summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dbaccess/inc/AsyncronousLink.hxx2
-rw-r--r--dbaccess/inc/IEnvironment.hxx80
-rw-r--r--dbaccess/inc/dataview.hxx11
-rw-r--r--dbaccess/inc/dbaccess_helpid.hrc862
-rw-r--r--dbaccess/inc/dbaccess_slotid.hrc3
-rwxr-xr-xdbaccess/inc/dbaundomanager.hxx103
-rw-r--r--dbaccess/inc/dbsubcomponentcontroller.hxx (renamed from dbaccess/inc/singledoccontroller.hxx)59
-rw-r--r--dbaccess/inc/genericcontroller.hxx2
-rw-r--r--dbaccess/prj/build.lst8
-rw-r--r--dbaccess/prj/d.lst6
-rw-r--r--dbaccess/qa/complex/dbaccess/ApplicationController.java46
-rw-r--r--dbaccess/qa/complex/dbaccess/Beamer.java106
-rw-r--r--dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java16
-rwxr-xr-xdbaccess/qa/complex/dbaccess/CopyTableInterActionHandler.java8
-rwxr-xr-xdbaccess/qa/complex/dbaccess/CopyTableWizard.java61
-rw-r--r--dbaccess/qa/complex/dbaccess/DataSource.java57
-rwxr-xr-xdbaccess/qa/complex/dbaccess/DatabaseApplication.java11
-rw-r--r--dbaccess/qa/complex/dbaccess/DatabaseDocument.java222
-rw-r--r--dbaccess/qa/complex/dbaccess/Parser.java45
-rw-r--r--dbaccess/qa/complex/dbaccess/PropertyBag.java123
-rw-r--r--dbaccess/qa/complex/dbaccess/Query.java42
-rw-r--r--dbaccess/qa/complex/dbaccess/QueryInQuery.java46
-rw-r--r--dbaccess/qa/complex/dbaccess/RowSet.java190
-rw-r--r--dbaccess/qa/complex/dbaccess/RowSetEventListener.java2
-rwxr-xr-xdbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java128
-rw-r--r--dbaccess/qa/complex/dbaccess/TestCase.java152
-rw-r--r--dbaccess/qa/complex/dbaccess/UISettings.java40
-rw-r--r--dbaccess/qa/complex/dbaccess/dbaccess.sce12
-rwxr-xr-xdbaccess/qa/complex/dbaccess/makefile.mk88
-rw-r--r--dbaccess/source/core/api/BookmarkSet.hxx2
-rw-r--r--dbaccess/source/core/api/CacheSet.cxx5
-rw-r--r--dbaccess/source/core/api/CacheSet.hxx3
-rw-r--r--dbaccess/source/core/api/KeySet.cxx12
-rw-r--r--dbaccess/source/core/api/KeySet.hxx3
-rw-r--r--dbaccess/source/core/api/OptimisticSet.cxx7
-rw-r--r--dbaccess/source/core/api/OptimisticSet.hxx3
-rw-r--r--dbaccess/source/core/api/RowSet.cxx20
-rw-r--r--dbaccess/source/core/api/RowSetBase.cxx3
-rw-r--r--dbaccess/source/core/api/RowSetCache.cxx17
-rw-r--r--dbaccess/source/core/api/RowSetCache.hxx5
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx2
-rw-r--r--dbaccess/source/core/api/StaticSet.cxx5
-rw-r--r--dbaccess/source/core/api/StaticSet.hxx4
-rw-r--r--dbaccess/source/core/api/WrappedResultSet.hxx2
-rw-r--r--dbaccess/source/core/api/query.cxx2
-rw-r--r--dbaccess/source/core/misc/dsntypes.cxx2
-rw-r--r--dbaccess/source/core/misc/services.cxx22
-rw-r--r--dbaccess/source/core/resource/strings.src2
-rw-r--r--dbaccess/source/ext/adabas/Acomponentmodule.cxx48
-rw-r--r--dbaccess/source/ext/adabas/Acomponentmodule.hxx17
-rw-r--r--dbaccess/source/ext/adabas/AdabasNewDb.cxx16
-rw-r--r--dbaccess/source/ext/adabas/AdabasNewDb.hxx6
-rw-r--r--dbaccess/source/ext/adabas/Aservices.cxx21
-rw-r--r--dbaccess/source/ext/adabas/adabasui.component34
-rw-r--r--dbaccess/source/ext/adabas/adabasui.dxp1
-rw-r--r--dbaccess/source/ext/adabas/exports.dxp1
-rw-r--r--dbaccess/source/ext/adabas/makefile.mk7
-rw-r--r--dbaccess/source/ext/macromigration/dbmm.component34
-rw-r--r--dbaccess/source/ext/macromigration/dbmm_types.cxx2
-rw-r--r--dbaccess/source/ext/macromigration/macromigration.src10
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationdialog.cxx4
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationdialog.hxx2
-rw-r--r--dbaccess/source/ext/macromigration/makefile.mk8
-rw-r--r--dbaccess/source/ext/macromigration/migrationlog.cxx4
-rw-r--r--dbaccess/source/ext/macromigration/rangeprogressbar.hxx2
-rw-r--r--dbaccess/source/filter/migration/cfgimport.cxx1180
-rw-r--r--dbaccess/source/filter/migration/cfgimport.hxx202
-rw-r--r--dbaccess/source/filter/migration/cfgservices.cxx111
-rw-r--r--dbaccess/source/filter/migration/makefile.mk73
-rw-r--r--dbaccess/source/filter/xml/dbaxml.component49
-rw-r--r--dbaccess/source/filter/xml/dbloader2.cxx2
-rw-r--r--dbaccess/source/filter/xml/makefile.mk8
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlExport.hxx2
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlservices.cxx22
-rw-r--r--dbaccess/source/inc/cfg_reghelper.hxx50
-rw-r--r--dbaccess/source/inc/cfgstrings.hrc99
-rw-r--r--dbaccess/source/inc/registrationhelper.hxx10
-rw-r--r--dbaccess/source/sdbtools/misc/sdbt_services.cxx21
-rw-r--r--dbaccess/source/shared/cfg_reghelper.cxx46
-rw-r--r--dbaccess/source/shared/cfgstrings.cxx93
-rw-r--r--dbaccess/source/shared/makefile.mk7
-rw-r--r--dbaccess/source/shared/registrationhelper.cxx48
-rw-r--r--dbaccess/source/ui/app/AppController.cxx4
-rw-r--r--dbaccess/source/ui/app/AppController.hxx2
-rw-r--r--dbaccess/source/ui/app/AppControllerGen.cxx4
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx57
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.hxx12
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx14
-rw-r--r--dbaccess/source/ui/app/AppDetailView.hxx14
-rw-r--r--dbaccess/source/ui/app/AppIconControl.cxx10
-rw-r--r--dbaccess/source/ui/app/AppSwapWindow.cxx10
-rw-r--r--dbaccess/source/ui/app/AppSwapWindow.hxx6
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.cxx4
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.hxx8
-rw-r--r--dbaccess/source/ui/app/AppView.cxx2
-rw-r--r--dbaccess/source/ui/app/app.src19
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx81
-rw-r--r--dbaccess/source/ui/browser/brwview.cxx4
-rw-r--r--dbaccess/source/ui/browser/dataview.cxx37
-rw-r--r--dbaccess/source/ui/browser/dbexchange.cxx2
-rw-r--r--dbaccess/source/ui/browser/dbtreemodel.hxx4
-rw-r--r--dbaccess/source/ui/browser/dsEntriesNoExp.cxx4
-rw-r--r--dbaccess/source/ui/browser/exsrcbrw.cxx2
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx18
-rw-r--r--dbaccess/source/ui/browser/sbabrw.src2
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx2
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx348
-rw-r--r--dbaccess/source/ui/control/ColumnControlWindow.cxx2
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx16
-rw-r--r--dbaccess/source/ui/control/RelationControl.cxx64
-rw-r--r--dbaccess/source/ui/control/TableGrantCtrl.cxx60
-rw-r--r--dbaccess/source/ui/control/charsetlistbox.cxx2
-rw-r--r--dbaccess/source/ui/control/curledit.cxx4
-rw-r--r--dbaccess/source/ui/control/dbtreelistbox.cxx42
-rw-r--r--dbaccess/source/ui/control/listviewitems.cxx2
-rw-r--r--dbaccess/source/ui/control/opendoccontrols.cxx14
-rw-r--r--dbaccess/source/ui/control/sqledit.cxx6
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx14
-rw-r--r--dbaccess/source/ui/control/toolboxcontroller.cxx22
-rw-r--r--dbaccess/source/ui/dlg/AdabasStat.cxx4
-rw-r--r--dbaccess/source/ui/dlg/AdabasStat.src7
-rw-r--r--dbaccess/source/ui/dlg/AutoControls_tmpl.hrc25
-rw-r--r--dbaccess/source/ui/dlg/CollectionView.cxx4
-rw-r--r--dbaccess/source/ui/dlg/CollectionView.src4
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx4
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.cxx10
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.hxx2
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.src7
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.cxx2
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.hxx4
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx12
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx32
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx8
-rw-r--r--dbaccess/source/ui/dlg/DriverSettings.cxx2
-rw-r--r--dbaccess/source/ui/dlg/ExtensionNotPresent.cxx208
-rw-r--r--dbaccess/source/ui/dlg/ExtensionNotPresent.hrc47
-rw-r--r--dbaccess/source/ui/dlg/ExtensionNotPresent.src81
-rw-r--r--dbaccess/source/ui/dlg/RelationDlg.cxx26
-rw-r--r--dbaccess/source/ui/dlg/RelationDlg.src1
-rw-r--r--dbaccess/source/ui/dlg/TablesSingleDlg.cxx5
-rw-r--r--dbaccess/source/ui/dlg/UserAdmin.src3
-rw-r--r--dbaccess/source/ui/dlg/UserAdminDlg.cxx2
-rw-r--r--dbaccess/source/ui/dlg/UserAdminDlg.src1
-rw-r--r--dbaccess/source/ui/dlg/admincontrols.cxx6
-rw-r--r--dbaccess/source/ui/dlg/admincontrols.hxx2
-rw-r--r--dbaccess/source/ui/dlg/adminpages.cxx29
-rw-r--r--dbaccess/source/ui/dlg/adminpages.hxx12
-rw-r--r--dbaccess/source/ui/dlg/adodatalinks.cxx4
-rw-r--r--dbaccess/source/ui/dlg/adtabdlg.cxx16
-rw-r--r--dbaccess/source/ui/dlg/adtabdlg.src5
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.cxx54
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.hrc2
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.hxx9
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.src22
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.cxx6
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.src25
-rw-r--r--dbaccess/source/ui/dlg/dbadmin2.src42
-rw-r--r--dbaccess/source/ui/dlg/dbadminsetup.src42
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.hxx2
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.src8
-rw-r--r--dbaccess/source/ui/dlg/dbwiz.cxx2
-rw-r--r--dbaccess/source/ui/dlg/detailpages.cxx14
-rw-r--r--dbaccess/source/ui/dlg/detailpages.hxx28
-rw-r--r--dbaccess/source/ui/dlg/directsql.cxx4
-rw-r--r--dbaccess/source/ui/dlg/directsql.src6
-rw-r--r--dbaccess/source/ui/dlg/dlgattr.cxx4
-rw-r--r--dbaccess/source/ui/dlg/dlgsave.cxx6
-rw-r--r--dbaccess/source/ui/dlg/dlgsave.src3
-rw-r--r--dbaccess/source/ui/dlg/dlgsize.src9
-rw-r--r--dbaccess/source/ui/dlg/dsselect.cxx6
-rw-r--r--dbaccess/source/ui/dlg/dsselect.hxx2
-rw-r--r--dbaccess/source/ui/dlg/dsselect.src4
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx4
-rw-r--r--dbaccess/source/ui/dlg/generalpage.hxx2
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.src3
-rw-r--r--dbaccess/source/ui/dlg/makefile.mk1
-rw-r--r--dbaccess/source/ui/dlg/odbcconfig.cxx10
-rw-r--r--dbaccess/source/ui/dlg/odbcconfig.hxx4
-rw-r--r--dbaccess/source/ui/dlg/paramdialog.src4
-rw-r--r--dbaccess/source/ui/dlg/queryfilter.src11
-rw-r--r--dbaccess/source/ui/dlg/queryorder.cxx2
-rw-r--r--dbaccess/source/ui/dlg/queryorder.src6
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx27
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.src1
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx4
-rw-r--r--dbaccess/source/ui/dlg/tablespage.hxx4
-rw-r--r--dbaccess/source/ui/dlg/textconnectionsettings.src1
-rw-r--r--dbaccess/source/ui/inc/ColumnControlWindow.hxx2
-rw-r--r--dbaccess/source/ui/inc/ConnectionLine.hxx4
-rw-r--r--dbaccess/source/ui/inc/ExtensionNotPresent.hxx85
-rw-r--r--dbaccess/source/ui/inc/FieldControls.hxx46
-rw-r--r--dbaccess/source/ui/inc/FieldDescControl.hxx24
-rw-r--r--dbaccess/source/ui/inc/GeneralUndo.hxx2
-rw-r--r--dbaccess/source/ui/inc/JoinController.hxx2
-rw-r--r--dbaccess/source/ui/inc/JoinTableView.hxx16
-rw-r--r--dbaccess/source/ui/inc/QueryTableView.hxx14
-rw-r--r--dbaccess/source/ui/inc/RTableConnectionData.hxx20
-rw-r--r--dbaccess/source/ui/inc/RelationControl.hxx4
-rw-r--r--dbaccess/source/ui/inc/RelationController.hxx2
-rw-r--r--dbaccess/source/ui/inc/RelationDlg.hxx4
-rw-r--r--dbaccess/source/ui/inc/RelationTableView.hxx4
-rw-r--r--dbaccess/source/ui/inc/TableConnection.hxx6
-rw-r--r--dbaccess/source/ui/inc/TableConnectionData.hxx10
-rw-r--r--dbaccess/source/ui/inc/TableController.hxx3
-rw-r--r--dbaccess/source/ui/inc/TableDesignControl.hxx24
-rw-r--r--dbaccess/source/ui/inc/TableDesignHelpBar.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableDesignView.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableGrantCtrl.hxx20
-rw-r--r--dbaccess/source/ui/inc/TableRow.hxx4
-rw-r--r--dbaccess/source/ui/inc/TableWindow.hxx28
-rw-r--r--dbaccess/source/ui/inc/TableWindowData.hxx8
-rw-r--r--dbaccess/source/ui/inc/TableWindowListBox.hxx8
-rw-r--r--dbaccess/source/ui/inc/TokenWriter.hxx18
-rw-r--r--dbaccess/source/ui/inc/UITools.hxx8
-rw-r--r--dbaccess/source/ui/inc/UserAdminDlg.hxx2
-rw-r--r--dbaccess/source/ui/inc/VertSplitView.hxx2
-rw-r--r--dbaccess/source/ui/inc/WCPage.hxx18
-rw-r--r--dbaccess/source/ui/inc/WColumnSelect.hxx2
-rw-r--r--dbaccess/source/ui/inc/adtabdlg.hxx2
-rw-r--r--dbaccess/source/ui/inc/advancedsettingsdlg.hxx2
-rw-r--r--dbaccess/source/ui/inc/brwctrlr.hxx13
-rw-r--r--dbaccess/source/ui/inc/charsetlistbox.hxx2
-rw-r--r--dbaccess/source/ui/inc/curledit.hxx6
-rw-r--r--dbaccess/source/ui/inc/dbadmin.hxx6
-rw-r--r--dbaccess/source/ui/inc/dbtreelistbox.hxx8
-rw-r--r--dbaccess/source/ui/inc/dbu_dlg.hrc22
-rw-r--r--dbaccess/source/ui/inc/dbu_resource.hrc2
-rw-r--r--dbaccess/source/ui/inc/dlgattr.hxx4
-rw-r--r--dbaccess/source/ui/inc/dlgsize.hxx2
-rw-r--r--dbaccess/source/ui/inc/dsitems.hxx3
-rw-r--r--dbaccess/source/ui/inc/dsmeta.hxx1
-rw-r--r--dbaccess/source/ui/inc/exsrcbrw.hxx2
-rw-r--r--dbaccess/source/ui/inc/imageprovider.hxx2
-rw-r--r--dbaccess/source/ui/inc/listviewitems.hxx2
-rw-r--r--dbaccess/source/ui/inc/moduledbu.hxx2
-rw-r--r--dbaccess/source/ui/inc/opendoccontrols.hxx4
-rw-r--r--dbaccess/source/ui/inc/propertystorage.hxx2
-rw-r--r--dbaccess/source/ui/inc/querycontroller.hxx2
-rw-r--r--dbaccess/source/ui/inc/queryfilter.hxx4
-rw-r--r--dbaccess/source/ui/inc/sbagrid.hxx2
-rwxr-xr-xdbaccess/source/ui/inc/singledoccontroller.hxx93
-rw-r--r--dbaccess/source/ui/inc/sqledit.hxx6
-rw-r--r--dbaccess/source/ui/inc/unodatbr.hxx12
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx14
-rw-r--r--dbaccess/source/ui/misc/HtmlReader.cxx12
-rw-r--r--dbaccess/source/ui/misc/RowSetDrop.cxx10
-rw-r--r--dbaccess/source/ui/misc/RtfReader.cxx10
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx54
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx6
-rw-r--r--dbaccess/source/ui/misc/WCPage.cxx6
-rw-r--r--dbaccess/source/ui/misc/WColumnSelect.cxx8
-rw-r--r--dbaccess/source/ui/misc/WNameMatch.cxx14
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx8
-rw-r--r--dbaccess/source/ui/misc/WizardPages.src30
-rwxr-xr-xdbaccess/source/ui/misc/dbaundomanager.cxx395
-rw-r--r--dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx672
-rw-r--r--dbaccess/source/ui/misc/dbumiscres.src2
-rw-r--r--dbaccess/source/ui/misc/dsmeta.cxx1
-rw-r--r--dbaccess/source/ui/misc/imageprovider.cxx12
-rw-r--r--dbaccess/source/ui/misc/linkeddocuments.cxx3
-rw-r--r--dbaccess/source/ui/misc/makefile.mk75
-rwxr-xr-x[-rw-r--r--]dbaccess/source/ui/misc/singledoccontroller.cxx690
-rw-r--r--dbaccess/source/ui/misc/uiservices.cxx22
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLine.cxx10
-rw-r--r--dbaccess/source/ui/querydesign/JoinController.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/JoinTableView.cxx134
-rw-r--r--dbaccess/source/ui/querydesign/QTableConnectionData.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/QTableConnectionData.hxx2
-rw-r--r--dbaccess/source/ui/querydesign/QTableWindow.hxx6
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx8
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx12
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx20
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx6
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx12
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx8
-rw-r--r--dbaccess/source/ui/querydesign/QueryTableView.cxx12
-rw-r--r--dbaccess/source/ui/querydesign/QueryTextView.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryViewSwitch.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx122
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx30
-rw-r--r--dbaccess/source/ui/querydesign/TableConnection.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/TableConnectionData.cxx20
-rw-r--r--dbaccess/source/ui/querydesign/TableWindow.cxx44
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowData.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowListBox.cxx24
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowTitle.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/querycontainerwindow.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx12
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.cxx20
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.hxx2
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.src1
-rw-r--r--dbaccess/source/ui/relationdesign/RTableConnectionData.cxx26
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx6
-rw-r--r--dbaccess/source/ui/relationdesign/RelationTableView.cxx18
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx6
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx38
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.hxx60
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx11
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignControl.cxx12
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignView.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldControl.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldControl.hxx6
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx6
-rw-r--r--dbaccess/source/ui/tabledesign/TableRowExchange.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.cxx28
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.hxx14
-rw-r--r--dbaccess/source/ui/tabledesign/table.src4
-rw-r--r--dbaccess/source/ui/uno/ColumnControl.cxx4
-rw-r--r--dbaccess/source/ui/uno/ColumnControl.hxx1
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx15
-rw-r--r--dbaccess/util/dba.component63
-rw-r--r--dbaccess/util/dbu.component116
-rw-r--r--dbaccess/util/hidother.src37
-rw-r--r--dbaccess/util/makefile.mk20
-rw-r--r--dbaccess/util/sdbt.component34
-rw-r--r--reportdesign/inc/ModuleHelper.hxx2
-rwxr-xr-x[-rw-r--r--]reportdesign/inc/ReportDefinition.hxx77
-rw-r--r--reportdesign/inc/RptDef.hxx18
-rw-r--r--reportdesign/inc/RptModel.hxx10
-rw-r--r--reportdesign/inc/RptObject.hxx20
-rw-r--r--reportdesign/inc/RptPage.hxx6
-rw-r--r--reportdesign/inc/UndoActions.hxx60
-rw-r--r--reportdesign/inc/helpids.hrc174
-rw-r--r--reportdesign/prj/build.lst5
-rw-r--r--reportdesign/prj/d.lst3
-rw-r--r--reportdesign/qa/complex/reportdesign/FileURL.java62
-rw-r--r--reportdesign/qa/complex/reportdesign/ReportDesignerTest.java (renamed from reportdesign/qa/complex/ReportDesignerTest.java)343
-rw-r--r--reportdesign/qa/complex/reportdesign/TestDocument.java41
-rwxr-xr-xreportdesign/qa/complex/reportdesign/makefile.mk (renamed from reportdesign/qa/complex/makefile.mk)44
-rw-r--r--reportdesign/qa/complex/reportdesign/mysql-connector-exists.pl (renamed from reportdesign/qa/complex/mysql-connector-exists.pl)0
-rwxr-xr-xreportdesign/qa/complex/reportdesign/runner.props (renamed from reportdesign/qa/complex/runner.props)0
-rwxr-xr-xreportdesign/qa/complex/reportdesign/test_documents/RPTCalcTests.odb (renamed from reportdesign/qa/complex/RPTCalcTests.odb)bin6715 -> 6715 bytes
-rwxr-xr-xreportdesign/qa/complex/reportdesign/test_documents/RPTWriterTests.odb (renamed from reportdesign/qa/complex/RPTWriterTests.odb)bin5886 -> 5762 bytes
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx176
-rw-r--r--reportdesign/source/core/api/services.cxx6
-rw-r--r--reportdesign/source/core/sdr/ReportDrawPage.cxx2
-rw-r--r--reportdesign/source/core/sdr/ReportUndoFactory.cxx10
-rw-r--r--reportdesign/source/core/sdr/RptModel.cxx8
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx22
-rw-r--r--reportdesign/source/core/sdr/RptPage.cxx16
-rw-r--r--reportdesign/source/core/sdr/UndoActions.cxx10
-rw-r--r--reportdesign/source/core/sdr/UndoEnv.cxx133
-rw-r--r--reportdesign/source/core/sdr/formatnormalizer.cxx4
-rw-r--r--reportdesign/source/filter/xml/xmlExport.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlExport.hxx2
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlservices.cxx8
-rw-r--r--reportdesign/source/ui/dlg/AddField.cxx34
-rw-r--r--reportdesign/source/ui/dlg/CondFormat.cxx10
-rw-r--r--reportdesign/source/ui/dlg/Condition.cxx26
-rw-r--r--reportdesign/source/ui/dlg/Condition.hxx2
-rw-r--r--reportdesign/source/ui/dlg/DateTime.src4
-rw-r--r--reportdesign/source/ui/dlg/Formula.cxx14
-rw-r--r--reportdesign/source/ui/dlg/GroupExchange.cxx2
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx91
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.src6
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx34
-rw-r--r--reportdesign/source/ui/dlg/Navigator.src5
-rw-r--r--reportdesign/source/ui/dlg/PageNumber.src6
-rw-r--r--reportdesign/source/ui/dlg/dlgpage.cxx2
-rw-r--r--reportdesign/source/ui/inc/CondFormat.hxx4
-rw-r--r--reportdesign/source/ui/inc/DesignView.hxx36
-rw-r--r--reportdesign/source/ui/inc/Formula.hxx8
-rw-r--r--reportdesign/source/ui/inc/FunctionHelper.hxx4
-rw-r--r--reportdesign/source/ui/inc/GeometryHandler.hxx2
-rw-r--r--reportdesign/source/ui/inc/GroupsSorting.hxx4
-rw-r--r--reportdesign/source/ui/inc/ReportController.hxx109
-rw-r--r--reportdesign/source/ui/inc/ReportRuler.hxx2
-rw-r--r--reportdesign/source/ui/inc/ReportSection.hxx8
-rw-r--r--reportdesign/source/ui/inc/ReportWindow.hxx16
-rw-r--r--reportdesign/source/ui/inc/RptUndo.hxx (renamed from reportdesign/source/ui/inc/Undo.hxx)8
-rw-r--r--reportdesign/source/ui/inc/ScrollHelper.hxx16
-rw-r--r--reportdesign/source/ui/inc/SectionWindow.hxx8
-rw-r--r--reportdesign/source/ui/inc/UITools.hxx2
-rw-r--r--reportdesign/source/ui/inc/ViewsWindow.hxx30
-rw-r--r--reportdesign/source/ui/inc/dlgedfunc.hxx20
-rw-r--r--reportdesign/source/ui/inc/dlgpage.hxx2
-rw-r--r--reportdesign/source/ui/inc/metadata.hxx4
-rw-r--r--reportdesign/source/ui/inspection/DataProviderHandler.cxx6
-rw-r--r--reportdesign/source/ui/inspection/DefaultInspection.cxx13
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx12
-rw-r--r--reportdesign/source/ui/inspection/ReportComponentHandler.cxx2
-rw-r--r--reportdesign/source/ui/inspection/metadata.cxx16
-rw-r--r--reportdesign/source/ui/misc/FunctionHelper.cxx8
-rw-r--r--reportdesign/source/ui/misc/RptUndo.cxx (renamed from reportdesign/source/ui/misc/Undo.cxx)13
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx26
-rw-r--r--reportdesign/source/ui/misc/makefile.mk2
-rw-r--r--reportdesign/source/ui/misc/rptuiservices.cxx8
-rw-r--r--reportdesign/source/ui/misc/statusbarcontroller.cxx6
-rw-r--r--reportdesign/source/ui/misc/toolboxcontroller.cxx10
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx48
-rw-r--r--reportdesign/source/ui/report/EndMarker.cxx10
-rw-r--r--reportdesign/source/ui/report/FixedTextColor.cxx2
-rw-r--r--reportdesign/source/ui/report/FormattedFieldBeautifier.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx435
-rw-r--r--reportdesign/source/ui/report/ReportRuler.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx28
-rw-r--r--reportdesign/source/ui/report/ReportWindow.cxx22
-rw-r--r--reportdesign/source/ui/report/ScrollHelper.cxx16
-rw-r--r--reportdesign/source/ui/report/SectionView.cxx18
-rw-r--r--reportdesign/source/ui/report/SectionWindow.cxx16
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx14
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx60
-rw-r--r--reportdesign/source/ui/report/dlgedfunc.cxx96
-rw-r--r--reportdesign/source/ui/report/propbrw.cxx6
-rw-r--r--reportdesign/source/ui/report/report.src24
-rw-r--r--reportdesign/util/hidother.src22
-rw-r--r--reportdesign/util/makefile.mk20
-rw-r--r--reportdesign/util/rpt.component58
-rw-r--r--reportdesign/util/rptui.component52
-rw-r--r--reportdesign/util/rptxml.component73
415 files changed, 6403 insertions, 7017 deletions
diff --git a/dbaccess/inc/AsyncronousLink.hxx b/dbaccess/inc/AsyncronousLink.hxx
index 93faab850163..3fff1f7deb20 100644
--- a/dbaccess/inc/AsyncronousLink.hxx
+++ b/dbaccess/inc/AsyncronousLink.hxx
@@ -50,7 +50,7 @@ namespace dbaui
protected:
::osl::Mutex m_aEventSafety;
::osl::Mutex m_aDestructionSafety;
- ULONG m_nEventId;
+ sal_uLong m_nEventId;
public:
/** constructs the object
diff --git a/dbaccess/inc/IEnvironment.hxx b/dbaccess/inc/IEnvironment.hxx
deleted file mode 100644
index 64ad54844912..000000000000
--- a/dbaccess/inc/IEnvironment.hxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 DBAUI_IENVIRONMENT_HXX
-#define DBAUI_IENVIRONMENT_HXX
-
-#include <com/sun/star/sdbc/SQLException.hpp>
-
-#include <connectivity/standardsqlstate.hxx>
-
-namespace dbtools
-{
- class SQLExceptionInfo;
-}
-
-namespace dbaui
-{
- // interface class for a generell environment
- class IEnvironment
- {
- public:
- /** appends an error in the current environment.
- */
- virtual void appendError(
- const ::rtl::OUString& _rErrorMessage,
- const ::dbtools::StandardSQLState _eSQLState = ::dbtools::SQL_GENERAL_ERROR,
- const sal_Int32 _nErrorCode = 1000
- ) = 0;
-
- /** clears the error state.
- */
- virtual void clearError() = 0;
-
- /** @retrun
- returns <TRUE/> when an error was set otherwise <FALSE/>
- */
- virtual sal_Bool hasError() const = 0;
-
- /** returns the current error
- */
- virtual const ::dbtools::SQLExceptionInfo& getError() const = 0;
-
- /** displays the current error, or does nothing if there is no current error
- */
- virtual void displayError() = 0;
-
- /** gives access to the currently used connection
- @return
- the currently used connection.
- */
- virtual const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& getConnection() const = 0;
- };
-}
-#endif // DBAUI_IENVIRONMENT_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/inc/dataview.hxx b/dbaccess/inc/dataview.hxx
index e3026f15ce56..813faa4a8dd4 100644
--- a/dbaccess/inc/dataview.hxx
+++ b/dbaccess/inc/dataview.hxx
@@ -28,12 +28,14 @@
#ifndef DBAUI_DATAVIEW_HXX
#define DBAUI_DATAVIEW_HXX
-#include <vcl/window.hxx>
+#include "dbaccessdllapi.h"
+
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <svtools/acceleratorexecute.hxx>
#include <sal/macros.h>
+#include <vcl/fixed.hxx>
+
#include <memory>
-#include "dbaccessdllapi.h"
class FixedLine;
class SvtMiscOptions;
@@ -46,7 +48,7 @@ namespace dbaui
protected:
IController& m_rController; // the controller in where we resides in
- FixedLine* m_pSeparator; // our separator above the toolbox (may be NULL)
+ FixedLine m_aSeparator;
::std::auto_ptr< ::svt::AcceleratorExecute> m_pAccel;
public:
@@ -71,9 +73,6 @@ namespace dbaui
*/
virtual void resizeControls(const Size& /*_rDiff*/) { Resize(); }
- void enableSeparator( const sal_Bool _bEnable = sal_True );
- sal_Bool isSeparatorEnabled() const { return NULL != m_pSeparator; }
-
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() { return m_xServiceFactory;}
// the default implementation simply calls resizeAll( GetSizePixel() )
diff --git a/dbaccess/inc/dbaccess_helpid.hrc b/dbaccess/inc/dbaccess_helpid.hrc
index 22d1ceb11368..29094bee1882 100644
--- a/dbaccess/inc/dbaccess_helpid.hrc
+++ b/dbaccess/inc/dbaccess_helpid.hrc
@@ -28,446 +28,440 @@
#ifndef _DBA_DBACCESS_HELPID_HRC_
#define _DBA_DBACCESS_HELPID_HRC_
-#ifndef _SOLAR_HRC
-#include <svl/solar.hrc> // HID_DBACCESS_START
-#endif
-
-#define HID_DSADMIN_CHARSET (HID_DBACCESS_START + 9)
-
-#define HID_DLG_FILTERCRIT (HID_DBACCESS_START + 15)
-#define HID_DLG_ORDERCRIT (HID_DBACCESS_START + 16)
-
-#define HID_DATABROWSE_HEADER (HID_DBACCESS_START + 17)
-#define HID_CTL_TABBROWSER (HID_DBACCESS_START + 18)
-#define UID_DATABROWSE_DATAWINDOW (HID_DBACCESS_START + 19)
-#define HID_CTL_TREEVIEW (HID_DBACCESS_START + 20)
-#define UID_CTL_CONTENT (HID_DBACCESS_START + 21)
-#define HID_TLB_TABBROWSER (HID_DBACCESS_START + 22)
-#define HID_TLB_TREELISTBOX (HID_DBACCESS_START + 23)
-#define HID_DSADMIN_DIALOG (HID_DBACCESS_START + 24)
-
-
-#define HID_DSADMIN_TABCONTROL (HID_DBACCESS_START + 27)
-#define HID_DSADMIN_PAGE_GENERAL (HID_DBACCESS_START + 28)
-#define HID_DSADMIN_PAGE_DBASE (HID_DBACCESS_START + 29)
-#define HID_DSADMIN_PAGE_JDBC (HID_DBACCESS_START + 30)
-#define HID_DSADMIN_PAGE_ODBC (HID_DBACCESS_START + 31)
-#define HID_DSADMIN_PAGE_ADABAS (HID_DBACCESS_START + 32)
-#define HID_DSADMIN_PAGE_TEXT (HID_DBACCESS_START + 33)
-#define HID_DSADMIN_TABLE_SUBSCRIPTION (HID_DBACCESS_START + 34)
-#define HID_DSADMIN_DSACTIONS_NEWDS (HID_DBACCESS_START + 35)
-#define HID_DSADMIN_DSACTIONS_DELETEDS (HID_DBACCESS_START + 36)
-#define HID_DSADMIN_DSACTIONS_RESTOREDS (HID_DBACCESS_START + 37)
-#define HID_DSADMIN_DSNAME (HID_DBACCESS_START + 38)
-#define HID_DSADMIN_DSTYPE (HID_DBACCESS_START + 39)
-#define HID_DSADMIN_URL_GENERAL (HID_DBACCESS_START + 40)
-#define HID_DSADMIN_BROWSECONN (HID_DBACCESS_START + 41)
-#define HID_DSADMIN_LOGINTIMEOUT_NUMBER (HID_DBACCESS_START + 42)
-#define HID_DSADMIN_LOGINTIMEOUT_UNIT (HID_DBACCESS_START + 43)
-#define HID_DSADMIN_SHOWDELETED (HID_DBACCESS_START + 44)
-#define HID_DSADMIN_ALLOWLONG (HID_DBACCESS_START + 45)
-#define HID_DSADMIN_DBASE_INDICIES (HID_DBACCESS_START + 46)
-#define HID_DSADMIN_DRIVERCLASS (HID_DBACCESS_START + 47)
-#define HID_DSADMIN_ODBC_OPTIONS (HID_DBACCESS_START + 48)
-#define HID_DSADMIN_TEXT_HEADER (HID_DBACCESS_START + 49)
-#define HID_DSADMIN_FIELD_SEPARATOR (HID_DBACCESS_START + 50)
-#define HID_DSADMIN_TEXT_SEPARATOR (HID_DBACCESS_START + 51)
-#define HID_DSADMIN_DECIMAL_SEPARATOR (HID_DBACCESS_START + 52)
-#define HID_DSADMIN_THOUSANDS_SEPARATOR (HID_DBACCESS_START + 53)
-#define HID_DSADMIN_EXTENSION (HID_DBACCESS_START + 54)
-#define HID_DSADMIN_ALL_TABLES (HID_DBACCESS_START + 55)
-#define HID_DSADMIN_NO_TABLES (HID_DBACCESS_START + 56)
-#define HID_DSADMIN_SELECT_TABLES (HID_DBACCESS_START + 57)
-#define HID_DSADMIN_TABLE_SELECTOR (HID_DBACCESS_START + 58)
-#define HID_DSADMIN_SUPPRESS_VERSIONCL (HID_DBACCESS_START + 59)
-
-#define HID_GENERIC_SQL_ERROR (HID_DBACCESS_START + 60)
-
-#define HID_BROWSER_COLUMNFORMAT (HID_DBACCESS_START + 61)
-#define HID_BROWSER_COLUMNWIDTH (HID_DBACCESS_START + 62)
-#define HID_BROWSER_TABLEFORMAT (HID_DBACCESS_START + 63)
-#define HID_BROWSER_ROWHEIGHT (HID_DBACCESS_START + 64)
-#define HID_BROWSER_EDIT_DATABASE (HID_DBACCESS_START + 65)
-#define HID_BROWSER_CLOSECONN (HID_DBACCESS_START + 66)
-#define HID_BROWSER_REFRESHCONN (HID_DBACCESS_START + 67)
-
-#define HID_DLG_ROWHEIGHT (HID_DBACCESS_START + 68)
-#define HID_DLG_COLWIDTH (HID_DBACCESS_START + 69)
-
-
-#define HID_TLB_QUERYDESIGN (HID_DBACCESS_START + 70)
-#define HID_CTL_QRYSQLEDIT (HID_DBACCESS_START + 71)
-#define HID_DSADMIN_SPECIAL_MESSAGE (HID_DBACCESS_START + 72)
-
-#define HID_BROWSER_QUERY_CREATE_TEXT (HID_DBACCESS_START + 73)
-
-#define HID_DLG_ERROR (HID_DBACCESS_START + 74)
-#define HID_DLG_TEXT (HID_DBACCESS_START + 75)
-#define UID_SQLERROR_BUTTONMORE (HID_DBACCESS_START + 76)
-#define HID_DLG_SAVE_AS (HID_DBACCESS_START + 77)
-
-#define HID_BROWSER_QUERY_EDIT (HID_DBACCESS_START + 78)
-#define HID_BROWSER_QUERY_DELETE (HID_DBACCESS_START + 79)
-
-#define HID_DSADMIN_USER_ADO (HID_DBACCESS_START + 80)
-#define HID_DSADMIN_PWDREC_ADO (HID_DBACCESS_START + 81)
-#define HID_DSADMIN_CONNURL_ADOPAGE (HID_DBACCESS_START + 82)
-#define HID_DSADMIN_PAGE_ADO (HID_DBACCESS_START + 83)
-
-
-#define HID_JOINSH_ADDTAB_CLOSE (HID_DBACCESS_START + 84)
-#define HID_JOINSH_ADDTAB_TABLELIST (HID_DBACCESS_START + 85)
-#define HID_CTL_QRYDGNTAB (HID_DBACCESS_START + 86)
-#define HID_DLG_QRY_JOIN (HID_DBACCESS_START + 87)
-#define HID_DLG_QRY_JOINTYPE (HID_DBACCESS_START + 88)
-#define HID_JOINSH_ADDTAB_QUERYLIST (HID_DBACCESS_START + 89)
-#define HID_DLG_QRY_HELPTEXT (HID_DBACCESS_START + 92)
-
-#define HID_CTL_QRYDGNCRIT (HID_DBACCESS_START + 93)
-#define HID_QRYDGN_ROW_VISIBLE (HID_DBACCESS_START + 94)
-#define HID_QRYDGN_ROW_TABLE (HID_DBACCESS_START + 95)
-#define HID_QRYDGN_ROW_FIELD (HID_DBACCESS_START + 96)
-#define HID_QRYDGN_ROW_ORDER (HID_DBACCESS_START + 97)
-#define HID_QRYDGN_ROW_FUNCTION (HID_DBACCESS_START + 98)
-#define HID_QRYDGN_ROW_ALIAS (HID_DBACCESS_START + 99)
-#define HID_QRYDGN_ROW_CRIT (HID_DBACCESS_START + 100)
-
-#define HID_QUERY_FUNCTION (HID_DBACCESS_START + 101)
-#define HID_QUERY_TABLENAME (HID_DBACCESS_START + 102)
-#define HID_QUERY_ALIASNAME (HID_DBACCESS_START + 103)
-#define HID_QUERY_DISTINCT (HID_DBACCESS_START + 104)
-
-#define HID_BROWSER_QUERY_CREATE_DESIGN (HID_DBACCESS_START + 105)
-
-#define HID_DSADMIN_QUERIES (HID_DBACCESS_START + 106)
-#define HID_DSADMIN_QUERIES_NEW (HID_DBACCESS_START + 107)
-#define HID_DSADMIN_QUERIES_EDIT (HID_DBACCESS_START + 108)
-#define HID_DSADMIN_QUERIES_DELETE (HID_DBACCESS_START + 109)
-#define HID_DSADMIN_QUERYADMINISTRATION (HID_DBACCESS_START + 110)
-
-
-#define HID_TAB_DESIGN_TABLE_DESC (HID_DBACCESS_START + 111)
-#define HID_TAB_DESIGN_FIELDCONTROL (HID_DBACCESS_START + 112)
-#define HID_TABLE_DESIGN_HELP_WINDOW (HID_DBACCESS_START + 113)
-#define HID_TAB_DESIGN_DESCWIN (HID_DBACCESS_START + 114)
-#define HID_TAB_DESIGN_TABLE_PROPS (HID_DBACCESS_START + 115)
-#define HID_TABDESIGN_BACKGROUND (HID_DBACCESS_START + 116)
-#define HID_CTL_TABLEEDIT (HID_DBACCESS_START + 117)
-#define HID_TABDESIGN_NAMECELL (HID_DBACCESS_START + 118)
-#define HID_TABDESIGN_TYPECELL (HID_DBACCESS_START + 119)
-#define HID_TABDESIGN_COMMENTCELL (HID_DBACCESS_START + 120)
-#define SID_TABLEDESIGN_INSERTROWS (HID_DBACCESS_START + 121)
-#define SID_TABLEDESIGN_TABED_PRIMARYKEY (HID_DBACCESS_START + 122)
-#define HID_TLB_TABLEDESIGN (HID_DBACCESS_START + 123)
-#define HID_TAB_DESIGN_HELP_TEXT_FRAME (HID_DBACCESS_START + 124)
-#define HID_TABLE_DESIGN_TABPAGE_GENERAL (HID_DBACCESS_START + 125)
-#define HID_TAB_ENT_DEFAULT (HID_DBACCESS_START + 126)
-#define HID_TAB_ENT_FORMAT_SAMPLE (HID_DBACCESS_START + 127)
-#define HID_TAB_ENT_FORMAT (HID_DBACCESS_START + 128)
-#define HID_TAB_ENT_BOOL_DEFAULT (HID_DBACCESS_START + 129)
-#define HID_TAB_ENT_REQUIRED (HID_DBACCESS_START + 130)
-#define HID_TAB_ENT_AUTOINCREMENT (HID_DBACCESS_START + 131)
-#define HID_TAB_ENT_TEXT_LEN (HID_DBACCESS_START + 132)
-#define HID_TAB_ENT_TYPE (HID_DBACCESS_START + 133)
-#define HID_TAB_ENT_COLUMNNAME (HID_DBACCESS_START + 134)
-#define HID_TAB_ENT_NUMTYP (HID_DBACCESS_START + 135)
-#define HID_TAB_ENT_LEN (HID_DBACCESS_START + 136)
-#define HID_TAB_ENT_SCALE (HID_DBACCESS_START + 137)
-#define HID_BROWSER_TABLE_CREATE_DESIGN (HID_DBACCESS_START + 138)
-#define HID_BROWSER_TABLE_EDIT (HID_DBACCESS_START + 139)
-#define HID_BROWSER_TABLE_DELETE (HID_DBACCESS_START + 140)
-#define HID_SQLERROR_EXCHAIN_ERRORS (HID_DBACCESS_START + 141)
-#define HID_SQLERROR_EXCHAIN_TEXT (HID_DBACCESS_START + 142)
-#define HID_TAB_WIZ_COLUMN_SELECT (HID_DBACCESS_START + 146)
-#define HID_TAB_WIZ_TYPE_SELECT (HID_DBACCESS_START + 147)
-#define HID_TAB_NAMEMATCHING_COLS_AVAIL (HID_DBACCESS_START + 148)
-#define HID_TAB_NAMEMATCHING_COLS_ASSIGN (HID_DBACCESS_START + 149)
-#define HID_TAB_WIZ_COPYTABLE (HID_DBACCESS_START + 150)
-#define HID_TAB_WIZ_TABLENAME_EDIT (HID_DBACCESS_START + 151)
-#define HID_CTL_RELATIONTAB (HID_DBACCESS_START + 152)
-#define HID_TLB_RELATIONDESIGN (HID_DBACCESS_START + 153)
-#define HID_RELATIONDIALOG_LEFTFIELDCELL (HID_DBACCESS_START + 154)
-#define HID_RELATIONDIALOG_RIGHTFIELDCELL (HID_DBACCESS_START + 155)
-#define HID_RELDLG_KEYFIELDS (HID_DBACCESS_START + 156)
-#define HID_BROWSER_RELATION_DESIGN (HID_DBACCESS_START + 157)
-#define HID_TABLE_DESIGN_NO_CONNECTION (HID_DBACCESS_START + 158)
-#define HID_DSADMIN_CREATEDATABASE (HID_DBACCESS_START + 159)
-#define HID_BROWSER_COLUMNINFO (HID_DBACCESS_START + 160)
-#define HID_DSADMIN_USECATALOG (HID_DBACCESS_START + 161)
-#define HID_BROWSER_VIEW_CREATE_DESIGN (HID_DBACCESS_START + 162)
-#define HID_DSADMIN_DOCUMENTS (HID_DBACCESS_START + 166)
-#define HID_DSADMIN_DOCUMENTLINKS (HID_DBACCESS_START + 167)
-#define HID_DSADMIN_FILTER_EXPLANATION (HID_DBACCESS_START + 168)
-#define HID_CONFIRM_DROP_BUTTON_ALL (HID_DBACCESS_START + 169)
-#define HID_DSBROWSER_BOOKMARK_SELECTED (HID_DBACCESS_START + 170)
-#define HID_DSADMIN_TABLE_TOOLBOX (HID_DBACCESS_START + 171)
-#define HID_DSADMIN_QUERY_TOOLBOX (HID_DBACCESS_START + 172)
-#define HID_DSADMIN_BOOKMARK_TOOLBOX (HID_DBACCESS_START + 173)
-#define HID_DSADMIN_PAGE_LDAP (HID_DBACCESS_START + 174)
-#define HID_DSADMIN_LDAP_HOSTNAME (HID_DBACCESS_START + 175)
-#define HID_DSADMIN_LDAP_BASEDN (HID_DBACCESS_START + 176)
-#define HID_DSADMIN_LDAP_PORTNUMBER (HID_DBACCESS_START + 177)
-#define HID_DSBROWSER_BOOKMARKSELECTED (HID_DBACCESS_START + 178)
-#define HID_DSBROWSER_DISCONNECTING (HID_DBACCESS_START + 179)
-#define HID_TAB_PAGE_USERADMIN (HID_DBACCESS_START + 180)
-#define HID_TAB_PAGE_PBUSER (HID_DBACCESS_START + 181)
-#define HID_TAB_PAGE_PBCHGPWD (HID_DBACCESS_START + 182)
-#define HID_TAB_PAGE_PBUSERDELETE (HID_DBACCESS_START + 183)
-#define HID_TAB_PAGE_TBLGRANTS (HID_DBACCESS_START + 184)
-#define HID_TAB_PAGE_LBUSER (HID_DBACCESS_START + 185)
-#define HID_DSBROWSER_DIRECTSQL (HID_DBACCESS_START + 186)
-#define HID_DSADMIN_LDAP_ROWCOUNT (HID_DBACCESS_START + 187)
-#define HID_BROWSER_QUERY_EDITSQL (HID_DBACCESS_START + 189)
-#define HID_DSADMIN_PAGE_MOZILLA (HID_DBACCESS_START + 190)
-#define HID_DSADMIN_MOZILLA_PROFILE_NAME (HID_DBACCESS_START + 191)
-#define HID_DSADMIN_THUNDERBIRD_PROFILE_NAME (HID_DBACCESS_START + 192)
-#define HID_BROWSER_OPEN_DOCUMENT (HID_DBACCESS_START + 193)
-#define HID_BROWSER_EDIT_DOCUMENT (HID_DBACCESS_START + 194)
-#define HID_BROWSER_BEW_DOCUMENT (HID_DBACCESS_START + 195)
-#define HID_DLG_PASSWORD (HID_DBACCESS_START + 196)
-
-#define HID_DLGIDX_NEWINDEX (HID_DBACCESS_START + 197)
-#define HID_DLGIDX_DROPINDEX (HID_DBACCESS_START + 198)
-#define HID_DLGIDX_RENAMEINDEX (HID_DBACCESS_START + 199)
-#define HID_DLGIDX_SAVEINDEX (HID_DBACCESS_START + 200)
-#define HID_DLGIDX_RESETINDEX (HID_DBACCESS_START + 201)
-#define HID_DLGIDX_INDEXLIST (HID_DBACCESS_START + 202)
-#define UID_DLGINDEX_INDEXDETAILS_BACK (HID_DBACCESS_START + 203)
-#define UID_DLGINDEX_INDEXDETAILS_MAIN (HID_DBACCESS_START + 204)
-#define HID_DLGINDEX_INDEXDETAILS_FIELD (HID_DBACCESS_START + 205)
-#define HID_DLGINDEX_INDEXDETAILS_SORTORDER (HID_DBACCESS_START + 206)
-
-#define HID_DOCLINKEDIT_URL (HID_DBACCESS_START + 207)
-#define HID_QUERY_SQLMODE (HID_DBACCESS_START + 208)
-
-#define HID_BROWSER_REFRESH_REBUILDVIEW (HID_DBACCESS_START + 209)
-#define HID_BROWSER_RENAME_ENTRY (HID_DBACCESS_START + 210)
-
-#define HID_QUERY_EDIT_JOINCONNECTION (HID_DBACCESS_START + 211)
-
-#define HID_DLG_QRY_WINDOW_CONTROL (HID_DBACCESS_START + 212)
-#define HID_DLG_QRY_LEFT_TABLE (HID_DBACCESS_START + 213)
-#define HID_DLG_QRY_RIGHT_TABLE (HID_DBACCESS_START + 214)
-
-#define HID_DLG_REL_CASC_DEL (HID_DBACCESS_START + 215)
-#define HID_DLG_REL_NO_CASC_DEL (HID_DBACCESS_START + 216)
-#define HID_DLG_REL_CASC_DEL_NULL (HID_DBACCESS_START + 217)
-#define HID_DLG_REL_CASC_DEL_DEFAULT (HID_DBACCESS_START + 218)
-
-#define HID_DLG_REL_CASC_UPD (HID_DBACCESS_START + 219)
-#define HID_DLG_REL_NO_CASC_UPD (HID_DBACCESS_START + 220)
-#define HID_DLG_REL_CASC_UPD_NULL (HID_DBACCESS_START + 221)
-#define HID_DLG_REL_CASC_UPD_DEFAULT (HID_DBACCESS_START + 222)
-#define HID_BROWSER_SAVE_RECORD (HID_DBACCESS_START + 223)
-#define HID_BROWSER_UNDO_RECORD (HID_DBACCESS_START + 224)
-
-#define HID_DSADMIN_SQL92CHECK (HID_DBACCESS_START + 225)
-#define HID_DSADMIN_AUTOINCREMENTVALUE (HID_DBACCESS_START + 226)
-#define HID_DOCUMENT_CREATE_REPWIZ (HID_DBACCESS_START + 227)
-#define HID_TAB_AUTOINCREMENTVALUE (HID_DBACCESS_START + 228)
-#define HID_DSADMIN_RETRIEVE_AUTO (HID_DBACCESS_START + 229)
-#define HID_DSADMIN_AUTORETRIEVEENABLED (HID_DBACCESS_START + 230)
-
-#define HID_DSADMIN_PAGE_MYSQL_ODBC (HID_DBACCESS_START + 231)
-#define HID_TAB_PAGE_TABLEPRIVILEGES (HID_DBACCESS_START + 232)
-
-#define HID_DSADMIN_PAGE_USERDRIVER (HID_DBACCESS_START + 233)
-#define HID_DSADMIN_USER_DEFINED (HID_DBACCESS_START + 234)
-#define HID_DSADMIN_USERDEF_OPTIONS (HID_DBACCESS_START + 235)
-#define HID_DSADMIN_CHARSET_USERDEF (HID_DBACCESS_START + 236)
-#define HID_DSADMIN_USER_LDAP (HID_DBACCESS_START + 237)
-#define HID_DSADMIN_PWDREC_LDAP (HID_DBACCESS_START + 238)
-#define HID_DSADMIN_USESSL_LDAP (HID_DBACCESS_START + 239)
-#define HID_BROWSER_QUERY_WIZARD (HID_DBACCESS_START + 237)
-
-#define HID_DLG_RENAME (HID_DBACCESS_START + 237)
-
-#define HID_DSADMIN_PAGE_MYSQL_JDBC (HID_DBACCESS_START + 238)
-
-#define HID_DSADMIN_DBASE_PATH (HID_DBACCESS_START + 239)
-#define HID_DSADMIN_MYSQL_DATABASE (HID_DBACCESS_START + 240)
-#define HID_DSADMIN_MYSQL_ODBC_DATASOURCE (HID_DBACCESS_START + 241)
-#define HID_DSADMIN_ODBC_DATASOURCE (HID_DBACCESS_START + 242)
-#define HID_DSADMIN_ADABAS_DATABASE (HID_DBACCESS_START + 243)
-#define HID_DSADMIN_MSACCESS_MDB_FILE (HID_DBACCESS_START + 244)
-#define HID_DSADMIN_PAGE_MSACCESS (HID_DBACCESS_START + 245)
-#define HID_DSADMIN_FLAT_PATH (HID_DBACCESS_START + 246)
-#define HID_DSADMIN_CALC_PATH (HID_DBACCESS_START + 247)
-#define HID_DSADMIN_ADVANCED (HID_DBACCESS_START + 248)
-#define HID_DSADMIN_BOOLEANCOMPARISON (HID_DBACCESS_START + 249)
-#define HID_DSADMIN_ORACLE_DATABASE (HID_DBACCESS_START + 250)
-
-#define UID_APP_VIEW (HID_DBACCESS_START + 251)
-#define HID_APP_TABLE_TREE (HID_DBACCESS_START + 252)
-#define HID_APP_FORM_TREE (HID_DBACCESS_START + 253)
-#define HID_APP_QUERY_TREE (HID_DBACCESS_START + 254)
-#define HID_APP_REPORT_TREE (HID_DBACCESS_START + 255)
-#define UID_APP_DETAIL_VIEW (HID_DBACCESS_START + 256)
-#define UID_APP_VIEW_VERT_SPLIT (HID_DBACCESS_START + 257)
-#define UID_APP_VIEW_BORDER_WIN (HID_DBACCESS_START + 258)
-#define HID_APP_CREATION_LIST (HID_DBACCESS_START + 259)
-#define UID_APP_SWAP_VIEW (HID_DBACCESS_START + 260)
-#define UID_DLG_TABLE_FILTER (HID_DBACCESS_START + 261)
-#define HID_APP_SWAP_ICONCONTROL (HID_DBACCESS_START + 262)
-
-#define HID_DSADMIN_APPENDTABLEALIAS (HID_DBACCESS_START + 263)
-#define HID_DSADMIN_PARAMETERNAMESUBST (HID_DBACCESS_START + 264)
-#define HID_DSADMIN_IGNOREDRIVER_PRIV (HID_DBACCESS_START + 265)
-#define HID_DSADMIN_HOSTNAME (HID_DBACCESS_START + 266)
-#define HID_DSADMIN_PORTNUMBER (HID_DBACCESS_START + 267)
-
-#define HID_APP_HELP_TEXT (HID_DBACCESS_START + 268)
-#define HID_EXPLORERDLG_COLLECTION (HID_DBACCESS_START + 269)
-#define UID_APP_DATABASE_VIEW (HID_DBACCESS_START + 270)
-#define UID_APP_TASKS_VIEW (HID_DBACCESS_START + 271)
-#define UID_APP_CONTAINER_VIEW (HID_DBACCESS_START + 272)
-#define UID_APP_TASKS_WINDOW (HID_DBACCESS_START + 273)
-#define HID_APP_DESCRIPTION_TEXT (HID_DBACCESS_START + 274)
-#define UID_APP_DETAILPAGE_HELPER (HID_DBACCESS_START + 275)
-#define HID_APP_VIEW_PREVIEW_CB (HID_DBACCESS_START + 276)
-#define HID_APP_VIEW_PREVIEW_1 (HID_DBACCESS_START + 277)
-#define HID_APP_VIEW_PREVIEW_2 (HID_DBACCESS_START + 278)
-#define HID_TABDESIGN_HELPTEXT (HID_DBACCESS_START + 279)
-#define UID_APP_VIEW_HORZ_SPLIT (HID_DBACCESS_START + 280)
-#define UID_APP_VIEW_PREVIEW_1 (HID_DBACCESS_START + 281)
-#define HID_APP_VIEW_PREVIEW_3 (HID_DBACCESS_START + 282)
-
-#define HID_DSADMIN_TYPE_DIALOG (HID_DBACCESS_START + 283)
-#define HID_DSADMIN_ENABLEOUTERJOIN (HID_DBACCESS_START + 284)
-#define HID_DSADMIN_ADABASADMIN (HID_DBACCESS_START + 285)
-#define HID_DSADMIN_USERADMIN (HID_DBACCESS_START + 286)
-
-#define HID_DBWIZ_PREVIOUS (HID_DBACCESS_START + 287)
-#define HID_DBWIZ_NEXT (HID_DBACCESS_START + 288)
-#define HID_DBWIZ_CANCEL (HID_DBACCESS_START + 289)
-#define HID_DBWIZ_FINISH (HID_DBACCESS_START + 290)
-#define UID_DBWIZ_HELP (HID_DBACCESS_START + 291)
-
-#define HID_DSADMIN_CATALOG (HID_DBACCESS_START + 292)
-#define HID_DSADMIN_SCHEMA (HID_DBACCESS_START + 293)
-#define HID_DSADMIN_IGNOREINDEXAPPENDIX (HID_DBACCESS_START + 294)
-#define HID_DSADMIN_DOSLINEENDS (HID_DBACCESS_START + 295)
-
-#define HID_BROWSER_ADMINISTRATE (HID_DBACCESS_START + 296)
-
-#define HID_DSADMIN_AS_BEFORE_CORRELATION_NAME (HID_DBACCESS_START + 297)
-#define HID_DSADMIN_CHECK_REQUIRED_FIELDS (HID_DBACCESS_START + 298)
-#define HID_DSADMIN_ESCAPE_DATETIME (HID_DBACCESS_START + 299)
-
-#define HID_PAGE_DBWIZARD_GENERALPAGE (HID_DBACCESS_START + 300)
-#define HID_PAGE_DBWIZARD_GENERAL_RB_CREATEDBDATABASE (HID_DBACCESS_START + 301)
-#define HID_PAGE_DBWIZARD_GENERAL_RB_GETEXISTINGDATABASE (HID_DBACCESS_START + 302)
-
-#define HID_PAGE_DBWIZARD_DBASE_ET_DBASELOCATION (HID_DBACCESS_START + 304)
-#define HID_PAGE_DBWIZARD_DBASE_PB_DBASELOCATION (HID_DBACCESS_START + 305)
-
-
-#define HID_PAGE_DBWIZARD_TEXT_RB_ACCESSTXTFILES (HID_DBACCESS_START + 307)
-#define HID_PAGE_DBWIZARD_TEXT_RB_ACCESSCSVFILES (HID_DBACCESS_START + 308)
-#define HID_PAGE_DBWIZARD_TEXT_RB_ACCESSOTHERFILES (HID_DBACCESS_START + 309)
-#define HID_PAGE_DBWIZARD_TEXT_ET_OWNEXTENSION (HID_DBACCESS_START + 310)
-
-
-#define HID_PAGE_DBWIZARD_TEXT_ET_LOCATIONTEXTFILE (HID_DBACCESS_START + 311)
-#define HID_PAGE_DBWIZARD_TEXT_PB_LOCATIONTEXTFILE (HID_DBACCESS_START + 312)
-#define HID_PAGE_DBWIZARD_TEXT_CB_FIELDSEPARATOR (HID_DBACCESS_START + 313)
-#define HID_PAGE_DBWIZARD_TEXT_CB_TEXTSEPARATOR (HID_DBACCESS_START + 314)
-#define HID_PAGE_DBWIZARD_TEXT_CB_DECIMALSEPARATOR (HID_DBACCESS_START + 315)
-#define HID_PAGE_DBWIZARD_TEXT_CB_THOUSANDSSEPARATOR (HID_DBACCESS_START + 316)
-
-#define HID_PAGE_DBWIZARD_MSACCESS_ET_MSACCESSLOCATION (HID_DBACCESS_START + 317)
-#define HID_PAGE_DBWIZARD_MSACCESS_PB_MSACCESSLOCATION (HID_DBACCESS_START + 318)
-
-#define HID_PAGE_DBWIZARD_LDAP_ET_HOSTSERVER (HID_DBACCESS_START + 319)
-#define HID_PAGE_DBWIZARD_LDAP_ET_BASEDN (HID_DBACCESS_START + 320)
-#define HID_PAGE_DBWIZARD_LDAP_ET_PORTNUMBER (HID_DBACCESS_START + 321)
-#define HID_PAGE_DBWIZARD_LDAP_CB_USESSL (HID_DBACCESS_START + 322)
-#define HID_PAGE_DBWIZARD_LDAP_PB_TESTLDAPCONNECTION (HID_DBACCESS_START + 323)
-
-#define HID_PAGE_DBWIZARD_ADABAS_ET_ADABASNAME (HID_DBACCESS_START + 326)
-#define HID_PAGE_DBWIZARD_ADABAS_PB_ADABASNAME (HID_DBACCESS_START + 327)
-
-#define HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAODBC (HID_DBACCESS_START + 329)
-#define HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAJDBC (HID_DBACCESS_START + 330)
-
-#define HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEDBNAME (HID_DBACCESS_START + 333)
-#define HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEHOSTSERVER (HID_DBACCESS_START + 334)
-#define HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEPORT (HID_DBACCESS_START + 335)
-#define HID_PAGE_DBWIZARD_ORACLE_ET_ORACLECLASS (HID_DBACCESS_START + 336)
-#define HID_PAGE_DBWIZARD_ORACLE_PB_TESTORACLECLASS (HID_DBACCESS_START + 337)
-
-#define HID_PAGE_DBWIZARD_JDBC_ET_JDBCURL (HID_DBACCESS_START + 340)
-#define HID_PAGE_DBWIZARD_JDBC_PB_JDBCURL (HID_DBACCESS_START + 341)
-
-#define HID_PAGE_DBWIZARD_JDBC_ET_JDBCCLASS (HID_DBACCESS_START + 342)
-#define HID_PAGE_DBWIZARD_JDBC_PB_TESTJDBCCLASS (HID_DBACCESS_START + 343)
-
-#define HID_PAGE_DBWIZARD_JDBC_ET_MYSQLDBNAME (HID_DBACCESS_START + 344)
-#define HID_PAGE_DBWIZARD_JDBC_ET_MYSQLHOSTSERVER (HID_DBACCESS_START + 345)
-#define HID_PAGE_DBWIZARD_JDBC_ET_MYSQLPORT (HID_DBACCESS_START + 346)
-#define HID_PAGE_DBWIZARD_JDBC_ET_MYSQLCLASS (HID_DBACCESS_START + 347)
-#define HID_PAGE_DBWIZARD_JDBC_PB_TESTMYSQLCLASS (HID_DBACCESS_START + 348)
-
-
-#define HID_PAGE_DBWIZARD_ADO_ET_ADOURL (HID_DBACCESS_START + 349)
-#define HID_PAGE_DBWIZARD_ADO_PB_ADOURL (HID_DBACCESS_START + 350)
-#define HID_PAGE_DBWIZARD_ADO_PB_TESTADOCONNECTION (HID_DBACCESS_START + 351)
-
-#define HID_PAGE_DBWIZARD_ODBC_ET_NAMEOFODBCDATASOURCE (HID_DBACCESS_START + 355)
-#define HID_PAGE_DBWIZARD_ODBC_PB_NAMEOFODBCDATASOURCE (HID_DBACCESS_START + 356)
-
-#define HID_PAGE_DBWIZARD_SPREADSHEET_ET_SPREADSHEETPATH (HID_DBACCESS_START + 359)
-#define HID_PAGE_DBWIZARD_SPREADSHEET_PB_SPREADSHEETPATH (HID_DBACCESS_START + 360)
-#define HID_PAGE_DBWIZARD_SPREADSHEET_CB_SPREADSHEETPASSWORDREQUIRED (HID_DBACCESS_START + 361)
-
-#define HID_PAGE_DBWIZARD_AUTHENTIFICATION_CB_GENERALPASSWORDREQUIRED (HID_DBACCESS_START + 365)
-#define HID_PAGE_DBWIZARD_AUTHENTIFICATION_ET_GENERALUSERNAME (HID_DBACCESS_START + 366)
-#define HID_PAGE_DBWIZARD_AUTHENTIFICATION_PB_TESTCONNECTION (HID_DBACCESS_START + 367)
+#define HID_DSADMIN_CHARSET "DBACCESS_HID_DSADMIN_CHARSET"
+
+#define HID_DLG_FILTERCRIT "DBACCESS_HID_DLG_FILTERCRIT"
+#define HID_DLG_ORDERCRIT "DBACCESS_HID_DLG_ORDERCRIT"
+
+#define HID_DATABROWSE_HEADER "DBACCESS_HID_DATABROWSE_HEADER"
+#define HID_CTL_TABBROWSER "DBACCESS_HID_CTL_TABBROWSER"
+#define UID_DATABROWSE_DATAWINDOW "DBACCESS_UID_DATABROWSE_DATAWINDOW"
+#define HID_CTL_TREEVIEW "DBACCESS_HID_CTL_TREEVIEW"
+#define UID_CTL_CONTENT "DBACCESS_UID_CTL_CONTENT"
+#define HID_TLB_TABBROWSER "DBACCESS_HID_TLB_TABBROWSER"
+#define HID_TLB_TREELISTBOX "DBACCESS_HID_TLB_TREELISTBOX"
+#define HID_DSADMIN_DIALOG "DBACCESS_HID_DSADMIN_DIALOG"
+
+
+#define HID_DSADMIN_TABCONTROL "DBACCESS_HID_DSADMIN_TABCONTROL"
+#define HID_DSADMIN_PAGE_GENERAL "DBACCESS_HID_DSADMIN_PAGE_GENERAL"
+#define HID_DSADMIN_PAGE_DBASE "DBACCESS_HID_DSADMIN_PAGE_DBASE"
+#define HID_DSADMIN_PAGE_JDBC "DBACCESS_HID_DSADMIN_PAGE_JDBC"
+#define HID_DSADMIN_PAGE_ODBC "DBACCESS_HID_DSADMIN_PAGE_ODBC"
+#define HID_DSADMIN_PAGE_ADABAS "DBACCESS_HID_DSADMIN_PAGE_ADABAS"
+#define HID_DSADMIN_PAGE_TEXT "DBACCESS_HID_DSADMIN_PAGE_TEXT"
+#define HID_DSADMIN_TABLE_SUBSCRIPTION "DBACCESS_HID_DSADMIN_TABLE_SUBSCRIPTION"
+#define HID_DSADMIN_DSACTIONS_NEWDS "DBACCESS_HID_DSADMIN_DSACTIONS_NEWDS"
+#define HID_DSADMIN_DSACTIONS_DELETEDS "DBACCESS_HID_DSADMIN_DSACTIONS_DELETEDS"
+#define HID_DSADMIN_DSACTIONS_RESTOREDS "DBACCESS_HID_DSADMIN_DSACTIONS_RESTOREDS"
+#define HID_DSADMIN_DSNAME "DBACCESS_HID_DSADMIN_DSNAME"
+#define HID_DSADMIN_DSTYPE "DBACCESS_HID_DSADMIN_DSTYPE"
+#define HID_DSADMIN_URL_GENERAL "DBACCESS_HID_DSADMIN_URL_GENERAL"
+#define HID_DSADMIN_BROWSECONN "DBACCESS_HID_DSADMIN_BROWSECONN"
+#define HID_DSADMIN_LOGINTIMEOUT_NUMBER "DBACCESS_HID_DSADMIN_LOGINTIMEOUT_NUMBER"
+#define HID_DSADMIN_LOGINTIMEOUT_UNIT "DBACCESS_HID_DSADMIN_LOGINTIMEOUT_UNIT"
+#define HID_DSADMIN_SHOWDELETED "DBACCESS_HID_DSADMIN_SHOWDELETED"
+#define HID_DSADMIN_ALLOWLONG "DBACCESS_HID_DSADMIN_ALLOWLONG"
+#define HID_DSADMIN_DBASE_INDICIES "DBACCESS_HID_DSADMIN_DBASE_INDICIES"
+#define HID_DSADMIN_DRIVERCLASS "DBACCESS_HID_DSADMIN_DRIVERCLASS"
+#define HID_DSADMIN_ODBC_OPTIONS "DBACCESS_HID_DSADMIN_ODBC_OPTIONS"
+#define HID_DSADMIN_TEXT_HEADER "DBACCESS_HID_DSADMIN_TEXT_HEADER"
+#define HID_DSADMIN_FIELD_SEPARATOR "DBACCESS_HID_DSADMIN_FIELD_SEPARATOR"
+#define HID_DSADMIN_TEXT_SEPARATOR "DBACCESS_HID_DSADMIN_TEXT_SEPARATOR"
+#define HID_DSADMIN_DECIMAL_SEPARATOR "DBACCESS_HID_DSADMIN_DECIMAL_SEPARATOR"
+#define HID_DSADMIN_THOUSANDS_SEPARATOR "DBACCESS_HID_DSADMIN_THOUSANDS_SEPARATOR"
+#define HID_DSADMIN_EXTENSION "DBACCESS_HID_DSADMIN_EXTENSION"
+#define HID_DSADMIN_ALL_TABLES "DBACCESS_HID_DSADMIN_ALL_TABLES"
+#define HID_DSADMIN_NO_TABLES "DBACCESS_HID_DSADMIN_NO_TABLES"
+#define HID_DSADMIN_SELECT_TABLES "DBACCESS_HID_DSADMIN_SELECT_TABLES"
+#define HID_DSADMIN_TABLE_SELECTOR "DBACCESS_HID_DSADMIN_TABLE_SELECTOR"
+#define HID_DSADMIN_SUPPRESS_VERSIONCL "DBACCESS_HID_DSADMIN_SUPPRESS_VERSIONCL"
+
+#define HID_GENERIC_SQL_ERROR "DBACCESS_HID_GENERIC_SQL_ERROR"
+
+#define HID_BROWSER_COLUMNFORMAT "DBACCESS_HID_BROWSER_COLUMNFORMAT"
+#define HID_BROWSER_COLUMNWIDTH "DBACCESS_HID_BROWSER_COLUMNWIDTH"
+#define HID_BROWSER_TABLEFORMAT "DBACCESS_HID_BROWSER_TABLEFORMAT"
+#define HID_BROWSER_ROWHEIGHT "DBACCESS_HID_BROWSER_ROWHEIGHT"
+#define HID_BROWSER_EDIT_DATABASE "DBACCESS_HID_BROWSER_EDIT_DATABASE"
+#define HID_BROWSER_CLOSECONN "DBACCESS_HID_BROWSER_CLOSECONN"
+#define HID_BROWSER_REFRESHCONN "DBACCESS_HID_BROWSER_REFRESHCONN"
+
+#define HID_DLG_ROWHEIGHT "DBACCESS_HID_DLG_ROWHEIGHT"
+#define HID_DLG_COLWIDTH "DBACCESS_HID_DLG_COLWIDTH"
+
+
+#define HID_TLB_QUERYDESIGN "DBACCESS_HID_TLB_QUERYDESIGN"
+#define HID_CTL_QRYSQLEDIT "DBACCESS_HID_CTL_QRYSQLEDIT"
+#define HID_DSADMIN_SPECIAL_MESSAGE "DBACCESS_HID_DSADMIN_SPECIAL_MESSAGE"
+
+#define HID_BROWSER_QUERY_CREATE_TEXT "DBACCESS_HID_BROWSER_QUERY_CREATE_TEXT"
+
+#define HID_DLG_ERROR "DBACCESS_HID_DLG_ERROR"
+#define HID_DLG_TEXT "DBACCESS_HID_DLG_TEXT"
+#define UID_SQLERROR_BUTTONMORE "DBACCESS_UID_SQLERROR_BUTTONMORE"
+#define HID_DLG_SAVE_AS "DBACCESS_HID_DLG_SAVE_AS"
+
+#define HID_BROWSER_QUERY_EDIT "DBACCESS_HID_BROWSER_QUERY_EDIT"
+#define HID_BROWSER_QUERY_DELETE "DBACCESS_HID_BROWSER_QUERY_DELETE"
+
+#define HID_DSADMIN_USER_ADO "DBACCESS_HID_DSADMIN_USER_ADO"
+#define HID_DSADMIN_PWDREC_ADO "DBACCESS_HID_DSADMIN_PWDREC_ADO"
+#define HID_DSADMIN_CONNURL_ADOPAGE "DBACCESS_HID_DSADMIN_CONNURL_ADOPAGE"
+#define HID_DSADMIN_PAGE_ADO "DBACCESS_HID_DSADMIN_PAGE_ADO"
+
+
+#define HID_JOINSH_ADDTAB_CLOSE "DBACCESS_HID_JOINSH_ADDTAB_CLOSE"
+#define HID_JOINSH_ADDTAB_TABLELIST "DBACCESS_HID_JOINSH_ADDTAB_TABLELIST"
+#define HID_CTL_QRYDGNTAB "DBACCESS_HID_CTL_QRYDGNTAB"
+#define HID_DLG_QRY_JOIN "DBACCESS_HID_DLG_QRY_JOIN"
+#define HID_DLG_QRY_JOINTYPE "DBACCESS_HID_DLG_QRY_JOINTYPE"
+#define HID_JOINSH_ADDTAB_QUERYLIST "DBACCESS_HID_JOINSH_ADDTAB_QUERYLIST"
+#define HID_DLG_QRY_HELPTEXT "DBACCESS_HID_DLG_QRY_HELPTEXT"
+
+#define HID_CTL_QRYDGNCRIT "DBACCESS_HID_CTL_QRYDGNCRIT"
+#define HID_QRYDGN_ROW_VISIBLE "DBACCESS_HID_QRYDGN_ROW_VISIBLE"
+#define HID_QRYDGN_ROW_TABLE "DBACCESS_HID_QRYDGN_ROW_TABLE"
+#define HID_QRYDGN_ROW_FIELD "DBACCESS_HID_QRYDGN_ROW_FIELD"
+#define HID_QRYDGN_ROW_ORDER "DBACCESS_HID_QRYDGN_ROW_ORDER"
+#define HID_QRYDGN_ROW_FUNCTION "DBACCESS_HID_QRYDGN_ROW_FUNCTION"
+#define HID_QRYDGN_ROW_ALIAS "DBACCESS_HID_QRYDGN_ROW_ALIAS"
+#define HID_QRYDGN_ROW_CRIT "DBACCESS_HID_QRYDGN_ROW_CRIT"
+
+#define HID_QUERY_FUNCTION "DBACCESS_HID_QUERY_FUNCTION"
+#define HID_QUERY_TABLENAME "DBACCESS_HID_QUERY_TABLENAME"
+#define HID_QUERY_ALIASNAME "DBACCESS_HID_QUERY_ALIASNAME"
+#define HID_QUERY_DISTINCT "DBACCESS_HID_QUERY_DISTINCT"
+
+#define HID_BROWSER_QUERY_CREATE_DESIGN "DBACCESS_HID_BROWSER_QUERY_CREATE_DESIGN"
+
+#define HID_DSADMIN_QUERIES "DBACCESS_HID_DSADMIN_QUERIES"
+#define HID_DSADMIN_QUERIES_NEW "DBACCESS_HID_DSADMIN_QUERIES_NEW"
+#define HID_DSADMIN_QUERIES_EDIT "DBACCESS_HID_DSADMIN_QUERIES_EDIT"
+#define HID_DSADMIN_QUERIES_DELETE "DBACCESS_HID_DSADMIN_QUERIES_DELETE"
+#define HID_DSADMIN_QUERYADMINISTRATION "DBACCESS_HID_DSADMIN_QUERYADMINISTRATION"
+
+
+#define HID_TAB_DESIGN_TABLE_DESC "DBACCESS_HID_TAB_DESIGN_TABLE_DESC"
+#define HID_TAB_DESIGN_FIELDCONTROL "DBACCESS_HID_TAB_DESIGN_FIELDCONTROL"
+#define HID_TABLE_DESIGN_HELP_WINDOW "DBACCESS_HID_TABLE_DESIGN_HELP_WINDOW"
+#define HID_TAB_DESIGN_DESCWIN "DBACCESS_HID_TAB_DESIGN_DESCWIN"
+#define HID_TAB_DESIGN_TABLE_PROPS "DBACCESS_HID_TAB_DESIGN_TABLE_PROPS"
+#define HID_TABDESIGN_BACKGROUND "DBACCESS_HID_TABDESIGN_BACKGROUND"
+#define HID_CTL_TABLEEDIT "DBACCESS_HID_CTL_TABLEEDIT"
+#define HID_TABDESIGN_NAMECELL "DBACCESS_HID_TABDESIGN_NAMECELL"
+#define HID_TABDESIGN_TYPECELL "DBACCESS_HID_TABDESIGN_TYPECELL"
+#define HID_TABDESIGN_COMMENTCELL "DBACCESS_HID_TABDESIGN_COMMENTCELL"
+#define HID_TABLEDESIGN_INSERTROWS "DBACCESS_HID_TABLEDESIGN_INSERTROWS"
+#define HID_TABLEDESIGN_TABED_PRIMARYKEY "DBACCESS_HID_TABLEDESIGN_TABED_PRIMARYKEY"
+#define HID_TLB_TABLEDESIGN "DBACCESS_HID_TLB_TABLEDESIGN"
+#define HID_TAB_DESIGN_HELP_TEXT_FRAME "DBACCESS_HID_TAB_DESIGN_HELP_TEXT_FRAME"
+#define HID_TABLE_DESIGN_TABPAGE_GENERAL "DBACCESS_HID_TABLE_DESIGN_TABPAGE_GENERAL"
+#define HID_TAB_ENT_DEFAULT "DBACCESS_HID_TAB_ENT_DEFAULT"
+#define HID_TAB_ENT_FORMAT_SAMPLE "DBACCESS_HID_TAB_ENT_FORMAT_SAMPLE"
+#define HID_TAB_ENT_FORMAT "DBACCESS_HID_TAB_ENT_FORMAT"
+#define HID_TAB_ENT_BOOL_DEFAULT "DBACCESS_HID_TAB_ENT_BOOL_DEFAULT"
+#define HID_TAB_ENT_REQUIRED "DBACCESS_HID_TAB_ENT_REQUIRED"
+#define HID_TAB_ENT_AUTOINCREMENT "DBACCESS_HID_TAB_ENT_AUTOINCREMENT"
+#define HID_TAB_ENT_TEXT_LEN "DBACCESS_HID_TAB_ENT_TEXT_LEN"
+#define HID_TAB_ENT_TYPE "DBACCESS_HID_TAB_ENT_TYPE"
+#define HID_TAB_ENT_COLUMNNAME "DBACCESS_HID_TAB_ENT_COLUMNNAME"
+#define HID_TAB_ENT_NUMTYP "DBACCESS_HID_TAB_ENT_NUMTYP"
+#define HID_TAB_ENT_LEN "DBACCESS_HID_TAB_ENT_LEN"
+#define HID_TAB_ENT_SCALE "DBACCESS_HID_TAB_ENT_SCALE"
+#define HID_BROWSER_TABLE_CREATE_DESIGN "DBACCESS_HID_BROWSER_TABLE_CREATE_DESIGN"
+#define HID_BROWSER_TABLE_EDIT "DBACCESS_HID_BROWSER_TABLE_EDIT"
+#define HID_BROWSER_TABLE_DELETE "DBACCESS_HID_BROWSER_TABLE_DELETE"
+#define HID_SQLERROR_EXCHAIN_ERRORS "DBACCESS_HID_SQLERROR_EXCHAIN_ERRORS"
+#define HID_SQLERROR_EXCHAIN_TEXT "DBACCESS_HID_SQLERROR_EXCHAIN_TEXT"
+#define HID_TAB_WIZ_COLUMN_SELECT "DBACCESS_HID_TAB_WIZ_COLUMN_SELECT"
+#define HID_TAB_WIZ_TYPE_SELECT "DBACCESS_HID_TAB_WIZ_TYPE_SELECT"
+#define HID_TAB_NAMEMATCHING_COLS_AVAIL "DBACCESS_HID_TAB_NAMEMATCHING_COLS_AVAIL"
+#define HID_TAB_NAMEMATCHING_COLS_ASSIGN "DBACCESS_HID_TAB_NAMEMATCHING_COLS_ASSIGN"
+#define HID_TAB_WIZ_COPYTABLE "DBACCESS_HID_TAB_WIZ_COPYTABLE"
+#define HID_TAB_WIZ_TABLENAME_EDIT "DBACCESS_HID_TAB_WIZ_TABLENAME_EDIT"
+#define HID_CTL_RELATIONTAB "DBACCESS_HID_CTL_RELATIONTAB"
+#define HID_TLB_RELATIONDESIGN "DBACCESS_HID_TLB_RELATIONDESIGN"
+#define HID_RELATIONDIALOG_LEFTFIELDCELL "DBACCESS_HID_RELATIONDIALOG_LEFTFIELDCELL"
+#define HID_RELATIONDIALOG_RIGHTFIELDCELL "DBACCESS_HID_RELATIONDIALOG_RIGHTFIELDCELL"
+#define HID_RELDLG_KEYFIELDS "DBACCESS_HID_RELDLG_KEYFIELDS"
+#define HID_BROWSER_RELATION_DESIGN "DBACCESS_HID_BROWSER_RELATION_DESIGN"
+#define HID_TABLE_DESIGN_NO_CONNECTION "DBACCESS_HID_TABLE_DESIGN_NO_CONNECTION"
+#define HID_DSADMIN_CREATEDATABASE "DBACCESS_HID_DSADMIN_CREATEDATABASE"
+#define HID_BROWSER_COLUMNINFO "DBACCESS_HID_BROWSER_COLUMNINFO"
+#define HID_DSADMIN_USECATALOG "DBACCESS_HID_DSADMIN_USECATALOG"
+#define HID_BROWSER_VIEW_CREATE_DESIGN "DBACCESS_HID_BROWSER_VIEW_CREATE_DESIGN"
+#define HID_DSADMIN_DOCUMENTS "DBACCESS_HID_DSADMIN_DOCUMENTS"
+#define HID_DSADMIN_DOCUMENTLINKS "DBACCESS_HID_DSADMIN_DOCUMENTLINKS"
+#define HID_DSADMIN_FILTER_EXPLANATION "DBACCESS_HID_DSADMIN_FILTER_EXPLANATION"
+#define HID_CONFIRM_DROP_BUTTON_ALL "DBACCESS_HID_CONFIRM_DROP_BUTTON_ALL"
+#define HID_DSBROWSER_BOOKMARK_SELECTED "DBACCESS_HID_DSBROWSER_BOOKMARK_SELECTED"
+#define HID_DSADMIN_TABLE_TOOLBOX "DBACCESS_HID_DSADMIN_TABLE_TOOLBOX"
+#define HID_DSADMIN_QUERY_TOOLBOX "DBACCESS_HID_DSADMIN_QUERY_TOOLBOX"
+#define HID_DSADMIN_BOOKMARK_TOOLBOX "DBACCESS_HID_DSADMIN_BOOKMARK_TOOLBOX"
+#define HID_DSADMIN_PAGE_LDAP "DBACCESS_HID_DSADMIN_PAGE_LDAP"
+#define HID_DSADMIN_LDAP_HOSTNAME "DBACCESS_HID_DSADMIN_LDAP_HOSTNAME"
+#define HID_DSADMIN_LDAP_BASEDN "DBACCESS_HID_DSADMIN_LDAP_BASEDN"
+#define HID_DSADMIN_LDAP_PORTNUMBER "DBACCESS_HID_DSADMIN_LDAP_PORTNUMBER"
+#define HID_DSBROWSER_BOOKMARKSELECTED "DBACCESS_HID_DSBROWSER_BOOKMARKSELECTED"
+#define HID_DSBROWSER_DISCONNECTING "DBACCESS_HID_DSBROWSER_DISCONNECTING"
+#define HID_TAB_PAGE_USERADMIN "DBACCESS_HID_TAB_PAGE_USERADMIN"
+#define HID_TAB_PAGE_PBUSER "DBACCESS_HID_TAB_PAGE_PBUSER"
+#define HID_TAB_PAGE_PBCHGPWD "DBACCESS_HID_TAB_PAGE_PBCHGPWD"
+#define HID_TAB_PAGE_PBUSERDELETE "DBACCESS_HID_TAB_PAGE_PBUSERDELETE"
+#define HID_TAB_PAGE_TBLGRANTS "DBACCESS_HID_TAB_PAGE_TBLGRANTS"
+#define HID_TAB_PAGE_LBUSER "DBACCESS_HID_TAB_PAGE_LBUSER"
+#define HID_DSBROWSER_DIRECTSQL "DBACCESS_HID_DSBROWSER_DIRECTSQL"
+#define HID_DSADMIN_LDAP_ROWCOUNT "DBACCESS_HID_DSADMIN_LDAP_ROWCOUNT"
+#define HID_BROWSER_QUERY_EDITSQL "DBACCESS_HID_BROWSER_QUERY_EDITSQL"
+#define HID_DSADMIN_PAGE_MOZILLA "DBACCESS_HID_DSADMIN_PAGE_MOZILLA"
+#define HID_DSADMIN_MOZILLA_PROFILE_NAME "DBACCESS_HID_DSADMIN_MOZILLA_PROFILE_NAME"
+#define HID_DSADMIN_THUNDERBIRD_PROFILE_NAME "DBACCESS_HID_DSADMIN_THUNDERBIRD_PROFILE_NAME"
+#define HID_BROWSER_OPEN_DOCUMENT "DBACCESS_HID_BROWSER_OPEN_DOCUMENT"
+#define HID_BROWSER_EDIT_DOCUMENT "DBACCESS_HID_BROWSER_EDIT_DOCUMENT"
+#define HID_BROWSER_BEW_DOCUMENT "DBACCESS_HID_BROWSER_BEW_DOCUMENT"
+#define HID_DLG_PASSWORD "DBACCESS_HID_DLG_PASSWORD"
+
+#define HID_DLGIDX_NEWINDEX "DBACCESS_HID_DLGIDX_NEWINDEX"
+#define HID_DLGIDX_DROPINDEX "DBACCESS_HID_DLGIDX_DROPINDEX"
+#define HID_DLGIDX_RENAMEINDEX "DBACCESS_HID_DLGIDX_RENAMEINDEX"
+#define HID_DLGIDX_SAVEINDEX "DBACCESS_HID_DLGIDX_SAVEINDEX"
+#define HID_DLGIDX_RESETINDEX "DBACCESS_HID_DLGIDX_RESETINDEX"
+#define HID_DLGIDX_INDEXLIST "DBACCESS_HID_DLGIDX_INDEXLIST"
+#define UID_DLGINDEX_INDEXDETAILS_BACK "DBACCESS_UID_DLGINDEX_INDEXDETAILS_BACK"
+#define UID_DLGINDEX_INDEXDETAILS_MAIN "DBACCESS_UID_DLGINDEX_INDEXDETAILS_MAIN"
+#define HID_DLGINDEX_INDEXDETAILS_FIELD "DBACCESS_HID_DLGINDEX_INDEXDETAILS_FIELD"
+#define HID_DLGINDEX_INDEXDETAILS_SORTORDER "DBACCESS_HID_DLGINDEX_INDEXDETAILS_SORTORDER"
+
+#define HID_DOCLINKEDIT_URL "DBACCESS_HID_DOCLINKEDIT_URL"
+#define HID_QUERY_SQLMODE "DBACCESS_HID_QUERY_SQLMODE"
+
+#define HID_BROWSER_REFRESH_REBUILDVIEW "DBACCESS_HID_BROWSER_REFRESH_REBUILDVIEW"
+#define HID_BROWSER_RENAME_ENTRY "DBACCESS_HID_BROWSER_RENAME_ENTRY"
+
+#define HID_QUERY_EDIT_JOINCONNECTION "DBACCESS_HID_QUERY_EDIT_JOINCONNECTION"
+
+#define HID_DLG_QRY_WINDOW_CONTROL "DBACCESS_HID_DLG_QRY_WINDOW_CONTROL"
+#define HID_DLG_QRY_LEFT_TABLE "DBACCESS_HID_DLG_QRY_LEFT_TABLE"
+#define HID_DLG_QRY_RIGHT_TABLE "DBACCESS_HID_DLG_QRY_RIGHT_TABLE"
+
+#define HID_DLG_REL_CASC_DEL "DBACCESS_HID_DLG_REL_CASC_DEL"
+#define HID_DLG_REL_NO_CASC_DEL "DBACCESS_HID_DLG_REL_NO_CASC_DEL"
+#define HID_DLG_REL_CASC_DEL_NULL "DBACCESS_HID_DLG_REL_CASC_DEL_NULL"
+#define HID_DLG_REL_CASC_DEL_DEFAULT "DBACCESS_HID_DLG_REL_CASC_DEL_DEFAULT"
+
+#define HID_DLG_REL_CASC_UPD "DBACCESS_HID_DLG_REL_CASC_UPD"
+#define HID_DLG_REL_NO_CASC_UPD "DBACCESS_HID_DLG_REL_NO_CASC_UPD"
+#define HID_DLG_REL_CASC_UPD_NULL "DBACCESS_HID_DLG_REL_CASC_UPD_NULL"
+#define HID_DLG_REL_CASC_UPD_DEFAULT "DBACCESS_HID_DLG_REL_CASC_UPD_DEFAULT"
+#define HID_BROWSER_SAVE_RECORD "DBACCESS_HID_BROWSER_SAVE_RECORD"
+#define HID_BROWSER_UNDO_RECORD "DBACCESS_HID_BROWSER_UNDO_RECORD"
+
+#define HID_DSADMIN_SQL92CHECK "DBACCESS_HID_DSADMIN_SQL92CHECK"
+#define HID_DSADMIN_AUTOINCREMENTVALUE "DBACCESS_HID_DSADMIN_AUTOINCREMENTVALUE"
+#define HID_DOCUMENT_CREATE_REPWIZ "DBACCESS_HID_DOCUMENT_CREATE_REPWIZ"
+#define HID_TAB_AUTOINCREMENTVALUE "DBACCESS_HID_TAB_AUTOINCREMENTVALUE"
+#define HID_DSADMIN_RETRIEVE_AUTO "DBACCESS_HID_DSADMIN_RETRIEVE_AUTO"
+#define HID_DSADMIN_AUTORETRIEVEENABLED "DBACCESS_HID_DSADMIN_AUTORETRIEVEENABLED"
+
+#define HID_DSADMIN_PAGE_MYSQL_ODBC "DBACCESS_HID_DSADMIN_PAGE_MYSQL_ODBC"
+#define HID_TAB_PAGE_TABLEPRIVILEGES "DBACCESS_HID_TAB_PAGE_TABLEPRIVILEGES"
+
+#define HID_DSADMIN_PAGE_USERDRIVER "DBACCESS_HID_DSADMIN_PAGE_USERDRIVER"
+#define HID_DSADMIN_USER_DEFINED "DBACCESS_HID_DSADMIN_USER_DEFINED"
+#define HID_DSADMIN_USERDEF_OPTIONS "DBACCESS_HID_DSADMIN_USERDEF_OPTIONS"
+#define HID_DSADMIN_CHARSET_USERDEF "DBACCESS_HID_DSADMIN_CHARSET_USERDEF"
+#define HID_DSADMIN_USER_LDAP "DBACCESS_HID_DSADMIN_USER_LDAP"
+#define HID_DSADMIN_PWDREC_LDAP "DBACCESS_HID_DSADMIN_PWDREC_LDAP"
+#define HID_DSADMIN_USESSL_LDAP "DBACCESS_HID_DSADMIN_USESSL_LDAP"
+#define HID_BROWSER_QUERY_WIZARD "DBACCESS_HID_BROWSER_QUERY_WIZARD"
+
+#define HID_DLG_RENAME "DBACCESS_HID_DLG_RENAME"
+
+#define HID_DSADMIN_PAGE_MYSQL_JDBC "DBACCESS_HID_DSADMIN_PAGE_MYSQL_JDBC"
+
+#define HID_DSADMIN_DBASE_PATH "DBACCESS_HID_DSADMIN_DBASE_PATH"
+#define HID_DSADMIN_MYSQL_DATABASE "DBACCESS_HID_DSADMIN_MYSQL_DATABASE"
+#define HID_DSADMIN_MYSQL_ODBC_DATASOURCE "DBACCESS_HID_DSADMIN_MYSQL_ODBC_DATASOURCE"
+#define HID_DSADMIN_ODBC_DATASOURCE "DBACCESS_HID_DSADMIN_ODBC_DATASOURCE"
+#define HID_DSADMIN_ADABAS_DATABASE "DBACCESS_HID_DSADMIN_ADABAS_DATABASE"
+#define HID_DSADMIN_MSACCESS_MDB_FILE "DBACCESS_HID_DSADMIN_MSACCESS_MDB_FILE"
+#define HID_DSADMIN_PAGE_MSACCESS "DBACCESS_HID_DSADMIN_PAGE_MSACCESS"
+#define HID_DSADMIN_FLAT_PATH "DBACCESS_HID_DSADMIN_FLAT_PATH"
+#define HID_DSADMIN_CALC_PATH "DBACCESS_HID_DSADMIN_CALC_PATH"
+#define HID_DSADMIN_ADVANCED "DBACCESS_HID_DSADMIN_ADVANCED"
+#define HID_DSADMIN_BOOLEANCOMPARISON "DBACCESS_HID_DSADMIN_BOOLEANCOMPARISON"
+#define HID_DSADMIN_ORACLE_DATABASE "DBACCESS_HID_DSADMIN_ORACLE_DATABASE"
+#define HID_DSADMIN_MAXROWSCAN "DBACCESS_HID_DSADMIN_MAXROWSCAN"
+
+#define UID_APP_VIEW "DBACCESS_UID_APP_VIEW"
+#define HID_APP_TABLE_TREE "DBACCESS_HID_APP_TABLE_TREE"
+#define HID_APP_FORM_TREE "DBACCESS_HID_APP_FORM_TREE"
+#define HID_APP_QUERY_TREE "DBACCESS_HID_APP_QUERY_TREE"
+#define HID_APP_REPORT_TREE "DBACCESS_HID_APP_REPORT_TREE"
+#define UID_APP_DETAIL_VIEW "DBACCESS_UID_APP_DETAIL_VIEW"
+#define UID_APP_VIEW_VERT_SPLIT "DBACCESS_UID_APP_VIEW_VERT_SPLIT"
+#define UID_APP_VIEW_BORDER_WIN "DBACCESS_UID_APP_VIEW_BORDER_WIN"
+#define HID_APP_CREATION_LIST "DBACCESS_HID_APP_CREATION_LIST"
+#define UID_APP_SWAP_VIEW "DBACCESS_UID_APP_SWAP_VIEW"
+#define HID_APP_SWAP_ICONCONTROL "DBACCESS_HID_APP_SWAP_ICONCONTROL"
+
+#define HID_DSADMIN_APPENDTABLEALIAS "DBACCESS_HID_DSADMIN_APPENDTABLEALIAS"
+#define HID_DSADMIN_PARAMETERNAMESUBST "DBACCESS_HID_DSADMIN_PARAMETERNAMESUBST"
+#define HID_DSADMIN_IGNOREDRIVER_PRIV "DBACCESS_HID_DSADMIN_IGNOREDRIVER_PRIV"
+#define HID_DSADMIN_HOSTNAME "DBACCESS_HID_DSADMIN_HOSTNAME"
+#define HID_DSADMIN_PORTNUMBER "DBACCESS_HID_DSADMIN_PORTNUMBER"
+
+#define HID_APP_HELP_TEXT "DBACCESS_HID_APP_HELP_TEXT"
+#define HID_EXPLORERDLG_COLLECTION "DBACCESS_HID_EXPLORERDLG_COLLECTION"
+#define UID_APP_DATABASE_VIEW "DBACCESS_UID_APP_DATABASE_VIEW"
+#define UID_APP_TASKS_VIEW "DBACCESS_UID_APP_TASKS_VIEW"
+#define UID_APP_CONTAINER_VIEW "DBACCESS_UID_APP_CONTAINER_VIEW"
+#define UID_APP_TASKS_WINDOW "DBACCESS_UID_APP_TASKS_WINDOW"
+#define HID_APP_DESCRIPTION_TEXT "DBACCESS_HID_APP_DESCRIPTION_TEXT"
+#define UID_APP_DETAILPAGE_HELPER "DBACCESS_UID_APP_DETAILPAGE_HELPER"
+#define HID_APP_VIEW_PREVIEW_CB "DBACCESS_HID_APP_VIEW_PREVIEW_CB"
+#define HID_APP_VIEW_PREVIEW_1 "DBACCESS_HID_APP_VIEW_PREVIEW_1"
+#define HID_APP_VIEW_PREVIEW_2 "DBACCESS_HID_APP_VIEW_PREVIEW_2"
+#define HID_TABDESIGN_HELPTEXT "DBACCESS_HID_TABDESIGN_HELPTEXT"
+#define UID_APP_VIEW_HORZ_SPLIT "DBACCESS_UID_APP_VIEW_HORZ_SPLIT"
+#define UID_APP_VIEW_PREVIEW_1 "DBACCESS_UID_APP_VIEW_PREVIEW_1"
+#define HID_APP_VIEW_PREVIEW_3 "DBACCESS_HID_APP_VIEW_PREVIEW_3"
+
+#define HID_DSADMIN_TYPE_DIALOG "DBACCESS_HID_DSADMIN_TYPE_DIALOG"
+#define HID_DSADMIN_ENABLEOUTERJOIN "DBACCESS_HID_DSADMIN_ENABLEOUTERJOIN"
+#define HID_DSADMIN_ADABASADMIN "DBACCESS_HID_DSADMIN_ADABASADMIN"
+#define HID_DSADMIN_USERADMIN "DBACCESS_HID_DSADMIN_USERADMIN"
+
+#define HID_DBWIZ_PREVIOUS "DBACCESS_HID_DBWIZ_PREVIOUS"
+#define HID_DBWIZ_NEXT "DBACCESS_HID_DBWIZ_NEXT"
+#define HID_DBWIZ_CANCEL "DBACCESS_HID_DBWIZ_CANCEL"
+#define HID_DBWIZ_FINISH "DBACCESS_HID_DBWIZ_FINISH"
+#define UID_DBWIZ_HELP "DBACCESS_UID_DBWIZ_HELP"
+
+#define HID_DSADMIN_CATALOG "DBACCESS_HID_DSADMIN_CATALOG"
+#define HID_DSADMIN_SCHEMA "DBACCESS_HID_DSADMIN_SCHEMA"
+#define HID_DSADMIN_IGNOREINDEXAPPENDIX "DBACCESS_HID_DSADMIN_IGNOREINDEXAPPENDIX"
+#define HID_DSADMIN_DOSLINEENDS "DBACCESS_HID_DSADMIN_DOSLINEENDS"
+
+#define HID_BROWSER_ADMINISTRATE "DBACCESS_HID_BROWSER_ADMINISTRATE"
+
+#define HID_DSADMIN_AS_BEFORE_CORRELATION_NAME "DBACCESS_HID_DSADMIN_AS_BEFORE_CORRELATION_NAME"
+#define HID_DSADMIN_CHECK_REQUIRED_FIELDS "DBACCESS_HID_DSADMIN_CHECK_REQUIRED_FIELDS"
+#define HID_DSADMIN_ESCAPE_DATETIME "DBACCESS_HID_DSADMIN_ESCAPE_DATETIME"
+
+#define HID_PAGE_DBWIZARD_GENERALPAGE "DBACCESS_HID_PAGE_DBWIZARD_GENERALPAGE"
+#define HID_PAGE_DBWIZARD_GENERAL_RB_CREATEDBDATABASE "DBACCESS_HID_PAGE_DBWIZARD_GENERAL_RB_CREATEDBDATABASE"
+#define HID_PAGE_DBWIZARD_GENERAL_RB_GETEXISTINGDATABASE "DBACCESS_HID_PAGE_DBWIZARD_GENERAL_RB_GETEXISTINGDATABASE"
+
+#define HID_PAGE_DBWIZARD_DBASE_ET_DBASELOCATION "DBACCESS_HID_PAGE_DBWIZARD_DBASE_ET_DBASELOCATION"
+#define HID_PAGE_DBWIZARD_DBASE_PB_DBASELOCATION "DBACCESS_HID_PAGE_DBWIZARD_DBASE_PB_DBASELOCATION"
+
+
+#define HID_PAGE_DBWIZARD_TEXT_RB_ACCESSTXTFILES "DBACCESS_HID_PAGE_DBWIZARD_TEXT_RB_ACCESSTXTFILES"
+#define HID_PAGE_DBWIZARD_TEXT_RB_ACCESSCSVFILES "DBACCESS_HID_PAGE_DBWIZARD_TEXT_RB_ACCESSCSVFILES"
+#define HID_PAGE_DBWIZARD_TEXT_RB_ACCESSOTHERFILES "DBACCESS_HID_PAGE_DBWIZARD_TEXT_RB_ACCESSOTHERFILES"
+#define HID_PAGE_DBWIZARD_TEXT_ET_OWNEXTENSION "DBACCESS_HID_PAGE_DBWIZARD_TEXT_ET_OWNEXTENSION"
+
+
+#define HID_PAGE_DBWIZARD_TEXT_ET_LOCATIONTEXTFILE "DBACCESS_HID_PAGE_DBWIZARD_TEXT_ET_LOCATIONTEXTFILE"
+#define HID_PAGE_DBWIZARD_TEXT_PB_LOCATIONTEXTFILE "DBACCESS_HID_PAGE_DBWIZARD_TEXT_PB_LOCATIONTEXTFILE"
+#define HID_PAGE_DBWIZARD_TEXT_CB_FIELDSEPARATOR "DBACCESS_HID_PAGE_DBWIZARD_TEXT_CB_FIELDSEPARATOR"
+#define HID_PAGE_DBWIZARD_TEXT_CB_TEXTSEPARATOR "DBACCESS_HID_PAGE_DBWIZARD_TEXT_CB_TEXTSEPARATOR"
+#define HID_PAGE_DBWIZARD_TEXT_CB_DECIMALSEPARATOR "DBACCESS_HID_PAGE_DBWIZARD_TEXT_CB_DECIMALSEPARATOR"
+#define HID_PAGE_DBWIZARD_TEXT_CB_THOUSANDSSEPARATOR "DBACCESS_HID_PAGE_DBWIZARD_TEXT_CB_THOUSANDSSEPARATOR"
+
+#define HID_PAGE_DBWIZARD_MSACCESS_ET_MSACCESSLOCATION "DBACCESS_HID_PAGE_DBWIZARD_MSACCESS_ET_MSACCESSLOCATION"
+#define HID_PAGE_DBWIZARD_MSACCESS_PB_MSACCESSLOCATION "DBACCESS_HID_PAGE_DBWIZARD_MSACCESS_PB_MSACCESSLOCATION"
+
+#define HID_PAGE_DBWIZARD_LDAP_ET_HOSTSERVER "DBACCESS_HID_PAGE_DBWIZARD_LDAP_ET_HOSTSERVER"
+#define HID_PAGE_DBWIZARD_LDAP_ET_BASEDN "DBACCESS_HID_PAGE_DBWIZARD_LDAP_ET_BASEDN"
+#define HID_PAGE_DBWIZARD_LDAP_ET_PORTNUMBER "DBACCESS_HID_PAGE_DBWIZARD_LDAP_ET_PORTNUMBER"
+#define HID_PAGE_DBWIZARD_LDAP_CB_USESSL "DBACCESS_HID_PAGE_DBWIZARD_LDAP_CB_USESSL"
+#define HID_PAGE_DBWIZARD_LDAP_PB_TESTLDAPCONNECTION "DBACCESS_HID_PAGE_DBWIZARD_LDAP_PB_TESTLDAPCONNECTION"
+
+#define HID_PAGE_DBWIZARD_ADABAS_ET_ADABASNAME "DBACCESS_HID_PAGE_DBWIZARD_ADABAS_ET_ADABASNAME"
+#define HID_PAGE_DBWIZARD_ADABAS_PB_ADABASNAME "DBACCESS_HID_PAGE_DBWIZARD_ADABAS_PB_ADABASNAME"
+
+#define HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAODBC "DBACCESS_HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAODBC"
+#define HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAJDBC "DBACCESS_HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAJDBC"
+
+#define HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEDBNAME "DBACCESS_HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEDBNAME"
+#define HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEHOSTSERVER "DBACCESS_HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEHOSTSERVER"
+#define HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEPORT "DBACCESS_HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEPORT"
+#define HID_PAGE_DBWIZARD_ORACLE_ET_ORACLECLASS "DBACCESS_HID_PAGE_DBWIZARD_ORACLE_ET_ORACLECLASS"
+#define HID_PAGE_DBWIZARD_ORACLE_PB_TESTORACLECLASS "DBACCESS_HID_PAGE_DBWIZARD_ORACLE_PB_TESTORACLECLASS"
+
+#define HID_PAGE_DBWIZARD_JDBC_ET_JDBCURL "DBACCESS_HID_PAGE_DBWIZARD_JDBC_ET_JDBCURL"
+#define HID_PAGE_DBWIZARD_JDBC_PB_JDBCURL "DBACCESS_HID_PAGE_DBWIZARD_JDBC_PB_JDBCURL"
+
+#define HID_PAGE_DBWIZARD_JDBC_ET_JDBCCLASS "DBACCESS_HID_PAGE_DBWIZARD_JDBC_ET_JDBCCLASS"
+#define HID_PAGE_DBWIZARD_JDBC_PB_TESTJDBCCLASS "DBACCESS_HID_PAGE_DBWIZARD_JDBC_PB_TESTJDBCCLASS"
+
+#define HID_PAGE_DBWIZARD_JDBC_ET_MYSQLDBNAME "DBACCESS_HID_PAGE_DBWIZARD_JDBC_ET_MYSQLDBNAME"
+#define HID_PAGE_DBWIZARD_JDBC_ET_MYSQLHOSTSERVER "DBACCESS_HID_PAGE_DBWIZARD_JDBC_ET_MYSQLHOSTSERVER"
+#define HID_PAGE_DBWIZARD_JDBC_ET_MYSQLPORT "DBACCESS_HID_PAGE_DBWIZARD_JDBC_ET_MYSQLPORT"
+#define HID_PAGE_DBWIZARD_JDBC_ET_MYSQLCLASS "DBACCESS_HID_PAGE_DBWIZARD_JDBC_ET_MYSQLCLASS"
+#define HID_PAGE_DBWIZARD_JDBC_PB_TESTMYSQLCLASS "DBACCESS_HID_PAGE_DBWIZARD_JDBC_PB_TESTMYSQLCLASS"
+
+
+#define HID_PAGE_DBWIZARD_ADO_ET_ADOURL "DBACCESS_HID_PAGE_DBWIZARD_ADO_ET_ADOURL"
+#define HID_PAGE_DBWIZARD_ADO_PB_ADOURL "DBACCESS_HID_PAGE_DBWIZARD_ADO_PB_ADOURL"
+#define HID_PAGE_DBWIZARD_ADO_PB_TESTADOCONNECTION "DBACCESS_HID_PAGE_DBWIZARD_ADO_PB_TESTADOCONNECTION"
+
+#define HID_PAGE_DBWIZARD_ODBC_ET_NAMEOFODBCDATASOURCE "DBACCESS_HID_PAGE_DBWIZARD_ODBC_ET_NAMEOFODBCDATASOURCE"
+#define HID_PAGE_DBWIZARD_ODBC_PB_NAMEOFODBCDATASOURCE "DBACCESS_HID_PAGE_DBWIZARD_ODBC_PB_NAMEOFODBCDATASOURCE"
+
+#define HID_PAGE_DBWIZARD_SPREADSHEET_ET_SPREADSHEETPATH "DBACCESS_HID_PAGE_DBWIZARD_SPREADSHEET_ET_SPREADSHEETPATH"
+#define HID_PAGE_DBWIZARD_SPREADSHEET_PB_SPREADSHEETPATH "DBACCESS_HID_PAGE_DBWIZARD_SPREADSHEET_PB_SPREADSHEETPATH"
+#define HID_PAGE_DBWIZARD_SPREADSHEET_CB_SPREADSHEETPASSWORDREQUIRED "DBACCESS_HID_PAGE_DBWIZARD_SPREADSHEET_CB_SPREADSHEETPASSWORDREQUIRED"
+
+#define HID_PAGE_DBWIZARD_AUTHENTIFICATION_CB_GENERALPASSWORDREQUIRED "DBACCESS_HID_PAGE_DBWIZARD_AUTHENTIFICATION_CB_GENERALPASSWORDREQUIRED"
+#define HID_PAGE_DBWIZARD_AUTHENTIFICATION_ET_GENERALUSERNAME "DBACCESS_HID_PAGE_DBWIZARD_AUTHENTIFICATION_ET_GENERALUSERNAME"
+#define HID_PAGE_DBWIZARD_AUTHENTIFICATION_PB_TESTCONNECTION "DBACCESS_HID_PAGE_DBWIZARD_AUTHENTIFICATION_PB_TESTCONNECTION"
-#define HID_PAGE_DBWIZARD_FINAL_RB_REGISTERDATASOURCE (HID_DBACCESS_START + 373)
-#define HID_PAGE_DBWIZARD_FINAL_RB_DONTREGISTERDATASOURCE (HID_DBACCESS_START + 374)
-#define HID_PAGE_DBWIZARD_FINAL_CB_STARTTABLEWIZARD (HID_DBACCESS_START + 375)
-#define HID_PAGE_DBWIZARD_FINAL_CB_OPENAFTERWARDS (HID_DBACCESS_START + 376)
+#define HID_PAGE_DBWIZARD_FINAL_RB_REGISTERDATASOURCE "DBACCESS_HID_PAGE_DBWIZARD_FINAL_RB_REGISTERDATASOURCE"
+#define HID_PAGE_DBWIZARD_FINAL_RB_DONTREGISTERDATASOURCE "DBACCESS_HID_PAGE_DBWIZARD_FINAL_RB_DONTREGISTERDATASOURCE"
+#define HID_PAGE_DBWIZARD_FINAL_CB_STARTTABLEWIZARD "DBACCESS_HID_PAGE_DBWIZARD_FINAL_CB_STARTTABLEWIZARD"
+#define HID_PAGE_DBWIZARD_FINAL_CB_OPENAFTERWARDS "DBACCESS_HID_PAGE_DBWIZARD_FINAL_CB_OPENAFTERWARDS"
-#define HID_PAGE_DBWIZARD_USERDEFINED_ET_BROWSE (HID_DBACCESS_START + 377)
-#define HID_PAGE_DBWIZARD_USERDEFINED_BROWSE (HID_DBACCESS_START + 378)
-#define HID_INDEX_DIALOG_ACTION_TB (HID_DBACCESS_START + 379)
+#define HID_PAGE_DBWIZARD_USERDEFINED_ET_BROWSE "DBACCESS_HID_PAGE_DBWIZARD_USERDEFINED_ET_BROWSE"
+#define HID_PAGE_DBWIZARD_USERDEFINED_BROWSE "DBACCESS_HID_PAGE_DBWIZARD_USERDEFINED_BROWSE"
+#define HID_INDEX_DIALOG_ACTION_TB "DBACCESS_HID_INDEX_DIALOG_ACTION_TB"
-#define HID_DLG_DATABASE_WIZARD (HID_DBACCESS_START + 380)
+#define HID_DLG_DATABASE_WIZARD "DBACCESS_HID_DLG_DATABASE_WIZARD"
-#define HID_EXTENSION_NOT_PRESENT_DLG ( HID_DBACCESS_START + 381)
-#define HID_DLG_QRY_JOIN_CONTROL ( HID_DBACCESS_START + 382)
-#define HID_DSADMIN_IGNORECURRENCY ( HID_DBACCESS_START + 383)
-#define HID_MACRO_MIGRATION_BACKUP_LOCATION ( HID_DBACCESS_START + 384)
-#define HID_DSADMIN_PRIMARY_KEY_SUPPORT ( HID_DBACCESS_START + 385)
+#define HID_EXTENSION_NOT_PRESENT_DLG "DBACCESS_HID_EXTENSION_NOT_PRESENT_DLG"
+#define HID_DLG_QRY_JOIN_CONTROL "DBACCESS_HID_DLG_QRY_JOIN_CONTROL"
+#define HID_DSADMIN_IGNORECURRENCY "DBACCESS_HID_DSADMIN_IGNORECURRENCY"
+#define HID_MACRO_MIGRATION_BACKUP_LOCATION "DBACCESS_HID_MACRO_MIGRATION_BACKUP_LOCATION"
+#define HID_DSADMIN_PRIMARY_KEY_SUPPORT "DBACCESS_HID_DSADMIN_PRIMARY_KEY_SUPPORT"
// this one below have hid in number space HID_SBA_START
-#define HID_DLG_ADABAS_NEWDB (HID_SBA_START + 0)
-#define HID_DLG_ADABAS_DBNAME (HID_SBA_START + 1)
-#define HID_DLG_ADABAS_SYSUSR (HID_SBA_START + 2)
-#define HID_DLG_ADABAS_SYSPWD (HID_SBA_START + 3)
-#define HID_DLG_ADABAS_CONUSR (HID_SBA_START + 4)
-#define HID_DLG_ADABAS_CONPWD (HID_SBA_START + 5)
-#define HID_DLG_ADABAS_DATADEVSPACE_SIZE (HID_SBA_START + 6)
-#define HID_DLG_ADABAS_CACHE_SIZE (HID_SBA_START + 7)
-#define HID_DLG_ADABAS_USR (HID_SBA_START + 8)
-#define HID_DLG_ADABAS_DOMAINPWD (HID_SBA_START + 9)
-#define HID_DLG_ADABAS_RESTORE (HID_SBA_START + 10)
-#define HID_DLG_ADABAS_PBRESTORE (HID_SBA_START + 11)
-#define HID_DLG_ADABAS_SYSDEVSPACE (HID_SBA_START + 12)
-#define HID_DLG_ADABAS_PBSYSDEVSPACE (HID_SBA_START + 13)
-#define HID_DLG_ADABAS_TRANSACTIONLOG (HID_SBA_START + 14)
-#define HID_DLG_ADABAS_PBTRANSACTIONLOG (HID_SBA_START + 15)
-#define HID_DLG_ADABAS_DATADEVSPACE (HID_SBA_START + 16)
-#define HID_DLG_ADABAS_PBDATADEVSPACE (HID_SBA_START + 18)
-#define HID_DLG_ADABAS_TRANSACTIONLOG_SIZE (HID_SBA_START + 19)
-#define HID_DLG_ADABAS_CON_PWD (HID_SBA_START + 20)
-#define HID_DLG_ADABAS_SYS_PWD (HID_SBA_START + 21)
-#define HID_DLG_ADABAS_DOMAIN_PWD (HID_SBA_START + 22)
-//end of HID_SBA_START
-
-// don't forget to update the file util/hidother.src
-
+#define HID_DLG_ADABAS_NEWDB "DBACCESS_HID_DLG_ADABAS_NEWDB"
+#define HID_DLG_ADABAS_DBNAME "DBACCESS_HID_DLG_ADABAS_DBNAME"
+#define HID_DLG_ADABAS_SYSUSR "DBACCESS_HID_DLG_ADABAS_SYSUSR"
+#define HID_DLG_ADABAS_SYSPWD "DBACCESS_HID_DLG_ADABAS_SYSPWD"
+#define HID_DLG_ADABAS_CONUSR "DBACCESS_HID_DLG_ADABAS_CONUSR"
+#define HID_DLG_ADABAS_CONPWD "DBACCESS_HID_DLG_ADABAS_CONPWD"
+#define HID_DLG_ADABAS_DATADEVSPACE_SIZE "DBACCESS_HID_DLG_ADABAS_DATADEVSPACE_SIZE"
+#define HID_DLG_ADABAS_CACHE_SIZE "DBACCESS_HID_DLG_ADABAS_CACHE_SIZE"
+#define HID_DLG_ADABAS_USR "DBACCESS_HID_DLG_ADABAS_USR"
+#define HID_DLG_ADABAS_DOMAINPWD "DBACCESS_HID_DLG_ADABAS_DOMAINPWD"
+#define HID_DLG_ADABAS_RESTORE "DBACCESS_HID_DLG_ADABAS_RESTORE"
+#define HID_DLG_ADABAS_PBRESTORE "DBACCESS_HID_DLG_ADABAS_PBRESTORE"
+#define HID_DLG_ADABAS_SYSDEVSPACE "DBACCESS_HID_DLG_ADABAS_SYSDEVSPACE"
+#define HID_DLG_ADABAS_PBSYSDEVSPACE "DBACCESS_HID_DLG_ADABAS_PBSYSDEVSPACE"
+#define HID_DLG_ADABAS_TRANSACTIONLOG "DBACCESS_HID_DLG_ADABAS_TRANSACTIONLOG"
+#define HID_DLG_ADABAS_PBTRANSACTIONLOG "DBACCESS_HID_DLG_ADABAS_PBTRANSACTIONLOG"
+#define HID_DLG_ADABAS_DATADEVSPACE "DBACCESS_HID_DLG_ADABAS_DATADEVSPACE"
+#define HID_DLG_ADABAS_PBDATADEVSPACE "DBACCESS_HID_DLG_ADABAS_PBDATADEVSPACE"
+#define HID_DLG_ADABAS_TRANSACTIONLOG_SIZE "DBACCESS_HID_DLG_ADABAS_TRANSACTIONLOG_SIZE"
+#define HID_DLG_ADABAS_CON_PWD "DBACCESS_HID_DLG_ADABAS_CON_PWD"
+#define HID_DLG_ADABAS_SYS_PWD "DBACCESS_HID_DLG_ADABAS_SYS_PWD"
+#define HID_DLG_ADABAS_DOMAIN_PWD "DBACCESS_HID_DLG_ADABAS_DOMAIN_PWD"
+
+#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 c273a67edcbd..96ff91e7d0e8 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/dbaundomanager.hxx b/dbaccess/inc/dbaundomanager.hxx
new file mode 100755
index 000000000000..1b8627f66326
--- /dev/null
+++ b/dbaccess/inc/dbaundomanager.hxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ * 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 DBACCESS_DBAUNDOMANAGER_HXX
+#define DBACCESS_DBAUNDOMANAGER_HXX
+
+#include "dbaccessdllapi.h"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/document/XUndoManager.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/implbase1.hxx>
+
+#include <boost/scoped_ptr.hpp>
+
+class SfxUndoManager;
+
+//......................................................................................................................
+namespace dbaui
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= UndoManager
+ //==================================================================================================================
+ struct UndoManager_Impl;
+ typedef ::cppu::ImplHelper1< ::com::sun::star::document::XUndoManager > UndoManager_Base;
+ class DBACCESS_DLLPUBLIC UndoManager : public UndoManager_Base
+ {
+ public:
+ UndoManager( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex );
+ virtual ~UndoManager();
+
+ SfxUndoManager& GetSfxUndoManager() const;
+
+ // XInterface
+ virtual void SAL_CALL acquire( ) throw ();
+ virtual void SAL_CALL release( ) throw ();
+
+ // XComponent equivalents
+ void disposing();
+
+ // XUndoManager
+ virtual void SAL_CALL enterUndoContext( const ::rtl::OUString& i_title ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL enterHiddenUndoContext( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL leaveUndoContext( ) throw (::com::sun::star::util::InvalidStateException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addUndoAction( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoAction >& i_action ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL undo( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::document::UndoFailedException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL redo( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::document::UndoFailedException, ::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isUndoPossible( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isRedoPossible( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getCurrentUndoActionTitle( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getCurrentRedoActionTitle( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAllUndoActionTitles( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAllRedoActionTitles( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL clear( ) throw (::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL clearRedo( ) throw (::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL reset( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addUndoManagerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManagerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeUndoManagerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManagerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XLockable (base of XUndoManager)
+ virtual void SAL_CALL lock( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL unlock( ) throw (::com::sun::star::util::NotLockedException, ::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isLocked( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XChild (base of XUndoManager)
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
+
+ private:
+ ::boost::scoped_ptr< UndoManager_Impl > m_pImpl;
+ };
+
+//......................................................................................................................
+} // namespace dbaui
+//......................................................................................................................
+
+#endif // DBACCESS_DBAUNDOMANAGER_HXX
diff --git a/dbaccess/inc/singledoccontroller.hxx b/dbaccess/inc/dbsubcomponentcontroller.hxx
index 75e146ec2a05..a4d24359cebc 100644
--- a/dbaccess/inc/singledoccontroller.hxx
+++ b/dbaccess/inc/dbsubcomponentcontroller.hxx
@@ -26,11 +26,10 @@
*
************************************************************************/
-#ifndef DBAUI_SINGLEDOCCONTROLLER_HXX
-#define DBAUI_SINGLEDOCCONTROLLER_HXX
+#ifndef DBAUI_SUBCOMPONENTCONTROLLER_HXX
+#define DBAUI_SUBCOMPONENTCONTROLLER_HXX
#include "genericcontroller.hxx"
-#include "IEnvironment.hxx"
/** === begin UNO includes === **/
#include <com/sun/star/document/XScriptInvocationContext.hpp>
@@ -46,7 +45,6 @@
#include <comphelper/propertycontainer.hxx>
#include <connectivity/dbmetadata.hxx>
#include <cppuhelper/implbase2.hxx>
-#include <svl/undo.hxx>
#include <memory>
@@ -56,25 +54,20 @@ namespace dbaui
//........................................................................
//====================================================================
- //= OSingleDocumentController
+ //= DBSubComponentController
//====================================================================
- class OSingleDocumentController;
+ class DBSubComponentController;
typedef ::cppu::ImplInheritanceHelper2 < OGenericUnoController
, ::com::sun::star::document::XScriptInvocationContext
, ::com::sun::star::util::XModifiable
- > OSingleDocumentController_Base;
+ > DBSubComponentController_Base;
- struct OSingleDocumentControllerImpl;
- class DBACCESS_DLLPUBLIC OSingleDocumentController
- :public OSingleDocumentController_Base
- ,public IEnvironment
+ struct DBSubComponentController_Impl;
+ class DBACCESS_DLLPUBLIC DBSubComponentController : public DBSubComponentController_Base
{
private:
- ::std::auto_ptr<OSingleDocumentControllerImpl> m_pImpl;
-
- protected:
- SfxUndoManager m_aUndoManager;
+ ::std::auto_ptr<DBSubComponentController_Impl> m_pImpl;
private:
/** forces usage of a connection which we do not own
@@ -86,9 +79,7 @@ namespace dbaui
// OGenericUnoController - initialization
virtual void impl_initialize();
- // state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
- virtual FeatureState GetState(sal_uInt16 nId) const;
- // execute a feature
+ // OGenericUnoController
virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > getPrivateModel() const;
@@ -102,14 +93,6 @@ namespace dbaui
sal_Bool isEditable() const;
void setEditable(sal_Bool _bEditable);
- // need for undo's and redo's
- SfxUndoManager* getUndoMgr();
-
- /** addUndoActionAndInvalidate adds an undo action to the undoManager,
- additionally invalidates the UNDO and REDO slot
- @param pAction the undo action to add
- */
- void addUndoActionAndInvalidate(SfxUndoAction *pAction);
// ----------------------------------------------------------------
// asking for connection-related stuff
@@ -132,10 +115,9 @@ namespace dbaui
*/
const ::dbtools::DatabaseMetaData& getSdbMetaData() const;
- // IEnvironment
/** appends an error in the current environment.
*/
- virtual void appendError(
+ void appendError(
const ::rtl::OUString& _rErrorMessage,
const ::dbtools::StandardSQLState _eSQLState = ::dbtools::SQL_GENERAL_ERROR,
const sal_Int32 _nErrorCode = 1000
@@ -143,20 +125,20 @@ namespace dbaui
/** clears the error state.
*/
- virtual void clearError();
+ void clearError();
/** @return
<TRUE/> when an error was set otherwise <FALSE/>
*/
- virtual sal_Bool hasError() const;
+ sal_Bool hasError() const;
/** returns the current error
*/
- virtual const ::dbtools::SQLExceptionInfo& getError() const;
+ const ::dbtools::SQLExceptionInfo& getError() const;
/** displays the current error, or does nothing if there is no current error
*/
- virtual void displayError();
+ void displayError();
/** shows an info box with the string conntection lost.
*/
@@ -166,7 +148,7 @@ namespace dbaui
@return
the currently used connection.
*/
- virtual const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >&
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >&
getConnection() const;
/** returns the number formatter
@@ -192,8 +174,8 @@ namespace dbaui
virtual ::rtl::OUString SAL_CALL getTitle( ) throw (::com::sun::star::uno::RuntimeException);
protected:
- OSingleDocumentController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxORB);
- virtual ~OSingleDocumentController();
+ DBSubComponentController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxORB);
+ virtual ~DBSubComponentController();
virtual void disconnect();
virtual void reconnect( sal_Bool _bUI );
@@ -204,9 +186,6 @@ namespace dbaui
*/
virtual void losingConnection( );
- // late construction
- virtual sal_Bool Construct(Window* pParent);
-
protected:
// XEventListener
virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
@@ -224,13 +203,13 @@ namespace dbaui
sal_Int32 getCurrentStartNumber() const;
private:
- OSingleDocumentController(); // never implemented
+ DBSubComponentController(); // never implemented
};
//........................................................................
} // namespace dbaui
//........................................................................
-#endif // DBAUI_SINGLEDOCCONTROLLER_HXX
+#endif // DBAUI_SUBCOMPONENTCONTROLLER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/inc/genericcontroller.hxx b/dbaccess/inc/genericcontroller.hxx
index 510e554e93f6..3dad26798ec1 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 f8b0502574e0..ca2fa71856e7 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:l10n BOOST:boost connectivity svx stoc qadevOOo xmlscript LIBXSLT:libxslt test 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
@@ -8,7 +8,6 @@ ba dbaccess\source\core\recovery nmake - all ba_crecovery ba_inc NULL
ba dbaccess\source\core\misc nmake - all ba_cmisc ba_inc NULL
ba dbaccess\source\core\resource nmake - all ba_cres ba_inc NULL
ba dbaccess\source\filter\xml nmake - all ba_ffilter ba_shared ba_util ba_inc NULL
-ba dbaccess\source\filter\migration nmake - all ba_fmigration ba_shared ba_inc NULL
ba dbaccess\source\shared nmake - all ba_shared ba_cres ba_inc NULL
ba dbaccess\source\sdbtools\connection nmake - all ba_conntools ba_inc NULL
ba dbaccess\source\sdbtools\misc nmake - all ba_misctools ba_inc NULL
@@ -27,5 +26,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 383cc119c814..543714657d31 100644
--- a/dbaccess/prj/d.lst
+++ b/dbaccess/prj/d.lst
@@ -51,3 +51,9 @@ 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\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 4c964e82dc06..f8a57b8f6efb 100644
--- a/dbaccess/qa/complex/dbaccess/ApplicationController.java
+++ b/dbaccess/qa/complex/dbaccess/ApplicationController.java
@@ -27,27 +27,30 @@
package complex.dbaccess;
import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XNameAccess;
import com.sun.star.frame.FrameSearchFlag;
import com.sun.star.frame.XComponentLoader;
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.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 connectivity.tools.HsqlColumnDescriptor;
import connectivity.tools.HsqlDatabase;
import connectivity.tools.HsqlTableDescriptor;
-import helper.URLHelper;
-import java.io.File;
import java.io.IOException;
+
+// ---------- junit imports -----------------
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+// ------------------------------------------
+
/** complex test case for Base's application UI
*/
public class ApplicationController extends TestCase
@@ -63,16 +66,6 @@ public class ApplicationController extends TestCase
}
// --------------------------------------------------------------------------------------------------------
-
- public String[] getTestMethodNames()
- {
- return new String[]
- {
- "checkSaveAs"
- };
- }
-
- // --------------------------------------------------------------------------------------------------------
public String getTestObjectName()
{
return getClass().getName();
@@ -98,16 +91,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,6 +111,8 @@ public class ApplicationController extends TestCase
}
// --------------------------------------------------------------------------------------------------------
+ @Before
+ @Override
public void before() throws java.lang.Exception
{
super.before();
@@ -125,6 +120,8 @@ public class ApplicationController extends TestCase
}
// --------------------------------------------------------------------------------------------------------
+ @After
+ @Override
public void after() throws java.lang.Exception
{
impl_closeDocument();
@@ -132,6 +129,7 @@ public class ApplicationController extends TestCase
}
// --------------------------------------------------------------------------------------------------------
+ @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,
@@ -146,7 +144,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 +157,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 503db8090f88..6052c308dbdf 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;
@@ -77,82 +71,44 @@ public class Beamer extends complexlib.ComplexTestCase
}
// --------------------------------------------------------------------------------------------------------
- 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 getTestObjectName()
- {
- return getClass().getName();
- }
-
- // --------------------------------------------------------------------------------------------------------
- protected final XMultiServiceFactory getORB()
- {
- return (XMultiServiceFactory) param.getMSF();
- }
-
- // --------------------------------------------------------------------------------------------------------
- private void impl_closeDocument()
- {
- }
-
- // --------------------------------------------------------------------------------------------------------
+ @Before
+ @Override
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);
}
// --------------------------------------------------------------------------------------------------------
+ @After
+ @Override
public void after()
{
}
- // --------------------------------------------------------------------------------------------------------
+ // --------------------------------------------------------------------------------------------------------
+ @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 +119,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 +128,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 +141,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 3bba8fa45001..aa74ea87a3f6 100644
--- a/dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java
+++ b/dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java
@@ -26,13 +26,17 @@
************************************************************************/
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.Before;
+import static org.junit.Assert.*;
+// ------------------------------------------
+
public abstract class CRMBasedTestCase extends TestCase
{
protected CRMDatabase m_database;
@@ -42,16 +46,17 @@ 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");
}
}
// --------------------------------------------------------------------------------------------------------
+ @Before
@Override
public void before()
{
@@ -59,13 +64,16 @@ public abstract class CRMBasedTestCase extends TestCase
}
// --------------------------------------------------------------------------------------------------------
+ @After
@Override
public void after()
{
try
{
if ( m_database != null )
+ {
m_database.saveAndClose();
+ }
}
catch ( Exception ex )
{
diff --git a/dbaccess/qa/complex/dbaccess/CopyTableInterActionHandler.java b/dbaccess/qa/complex/dbaccess/CopyTableInterActionHandler.java
index 53527e356f78..7f88028f72c9 100755
--- a/dbaccess/qa/complex/dbaccess/CopyTableInterActionHandler.java
+++ b/dbaccess/qa/complex/dbaccess/CopyTableInterActionHandler.java
@@ -30,6 +30,8 @@ import com.sun.star.lib.uno.helper.WeakBase;
import com.sun.star.task.XInteractionHandler;
import com.sun.star.task.XInteractionRequest;
+import static org.junit.Assert.*;
+
/**
*
* @author oj93728
@@ -37,14 +39,12 @@ import com.sun.star.task.XInteractionRequest;
class CopyTableInterActionHandler extends WeakBase
implements XInteractionHandler
{
- private final CopyTableWizard test;
- public CopyTableInterActionHandler(CopyTableWizard testCase)
+ CopyTableInterActionHandler()
{
- test = testCase;
}
public void handle(XInteractionRequest xRequest)
{
- test.assure(xRequest.toString());
+ fail( "interaction handler is not expected to be called" );
}
}
diff --git a/dbaccess/qa/complex/dbaccess/CopyTableWizard.java b/dbaccess/qa/complex/dbaccess/CopyTableWizard.java
index 7c3db7f6020d..1facca3d8497 100755
--- a/dbaccess/qa/complex/dbaccess/CopyTableWizard.java
+++ b/dbaccess/qa/complex/dbaccess/CopyTableWizard.java
@@ -46,6 +46,13 @@ import connectivity.tools.DbaseDatabase;
import java.io.IOException;
import util.UITools;
+// ---------- junit imports -----------------
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+// ------------------------------------------
+
/** complex test case for Base's application UI
*/
public class CopyTableWizard extends CRMBasedTestCase
@@ -60,23 +67,8 @@ public class CopyTableWizard extends CRMBasedTestCase
}
// --------------------------------------------------------------------------------------------------------
- public String[] getTestMethodNames()
- {
- return new String[]
- {
- "copyTable", "copyTableDbase"
- };
- }
-
- // --------------------------------------------------------------------------------------------------------
- @Override
- public String getTestObjectName()
- {
- return getClass().getName();
- }
-// --------------------------------------------------------------------------------------------------------
- // --------------------------------------------------------------------------------------------------------
+ @After
@Override
public void after()
{
@@ -84,6 +76,7 @@ public class CopyTableWizard extends CRMBasedTestCase
super.after();
}
+ @Before
@Override
public void before()
{
@@ -91,23 +84,21 @@ public class CopyTableWizard extends CRMBasedTestCase
{
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("");
}
}
- // --------------------------------------------------------------------------------------------------------
-
-
+ // --------------------------------------------------------------------------------------------------------
class CopyThread implements Runnable
{
final XCopyTableWizard copyWizard;
- public CopyThread(final XCopyTableWizard copyWizard)
+ CopyThread(final XCopyTableWizard copyWizard)
{
this.copyWizard = copyWizard;
}
@@ -123,33 +114,35 @@ 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)
{
return null;
}
- XExtendedToolkit tk = (XExtendedToolkit) UnoRuntime.queryInterface(XExtendedToolkit.class, toolKit);
+ XExtendedToolkit tk = UnoRuntime.queryInterface( XExtendedToolkit.class, toolKit );
Object atw = tk.getActiveTopWindow();
- return (XWindow) UnoRuntime.queryInterface(XWindow.class, atw);
+ return UnoRuntime.queryInterface( XWindow.class, atw );
}
+ @Test
public void copyTable() throws Exception, IOException, java.lang.Exception
{
copyTable(source,source);
}
+ @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();
@@ -159,15 +152,10 @@ public class CopyTableWizard extends CRMBasedTestCase
}
}
- public void assure(final String message)
- {
- assure(message, false);
- }
-
private void copyTable(final String tableName, final XConnection sourceConnection, final XConnection destConnection) throws Exception, IOException, java.lang.Exception
{
- final XInteractionHandler interAction = new CopyTableInterActionHandler(this);
+ final XInteractionHandler interAction = new CopyTableInterActionHandler();
final XComponentContext context = getComponentContext();
final XPropertySet sourceDescriptor = DataAccessDescriptorFactory.get(context).createDataAccessDescriptor();
sourceDescriptor.setPropertyValue("CommandType", CommandType.TABLE);
@@ -177,7 +165,8 @@ public class CopyTableWizard extends CRMBasedTestCase
final XPropertySet destDescriptor = DataAccessDescriptorFactory.get(context).createDataAccessDescriptor();
destDescriptor.setPropertyValue("ActiveConnection", destConnection);
- final XCopyTableWizard copyWizard = com.sun.star.sdb.application.CopyTableWizard.createWithInteractionHandler(context, sourceDescriptor, destDescriptor, interAction);
+ final XCopyTableWizard copyWizard = com.sun.star.sdb.application.CopyTableWizard.createWithInteractionHandler(
+ context, sourceDescriptor, destDescriptor, interAction);
copyWizard.setOperation((short) 0); // com.sun.star.sdb.application.CopyDefinitionAndData
Optional<String> auto = new Optional<String>();
@@ -194,7 +183,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();
@@ -211,7 +200,7 @@ public class CopyTableWizard extends CRMBasedTestCase
}
catch (java.lang.Exception exception)
{
- exception.printStackTrace();
+ exception.printStackTrace( System.err );
}
}
catch (com.sun.star.lang.IndexOutOfBoundsException indexOutOfBoundsException)
diff --git a/dbaccess/qa/complex/dbaccess/DataSource.java b/dbaccess/qa/complex/dbaccess/DataSource.java
index f74d5af8d8f0..ae5d131c1e20 100644
--- a/dbaccess/qa/complex/dbaccess/DataSource.java
+++ b/dbaccess/qa/complex/dbaccess/DataSource.java
@@ -26,66 +26,49 @@
************************************************************************/
package complex.dbaccess;
-import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.container.XNameAccess;
import com.sun.star.uno.Exception;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XNamingService;
-import complexlib.ComplexTestCase;
import connectivity.tools.CRMDatabase;
import connectivity.tools.HsqlDatabase;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-public class DataSource extends ComplexTestCase
+// ---------- junit imports -----------------
+import org.junit.Test;
+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";
- }
-
- // --------------------------------------------------------------------------------------------------------
private void createTestCase()
{
try
{
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();
- }
-
- // --------------------------------------------------------------------------------------------------------
+ @Test
public void testRegistrationName()
{
try
@@ -93,18 +76,22 @@ public class DataSource extends ComplexTestCase
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"));
+ final XNamingService dataSourceRegistrations = UnoRuntime.queryInterface(
+ 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 d6bfa804eafa..0941bd318d47 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 0c712086d2fe..b22671fa2f18 100644
--- a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
+++ b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
@@ -26,6 +26,8 @@
************************************************************************/
package complex.dbaccess;
+import com.sun.star.lang.NotInitializedException;
+import com.sun.star.frame.DoubleInitializationException;
import com.sun.star.awt.XTopWindow;
import com.sun.star.beans.PropertyState;
import com.sun.star.document.DocumentEvent;
@@ -33,7 +35,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 +47,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 +57,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 +83,13 @@ import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
+// ---------- junit imports -----------------
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+// ------------------------------------------
+
public class DatabaseDocument extends TestCase implements com.sun.star.document.XDocumentEventListener
{
@@ -145,12 +152,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 +216,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 +233,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,24 +252,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
// ========================================================================================================
// --------------------------------------------------------------------------------------------------------
- public String[] getTestMethodNames()
- {
- return new String[]
- {
- "testLoadable",
- "testDocumentRevenants",
- "testDocumentEvents",
- "testGlobalEvents"
- };
- }
-
- // --------------------------------------------------------------------------------------------------------
- public String getTestObjectName()
- {
- return "DatabaseDocument";
- }
-
- // --------------------------------------------------------------------------------------------------------
+ @Before
public void before() throws java.lang.Exception
{
super.before();
@@ -274,25 +262,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");
}
}
// --------------------------------------------------------------------------------------------------------
+ @After
public void after() throws java.lang.Exception
{
try
@@ -302,15 +289,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();
@@ -323,7 +309,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
public Class unoInterfaceClass = null;
public String methodName = null;
- public UnoMethodDescriptor(Class _class, String _method)
+ UnoMethodDescriptor(Class _class, String _method)
{
unoInterfaceClass = _class;
methodName = _method;
@@ -356,8 +342,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
// --------------------------------------------------------------------------------------------------------
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 +353,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 +371,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 +385,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,6 +393,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
}
// --------------------------------------------------------------------------------------------------------
+ @Test
public void testLoadable() throws Exception, IOException
{
XModel databaseDoc = impl_createEmptyEmbeddedHSQLDocument();
@@ -426,18 +408,17 @@ 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
@@ -450,9 +431,9 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
// 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
@@ -478,7 +459,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 +482,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 +509,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 +518,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 +530,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,6 +555,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.
*/
+ @Test
public void testDocumentRevenants() throws Exception, IOException
{
// create an empty document
@@ -592,42 +569,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,6 +608,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
}
// --------------------------------------------------------------------------------------------------------
+ @Test
public void testDocumentEvents() throws Exception, IOException
{
// create an empty document
@@ -660,8 +634,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 +667,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 +677,11 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
}
// --------------------------------------------------------------------------------------------------------
+ @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 +690,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 +700,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 +711,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 +732,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 +740,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 +751,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 +764,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 +781,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 +798,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 +828,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 +837,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 +885,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 +937,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 +956,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 +967,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 +985,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 2b1b9342edcb..588755a8c29c 100644
--- a/dbaccess/qa/complex/dbaccess/Parser.java
+++ b/dbaccess/qa/complex/dbaccess/Parser.java
@@ -35,25 +35,16 @@ import com.sun.star.sdbc.SQLException;
import com.sun.star.uno.Exception;
import com.sun.star.uno.UnoRuntime;
-public class Parser extends CRMBasedTestCase
-{
- // --------------------------------------------------------------------------------------------------------
- public String[] getTestMethodNames()
- {
- return new String[] {
- "checkJoinSyntax",
- "checkParameterTypes",
- "checkWhere",
- };
- }
- // --------------------------------------------------------------------------------------------------------
- public String getTestObjectName()
- {
- return "Parser";
- }
+// ---------- junit imports -----------------
+import org.junit.Test;
+import static org.junit.Assert.*;
+// ------------------------------------------
+public class Parser extends CRMBasedTestCase
+{
// --------------------------------------------------------------------------------------------------------
+ @Override
protected void createTestCase()
{
try
@@ -64,10 +55,12 @@ 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");
}
}
+ // --------------------------------------------------------------------------------------------------------
+ @Test
public void checkWhere() throws Exception
{
final XSingleSelectQueryComposer composer = createQueryComposer();
@@ -107,6 +100,7 @@ public class Parser extends CRMBasedTestCase
// --------------------------------------------------------------------------------------------------------
/** verifies that aliases for inner queries work as expected
*/
+ @Test
public void checkJoinSyntax() throws Exception
{
final XSingleSelectQueryComposer composer = createQueryComposer();
@@ -144,7 +138,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,29 +148,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
*/
+ @Test
public void checkParameterTypes() throws Exception
{
impl_checkParameters(
diff --git a/dbaccess/qa/complex/dbaccess/PropertyBag.java b/dbaccess/qa/complex/dbaccess/PropertyBag.java
index c686be886bba..9f77559eab0b 100644
--- a/dbaccess/qa/complex/dbaccess/PropertyBag.java
+++ b/dbaccess/qa/complex/dbaccess/PropertyBag.java
@@ -27,14 +27,26 @@
package complex.dbaccess;
-import complexlib.ComplexTestCase;
+// import complexlib.ComplexTestCase;
+import com.sun.star.beans.NamedValue;
+import com.sun.star.beans.PropertyState;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.beans.PropertyAttribute;
+import com.sun.star.beans.XPropertyAccess;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.beans.XPropertyContainer;
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.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+// ------------------------------------------
+
+public class PropertyBag extends TestCase
{
private static final String VALUE = "Value";
private XPropertyContainer m_bag;
@@ -42,30 +54,23 @@ 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 getTestObjectName()
{
return "PropertyBag";
}
+ @Before
+ @Override
public void before()
{
- m_orb = (XMultiServiceFactory)param.getMSF();
+ m_orb = getMSF();
}
+ @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 +81,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 +95,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 +109,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 +122,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 +133,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 +151,15 @@ 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");
+ }
}
+ @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 +178,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 +198,26 @@ 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");
+ }
}
}
+ @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 +236,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 +246,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 +268,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 +290,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 81a651fd5696..e78f6859fb88 100644
--- a/dbaccess/qa/complex/dbaccess/Query.java
+++ b/dbaccess/qa/complex/dbaccess/Query.java
@@ -30,28 +30,19 @@ import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XIndexAccess;
import com.sun.star.container.XNameAccess;
import com.sun.star.container.XNamed;
-import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.sdb.XQueriesSupplier;
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.Test;
+import static org.junit.Assert.*;
+// ------------------------------------------
- connectivity.tools.HsqlDatabase m_database;
-
- // --------------------------------------------------------------------------------------------------------
- public String[] getTestMethodNames() {
- return new String[]
- {
- "testQueryColumns"
- };
- }
+public class Query extends TestCase {
- // --------------------------------------------------------------------------------------------------------
- public String getTestObjectName() {
- return "Query";
- }
+ connectivity.tools.HsqlDatabase m_database;
// --------------------------------------------------------------------------------------------------------
private void createTestCase()
@@ -60,25 +51,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();
+// }
// --------------------------------------------------------------------------------------------------------
+ @Test
public void testQueryColumns()
{
createTestCase();
@@ -107,20 +99,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 002d0395b791..ad78eb37718b 100644
--- a/dbaccess/qa/complex/dbaccess/QueryInQuery.java
+++ b/dbaccess/qa/complex/dbaccess/QueryInQuery.java
@@ -37,28 +37,17 @@ import connectivity.tools.RowSet;
import com.sun.star.sdbc.XStatement;
import com.sun.star.sdbc.XResultSet;
+// ---------- junit imports -----------------
+import org.junit.Test;
+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";
- }
// --------------------------------------------------------------------------------------------------------
+ @Override
protected void createTestCase()
{
try
@@ -69,7 +58,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 +73,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,6 +92,7 @@ public class QueryInQuery extends CRMBasedTestCase
// --------------------------------------------------------------------------------------------------------
/** executes a SQL statement simply selecting all columns from a query
*/
+ @Test
public void executeSimpleSelect() throws SQLException
{
verifyEqualRowSetContent(
@@ -113,6 +103,7 @@ public class QueryInQuery extends CRMBasedTestCase
// --------------------------------------------------------------------------------------------------------
/** verifies that aliases for inner queries work as expected
*/
+ @Test
public void executeAliasedSelect() throws SQLException
{
verifyEqualRowSetContent(
@@ -126,6 +117,7 @@ public class QueryInQuery extends CRMBasedTestCase
// --------------------------------------------------------------------------------------------------------
/** verifies that aliases for inner queries work as expected
*/
+ @Test
public void checkNameCollisions()
{
// create a query with a name which is used by a table
@@ -137,7 +129,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,11 +145,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 );
}
// --------------------------------------------------------------------------------------------------------
+ @Test
public void checkCyclicReferences() throws ElementExistException, WrappedTargetException, IllegalArgumentException
{
// some queries which create a cycle in the sub query tree
@@ -172,21 +165,22 @@ 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 );
}
// --------------------------------------------------------------------------------------------------------
+ @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 3ebfb2263148..90531b29f9ed 100644
--- a/dbaccess/qa/complex/dbaccess/RowSet.java
+++ b/dbaccess/qa/complex/dbaccess/RowSet.java
@@ -32,7 +32,6 @@ import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XIndexAccess;
import com.sun.star.lang.WrappedTargetException;
import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.sdb.CommandType;
import com.sun.star.sdb.XParametersSupplier;
import com.sun.star.sdb.XResultSetAccess;
@@ -49,7 +48,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 +56,12 @@ import connectivity.tools.sdb.Connection;
import java.lang.reflect.Method;
import java.util.Random;
-public class RowSet extends ComplexTestCase
+// ---------- junit imports -----------------
+import org.junit.Test;
+import static org.junit.Assert.*;
+// ------------------------------------------
+
+public class RowSet extends TestCase
{
static final int MAX_TABLE_ROWS = 100;
@@ -82,7 +86,7 @@ public class RowSet extends ComplexTestCase
XRow m_row;
int m_id;
- public ResultSetMovementStress(XResultSet _resultSet, int _id) throws java.lang.Exception
+ ResultSetMovementStress(XResultSet _resultSet, int _id) throws java.lang.Exception
{
m_resultSet = _resultSet;
m_row = UnoRuntime.queryInterface( XRow.class, m_resultSet );
@@ -99,50 +103,29 @@ 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";
- }
-
- // --------------------------------------------------------------------------------------------------------
private void createTestCase(boolean _defaultRowSet)
{
if (m_database == null)
{
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 +135,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,12 +145,6 @@ public class RowSet extends ComplexTestCase
}
// --------------------------------------------------------------------------------------------------------
- private XMultiServiceFactory getFactory()
- {
- return (XMultiServiceFactory) param.getMSF();
- }
-
- // --------------------------------------------------------------------------------------------------------
/** creates a com.sun.star.sdb.RowSet to use during the test
* @param command
* the command to use for the RowSet
@@ -196,7 +173,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 +197,16 @@ 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());
}
}
// --------------------------------------------------------------------------------------------------------
+ @Test
public void testRowSet() throws java.lang.Exception
{
- log.println("testing testRowSet");
+ System.out.println("testing testRowSet");
createTestCase(true);
// sequential postioning
@@ -278,8 +256,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 +275,7 @@ public class RowSet extends ComplexTestCase
}
catch (Exception e)
{
- assure("testSequentialPositining failed: " + e, false);
+ fail("testSequentialPositining failed: " + e);
}
}
@@ -309,13 +287,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 +317,7 @@ public class RowSet extends ComplexTestCase
}
catch (Exception e)
{
- assure("test3 failed: " + e, false);
+ fail("test3 failed: " + e);
}
}
@@ -366,14 +344,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 +362,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 +373,15 @@ public class RowSet extends ComplexTestCase
}
catch (Exception e)
{
- assure("testConcurrentAccess failed: " + e, false);
+ fail("testConcurrentAccess failed: " + e);
}
}
// --------------------------------------------------------------------------------------------------------
+ @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 +526,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 +566,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,14 +588,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;
}
// --------------------------------------------------------------------------------------------------------
+ @Test
public void testDeleteBehavior() throws Exception
{
createTestCase(true);
@@ -639,40 +619,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 +660,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 +674,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 +688,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 +703,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,14 +723,14 @@ 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);
}
// --------------------------------------------------------------------------------------------------------
/** checks whether deletions on the main RowSet properly interfere (or don't interfere) with the movement
* on a clone of the RowSet
*/
- @SuppressWarnings("empty-statement")
+ @Test
public void testCloneMovesPlusDeletions() throws SQLException, UnknownPropertyException, WrappedTargetException
{
createTestCase(true);
@@ -768,20 +748,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,36 +769,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
*/
+ @Test
public void testCloneMovesPlusInsertions() throws SQLException, UnknownPropertyException, WrappedTargetException, PropertyVetoException, com.sun.star.lang.IllegalArgumentException
{
createTestCase(true);
@@ -839,7 +820,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 +852,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 +869,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 +880,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 +894,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 +915,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 +934,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 +948,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,13 +978,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
*/
+ @Test
public void testParameters()
{
createTestCase(false);
diff --git a/dbaccess/qa/complex/dbaccess/RowSetEventListener.java b/dbaccess/qa/complex/dbaccess/RowSetEventListener.java
index c4569986a5d7..2f1d642c19b3 100644
--- a/dbaccess/qa/complex/dbaccess/RowSetEventListener.java
+++ b/dbaccess/qa/complex/dbaccess/RowSetEventListener.java
@@ -33,7 +33,7 @@ import com.sun.star.sdb.RowChangeEvent;
import com.sun.star.lang.EventObject;
import com.sun.star.beans.XPropertyChangeListener;
-public class RowSetEventListener implements XRowSetApproveListener,XRowSetListener,XPropertyChangeListener
+public final class RowSetEventListener implements XRowSetApproveListener,XRowSetListener,XPropertyChangeListener
{
public static final int APPROVE_CURSOR_MOVE = 0;
public static final int APPROVE_ROW_CHANGE = 1;
diff --git a/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java b/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
index bb3636100849..89d107ed5bb1 100755
--- a/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
+++ b/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
@@ -26,16 +26,31 @@
************************************************************************/
package complex.dbaccess;
+import com.sun.star.beans.PropertyState;
+import com.sun.star.sdb.SQLFilterOperator;
+import com.sun.star.beans.PropertyAttribute;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.beans.XPropertyContainer;
+import com.sun.star.beans.NamedValue;
+import com.sun.star.container.XNameAccess;
+import com.sun.star.sdbcx.XTablesSupplier;
+import com.sun.star.sdb.XParametersSupplier;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.sdbcx.XColumnsSupplier;
+import com.sun.star.container.XIndexAccess;
+import com.sun.star.sdb.CommandType;
+import com.sun.star.sdb.XSingleSelectQueryComposer;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.beans.*;
-import com.sun.star.sdbcx.*;
-import com.sun.star.sdb.*;
-import com.sun.star.container.*;
import com.sun.star.sdbc.DataType;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+// ---------- junit imports -----------------
+import org.junit.Test;
+import static org.junit.Assert.*;
+// ------------------------------------------
+
public class SingleSelectQueryComposer extends CRMBasedTestCase
{
@@ -48,32 +63,13 @@ 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";
- }
-
- // --------------------------------------------------------------------------------------------------------
private void createQueries() throws Exception
{
m_database.getDatabase().getDataSource().createQuery(INNERPRODUCTSQUERY, "SELECT * FROM \"products\"");
}
// --------------------------------------------------------------------------------------------------------
+ @Override
protected void createTestCase()
{
try
@@ -87,14 +83,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 +120,55 @@ 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
*/
+ @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)
*/
+ @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 +176,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,40 +194,41 @@ 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")
*/
+ @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
*/
+ @Test
public void testParameters()
{
try
@@ -241,8 +240,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,25 +250,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);
}
}
+ @Test
public void testConditionByColumn()
{
try
@@ -282,23 +280,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 +308,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,6 +328,7 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase
/** tests the disjunctive normal form functionality, aka the structured filter,
* of the composer
*/
+ @Test
public void testDisjunctiveNormalForm()
{
// a simple case: WHERE clause simply is a combination of predicates knitted with AND
diff --git a/dbaccess/qa/complex/dbaccess/TestCase.java b/dbaccess/qa/complex/dbaccess/TestCase.java
index b8dae3f6f350..f2cbdf988b38 100644
--- a/dbaccess/qa/complex/dbaccess/TestCase.java
+++ b/dbaccess/qa/complex/dbaccess/TestCase.java
@@ -26,12 +26,14 @@
************************************************************************/
package complex.dbaccess;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
import com.sun.star.beans.PropertyValue;
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,27 +42,29 @@ import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
-public abstract class TestCase extends complexlib.ComplexTestCase
-{
- // --------------------------------------------------------------------------------------------------------
- protected final XMultiServiceFactory getORB()
- {
- return (XMultiServiceFactory)param.getMSF();
- }
+// ---------- junit imports -----------------
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+// ------------------------------------------
+
+public abstract class TestCase
+{
// --------------------------------------------------------------------------------------------------------
protected final XComponentContext getComponentContext()
{
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 +87,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 +117,138 @@ 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[] {} ) );
}
// --------------------------------------------------------------------------------------------------------
+ /** invokes a given method on a given object, and assures a certain exception is caught
+ * @param _message
+ * is the message to print when the check fails
+ * @param _object
+ * is the object to invoke the method on
+ * @param _methodName
+ * is the name of the method to invoke
+ * @param _methodArgs
+ * are the arguments to pass to the method.
+ * @param _argClasses
+ * are the classes to assume for the arguments of the methods
+ * @param _expectedExceptionClass
+ * is the class of the exception to be caught. If this is null,
+ * it means that <em>no</em> exception must be throw by invoking the method.
+ */
+ protected void assureException( final String _message, final Object _object, final String _methodName,
+ final Class[] _argClasses, final Object[] _methodArgs, final Class _expectedExceptionClass )
+ {
+ Class objectClass = _object.getClass();
+
+ boolean noExceptionAllowed = ( _expectedExceptionClass == null );
+
+ boolean caughtExpected = noExceptionAllowed ? true : false;
+ try
+ {
+ Method method = objectClass.getMethod( _methodName, _argClasses );
+ method.invoke(_object, _methodArgs );
+ }
+ catch ( InvocationTargetException e )
+ {
+ caughtExpected = noExceptionAllowed
+ ? false
+ : ( e.getTargetException().getClass().equals( _expectedExceptionClass ) );
+ }
+ catch( Exception e )
+ {
+ caughtExpected = false;
+ }
+
+ assertTrue( _message, caughtExpected );
+ }
+
+ /** invokes a given method on a given object, and assures a certain exception is caught
+ * @param _message is the message to print when the check fails
+ * @param _object is the object to invoke the method on
+ * @param _methodName is the name of the method to invoke
+ * @param _methodArgs are the arguments to pass to the method. Those implicitly define
+ * the classes of the arguments of the method which is called.
+ * @param _expectedExceptionClass is the class of the exception to be caught. If this is null,
+ * it means that <em>no</em> exception must be throw by invoking the method.
+ */
+ protected void assureException( final String _message, final Object _object, final String _methodName,
+ final Object[] _methodArgs, final Class _expectedExceptionClass )
+ {
+ Class[] argClasses = new Class[ _methodArgs.length ];
+ for ( int i=0; i<_methodArgs.length; ++i )
+ argClasses[i] = _methodArgs[i].getClass();
+ assureException( _message, _object, _methodName, argClasses, _methodArgs, _expectedExceptionClass );
+ }
+
+ /** invokes a given method on a given object, and assures a certain exception is caught
+ * @param _object is the object to invoke the method on
+ * @param _methodName is the name of the method to invoke
+ * @param _methodArgs are the arguments to pass to the method. Those implicitly define
+ * the classes of the arguments of the method which is called.
+ * @param _expectedExceptionClass is the class of the exception to be caught. If this is null,
+ * it means that <em>no</em> exception must be throw by invoking the method.
+ */
+ protected void assureException( final Object _object, final String _methodName, final Object[] _methodArgs,
+ final Class _expectedExceptionClass )
+ {
+ assureException(
+ "did not catch the expected exception (" +
+ ( ( _expectedExceptionClass == null ) ? "none" : _expectedExceptionClass.getName() ) +
+ ") while calling " + _object.getClass().getName() + "." + _methodName,
+ _object, _methodName, _methodArgs, _expectedExceptionClass );
+ }
+
+ /** invokes a given method on a given object, and assures a certain exception is caught
+ * @param _object is the object to invoke the method on
+ * @param _methodName is the name of the method to invoke
+ * @param _methodArgs are the arguments to pass to the method
+ * @param _argClasses are the classes to assume for the arguments of the methods
+ * @param _expectedExceptionClass is the class of the exception to be caught. If this is null,
+ * it means that <em>no</em> exception must be throw by invoking the method.
+ */
+ protected void assureException( final Object _object, final String _methodName, final Class[] _argClasses,
+ final Object[] _methodArgs, final Class _expectedExceptionClass )
+ {
+ assureException(
+ "did not catch the expected exception (" +
+ ( ( _expectedExceptionClass == null ) ? "none" : _expectedExceptionClass.getName() ) +
+ ") while calling " + _object.getClass().getName() + "." + _methodName,
+ _object, _methodName, _argClasses, _methodArgs, _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
+ {
+ connection.setUp();
+ }
+
+ // --------------------------------------------------------------------------------------------------------
+ @AfterClass
+ public static void tearDownConnection() throws InterruptedException, com.sun.star.uno.Exception
+ {
+ 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 fc772b158f5f..536d66025deb 100644
--- a/dbaccess/qa/complex/dbaccess/UISettings.java
+++ b/dbaccess/qa/complex/dbaccess/UISettings.java
@@ -32,37 +32,26 @@ 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.Test;
+import static org.junit.Assert.*;
+// ------------------------------------------
+
public class UISettings extends TestCase
{
// --------------------------------------------------------------------------------------------------------
- public String[] getTestMethodNames()
- {
- return new String[] {
- "checkTableFormattingPersistence",
- "checkTransparentQueryColumnSettings"
- };
- }
-
- // --------------------------------------------------------------------------------------------------------
- public String getTestObjectName()
- {
- return "UISettings";
- }
-
- // --------------------------------------------------------------------------------------------------------
/** verifies that aliases for inner queries work as expected
*/
+ @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 +78,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 +87,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(), 0 );
+ assertEquals( "wrong font slant", FontSlant.ITALIC, (FontSlant)tableControlModel.getPropertyValue( "FontSlant" ) );
// close the doc
database.saveAndClose();
@@ -111,10 +100,11 @@ public class UISettings extends TestCase
* settings
* @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 +115,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 +133,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/dbaccess.sce b/dbaccess/qa/complex/dbaccess/dbaccess.sce
deleted file mode 100644
index c5fa408ff273..000000000000
--- a/dbaccess/qa/complex/dbaccess/dbaccess.sce
+++ /dev/null
@@ -1,12 +0,0 @@
--o complex.dbaccess.SingleSelectQueryComposer
--o complex.dbaccess.RowSet
--o complex.dbaccess.PropertyBag
--o complex.dbaccess.Query
--o complex.dbaccess.QueryInQuery
--o complex.dbaccess.DatabaseDocument
--o complex.dbaccess.DataSource
--o complex.dbaccess.Parser
--o complex.dbaccess.ApplicationController
--o complex.dbaccess.CopyTableWizard
--o complex.dbaccess.UISettings
--o complex.dbaccess.Beamer
diff --git a/dbaccess/qa/complex/dbaccess/makefile.mk b/dbaccess/qa/complex/dbaccess/makefile.mk
index 56a24c0292fc..760f94a294fa 100755
--- a/dbaccess/qa/complex/dbaccess/makefile.mk
+++ b/dbaccess/qa/complex/dbaccess/makefile.mk
@@ -25,54 +25,78 @@
#
#*************************************************************************
-PRJ = ..$/..$/..
-TARGET = DbaComplexTests
-PRJNAME = $(TARGET)
-PACKAGE = complex$/dbaccess
+.IF "$(OOO_JUNIT_JAR)" == ""
+nothing .PHONY:
+ @echo -----------------------------------------------------
+ @echo - JUnit not available, not building anything
+ @echo -----------------------------------------------------
+.ELSE
+
+PRJ = ../../..
+PRJNAME = dbaccess
+TARGET = qa_complex_dbaccess
+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 ------------------------------
+JARFILES = OOoRunner.jar ridl.jar test.jar juh.jar unoil.jar ConnectivityTools.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
-MAXLINELENGTH = 100000
+#----- create a jar from compiled files ----------------------------
-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
+#----- Java files --------------------------------------------------
+
+# here store only Files which contain a @Test
+JAVATESTFILES = \
+ ApplicationController.java \
+ Beamer.java \
+ DataSource.java \
+ DatabaseDocument.java \
+ Parser.java \
+ PropertyBag.java \
+ Query.java \
+ QueryInQuery.java \
+ RowSet.java \
+ SingleSelectQueryComposer.java \
+ UISettings.java \
+ CopyTableWizard.java \
+
+# put here all other files
+JAVAFILES = $(JAVATESTFILES) \
+ CRMBasedTestCase.java \
+ CopyTableInterActionHandler.java \
+ DatabaseApplication.java \
+ FileHelper.java \
+ RowSetEventListener.java \
+ TestCase.java \
+
+
+# Sample how to debug
+# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
# --- Targets ------------------------------------------------------
-.IF "$(depend)" == ""
+.INCLUDE: target.mk
+
ALL : ALLTAR
-.ELSE
-ALL: ALLDEP
-.ENDIF
-.INCLUDE : target.mk
+# --- subsequent tests ---------------------------------------------
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" != ""
+
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+ # Sample how to debug
+ # JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
-run: $(CLASSDIR)$/$(JARTARGET)
- +$(RUNNER_CALL) $(RUNNER_ARGS) -sce dbaccess.sce
+.END # "$(OOO_SUBSEQUENT_TESTS)" == ""
-run_%: $(CLASSDIR)$/$(JARTARGET)
- +$(RUNNER_CALL) $(RUNNER_ARGS) -o complex.dbaccess.$(@:s/run_//)
+.END # ELSE "$(OOO_JUNIT_JAR)" != ""
-.ENDIF # "$(SOLAR_JAVA)" == ""
diff --git a/dbaccess/source/core/api/BookmarkSet.hxx b/dbaccess/source/core/api/BookmarkSet.hxx
index 7e9a199d6c79..1b7b8052c285 100644
--- a/dbaccess/source/core/api/BookmarkSet.hxx
+++ b/dbaccess/source/core/api/BookmarkSet.hxx
@@ -41,7 +41,7 @@ namespace dbaccess
void updateColumn(sal_Int32 nPos,::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowUpdate > _xParameter,const connectivity::ORowSetValue& _rValue);
public:
- OBookmarkSet()
+ OBookmarkSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows)
{}
~OBookmarkSet()
{
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index 88eafa3c7d3a..134f57165a0f 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -69,8 +69,9 @@ using namespace ::osl;
DBG_NAME(OCacheSet)
-OCacheSet::OCacheSet()
- :m_bInserted(sal_False)
+OCacheSet::OCacheSet(sal_Int32 i_nMaxRows)
+ :m_nMaxRows(i_nMaxRows)
+ ,m_bInserted(sal_False)
,m_bUpdated(sal_False)
,m_bDeleted(sal_False)
{
diff --git a/dbaccess/source/core/api/CacheSet.hxx b/dbaccess/source/core/api/CacheSet.hxx
index 42f5d290edd5..961a0147e55b 100644
--- a/dbaccess/source/core/api/CacheSet.hxx
+++ b/dbaccess/source/core/api/CacheSet.hxx
@@ -62,11 +62,12 @@ namespace dbaccess
::com::sun::star::uno::Sequence<sal_Int32> m_aColumnTypes;
ORowSetRow m_aInsertRow;
::rtl::OUString m_aComposedTableName;
+ sal_Int32 m_nMaxRows;
sal_Bool m_bInserted;
sal_Bool m_bUpdated;
sal_Bool m_bDeleted;
- OCacheSet();
+ OCacheSet(sal_Int32 i_nMaxRows);
virtual ~OCacheSet();
void setParameter(sal_Int32 nPos
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 817fce0db86a..a977272ce57a 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -104,8 +104,10 @@ OKeySet::OKeySet(const connectivity::OSQLTable& _xTable,
const Reference< XIndexAccess>& _xTableKeys,
const ::rtl::OUString& _rUpdateTableName, // this can be the alias or the full qualified name
const Reference< XSingleSelectQueryAnalyzer >& _xComposer,
- const ORowSetValueVector& _aParameterValueForCache)
- :m_aParameterValueForCache(_aParameterValueForCache)
+ const ORowSetValueVector& _aParameterValueForCache,
+ sal_Int32 i_nMaxRows)
+ :OCacheSet(i_nMaxRows)
+ ,m_aParameterValueForCache(_aParameterValueForCache)
,m_pKeyColumnNames(NULL)
,m_pColumnNames(NULL)
,m_pParameterNames(NULL)
@@ -142,7 +144,7 @@ OKeySet::~OKeySet()
void OKeySet::initColumns()
{
Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData();
- bool bCase = (xMeta.is() && xMeta->storesMixedCaseQuotedIdentifiers()) ? true : false;
+ bool bCase = (xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers()) ? true : false;
m_pKeyColumnNames.reset( new SelectColumnsMetaData(bCase) );
m_pColumnNames.reset( new SelectColumnsMetaData(bCase) );
m_pParameterNames.reset( new SelectColumnsMetaData(bCase) );
@@ -929,8 +931,8 @@ void OKeySet::copyRowValue(const ORowSetRow& _rInsertRow,ORowSetRow& _rKeyRow,sa
SelectColumnsMetaData::const_iterator aPosEnd = (*m_pKeyColumnNames).end();
for(;aPosIter != aPosEnd;++aPosIter,++aIter)
{
+ impl_convertValue_throw(_rInsertRow,aPosIter->second);
*aIter = (_rInsertRow->get())[aPosIter->second.nPosition];
- impl_convertValue_throw(_rKeyRow,aPosIter->second);
aIter->setTypeKind(aPosIter->second.nType);
}
}
@@ -1327,7 +1329,7 @@ sal_Bool OKeySet::fetchRow()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::fetchRow" );
// fetch the next row and append on the keyset
sal_Bool bRet = sal_False;
- if ( !m_bRowCountFinal )
+ if ( !m_bRowCountFinal && (!m_nMaxRows || sal_Int32(m_aKeyMap.size()) < m_nMaxRows) )
bRet = m_xDriverSet->next();
if ( bRet )
{
diff --git a/dbaccess/source/core/api/KeySet.hxx b/dbaccess/source/core/api/KeySet.hxx
index 3ee20477f63a..10e9f2166827 100644
--- a/dbaccess/source/core/api/KeySet.hxx
+++ b/dbaccess/source/core/api/KeySet.hxx
@@ -150,7 +150,8 @@ namespace dbaccess
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xTableKeys,
const ::rtl::OUString& _rUpdateTableName,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryAnalyzer >& _xComposer,
- const ORowSetValueVector& _aParameterValueForCache);
+ const ORowSetValueVector& _aParameterValueForCache,
+ sal_Int32 i_nMaxRows);
// late ctor which can throw exceptions
virtual void construct(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xDriverSet,const ::rtl::OUString& i_sRowSetFilter);
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index 656a736df372..bf9969470594 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -101,8 +101,9 @@ DBG_NAME(OptimisticSet)
OptimisticSet::OptimisticSet(const ::comphelper::ComponentContext& _rContext,
const Reference< XConnection>& i_xConnection,
const Reference< XSingleSelectQueryAnalyzer >& _xComposer,
- const ORowSetValueVector& _aParameterValueForCache)
- :OKeySet(NULL,NULL,::rtl::OUString(),_xComposer,_aParameterValueForCache)
+ const ORowSetValueVector& _aParameterValueForCache,
+ sal_Int32 i_nMaxRows)
+ :OKeySet(NULL,NULL,::rtl::OUString(),_xComposer,_aParameterValueForCache,i_nMaxRows)
,m_aSqlParser( _rContext.getLegacyServiceFactory() )
,m_aSqlIterator( i_xConnection, Reference<XTablesSupplier>(_xComposer,UNO_QUERY)->getTables(), m_aSqlParser, NULL )
,m_bResultSetChanged(false)
@@ -123,7 +124,7 @@ void OptimisticSet::construct(const Reference< XResultSet>& _xDriverSet,const ::
initColumns();
Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData();
- bool bCase = (xMeta.is() && xMeta->storesMixedCaseQuotedIdentifiers()) ? true : false;
+ bool bCase = (xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers()) ? true : false;
Reference<XColumnsSupplier> xQueryColSup(m_xComposer,UNO_QUERY);
const Reference<XNameAccess> xQueryColumns = xQueryColSup->getColumns();
const Reference<XTablesSupplier> xTabSup(m_xComposer,UNO_QUERY);
diff --git a/dbaccess/source/core/api/OptimisticSet.hxx b/dbaccess/source/core/api/OptimisticSet.hxx
index 7a72ec55e6d6..75cb3fdfd612 100644
--- a/dbaccess/source/core/api/OptimisticSet.hxx
+++ b/dbaccess/source/core/api/OptimisticSet.hxx
@@ -76,7 +76,8 @@ namespace dbaccess
OptimisticSet(const ::comphelper::ComponentContext& _rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& i_xConnection,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryAnalyzer >& _xComposer,
- const ORowSetValueVector& _aParameterValueForCache);
+ const ORowSetValueVector& _aParameterValueForCache,
+ sal_Int32 i_nMaxRows);
// late ctor which can throw exceptions
virtual void construct(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xDriverSet,const ::rtl::OUString& i_sRowSetFilter);
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 02e84ea2b932..fc3fdb7ebb8e 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -348,7 +348,7 @@ void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const
case PROPERTY_ID_FETCHSIZE:
if(m_pCache)
{
- m_pCache->setMaxRowSize(m_nFetchSize);
+ m_pCache->setFetchSize(m_nFetchSize);
fireRowcount();
}
break;
@@ -1067,7 +1067,7 @@ void ORowSet::implCancelRowUpdates( sal_Bool _bNotifyModified ) SAL_THROW( ( SQL
positionCache( MOVE_NONE_REFRESH_ONLY );
ORowSetRow aOldValues;
- if ( !m_aCurrentRow.isNull() )
+ if ( !m_bModified && _bNotifyModified && !m_aCurrentRow.isNull() )
aOldValues = new ORowSetValueVector( *(*m_aCurrentRow) );
m_pCache->cancelRowUpdates();
@@ -1077,11 +1077,13 @@ void ORowSet::implCancelRowUpdates( sal_Bool _bNotifyModified ) SAL_THROW( ( SQL
m_aCurrentRow.setBookmark(m_aBookmark);
// notification order
- // - column values
- ORowSetBase::firePropertyChange(aOldValues);
// IsModified
if( !m_bModified && _bNotifyModified )
+ {
+ // - column values
+ ORowSetBase::firePropertyChange(aOldValues);
fireProperty(PROPERTY_ID_ISMODIFIED,sal_False,sal_True);
+ }
}
void SAL_CALL ORowSet::cancelRowUpdates( ) throw(SQLException, RuntimeException)
@@ -1643,6 +1645,8 @@ Reference< XResultSet > ORowSet::impl_prepareAndExecute_throw()
try
{
xStatementProps->setPropertyValue( PROPERTY_USEBOOKMARKS, makeAny( sal_True ) );
+ xStatementProps->setPropertyValue( PROPERTY_MAXROWS, makeAny( m_nMaxRows ) );
+
setStatementResultSetType( xStatementProps, m_nResultSetType, m_nResultSetConcurrency );
}
catch ( const Exception& )
@@ -1797,13 +1801,13 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "frank.schoenheit@sun.com", "ORowSet::execute_NoApprove_NoNewConn: creating cache" );
- m_pCache = new ORowSetCache( xResultSet, m_xComposer.get(), m_aContext, aComposedUpdateTableName, m_bModified, m_bNew,m_aParameterValueForCache,m_aFilter );
+ m_pCache = new ORowSetCache( xResultSet, m_xComposer.get(), m_aContext, aComposedUpdateTableName, m_bModified, m_bNew,m_aParameterValueForCache,m_aFilter,m_nMaxRows );
if ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY )
{
m_nPrivileges = Privilege::SELECT;
m_pCache->m_nPrivileges = Privilege::SELECT;
}
- m_pCache->setMaxRowSize(m_nFetchSize);
+ m_pCache->setFetchSize(m_nFetchSize);
m_aCurrentRow = m_pCache->createIterator(this);
m_aOldRow = m_pCache->registerOldRow();
}
@@ -2213,7 +2217,7 @@ Reference< XNameAccess > ORowSet::impl_getTables_throw()
try
{
Reference<XDatabaseMetaData> xMeta = m_xActiveConnection->getMetaData();
- bCase = xMeta.is() && xMeta->storesMixedCaseQuotedIdentifiers();
+ bCase = xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers();
}
catch(SQLException&)
{
@@ -2700,9 +2704,9 @@ void SAL_CALL ORowSet::refreshRow( ) throw(SQLException, RuntimeException)
// notification order:
if ( m_bModified && m_pCache )
- // - column values
implCancelRowUpdates( sal_False ); // do _not_ notify the IsModify - will do this ourself below
+ // - column values
ORowSetBase::refreshRow();
// - IsModified
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index 202b0fd88339..531e31046edf 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -1190,8 +1190,11 @@ void SAL_CALL ORowSetBase::refreshRow( ) throw(SQLException, RuntimeException)
if(!(m_bBeforeFirst || m_bAfterLast))
{
+ sal_Bool bWasNew = m_pCache->m_bNew || impl_rowDeleted();
+ ORowSetRow aOldValues = getOldRow(bWasNew);
positionCache( MOVE_NONE_REFRESH_ONLY );
m_pCache->refreshRow();
+ firePropertyChange(aOldValues);
}
}
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index 1b1a60090a25..4640b1bc6f60 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -90,7 +90,8 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
sal_Bool& _bModified,
sal_Bool& _bNew,
const ORowSetValueVector& _aParameterValueForCache,
- const ::rtl::OUString& i_sRowSetFilter)
+ const ::rtl::OUString& i_sRowSetFilter,
+ sal_Int32 i_nMaxRows)
:m_xSet(_xRs)
,m_xMetaData(Reference< XResultSetMetaDataSupplier >(_xRs,UNO_QUERY)->getMetaData())
,m_aContext( _rContext )
@@ -127,7 +128,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
xUp->cancelRowUpdates();
_xRs->beforeFirst();
m_nPrivileges = Privilege::SELECT|Privilege::DELETE|Privilege::INSERT|Privilege::UPDATE;
- m_pCacheSet = new WrappedResultSet();
+ m_pCacheSet = new WrappedResultSet(i_nMaxRows);
m_xCacheSet = m_pCacheSet;
m_pCacheSet->construct(_xRs,i_sRowSetFilter);
return;
@@ -174,7 +175,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
if ( aTableNames.getLength() > 1 && !_rUpdateTableName.getLength() && bNeedKeySet )
{// here we have a join or union and nobody told us which table to update, so we update them all
m_nPrivileges = Privilege::SELECT|Privilege::DELETE|Privilege::INSERT|Privilege::UPDATE;
- OptimisticSet* pCursor = new OptimisticSet(m_aContext,xConnection,_xAnalyzer,_aParameterValueForCache);
+ OptimisticSet* pCursor = new OptimisticSet(m_aContext,xConnection,_xAnalyzer,_aParameterValueForCache,i_nMaxRows);
m_pCacheSet = pCursor;
m_xCacheSet = m_pCacheSet;
try
@@ -235,7 +236,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
{
try
{
- m_pCacheSet = new OBookmarkSet();
+ m_pCacheSet = new OBookmarkSet(i_nMaxRows);
m_xCacheSet = m_pCacheSet;
m_pCacheSet->construct(_xRs,i_sRowSetFilter);
@@ -266,7 +267,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
if(!bAllKeysFound )
{
- m_pCacheSet = new OStaticSet();
+ m_pCacheSet = new OStaticSet(i_nMaxRows);
m_xCacheSet = m_pCacheSet;
m_pCacheSet->construct(_xRs,i_sRowSetFilter);
m_nPrivileges = Privilege::SELECT;
@@ -303,7 +304,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
}
}
- OKeySet* pKeySet = new OKeySet(m_aUpdateTable,xUpdateTableKeys,aUpdateTableName ,_xAnalyzer,_aParameterValueForCache);
+ OKeySet* pKeySet = new OKeySet(m_aUpdateTable,xUpdateTableKeys,aUpdateTableName ,_xAnalyzer,_aParameterValueForCache,i_nMaxRows);
try
{
m_pCacheSet = pKeySet;
@@ -330,7 +331,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
if ( m_pCacheSet )
m_pCacheSet = NULL;
m_xCacheSet = NULL;
- m_pCacheSet = new OStaticSet();
+ m_pCacheSet = new OStaticSet(i_nMaxRows);
m_xCacheSet = m_pCacheSet;
m_pCacheSet->construct(_xRs,i_sRowSetFilter);
m_nPrivileges = Privilege::SELECT;
@@ -366,7 +367,7 @@ ORowSetCache::~ORowSetCache()
DBG_DTOR(ORowSetCache,NULL);
}
-void ORowSetCache::setMaxRowSize(sal_Int32 _nSize)
+void ORowSetCache::setFetchSize(sal_Int32 _nSize)
{
if(_nSize == m_nFetchSize)
return;
diff --git a/dbaccess/source/core/api/RowSetCache.hxx b/dbaccess/source/core/api/RowSetCache.hxx
index 3256babcfaa5..ba1aaa937996 100644
--- a/dbaccess/source/core/api/RowSetCache.hxx
+++ b/dbaccess/source/core/api/RowSetCache.hxx
@@ -154,7 +154,8 @@ namespace dbaccess
sal_Bool& _bModified,
sal_Bool& _bNew,
const ORowSetValueVector& _aParameterValueForCache,
- const ::rtl::OUString& i_sRowSetFilter);
+ const ::rtl::OUString& i_sRowSetFilter,
+ sal_Int32 i_nMaxRows);
~ORowSetCache();
@@ -163,7 +164,7 @@ namespace dbaccess
ORowSetCacheIterator createIterator(ORowSetBase* _pRowSet);
void deleteIterator(const ORowSetBase* _pRowSet);
// sets the size of the matrix
- void setMaxRowSize(sal_Int32 _nSize);
+ void setFetchSize(sal_Int32 _nSize);
TORowSetOldRowHelperRef registerOldRow();
void deregisterOldRow(const TORowSetOldRowHelperRef& _rRow);
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 1c968d6e72ca..cd9577f94068 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1061,7 +1061,7 @@ sal_Bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode * pCondition,
}
else if (SQL_ISRULE(pCondition,test_for_null))
{
- if (SQL_ISTOKEN(pCondition->getChild(1)->getChild(2),NOT) )
+ if (SQL_ISTOKEN(pCondition->getChild(1)->getChild(1),NOT) )
aItem.Handle = SQLFilterOperator::NOT_SQLNULL;
else
aItem.Handle = SQLFilterOperator::SQLNULL;
diff --git a/dbaccess/source/core/api/StaticSet.cxx b/dbaccess/source/core/api/StaticSet.cxx
index 59f892d8d649..f76303f41299 100644
--- a/dbaccess/source/core/api/StaticSet.cxx
+++ b/dbaccess/source/core/api/StaticSet.cxx
@@ -102,7 +102,7 @@ sal_Bool OStaticSet::fetchRow()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::fetchRow" );
sal_Bool bRet = sal_False;
- if ( !m_bEnd )
+ if ( !m_bEnd && (!m_nMaxRows || sal_Int32(m_aSet.size()) < m_nMaxRows) )
bRet = m_xDriverSet->next();
if ( bRet )
{
@@ -121,9 +121,10 @@ void OStaticSet::fillAllRows()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::fillAllRows" );
if(!m_bEnd)
{
+ sal_Int32 nColumnCount = m_xSetMetaData->getColumnCount();
while(m_xDriverSet->next())
{
- ORowSetRow pRow = new connectivity::ORowVector< connectivity::ORowSetValue >(m_xSetMetaData->getColumnCount());
+ ORowSetRow pRow = new connectivity::ORowVector< connectivity::ORowSetValue >(nColumnCount);
m_aSet.push_back(pRow);
m_aSetIter = m_aSet.end() - 1;
(pRow->get())[0] = getRow();
diff --git a/dbaccess/source/core/api/StaticSet.hxx b/dbaccess/source/core/api/StaticSet.hxx
index d69dfca465ec..82b152161a31 100644
--- a/dbaccess/source/core/api/StaticSet.hxx
+++ b/dbaccess/source/core/api/StaticSet.hxx
@@ -43,8 +43,8 @@ namespace dbaccess
sal_Bool fetchRow();
void fillAllRows();
public:
- OStaticSet()
- : m_aSetIter(m_aSet.end())
+ OStaticSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows)
+ , m_aSetIter(m_aSet.end())
, m_bEnd(sal_False)
{
m_aSet.push_back(NULL); // this is the beforefirst record
diff --git a/dbaccess/source/core/api/WrappedResultSet.hxx b/dbaccess/source/core/api/WrappedResultSet.hxx
index 21f6169f75ab..8765a183afb7 100644
--- a/dbaccess/source/core/api/WrappedResultSet.hxx
+++ b/dbaccess/source/core/api/WrappedResultSet.hxx
@@ -44,7 +44,7 @@ namespace dbaccess
void updateColumn(sal_Int32 nPos,::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowUpdate > _xParameter,const connectivity::ORowSetValue& _rValue);
public:
- WrappedResultSet()
+ WrappedResultSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows)
{}
~WrappedResultSet()
{
diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx
index 53f691948bfe..04dd9793cddf 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -181,7 +181,7 @@ void OQuery::rebuildColumns()
::rtl::Reference< OSQLColumns > aParseColumns(
::connectivity::parse::OParseColumn::createColumnsForResultSet( xResultSetMeta, xDBMeta,xColumnDefinitions ) );
xColumns = OPrivateColumns::createWithIntrinsicNames(
- aParseColumns, xDBMeta->storesMixedCaseQuotedIdentifiers(), *this, m_aMutex );
+ aParseColumns, xDBMeta->supportsMixedCaseQuotedIdentifiers(), *this, m_aMutex );
if ( !xColumns.is() )
throw RuntimeException();
}
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index 14a7816d0ce6..ebd2e7c9717d 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -445,7 +445,7 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const String& _rDsn) const
for ( size_t i=0; i < SAL_N_ELEMENTS( aKnowPrefixes ); ++i )
{
- USHORT nMatchLen = aKnowPrefixes[i].bMatchComplete ? sDsn.Len() : (USHORT)rtl_str_getLength( aKnowPrefixes[i].pAsciiPrefix );
+ sal_uInt16 nMatchLen = aKnowPrefixes[i].bMatchComplete ? sDsn.Len() : (sal_uInt16)rtl_str_getLength( aKnowPrefixes[i].pAsciiPrefix );
if ( sDsn.EqualsIgnoreCaseAscii( aKnowPrefixes[i].pAsciiPrefix, 0, nMatchLen ) )
return aKnowPrefixes[i].eType;
}
diff --git a/dbaccess/source/core/misc/services.cxx b/dbaccess/source/core/misc/services.cxx
index 5cc8a588f085..14173af33978 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 c431f2cd233d..1a572c8a151f 100644
--- a/dbaccess/source/core/resource/strings.src
+++ b/dbaccess/source/core/resource/strings.src
@@ -305,7 +305,7 @@ String RID_STR_ROW_ALREADY_DELETED
String RID_STR_UPDATE_FAILED
{
- Text [ en-US ] = "Current row could be updated.";
+ Text [ en-US ] = "Current row could not be updated.";
};
//-------------------------------------------------------------------------
diff --git a/dbaccess/source/ext/adabas/Acomponentmodule.cxx b/dbaccess/source/ext/adabas/Acomponentmodule.cxx
index 2a4d84bb5ce8..6f153937fe2f 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_FAIL("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_FAIL("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 8ac75326a56e..7625ca26e810 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
@@ -184,7 +169,7 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService
class ModuleRes : public ::ResId
{
public:
- ModuleRes(USHORT _nId) : ResId(_nId, *OModule::getResManager()) { }
+ ModuleRes(sal_uInt16 _nId) : ResId(_nId, *OModule::getResManager()) { }
};
//==========================================================================
diff --git a/dbaccess/source/ext/adabas/AdabasNewDb.cxx b/dbaccess/source/ext/adabas/AdabasNewDb.cxx
index 648bc3c990dd..0438e4ae00dd 100644
--- a/dbaccess/source/ext/adabas/AdabasNewDb.cxx
+++ b/dbaccess/source/ext/adabas/AdabasNewDb.cxx
@@ -120,7 +120,7 @@ DBG_NAME( OAdabasNewDbDlg )
OAdabasNewDbDlg::OAdabasNewDbDlg( Window* pParent,
const Reference<XCreateCatalog>& _rxCreateCatalog,
const Reference< XMultiServiceFactory >& _rxORB,
- BOOL _bRestore)
+ sal_Bool _bRestore)
:ModalDialog( pParent, ModuleRes( DLG_ADABAS_NEWDB ))
,m_FT_DATABASENAME( this, ModuleRes( FT_DATABASENAME ) )
,m_ET_DATABASENAME( this, ModuleRes( ET_DATABASENAME ) )
@@ -213,7 +213,7 @@ OAdabasNewDbDlg::OAdabasNewDbDlg( Window* pParent,
m_ET_SYSUSR.SetModifyHdl( LINK(this,OAdabasNewDbDlg,LoseFocusHdl));
m_ET_CONUSR.SetModifyHdl( LINK(this,OAdabasNewDbDlg,LoseFocusHdl));
- m_ET_DOMAIN_USR.Enable(FALSE);
+ m_ET_DOMAIN_USR.Enable(sal_False);
}
@@ -341,7 +341,7 @@ OAdabasNewDbDlg::OAdabasNewDbDlg( Window* pParent,
m_ET_CONUSR.SetText(String::CreateFromAscii("CONTROL"));
m_PB_OK.SetClickHdl(LINK(this,OAdabasNewDbDlg,ImplOKHdl));
- m_PB_OK.Enable(FALSE);
+ m_PB_OK.Enable(sal_False);
m_ET_DATABASENAME.SetModifyHdl( LINK(this,OAdabasNewDbDlg,LoseFocusHdl));
@@ -427,7 +427,7 @@ IMPL_LINK( OAdabasNewDbDlg, ImplOKHdl, OKButton*, /*EMPTYARG*/ )
}
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
{
// we need url
@@ -451,13 +451,13 @@ IMPL_LINK( OAdabasNewDbDlg, ImplOKHdl, OKButton*, /*EMPTYARG*/ )
else if(m_ET_SYSUSR.GetText() == m_ET_CONUSR.GetText())
aErrorMessage = String(ModuleRes(STR_NO_SAME_USER));
else
- bOk = TRUE;
+ bOk = sal_True;
if (!bOk)
{
ErrorBox(this, WB_OK, aErrorMessage).Execute();
- return FALSE;
+ return sal_False;
}
sal_Int32 nPos = 0;
@@ -502,7 +502,7 @@ IMPL_LINK( OAdabasNewDbDlg, ImplOKHdl, OKButton*, /*EMPTYARG*/ )
m_aCreatorThread->setTerminateHandler(LINK(this,OAdabasNewDbDlg,TerminateHdl));
m_aCreatorThread->create();
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
IMPL_LINK( OAdabasNewDbDlg, TerminateHdl, void*, /*NOTUSABLE*/ )
@@ -689,7 +689,7 @@ IMPL_LINK( OAdabasNewDbDlg, PwdClickHdl, Button *, pButton )
//------------------------------------------------------------------------
void OAdabasNewDbDlg::CheckBitmaps()
{
- INT16 i=0;
+ sal_Int16 i=0;
if(m_ConPwd.Len() && m_ET_CONUSR.GetText().Len())
i++,m_BMP_CON.SetImage(ModuleRes(((m_nSetBitmap & 2) == 2) ? DEFAULT_BLUE : CHECK_GREEN));
else
diff --git a/dbaccess/source/ext/adabas/AdabasNewDb.hxx b/dbaccess/source/ext/adabas/AdabasNewDb.hxx
index 9ab36e88060c..224c175ccd3f 100644
--- a/dbaccess/source/ext/adabas/AdabasNewDb.hxx
+++ b/dbaccess/source/ext/adabas/AdabasNewDb.hxx
@@ -111,8 +111,8 @@ namespace adabasui
String m_sDbConfig;
::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XCreateCatalog> m_xCreateCatalog;
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xORB;
- BOOL m_bRestore;
- INT8 m_nSetBitmap;
+ sal_Bool m_bRestore;
+ sal_Int8 m_nSetBitmap;
::std::auto_ptr<WaitObject> m_aCreatorWait;
::std::auto_ptr<ODatabaseCreator> m_aCreatorThread;
@@ -135,7 +135,7 @@ namespace adabasui
OAdabasNewDbDlg(Window* pParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XCreateCatalog>& _rxCreateCatalog,
const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& _rxORB,
- BOOL _bRestore=FALSE);
+ sal_Bool _bRestore=sal_False);
virtual ~OAdabasNewDbDlg();
::rtl::OUString GetDatabaseName() const { return m_ET_DATABASENAME.GetText(); }
diff --git a/dbaccess/source/ext/adabas/Aservices.cxx b/dbaccess/source/ext/adabas/Aservices.cxx
index 397184d85bf4..8ff5aef57489 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_FAIL("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 000000000000..e547a0cffd4e
--- /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 db9c0a52f288..926e49f5f1a5 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 9630d7e06768..f0e1c69934bc 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 e23310ac92f3..8dbbe7abc3ff 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 000000000000..a74e94510aeb
--- /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/dbmm_types.cxx b/dbaccess/source/ext/macromigration/dbmm_types.cxx
index ee0c32b7eef7..e85026ae5ec1 100644
--- a/dbaccess/source/ext/macromigration/dbmm_types.cxx
+++ b/dbaccess/source/ext/macromigration/dbmm_types.cxx
@@ -44,7 +44,7 @@ namespace dbmm
//--------------------------------------------------------------------
String getScriptTypeDisplayName( const ScriptType _eType )
{
- USHORT nResId( 0 );
+ sal_uInt16 nResId( 0 );
switch ( _eType )
{
diff --git a/dbaccess/source/ext/macromigration/macromigration.src b/dbaccess/source/ext/macromigration/macromigration.src
index b00ce03925ec..5d1d9db39f8b 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 );
@@ -447,7 +455,7 @@ String STR_INVALID_NUMBER_ARGS
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
diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
index 4054f67189c0..27c195b46772 100644
--- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
@@ -214,10 +214,10 @@ namespace dbmm
}
//--------------------------------------------------------------------
- BOOL MacroMigrationDialog::Close()
+ sal_Bool MacroMigrationDialog::Close()
{
if ( m_pData->bMigrationIsRunning )
- return FALSE;
+ return sal_False;
return MacroMigrationDialog_Base::Close();
}
diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.hxx b/dbaccess/source/ext/macromigration/macromigrationdialog.hxx
index a4a6852909d0..9bda822366b2 100644
--- a/dbaccess/source/ext/macromigration/macromigrationdialog.hxx
+++ b/dbaccess/source/ext/macromigration/macromigrationdialog.hxx
@@ -72,7 +72,7 @@ namespace dbmm
virtual sal_Bool onFinish();
// Dialog overridables
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual short Execute();
private:
diff --git a/dbaccess/source/ext/macromigration/makefile.mk b/dbaccess/source/ext/macromigration/makefile.mk
index 41898091c26a..b71330f17ef5 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 d5b391532863..2d44e7ed764d 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;
@@ -398,7 +398,7 @@ namespace dbmm
}
//----------------------------------------------------------------
- void lcl_describeErrors( ::rtl::OUStringBuffer& _rBuffer, const ErrorLog& _rErrors, const USHORT _nHeadingResId )
+ void lcl_describeErrors( ::rtl::OUStringBuffer& _rBuffer, const ErrorLog& _rErrors, const sal_uInt16 _nHeadingResId )
{
_rBuffer.appendAscii( "=== " );
_rBuffer.append ( String( MacroMigrationResId( _nHeadingResId ) ) );
diff --git a/dbaccess/source/ext/macromigration/rangeprogressbar.hxx b/dbaccess/source/ext/macromigration/rangeprogressbar.hxx
index 6ecaabac6981..502dd86a4471 100644
--- a/dbaccess/source/ext/macromigration/rangeprogressbar.hxx
+++ b/dbaccess/source/ext/macromigration/rangeprogressbar.hxx
@@ -88,7 +88,7 @@ namespace dbmm
//--------------------------------------------------------------------
inline void RangeProgressBar::SetValue( sal_uInt32 _nValue )
{
- ProgressBar::SetValue( (USHORT)( 100.0 * _nValue / m_nRange ) );
+ ProgressBar::SetValue( (sal_uInt16)( 100.0 * _nValue / m_nRange ) );
}
//--------------------------------------------------------------------
diff --git a/dbaccess/source/filter/migration/cfgimport.cxx b/dbaccess/source/filter/migration/cfgimport.cxx
deleted file mode 100644
index 819c15ece69d..000000000000
--- a/dbaccess/source/filter/migration/cfgimport.cxx
+++ /dev/null
@@ -1,1180 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
- /*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_dbaccess.hxx"
-
-#include "cfgimport.hxx"
-
-#include "cfg_reghelper.hxx"
-#include <vcl/svapp.hxx>
-#include <com/sun/star/uno/XNamingService.hpp>
-#include <com/sun/star/sdb/XQueryDefinitionsSupplier.hpp>
-#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/beans/XMultiPropertySet.hpp>
-#include <com/sun/star/sdbcx/XAppend.hpp>
-#include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/sdbc/XDataSource.hpp>
-#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
-#include <com/sun/star/sdb/XDocumentDataSource.hpp>
-#include <tools/urlobj.hxx>
-#include <unotools/pathoptions.hxx>
-#include <com/sun/star/frame/XComponentLoader.hpp>
-#include "cfgstrings.hrc"
-#include <unotools/ucbhelper.hxx>
-#include <comphelper/types.hxx>
-#include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <sfx2/docfilt.hxx>
-#include <comphelper/streamsection.hxx>
-#include <com/sun/star/io/XActiveDataSink.hpp>
-#include <com/sun/star/io/XObjectInputStream.hpp>
-#include <comphelper/basicio.hxx>
-#include <comphelper/seqstream.hxx>
-#include <com/sun/star/sdb/XReportDocumentsSupplier.hpp>
-#include <com/sun/star/sdb/XFormDocumentsSupplier.hpp>
-#include <com/sun/star/configuration/backend/XLayer.hpp>
-#include <com/sun/star/frame/XLoadable.hpp>
-#include <com/sun/star/document/XTypeDetection.hpp>
-#include <com/sun/star/document/XEventsSupplier.hpp>
-#include <com/sun/star/util/XCloseable.hpp>
-#include <com/sun/star/container/XNameReplace.hpp>
-#include <com/sun/star/form/FormComponentType.hpp>
-#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
-#include <com/sun/star/form/XFormsSupplier.hpp>
-#include <tools/debug.hxx>
-
-
-extern "C" void SAL_CALL createRegistryInfo_OCfgImport( )
-{
- static ::dbacfg::OMultiInstanceAutoRegistration< ::dbacfg::OCfgImport > aAutoRegistration;
-}
-
-#define DATASOURCES 1
-#define DATASOURCE 2
-#define DATASOURCESETTINGS 3
-#define TABLES 4
-#define QUERIES 5
-#define BOOKMARKS 6
-#define DATASOURCESETTING 7
-#define BOOKMARK 8
-#define QUERY 9
-#define TABLE 10
-#define DATASETTINGS 11
-#define COLUMNS 12
-#define COLUMN 13
-#define NO_PROP 14
-#define LOGINTIMEOUT 15
-
-//--------------------------------------------------------------------------
-using namespace dbacfg;
-// {
- using namespace ::com::sun::star::util;
- using namespace ::com::sun::star::sdb;
- using namespace ::com::sun::star::sdbcx;
- using namespace ::com::sun::star::frame;
- using namespace ::com::sun::star::document;
- using namespace ::com::sun::star::io;
- using namespace ::com::sun::star::form;
- using namespace ::com::sun::star::drawing;
- using namespace ::com::sun::star::container;
- using namespace ::com::sun::star::beans;
- using namespace ::com::sun::star::task;
- using namespace ::com::sun::star::configuration::backend;
- using namespace ::utl;
- using namespace ::comphelper;
-
- void LoadTableWindows(const Reference< XObjectInputStream>& _rxIn,Sequence<PropertyValue>& _rViewProps);
- void LoadTableWindowData(const Reference<XObjectInputStream>& _rxIn,PropertyValue* _pValue);
- void LoadTableFields(const Reference< XObjectInputStream>& _rxIn,Sequence<PropertyValue>& _rViewProps);
- void LoadTableFieldDesc(const Reference< XObjectInputStream>& _rxIn,PropertyValue& _rProperty);
- sal_Bool isDocumentReport(const Reference< XMultiServiceFactory >& _xORB,const ::rtl::OUString& _sDocumentLocation);
-// -------------
-// - OCfgImport -
-// -------------
-DBG_NAME(OCfgImport)
-
-OCfgImport::OCfgImport( const Reference< XMultiServiceFactory >& _rxMSF )
- :m_xORB( _rxMSF )
- ,m_bPropertyMayBeVoid(sal_True)
-{
- DBG_CTOR(OCfgImport,NULL);
-
-}
-
-// -----------------------------------------------------------------------------
-
-OCfgImport::~OCfgImport() throw()
-{
-
- DBG_DTOR(OCfgImport,NULL);
-}
-// -----------------------------------------------------------------------------
-IMPLEMENT_SERVICE_INFO1_STATIC( OCfgImport, "com.sun.star.comp.sdb.DataSourceMigration", "com.sun.star.sdb.DataSourceMigration")
-// -----------------------------------------------------------------------------
-// XInitialization
-void SAL_CALL OCfgImport::initialize( const Sequence< Any >& _aArguments ) throw(Exception, RuntimeException)
-{
- const Any* pIter = _aArguments.getConstArray();
- const Any* pEnd = pIter + _aArguments.getLength();
- Sequence<NamedValue> aOldConfigValues;
- NamedValue aValue;
- for(;pIter != pEnd;++pIter)
- {
- *pIter >>= aValue;
- if ( aValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OldConfiguration")) && (aValue.Value >>= aOldConfigValues) )
- {
- const NamedValue* configValues = aOldConfigValues.getConstArray();
- const NamedValue* configValuesEnd = configValues + aOldConfigValues.getLength();
- for(;configValues != configValuesEnd;++configValues)
- {
- if ( configValues->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("org.openoffice.Office.DataAccess")) )
- {
- configValues->Value >>= m_xLayer;
- break;
- }
- }
- break;
- }
- }
-}
-// -----------------------------------------------------------------------------
-
-void LoadTableWindows(const Reference< XObjectInputStream>& _rxIn,Sequence<PropertyValue>& _rViewProps)
-{
- try
- {
- OStreamSection aSection(_rxIn.get());
-
- sal_Int32 nCount = 0;
- _rxIn >> nCount;
- if ( nCount > 0 )
- {
- PropertyValue *pViewIter = _rViewProps.getArray();
- PropertyValue *pEnd = pViewIter + _rViewProps.getLength();
- const static ::rtl::OUString s_sTables(RTL_CONSTASCII_USTRINGPARAM("Tables"));
- for (; pViewIter != pEnd && pViewIter->Name != s_sTables; ++pViewIter)
- ;
-
- if ( pViewIter == pEnd )
- {
- sal_Int32 nLen = _rViewProps.getLength();
- _rViewProps.realloc( nLen + 1 );
- pViewIter = _rViewProps.getArray() + nLen;
- pViewIter->Name = s_sTables;
- }
-
- Sequence<PropertyValue> aTables(nCount);
- PropertyValue *pIter = aTables.getArray();
-
-
- for(sal_Int32 i=0;i<nCount;++i,++pIter)
- {
- pIter->Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Table")) + ::rtl::OUString::valueOf(i+1);
- LoadTableWindowData(_rxIn,pIter);
- }
- }
- }
- catch(Exception&)
- {
- }
-}
-// -----------------------------------------------------------------------------
-void LoadTableWindowData(const Reference<XObjectInputStream>& _rxIn,PropertyValue* _pValue)
-{
- ::rtl::OUString sComposedName,aTableName,aWinName;
- sal_Int32 nX,nY,nWidth,nHeight;
- sal_Bool bShowAll;
-
- OStreamSection aSection(_rxIn.get());
- _rxIn >> sComposedName;
- _rxIn >> aTableName;
- _rxIn >> aWinName;
- _rxIn >> nX;
- _rxIn >> nY;
- _rxIn >> nWidth;
- _rxIn >> nHeight;
- _rxIn >> bShowAll;
-
- Sequence<PropertyValue> aWindow(8);
- sal_Int32 nPos = 0;
- aWindow[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ComposedName"));
- aWindow[nPos++].Value <<= sComposedName;
- aWindow[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TableName"));
- aWindow[nPos++].Value <<= aTableName;
- aWindow[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WindowName"));
- aWindow[nPos++].Value <<= aWinName;
- aWindow[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WindowTop"));
- aWindow[nPos++].Value <<= nY;
- aWindow[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WindowLeft"));
- aWindow[nPos++].Value <<= nX;
- aWindow[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WindowWidth"));
- aWindow[nPos++].Value <<= nWidth;
- aWindow[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WindowHeight"));
- aWindow[nPos++].Value <<= nHeight;
- aWindow[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowAll"));
- aWindow[nPos++].Value <<= bShowAll;
-
- _pValue->Value <<= aWindow;
-}
-// -----------------------------------------------------------------------------
-void LoadTableFields(const Reference< XObjectInputStream>& _rxIn,Sequence<PropertyValue>& _rViewProps)
-{
- LoadTableWindows(_rxIn,_rViewProps);
- OStreamSection aSection(_rxIn.get());
- PropertyValue *pIter = NULL;
- try
- {
- sal_Int32 nSplitPos,nVisibleRows;
- // some data
- _rxIn >> nSplitPos;
- _rxIn >> nVisibleRows;
-
- sal_Int32 nCount = 0;
- _rxIn >> nCount;
-
- sal_Int32 nLen = _rViewProps.getLength();
- _rViewProps.realloc( nLen + 2 + (nCount != 0 ? 1 : 0) );
- pIter = _rViewProps.getArray() + nLen;
-
- if ( nCount != 0 )
- {
- pIter->Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Fields"));
-
- Sequence<PropertyValue> aFields(nCount);
- PropertyValue *pFieldsIter = aFields.getArray();
- // the fielddata
- for(sal_Int32 j=0;j<nCount;++j)
- {
- if ( aSection.available() )
- {
- pFieldsIter->Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Field")) + ::rtl::OUString::valueOf(j+1);
- LoadTableFieldDesc(_rxIn,*pFieldsIter++);
- }
- }
- pIter->Value <<= aFields;
- ++pIter;
- }
-
- pIter->Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SplitterPosition"));
- pIter->Value <<= nSplitPos;
- ++pIter;
- pIter->Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VisibleRows"));
- pIter->Value <<= nVisibleRows;
- }
- catch(Exception&)
- {
- }
-}
-// -----------------------------------------------------------------------------
-void LoadTableFieldDesc(const Reference< XObjectInputStream>& _rxIn,PropertyValue& _rProperty)
-{
- ::rtl::OUString aTableName;
- ::rtl::OUString aAliasName; // table range
- ::rtl::OUString aFieldName; // column
- ::rtl::OUString aFieldAlias; // column alias
- ::rtl::OUString aDatabaseName; // qualifier or catalog
- ::rtl::OUString aFunctionName; // contains the function name if eFunctionType != FKT_NONE
-
- sal_Int32 eDataType;
- sal_Int32 eFunctionType;
- sal_Int32 eFieldType;
- sal_Int32 eOrderDir;
- sal_Int32 nColWidth;
- sal_Bool bGroupBy;
- sal_Bool bVisible;
-
- OStreamSection aSection(_rxIn.get());
- _rxIn >> aTableName;
- _rxIn >> aAliasName;
- _rxIn >> aFieldName;
- _rxIn >> aFieldAlias;
- _rxIn >> aDatabaseName;
- _rxIn >> aFunctionName;
- _rxIn >> eDataType;
- _rxIn >> eFunctionType;
- _rxIn >> eFieldType;
- _rxIn >> eOrderDir;
- _rxIn >> nColWidth;
- _rxIn >> bGroupBy;
- _rxIn >> bVisible;
-
- Sequence<PropertyValue> aFieldDesc(13);
- sal_Int32 nPos = 0;
- aFieldDesc[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AliasName"));
- aFieldDesc[nPos++].Value <<= aAliasName;
- aFieldDesc[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TableName"));
- aFieldDesc[nPos++].Value <<= aTableName;
- aFieldDesc[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FieldName"));
- aFieldDesc[nPos++].Value <<= aFieldName;
- aFieldDesc[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FieldAlias"));
- aFieldDesc[nPos++].Value <<= aFieldAlias;
- aFieldDesc[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DatabaseName"));
- aFieldDesc[nPos++].Value <<= aDatabaseName;
- aFieldDesc[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FunctionName"));
- aFieldDesc[nPos++].Value <<= aFunctionName;
- aFieldDesc[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataType"));
- aFieldDesc[nPos++].Value <<= eDataType;
- aFieldDesc[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FunctionType"));
- aFieldDesc[nPos++].Value <<= (sal_Int32)eFunctionType;
- aFieldDesc[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FieldType"));
- aFieldDesc[nPos++].Value <<= (sal_Int32)eFieldType;
- aFieldDesc[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OrderDir"));
- aFieldDesc[nPos++].Value <<= (sal_Int32)eOrderDir;
- aFieldDesc[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColWidth"));
- aFieldDesc[nPos++].Value <<= nColWidth;
- aFieldDesc[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GroupBy"));
- aFieldDesc[nPos++].Value <<= bGroupBy;
- aFieldDesc[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Visible"));
- aFieldDesc[nPos++].Value <<= bVisible;
-
- _rProperty.Value <<= aFieldDesc;
-}
-// -----------------------------------------------------------------------------
-void closeDocument(const Reference< XModel >& _xDocument)
-{
- Reference< XCloseable > xCloseable( _xDocument, UNO_QUERY );
- if ( xCloseable.is() )
- {
- try
- {
- xCloseable->close( sal_True );
- }
- catch( Exception& )
- {
- }
- }
-}
-// -----------------------------------------------------------------------------
-sal_Bool isDocumentReport(const Reference< XMultiServiceFactory >& _xORB,const ::rtl::OUString& _sDocumentLocation)
-{
- sal_Bool bReport = sal_False;
- try
- {
- Reference< XModel > xDocument(_xORB->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument"))),UNO_QUERY);
- if ( xDocument.is() )
- {
- Reference< XLoadable > xLoadable( xDocument, UNO_QUERY );
- if ( xLoadable.is() )
- {
- Sequence< PropertyValue > aMedDescr(4);
- sal_Int32 nPos = 0;
- aMedDescr[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AsTemplate"));
- aMedDescr[nPos++].Value <<= sal_False;
- aMedDescr[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Hidden"));
- aMedDescr[nPos++].Value <<= sal_False;
- aMedDescr[nPos].Name = PROPERTY_URL;
- aMedDescr[nPos++].Value <<= _sDocumentLocation;
- aMedDescr[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly"));
- aMedDescr[nPos++].Value <<= sal_True;
- Reference< XTypeDetection > xTypeDetection(_xORB->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.TypeDetection")) ),UNO_QUERY );
-
- if ( !xTypeDetection.is() )
- throw RuntimeException(); // TODO
-
- // get TypeName
- ::rtl::OUString aTypeName = xTypeDetection->queryTypeByDescriptor( aMedDescr, sal_True );
- const PropertyValue* pIter = aMedDescr.getConstArray();
- const PropertyValue* pEnd = pIter + aMedDescr.getLength();
- for( ; pIter != pEnd && !pIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ); ++pIter)
- ;
- if ( aTypeName.getLength() && pIter == pEnd )
- {
- Reference<XNameAccess> xNameAccess( xTypeDetection, UNO_QUERY );
- if ( xNameAccess.is() && xNameAccess->hasByName( aTypeName ) )
- {
- Sequence<PropertyValue> aTypes;
- xNameAccess->getByName(aTypeName) >>= aTypes;
- const PropertyValue* types = aTypes.getConstArray();
- const PropertyValue* typesEnd = types + aTypes.getLength();
- for( ; types != typesEnd && !types->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PreferredFilter" ) ) ; ++types)
- ;
- if ( types != typesEnd )
- {
- sal_Int32 nLen = aMedDescr.getLength();
- aMedDescr.realloc(nLen+1);
- aMedDescr[nLen].Value = types->Value;
- aMedDescr[nLen].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FilterName"));
- }
- }
- }
- try
- {
- xLoadable->load(aMedDescr);
-
- Reference< XEventsSupplier> xEventsSup(xDocument,UNO_QUERY);
- Reference< XNameReplace> xEvents = xEventsSup.is() ? xEventsSup->getEvents() : Reference< XNameReplace>();
- static const ::rtl::OUString s_sOnNew = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OnNew"));
- if ( xEvents.is() && xEvents->hasByName(s_sOnNew) )
- {
- Sequence<PropertyValue> aEventDesc;
- if ( (xEvents->getByName(s_sOnNew) >>= aEventDesc ) && aEventDesc.getLength() )
- {
- ::rtl::OUString sScript;
- const PropertyValue* events = aEventDesc.getConstArray();
- const PropertyValue* eventsEnd = events + aEventDesc.getLength();
- for( ; events != eventsEnd && !events->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Script" ) ) ; ++events)
- ;
- if ( events != eventsEnd && (events->Value >>= sScript) )
- bReport = sScript.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("service:com.sun.star.wizards.report.CallReportWizard?fill"));
- }
- }
- if ( !bReport )
- {
- sal_Bool bForm = sal_False;
- Reference< XDrawPageSupplier> xDrawPageSup(xDocument,UNO_QUERY);
- Reference< XFormsSupplier> xFormsSup(xDrawPageSup.is() ? xDrawPageSup->getDrawPage() : Reference< XDrawPage>(),UNO_QUERY);
- Reference< XNameContainer> xForms(xFormsSup.is() ? xFormsSup->getForms() : Reference< XNameContainer>(),UNO_QUERY);
- Sequence< ::rtl::OUString> aSeq = xForms.is() ? xForms->getElementNames() : Sequence< ::rtl::OUString>();
- const ::rtl::OUString* elementNames = aSeq.getConstArray();
- const ::rtl::OUString* elementNamesEnd = elementNames + aSeq.getLength();
- for(;elementNames != elementNamesEnd && !bForm;++elementNames)
- {
- Reference< XNameContainer> xControls(xForms->getByName(*elementNames),UNO_QUERY);
- Sequence< ::rtl::OUString> aControlSeq = xControls.is() ? xControls->getElementNames() : Sequence< ::rtl::OUString>();
- const ::rtl::OUString* pControlIter = aControlSeq.getConstArray();
- const ::rtl::OUString* pControlEnd = pControlIter + aControlSeq.getLength();
- for(;pControlIter != pControlEnd && !bForm;++pControlIter)
- {
- Reference<XPropertySet> xProp(xControls->getByName(*pControlIter),UNO_QUERY);
- sal_Int16 nClassId = 0;
- const static ::rtl::OUString s_sClassId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ClassId"));
- if ( xProp.is()
- && xProp->getPropertySetInfo().is()
- && xProp->getPropertySetInfo()->hasPropertyByName(s_sClassId)
- && (xProp->getPropertyValue(s_sClassId) >>= nClassId) )
- {
- bForm = nClassId != FormComponentType::HIDDENCONTROL;
- }
- }
- }
- bReport = !bForm;
- }
- }
- catch( Exception& )
- {
- closeDocument(xDocument);
- }
- }
- closeDocument(xDocument);
- }
- }
- catch(Exception)
- {
- OSL_ENSURE(0,"isDocumentReport: catched exception!");
- }
- return bReport;
-}
-// -----------------------------------------------------------------------------
-void OCfgImport::createDataSource(const ::rtl::OUString& _sName)
-{
- SvtPathOptions aPathOptions;
- const String& rsWorkPath = aPathOptions.GetWorkPath();
-
- ::rtl::OUString sExtension;
- static const String s_sDatabaseType = String::CreateFromAscii("StarOffice XML (Base)");
- const SfxFilter* pFilter = SfxFilter::GetFilterByName( s_sDatabaseType);
- OSL_ENSURE(pFilter,"Filter: StarOffice XML (Base) could not be found!");
- if ( pFilter )
- {
- String aRet = pFilter->GetDefaultExtension();
- while( aRet.SearchAndReplaceAscii( "*.", String() ) != STRING_NOTFOUND ) ;
- sExtension = aRet;
- }
- // then look for which of the settings are stored in the configuration
- ::rtl::OUString sFileName;
- try
- {
- m_xModel.set(m_xORB->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument"))),UNO_QUERY);
-
- if ( !m_xModel.is() )
- return;
-
- Reference<XOfficeDatabaseDocument> xOfficeDoc(m_xModel,UNO_QUERY);
- if ( xOfficeDoc.is() )
- m_xCurrentDS.set(xOfficeDoc->getDataSource(),UNO_QUERY);
-
-
- INetURLObject aURL(rsWorkPath,INetURLObject::WAS_ENCODED);
- aURL.insertName(_sName,false,INetURLObject::LAST_SEGMENT,true,INetURLObject::ENCODE_ALL);
- aURL.setExtension(sExtension);
-
- sFileName = aURL.GetMainURL(INetURLObject::NO_DECODE);
-
- sal_Int32 i = 0;
- // create unique name
- while ( UCBContentHelper::IsDocument(sFileName) )
- {
- sFileName = _sName + ::rtl::OUString::valueOf(++i);
- aURL.setName(sFileName,INetURLObject::LAST_SEGMENT,true,INetURLObject::ENCODE_ALL);
- aURL.setExtension(sExtension);
- sFileName = aURL.GetMainURL(INetURLObject::NO_DECODE);
- }
-
- Sequence< PropertyValue > aArgs(1);
- aArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FileName" ) );
- aArgs[0].Value <<= sFileName;
-
- Reference< XLoadable > xLoad( m_xModel, UNO_QUERY_THROW );
- xLoad->load( aArgs );
- m_xModel->attachResource( sFileName, Sequence< PropertyValue >() );
- }
- catch(Exception&)
- {
- OSL_ENSURE(0,"Exception: convert");
- UCBContentHelper::Kill(sFileName);
- }
-}
-// -----------------------------------------------------------------------------
-void OCfgImport::createObject(sal_Bool _bQuery ,const ::rtl::OUString& _sName)
-{
- if ( !m_xCurrentObject.is() )
- {
- Sequence< Any > aArguments(1);
- PropertyValue aValue;
- // set as folder
- aValue.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"));
- aValue.Value <<= _sName;
- aArguments[0] <<= aValue;
- m_xCurrentObject.set(m_xORB->createInstanceWithArguments(_bQuery ? SERVICE_SDB_COMMAND_DEFINITION : SERVICE_SDB_TABLEDEFINITION ,aArguments ),UNO_QUERY);
- }
-}
-// -----------------------------------------------------------------------------
-void OCfgImport::setProperties(sal_Int16 _eType)
-{
- if ( m_aValues[_eType].getLength() )
- {
- OSL_ENSURE(m_aProperties[_eType].getLength() == m_aValues[_eType].getLength(),"Count is not equal!");
- try
- {
- Reference< XMultiPropertySet > xFormMultiSet;
- if ( _eType == COLUMN )
- xFormMultiSet.set(m_xCurrentColumn,UNO_QUERY);
- else if ( _eType == TABLE || _eType == QUERY )
- xFormMultiSet.set(m_xCurrentObject,UNO_QUERY);
- else if ( _eType == DATASOURCE )
- xFormMultiSet.set(m_xCurrentDS,UNO_QUERY);
-
- if ( xFormMultiSet.is() )
- xFormMultiSet->setPropertyValues(m_aProperties[_eType], m_aValues[_eType]);
- }
- catch(const Exception& e)
- {
- throw WrappedTargetException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property could not be set.")),*this,makeAny(e));
- }
- m_aValues[_eType] = Sequence< Any>();
- m_aProperties[_eType] = Sequence< ::rtl::OUString>();
- }
-}
-// -----------------------------------------------------------------------------
-Any SAL_CALL OCfgImport::execute( const Sequence< NamedValue >& /*Arguments*/ ) throw (IllegalArgumentException, Exception, RuntimeException)
-{
- m_xLayer->readData(this);
- return Any();
-}
-// -----------------------------------------------------------------------------
-// XLayerHandler
-void SAL_CALL OCfgImport::startLayer()
- throw(WrappedTargetException)
-{
-}
-// -----------------------------------------------------------------------------
-
-void SAL_CALL OCfgImport::endLayer()
- throw(
- MalformedDataException,
- WrappedTargetException )
-{
-}
-// -----------------------------------------------------------------------------
-
-void SAL_CALL OCfgImport::overrideNode(
- const ::rtl::OUString& aName,
- sal_Int16 aAttributes,
- sal_Bool /*bClear*/)
- throw(
- MalformedDataException,
- WrappedTargetException )
-{
- addOrReplaceNode(aName,aAttributes);
-}
-// -----------------------------------------------------------------------------
-
-void SAL_CALL OCfgImport::addOrReplaceNode(
- const ::rtl::OUString& aName,
- sal_Int16 /*aAttributes*/)
- throw(
- MalformedDataException,
- WrappedTargetException )
-{
- if ( !m_aStack.empty() )
- {
- switch(m_aStack.top().second)
- {
- case DATASOURCES:
- m_sCurrentDataSourceName = aName;
- if ( m_sCurrentDataSourceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Bibliography")) )
- {
- Reference< XNameAccess > xDatabaseContext(m_xORB->createInstance(SERVICE_SDB_DATABASECONTEXT), UNO_QUERY);
- if ( xDatabaseContext.is() && xDatabaseContext->hasByName(m_sCurrentDataSourceName) )
- {
- m_xCurrentDS.set(xDatabaseContext->getByName(m_sCurrentDataSourceName),UNO_QUERY);
- Reference<XDocumentDataSource> xDocumentDataSource(m_xCurrentDS,UNO_QUERY);
- if ( xDocumentDataSource.is() )
- m_xModel.set(xDocumentDataSource->getDatabaseDocument(),UNO_QUERY);
- }
- }
- if ( !m_xCurrentDS.is() )
- createDataSource(m_sCurrentDataSourceName);
-
- m_aStack.push(TElementStack::value_type(aName,DATASOURCE));
- break;
- case DATASOURCESETTINGS:
- {
- PropertyValue aValue;
- aValue.Name = aName;
- m_aDataSourceSettings.push_back(aValue);
- m_aStack.push(TElementStack::value_type(aName,DATASOURCESETTING));
- }
- break;
- case TABLES:
- m_aStack.push(TElementStack::value_type(aName,TABLE));
- createObject(sal_False,aName);
- break;
- case QUERIES:
- m_aStack.push(TElementStack::value_type(aName,QUERY));
- createObject(sal_True,aName);
- break;
- case COLUMNS:
- if ( !m_xCurrentColumn.is() )
- {
- Reference<XColumnsSupplier> xSupplier(m_xCurrentObject,UNO_QUERY);
- if ( xSupplier.is() )
- {
- Reference<XDataDescriptorFactory> xFact(xSupplier->getColumns(),UNO_QUERY);
-
- m_xCurrentColumn = ( xFact.is() ? xFact->createDataDescriptor() : Reference<XPropertySet>());
- if ( m_xCurrentColumn.is() )
- m_xCurrentColumn->setPropertyValue(PROPERTY_NAME,makeAny(aName));
- }
- }
- m_aStack.push(TElementStack::value_type(aName,COLUMN));
- break;
- case BOOKMARKS:
- m_aStack.push(TElementStack::value_type(aName,BOOKMARK));
- break;
- }
- }
- if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DataSources")) )
- m_aStack.push(TElementStack::value_type(aName,DATASOURCES));
- else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DataSourceSettings")) )
- m_aStack.push(TElementStack::value_type(aName,DATASOURCESETTINGS));
- else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Tables")) )
- m_aStack.push(TElementStack::value_type(aName,TABLES));
- else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Queries")) )
- m_aStack.push(TElementStack::value_type(aName,QUERIES));
- else if ( aName == CONFIGKEY_DBLINK_BOOKMARKS )
- m_aStack.push(TElementStack::value_type(aName,BOOKMARKS));
- else if ( aName == CONFIGKEY_SETTINGS )
- m_aStack.push(TElementStack::value_type(aName,DATASETTINGS));
- else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Font")) )
- m_aStack.push(TElementStack::value_type(aName,DATASETTINGS));
- else if ( aName == CONFIGKEY_QRYDESCR_COLUMNS )
- m_aStack.push(TElementStack::value_type(aName,COLUMNS));
- else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Font")) )
- m_aStack.push(TElementStack::value_type(aName,DATASETTINGS));
-}
-// -----------------------------------------------------------------------------
-
-void SAL_CALL OCfgImport::addOrReplaceNodeFromTemplate(
- const ::rtl::OUString& /*aName*/,
- const TemplateIdentifier& /*aTemplate*/,
- sal_Int16 /*aAttributes*/ )
- throw(
- MalformedDataException,
- WrappedTargetException )
-{
-}
-// -----------------------------------------------------------------------------
-
-void SAL_CALL OCfgImport::endNode()
- throw(
- MalformedDataException,
- WrappedTargetException )
-{
- if ( !m_aStack.empty() )
- {
- sal_Int16 nElementType = m_aStack.top().second;
- ::rtl::OUString sName = m_aStack.top().first;
- m_aStack.pop();
-
- switch(nElementType)
- {
- case DATASOURCE:
- {
- setProperties(nElementType);
- Reference<XStorable> xStr(m_xModel,UNO_QUERY);
- if ( xStr.is() )
- {
- xStr->store();
- xStr = NULL;
- }
- // register the new datbase document
-
- if ( !m_sCurrentDataSourceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Bibliography")) )
- {
- // create unique name
- Reference< XNameAccess > xDatabaseContext(m_xORB->createInstance(SERVICE_SDB_DATABASECONTEXT), UNO_QUERY);
- if ( xDatabaseContext.is() )
- {
- sal_Int32 i = 0;
- ::rtl::OUString sDataSourceName = m_sCurrentDataSourceName;
- while ( xDatabaseContext->hasByName( sDataSourceName ) )
- {
- sDataSourceName = m_sCurrentDataSourceName + ::rtl::OUString::valueOf(++i);
- }
- Reference< XNamingService>(xDatabaseContext,UNO_QUERY)->registerObject(sDataSourceName,m_xCurrentDS);
- }
- }
- ::comphelper::disposeComponent(m_xModel);
- m_xCurrentDS = NULL;
- }
- break;
- case DATASOURCESETTINGS:
- OSL_ENSURE(m_xCurrentDS.is(),"Data Source is NULL!");
- {
- PropertyValue* pSettings = m_aDataSourceSettings.empty() ? NULL : &m_aDataSourceSettings[0];
- m_xCurrentDS->setPropertyValue(PROPERTY_INFO,makeAny(Sequence< PropertyValue >(pSettings, m_aDataSourceSettings.size())));
- }
- break;
- case TABLE:
- {
- setProperties(nElementType);
- Reference<XTablesSupplier> xSupplier(m_xCurrentDS,UNO_QUERY);
- Reference<XNameContainer> xTables(xSupplier->getTables(),UNO_QUERY);
- ::rtl::OUString sTableName;
- m_xCurrentObject->getPropertyValue(PROPERTY_NAME) >>= sTableName;
- if ( !xTables->hasByName( sTableName ) )
- xTables->insertByName( sTableName, makeAny( m_xCurrentObject ) );
- m_xCurrentObject = NULL;
- }
- break;
- case QUERY:
- {
- setProperties(nElementType);
- Reference<XQueryDefinitionsSupplier> xQueriesSupplier(m_xCurrentDS,UNO_QUERY);
- Reference<XNameContainer> xQueries(xQueriesSupplier->getQueryDefinitions(),UNO_QUERY);
- xQueries->insertByName(sName,makeAny(m_xCurrentObject));
- m_xCurrentObject = NULL;
- }
- break;
- case BOOKMARK:
- try
- {
- if ( !UCBContentHelper::IsDocument(m_sDocumentLocation) )
- break;
-
- sal_Bool bForm = sal_True;
- bForm = !isDocumentReport(m_xORB,m_sDocumentLocation);
- Reference<XNameAccess> xNames;
- if ( bForm )
- {
- Reference<XFormDocumentsSupplier> xSup(m_xModel,UNO_QUERY);
- if ( xSup.is() )
- xNames = xSup->getFormDocuments();
- }
- else
- {
- Reference<XReportDocumentsSupplier> xSup(m_xModel,UNO_QUERY);
- if ( xSup.is() )
- xNames = xSup->getReportDocuments();
- }
-
- if ( xNames.is() && m_sBookmarkName.getLength() )
- {
- ::rtl::OUString sServiceName(SERVICE_SDB_DOCUMENTDEFINITION);
- Sequence< Any > aArguments(3);
- PropertyValue aValue;
- // set as folder
- aValue.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"));
- aValue.Value <<= m_sBookmarkName;
- aArguments[0] <<= aValue;
- //parent
- aValue.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Parent"));
- aValue.Value <<= xNames;
- aArguments[1] <<= aValue;
-
- aValue.Name = PROPERTY_URL;
- aValue.Value <<= m_sDocumentLocation;
- aArguments[2] <<= aValue;
-
- Reference<XMultiServiceFactory> xORB(xNames,UNO_QUERY);
- if ( xORB.is() )
- {
- Reference<XInterface> xComponent = xORB->createInstanceWithArguments(SERVICE_SDB_DOCUMENTDEFINITION,aArguments);
- Reference<XNameContainer> xNameContainer(xNames,UNO_QUERY);
- if ( xNameContainer.is() )
- xNameContainer->insertByName(m_sBookmarkName,makeAny(xComponent));
- }
- }
- }
- catch(Exception&)
- {
- OSL_ENSURE(0,"convertLinks: Exception catched!");
- }
- m_sBookmarkName = ::rtl::OUString();
- m_sDocumentLocation = ::rtl::OUString();
- break;
- case COLUMN:
- if ( m_xCurrentColumn.is() )
- {
- setProperties(nElementType);
- Reference<XColumnsSupplier> xSupplier(m_xCurrentObject,UNO_QUERY);
- Reference<XAppend> xAppend(xSupplier->getColumns(),UNO_QUERY);
- if ( xAppend.is() )
- xAppend->appendByDescriptor(m_xCurrentColumn);
- m_xCurrentColumn = NULL;
- }
- break;
- }
- }
-}
-// -----------------------------------------------------------------------------
-
-void SAL_CALL OCfgImport::dropNode(
- const ::rtl::OUString& /*aName*/ )
- throw(
- MalformedDataException,
- WrappedTargetException )
-{
-}
-// -----------------------------------------------------------------------------
-
-void SAL_CALL OCfgImport::overrideProperty(
- const ::rtl::OUString& aName,
- sal_Int16 /*aAttributes*/,
- const Type& /*aType*/,
- sal_Bool /*bClear*/ )
- throw(
- MalformedDataException,
- WrappedTargetException )
-{
- m_bPropertyMayBeVoid = sal_True;
- if ( !m_aStack.empty() )
- {
- switch(m_aStack.top().second)
- {
- case DATASOURCE:
- {
- m_bPropertyMayBeVoid = sal_False;
- ::rtl::OUString sProp;
- if ( aName == CONFIGKEY_DBLINK_CONNECTURL )
- sProp = PROPERTY_URL;
- else if ( aName == CONFIGKEY_DBLINK_USER )
- sProp = PROPERTY_USER;
- else if ( aName == CONFIGKEY_DBLINK_TABLEFILTER )
- sProp = PROPERTY_TABLEFILTER;
- else if ( aName == CONFIGKEY_DBLINK_TABLETYEFILTER )
- sProp = PROPERTY_TABLETYPEFILTER;
- else if ( aName == CONFIGKEY_DBLINK_PASSWORDREQUIRED )
- sProp = PROPERTY_ISPASSWORDREQUIRED;
- else if ( aName == CONFIGKEY_DBLINK_SUPPRESSVERSIONCL )
- sProp = PROPERTY_SUPPRESSVERSIONCL;
- else if ( aName == CONFIGKEY_LAYOUTINFORMATION )
- sProp = PROPERTY_LAYOUTINFORMATION;
-
- if ( sProp.getLength() )
- {
- if ( m_aProperties.find(m_aStack.top().second) == m_aProperties.end() )
- m_aProperties.insert(::std::map< sal_Int16 ,Sequence< ::rtl::OUString> >::value_type(m_aStack.top().second,Sequence< ::rtl::OUString>()));
- sal_Int32 nPos = m_aProperties[m_aStack.top().second].getLength();
- m_aProperties[m_aStack.top().second].realloc(nPos+1);
- m_aProperties[m_aStack.top().second][nPos] = sProp;
- }
- else if ( aName == CONFIGKEY_DBLINK_LOGINTIMEOUT )
- m_aStack.push(TElementStack::value_type(aName,LOGINTIMEOUT));
- else
- m_aStack.push(TElementStack::value_type(aName,NO_PROP));
- }
- break;
- case QUERY:
- {
- m_bPropertyMayBeVoid = sal_False;
- ::rtl::OUString sProp;
- if ( aName == CONFIGKEY_QRYDESCR_COMMAND )
- sProp = PROPERTY_COMMAND;
- else if ( aName == CONFIGKEY_QRYDESCR_ESCAPE_PROCESSING )
- sProp = PROPERTY_ESCAPE_PROCESSING;
- else if ( aName == CONFIGKEY_QRYDESCR_UPDATE_TABLENAME )
- sProp = PROPERTY_UPDATE_TABLENAME;
- else if ( aName == CONFIGKEY_QRYDESCR_UPDATE_SCHEMANAME )
- sProp = PROPERTY_UPDATE_SCHEMANAME;
- else if ( aName == CONFIGKEY_QRYDESCR_UPDATE_CATALOGNAME )
- sProp = PROPERTY_UPDATE_CATALOGNAME;
- else if ( aName == CONFIGKEY_LAYOUTINFORMATION )
- sProp = PROPERTY_LAYOUTINFORMATION;
-
- if ( sProp.getLength() )
- {
- if ( m_aProperties.find(m_aStack.top().second) == m_aProperties.end() )
- m_aProperties.insert(::std::map< sal_Int16 ,Sequence< ::rtl::OUString> >::value_type(m_aStack.top().second,Sequence< ::rtl::OUString>()));
- sal_Int32 nPos = m_aProperties[m_aStack.top().second].getLength();
- m_aProperties[m_aStack.top().second].realloc(nPos+1);
- m_aProperties[m_aStack.top().second][nPos] = sProp;
- }
- else
- m_aStack.push(TElementStack::value_type(aName,NO_PROP));
- }
- break;
- case DATASETTINGS:
- {
- m_bPropertyMayBeVoid = sal_False;
- ::rtl::OUString sProp;
- if ( aName == CONFIGKEY_DEFSET_FILTER ) sProp = PROPERTY_FILTER;
- else if ( aName == CONFIGKEY_DEFSET_FONT_NAME ) sProp = PROPERTY_FONTNAME;
- else if ( aName == CONFIGKEY_DEFSET_ORDER ) sProp = PROPERTY_ORDER;
- else if ( aName == CONFIGKEY_DEFSET_APPLYFILTER ) sProp = PROPERTY_APPLYFILTER;
- else if ( aName == CONFIGKEY_DEFSET_ROW_HEIGHT ) { m_bPropertyMayBeVoid = true; sProp = PROPERTY_ROW_HEIGHT; }
- else if ( aName == CONFIGKEY_DEFSET_TEXTCOLOR ) { m_bPropertyMayBeVoid = true; sProp = PROPERTY_TEXTCOLOR; }
- else if ( aName == CONFIGKEY_DEFSET_FONT_UNDERLINECOLOR ) { m_bPropertyMayBeVoid = true; sProp = PROPERTY_TEXTLINECOLOR; }
- else if ( aName == CONFIGKEY_DEFSET_FONT_CHARACTEREMPHASIS ) sProp = PROPERTY_TEXTEMPHASIS;
- else if ( aName == CONFIGKEY_DEFSET_FONT_CHARACTERRELIEF ) sProp = PROPERTY_TEXTRELIEF;
- // font
- else if ( aName == CONFIGKEY_DEFSET_FONT_HEIGHT ) sProp = PROPERTY_FONTHEIGHT;
- else if ( aName == CONFIGKEY_DEFSET_FONT_WIDTH ) sProp = PROPERTY_FONTWIDTH;
- else if ( aName == CONFIGKEY_DEFSET_FONT_STYLENAME ) sProp = PROPERTY_FONTSTYLENAME;
- else if ( aName == CONFIGKEY_DEFSET_FONT_FAMILY ) sProp = PROPERTY_FONTFAMILY;
- else if ( aName == CONFIGKEY_DEFSET_FONT_CHARSET ) sProp = PROPERTY_FONTCHARSET;
- else if ( aName == CONFIGKEY_DEFSET_FONT_PITCH ) sProp = PROPERTY_FONTPITCH;
- else if ( aName == CONFIGKEY_DEFSET_FONT_CHARACTERWIDTH ) sProp = PROPERTY_FONTCHARWIDTH;
- else if ( aName == CONFIGKEY_DEFSET_FONT_WEIGHT ) sProp = PROPERTY_FONTWEIGHT;
- else if ( aName == CONFIGKEY_DEFSET_FONT_UNDERLINE ) sProp = PROPERTY_FONTUNDERLINE;
- else if ( aName == CONFIGKEY_DEFSET_FONT_STRIKEOUT ) sProp = PROPERTY_FONTSTRIKEOUT;
- else if ( aName == CONFIGKEY_DEFSET_FONT_ORIENTATION ) sProp = PROPERTY_FONTORIENTATION;
- else if ( aName == CONFIGKEY_DEFSET_FONT_KERNING ) sProp = PROPERTY_FONTKERNING;
- else if ( aName == CONFIGKEY_DEFSET_FONT_WORDLINEMODE ) sProp = PROPERTY_FONTWORDLINEMODE;
- else if ( aName == CONFIGKEY_DEFSET_FONT_TYPE ) sProp = PROPERTY_FONTTYPE;
- else if ( aName == CONFIGKEY_DEFSET_FONT_SLANT ) sProp = PROPERTY_FONTSLANT;
-
- if ( sProp.getLength() )
- {
- if ( m_aProperties.find(m_aStack.top().second) == m_aProperties.end() )
- m_aProperties.insert(::std::map< sal_Int16 ,Sequence< ::rtl::OUString> >::value_type(m_aStack.top().second,Sequence< ::rtl::OUString>()));
- sal_Int32 nPos = m_aProperties[m_aStack.top().second].getLength();
- m_aProperties[m_aStack.top().second].realloc(nPos+1);
- m_aProperties[m_aStack.top().second][nPos] = sProp;
- }
- else
- m_aStack.push(TElementStack::value_type(aName,NO_PROP));
- }
- break;
- case COLUMN:
- {
- ::rtl::OUString sProp;
- m_bPropertyMayBeVoid = sal_False;
- if ( aName == CONFIGKEY_COLUMN_ALIGNMENT ) {
- m_bPropertyMayBeVoid = true;
- sProp = PROPERTY_ALIGN;
- } else if ( aName == CONFIGKEY_COLUMN_WIDTH ) {
- m_bPropertyMayBeVoid = true;
- sProp = PROPERTY_WIDTH;
- } else if ( aName == CONFIGKEY_COLUMN_RELPOSITION ) {
- m_bPropertyMayBeVoid = true;
- sProp = PROPERTY_RELATIVEPOSITION;
- } else if ( aName == CONFIGKEY_COLUMN_HIDDEN ) {
- sProp = PROPERTY_HIDDEN;
- } else if ( aName == CONFIGKEY_COLUMN_HELPTEXT ) {
- m_bPropertyMayBeVoid = true;
- sProp = PROPERTY_HELPTEXT;
- } else if ( aName == CONFIGKEY_COLUMN_CONTROLDEFAULT ) {
- m_bPropertyMayBeVoid = true;
- sProp = PROPERTY_CONTROLDEFAULT;
- } else if ( aName == CONFIGKEY_COLUMN_NUMBERFORMAT ) {
- m_bPropertyMayBeVoid = true;
- sProp = PROPERTY_NUMBERFORMAT;
- }
-
-
- if ( sProp.getLength() )
- {
- if ( m_aProperties.find(m_aStack.top().second) == m_aProperties.end() )
- m_aProperties.insert(::std::map< sal_Int16 ,Sequence< ::rtl::OUString> >::value_type(m_aStack.top().second,Sequence< ::rtl::OUString>()));
- sal_Int32 nPos = m_aProperties[m_aStack.top().second].getLength();
- m_aProperties[m_aStack.top().second].realloc(nPos+1);
- m_aProperties[m_aStack.top().second][nPos] = sProp;
- }
- else
- m_aStack.push(TElementStack::value_type(aName,NO_PROP));
- }
- break;
- case BOOKMARK:
- break;
- }
- }
-}
-// -----------------------------------------------------------------------------
-
-void SAL_CALL OCfgImport::setPropertyValue(
- const Any& aValue )
- throw(
- MalformedDataException,
- WrappedTargetException )
-{
- if ( !m_aStack.empty() )
- {
- switch(m_aStack.top().second)
- {
- case LOGINTIMEOUT:
- {
- Reference< ::com::sun::star::sdbc::XDataSource> xDataSource(m_xCurrentDS,UNO_QUERY);
- sal_Int32 nTimeOut = 0;
- aValue >>= nTimeOut;
- if ( xDataSource.is() && nTimeOut >= 0 )
- xDataSource->setLoginTimeout(nTimeOut);
- m_aStack.pop();
- }
- break;
- case DATASOURCESETTING:
- OSL_ENSURE(!m_aDataSourceSettings.empty(),"Settings are emtpy!");
- if ( aValue.hasValue() )
- m_aDataSourceSettings.rbegin()->Value = aValue;
- else
- m_aDataSourceSettings.pop_back();
- break;
- case BOOKMARK:
- aValue >>= m_sDocumentLocation;
- break;
- case NO_PROP:
- m_aStack.pop();
- break;
- default:
- OSL_ENSURE(m_aProperties[m_aStack.top().second].getLength(),"Properties are zero!");
- if ( m_aProperties[m_aStack.top().second].getLength() )
- {
- if ( m_aProperties[m_aStack.top().second][m_aProperties[m_aStack.top().second].getLength()-1] != PROPERTY_LAYOUTINFORMATION )
- {
- if ( !m_bPropertyMayBeVoid && !aValue.hasValue() )
- {
- m_aProperties[m_aStack.top().second].realloc(m_aProperties[m_aStack.top().second].getLength()-1);
- }
- else
- {
- if ( m_aValues.find(m_aStack.top().second) == m_aValues.end() )
- m_aValues.insert(::std::map< sal_Int16 ,Sequence< Any> >::value_type(m_aStack.top().second,Sequence< Any>()));
- sal_Int32 nPos = m_aValues[m_aStack.top().second].getLength();
- m_aValues[m_aStack.top().second].realloc(nPos+1);
- m_aValues[m_aStack.top().second][nPos] = aValue;
- }
- }
- else
- {
- try
- {
- Sequence< sal_Int8 > aInputSequence;
- aValue >>= aInputSequence;
- if ( m_aValues.find(m_aStack.top().second) == m_aValues.end() )
- m_aValues.insert(::std::map< sal_Int16 ,Sequence< Any> >::value_type(m_aStack.top().second,Sequence< Any>()));
- sal_Int32 nPos = m_aValues[m_aStack.top().second].getLength();
- m_aValues[m_aStack.top().second].realloc(nPos+1);
- Sequence< PropertyValue > aLayout;
- if ( aInputSequence.getLength() )
- {
- Reference< XInputStream> xInStreamHelper = new SequenceInputStream(aInputSequence);; // used for wrapping sequence to xinput
- Reference< XObjectInputStream> xInStream = Reference< XObjectInputStream >(m_xORB->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.ObjectInputStream"))),UNO_QUERY);
- Reference< XInputStream> xMarkInStream = Reference< XInputStream >(m_xORB->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.MarkableInputStream"))),UNO_QUERY);
- Reference< XActiveDataSink >(xMarkInStream,UNO_QUERY)->setInputStream(xInStreamHelper);
- Reference< XActiveDataSink > xInDataSource(xInStream, UNO_QUERY);
- OSL_ENSURE(xInDataSource.is(),"Couldn't create com.sun.star.io.ObjectInputStream!");
- xInDataSource->setInputStream(xMarkInStream);
-
- if ( DATASOURCE == m_aStack.top().second )
- LoadTableWindows(xInStream,aLayout);
- else if ( QUERY == m_aStack.top().second )
- LoadTableFields(xInStream,aLayout);
- }
- m_aValues[m_aStack.top().second][nPos] <<= aLayout;
- }
- catch(const Exception& e)
- {
- throw WrappedTargetException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property could not be set.")),*this,makeAny(e));
- }
- }
- }
- break;
- }
- }
-}
-// -----------------------------------------------------------------------------
-
-void SAL_CALL OCfgImport::setPropertyValueForLocale(
- const Any& /*aValue*/,
- const ::rtl::OUString& /*aLocale*/ )
- throw(
- MalformedDataException,
- WrappedTargetException )
-{
-}
-// -----------------------------------------------------------------------------
-
-void SAL_CALL OCfgImport::endProperty()
- throw(
- MalformedDataException,
- WrappedTargetException )
-{
-}
-// -----------------------------------------------------------------------------
-
-void SAL_CALL OCfgImport::addProperty(
- const rtl::OUString& /*aName*/,
- sal_Int16 /*aAttributes*/,
- const Type& /*aType*/ )
- throw(
- MalformedDataException,
- WrappedTargetException )
-{
-}
-// -----------------------------------------------------------------------------
-
-void SAL_CALL OCfgImport::addPropertyWithValue(
- const rtl::OUString& /*aName*/,
- sal_Int16 /*aAttributes*/,
- const Any& /*aValue*/ )
- throw(
- MalformedDataException,
- WrappedTargetException )
-{
-}
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-// }// dbacfg
-// -----------------------------------------------------------------------------
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/migration/cfgimport.hxx b/dbaccess/source/filter/migration/cfgimport.hxx
deleted file mode 100644
index fcccadae42b0..000000000000
--- a/dbaccess/source/filter/migration/cfgimport.hxx
+++ /dev/null
@@ -1,202 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 CFG_CFGIMPORT_HXX
-#define CFG_CFGIMPORT_HXX
-
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/task/XJob.hpp>
-#include <osl/diagnose.h>
-#include "apitools.hxx"
-#include <comphelper/stl_types.hxx>
-#include <cppuhelper/implbase4.hxx>
-#include <com/sun/star/configuration/backend/XLayerHandler.hpp>
-#include <com/sun/star/configuration/backend/XLayer.hpp>
-
-#include <memory>
-#include <stack>
-
-namespace dbacfg
-{
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::frame;
-
-typedef ::cppu::WeakImplHelper4 < ::com::sun::star::lang::XServiceInfo
- , ::com::sun::star::lang::XInitialization
- , ::com::sun::star::task::XJob
- , ::com::sun::star::configuration::backend::XLayerHandler
- > OCfgImport_COMPBASE;
-// -------------
-// - OCfgImport -
-// -------------
-class OCfgImport : public OCfgImport_COMPBASE
-{
-private:
- typedef ::std::pair< ::rtl::OUString, sal_Int16> TElementType;
- typedef ::std::stack< TElementType > TElementStack;
- typedef ::std::vector< PropertyValue > TDataSourceSettings;
-
- Reference< XMultiServiceFactory > m_xORB;
- Reference< XMultiServiceFactory > m_xOldORB;
- Reference< ::com::sun::star::configuration::backend::XLayer> m_xLayer;
- Reference<XPropertySet> m_xCurrentDS;
- Reference<XModel> m_xModel;
- Reference<XPropertySet> m_xCurrentObject; /// can either be a query or a table
- Reference<XPropertySet> m_xCurrentColumn;
- ::std::map< sal_Int16 ,Sequence< ::rtl::OUString> > m_aProperties;
- ::std::map< sal_Int16 ,Sequence< Any> > m_aValues;
- ::rtl::OUString m_sCurrentDataSourceName;
- ::rtl::OUString m_sBookmarkName;
- ::rtl::OUString m_sDocumentLocation;
-
- TElementStack m_aStack;
- TDataSourceSettings m_aDataSourceSettings;
- sal_Bool m_bPropertyMayBeVoid;
-
- /** convert the old configuration settings into new database documents.
- */
- void convert();
- void createDataSource(const ::rtl::OUString& _sName);
- void createObject(sal_Bool _bQuery ,const ::rtl::OUString& _sName);
- void setProperties(sal_Int16 _eType);
-
-protected:
- virtual ~OCfgImport() throw();
-public:
-
- OCfgImport( const Reference< XMultiServiceFactory >& _rxMSF );
-
-
- // XServiceInfo
- DECLARE_SERVICE_INFO_STATIC( );
-
- inline Reference< XMultiServiceFactory > getORB() const { return m_xORB; }
-
- // lang::XInitialization
- virtual void SAL_CALL initialize( const Sequence< Any >& aArguments ) throw(Exception, RuntimeException);
- // task::XJob
- virtual ::com::sun::star::uno::Any SAL_CALL execute( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Arguments ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
-
- // XLayerHandler
- virtual void SAL_CALL startLayer()
- throw(::com::sun::star::lang::WrappedTargetException);
-
- virtual void SAL_CALL endLayer()
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL overrideNode(
- const rtl::OUString& aName,
- sal_Int16 aAttributes,
- sal_Bool bClear)
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL addOrReplaceNode(
- const rtl::OUString& aName,
- sal_Int16 aAttributes)
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL addOrReplaceNodeFromTemplate(
- const rtl::OUString& aName,
- const ::com::sun::star::configuration::backend::TemplateIdentifier& aTemplate,
- sal_Int16 aAttributes )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL endNode()
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL dropNode(
- const rtl::OUString& aName )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL overrideProperty(
- const rtl::OUString& aName,
- sal_Int16 aAttributes,
- const Type& aType,
- sal_Bool bClear )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL setPropertyValue(
- const Any& aValue )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL setPropertyValueForLocale(
- const Any& aValue,
- const rtl::OUString& aLocale )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL endProperty()
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL addProperty(
- const rtl::OUString& aName,
- sal_Int16 aAttributes,
- const Type& aType )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL addPropertyWithValue(
- const rtl::OUString& aName,
- sal_Int16 aAttributes,
- const Any& aValue )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-};
-// -----------------------------------------------------------------------------
-} // dbacfg
-// -----------------------------------------------------------------------------
-#endif // CFG_CFGIMPORT_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/migration/cfgservices.cxx b/dbaccess/source/filter/migration/cfgservices.cxx
deleted file mode 100644
index a5c256488ebc..000000000000
--- a/dbaccess/source/filter/migration/cfgservices.cxx
+++ /dev/null
@@ -1,111 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_dbaccess.hxx"
-
-#include <cppuhelper/factory.hxx>
-#include <osl/diagnose.h>
-#include "cfg_reghelper.hxx"
-
-
-/********************************************************************************************/
-
-using namespace ::dbacfg;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
-
-//***************************************************************************************
-//
-// registry functions
-extern "C" void SAL_CALL createRegistryInfo_OCfgImport();
-
-//***************************************************************************************
-extern "C" void SAL_CALL createRegistryInfo_dbacfg()
-{
- static sal_Bool bInit = sal_False;
- if (!bInit)
- {
- createRegistryInfo_OCfgImport();
- bInit = sal_True;
- }
-}
-
-//---------------------------------------------------------------------------------------
-
-extern "C" void SAL_CALL component_getImplementationEnvironment(
- const sal_Char **ppEnvTypeName,
- uno_Environment **
- )
-{
- createRegistryInfo_dbacfg();
- *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
-}
-
-//---------------------------------------------------------------------------------------
-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,
- void* /*pRegistryKey*/)
-{
- Reference< XInterface > xRet;
- if (pServiceManager && pImplementationName)
- {
- xRet = ::dbacfg::OModuleRegistration::getComponentFactory(
- ::rtl::OUString::createFromAscii(pImplementationName),
- static_cast< XMultiServiceFactory* >(pServiceManager));
- }
-
- if (xRet.is())
- xRet->acquire();
- return xRet.get();
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/migration/makefile.mk b/dbaccess/source/filter/migration/makefile.mk
deleted file mode 100644
index 9d4b95035a2a..000000000000
--- a/dbaccess/source/filter/migration/makefile.mk
+++ /dev/null
@@ -1,73 +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.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-PRJINC=$(PRJ)$/source
-PRJNAME=dbaccess
-TARGET=dbacfg
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files -------------------------------------
-
-SLOFILES= $(SLO)$/cfgimport.obj \
- $(SLO)$/cfgservices.obj
-
-# --- Library -----------------------------------
-LIB1TARGET=$(SLB)$/dba_cfg.lib
-LIB1FILES=\
- $(SLB)$/cfgshared.lib \
- $(SLB)$/$(TARGET).lib
-
-SHL1TARGET=$(TARGET)$(DLLPOSTFIX)
-
-SHL1STDLIBS=\
- $(UNOTOOLSLIB) \
- $(TOOLSLIB) \
- $(COMPHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SFXLIB) \
- $(SVLLIB) \
- $(SALLIB)
-
-
-SHL1DEPN=
-SHL1LIBS=$(LIB1TARGET)
-SHL1IMPLIB= i$(SHL1TARGET)
-SHL1VERSIONMAP=$(SOLARENV)/src/component.map
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-
-DEF1NAME=$(SHL1TARGET)
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
diff --git a/dbaccess/source/filter/xml/dbaxml.component b/dbaccess/source/filter/xml/dbaxml.component
new file mode 100644
index 000000000000..23b3a5c1a776
--- /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/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx
index 1f3fb6e22f61..1c7bd7cafadd 100644
--- a/dbaccess/source/filter/xml/dbloader2.cxx
+++ b/dbaccess/source/filter/xml/dbloader2.cxx
@@ -247,7 +247,7 @@ private:
::comphelper::ComponentContext m_aContext;
Reference< XFrameLoader > m_xMySelf;
::rtl::OUString m_sCurrentURL;
- ULONG m_nStartWizard;
+ sal_uLong m_nStartWizard;
DECL_LINK( OnStartTableWizard, void* );
public:
diff --git a/dbaccess/source/filter/xml/makefile.mk b/dbaccess/source/filter/xml/makefile.mk
index 3f3b0219512b..33ff074b8012 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/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index a645c22ae075..bfd267e140bc 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -1284,7 +1284,7 @@ void ODBExport::_ExportAutoStyles()
}
}
// -----------------------------------------------------------------------------
-void ODBExport::_ExportStyles(BOOL bUsed)
+void ODBExport::_ExportStyles(sal_Bool bUsed)
{
SvXMLExport::_ExportStyles(bUsed);
}
diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx
index 7e957cf554a0..8dc662f85705 100644
--- a/dbaccess/source/filter/xml/xmlExport.hxx
+++ b/dbaccess/source/filter/xml/xmlExport.hxx
@@ -169,7 +169,7 @@ private:
ODBExport();
protected:
- virtual void _ExportStyles( BOOL bUsed );
+ virtual void _ExportStyles( sal_Bool bUsed );
virtual void _ExportAutoStyles();
virtual void _ExportContent();
virtual void _ExportMasterStyles();
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 2e9f86cd1c5e..5814c969eb92 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -451,7 +451,7 @@ sal_Bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
uno::Reference<XComponent> xCom(GetModel(),UNO_QUERY);
SfxMediumRef pMedium = new SfxMedium(
- sFileName, ( STREAM_READ | STREAM_NOCREATE ), FALSE, 0 );
+ sFileName, ( STREAM_READ | STREAM_NOCREATE ), sal_False, 0 );
uno::Reference< embed::XStorage > xStorage;
try
{
diff --git a/dbaccess/source/filter/xml/xmlservices.cxx b/dbaccess/source/filter/xml/xmlservices.cxx
index 95464c7d6896..a70c1d9c4981 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/cfg_reghelper.hxx b/dbaccess/source/inc/cfg_reghelper.hxx
deleted file mode 100644
index e7edf6004423..000000000000
--- a/dbaccess/source/inc/cfg_reghelper.hxx
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 CFG_REGHELPER_HXX
-#define CFG_REGHELPER_HXX
-
-#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <rtl/ustring.hxx>
-#include <cppuhelper/factory.hxx>
-
-namespace dbacfg
-{
-
- #define _REGISTRATIONHELPER_INCLUDED_INDIRECTLY_
- #include "registrationhelper.hxx"
- #undef _REGISTRATIONHELPER_INCLUDED_INDIRECTLY_
-
-}
-
-#endif // CFG_REGHELPER_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/inc/cfgstrings.hrc b/dbaccess/source/inc/cfgstrings.hrc
deleted file mode 100644
index 82f46a60a96e..000000000000
--- a/dbaccess/source/inc/cfgstrings.hrc
+++ /dev/null
@@ -1,99 +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 DBACCESS_SHARED_CFGSTRINGS_HRC
-#define DBACCESS_SHARED_CFGSTRINGS_HRC
-
-#ifndef _RTL_USTRING_HXX_
-#include <rtl/ustring.hxx>
-#endif
-
-namespace dbacfg
-{
-#define STRINGCONSTANTS_INCLUDED_INDIRECT
-#include "stringconstants.hrc"
-#undef STRINGCONSTANTS_INCLUDED_INDIRECT
-
- //============================================================
- //= configuration key names
- //============================================================
- // (we could use PROPERTY_* strings for this, but this would mean that
- // our configuration scheme would change if a property name changes for
- // any reason)
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DBLINK_CONNECTURL);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DBLINK_USER);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DBLINK_TABLEFILTER);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DBLINK_TABLETYEFILTER);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DBLINK_LOGINTIMEOUT);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DBLINK_PASSWORDREQUIRED);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DBLINK_SUPPRESSVERSIONCL);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DBLINK_BOOKMARKS);
-
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_QRYDESCR_COMMAND);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_QRYDESCR_ESCAPE_PROCESSING);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_QRYDESCR_UPDATE_TABLENAME);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_QRYDESCR_UPDATE_SCHEMANAME);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_QRYDESCR_UPDATE_CATALOGNAME);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_QRYDESCR_COLUMNS);
-
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FILTER);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_APPLYFILTER);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_ORDER);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_ROW_HEIGHT);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_TEXTCOLOR);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_NAME);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_HEIGHT);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_WIDTH);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_STYLENAME);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_FAMILY);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_CHARSET);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_PITCH);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_CHARACTERWIDTH);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_WEIGHT);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_SLANT);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_UNDERLINE);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_STRIKEOUT);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_ORIENTATION);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_KERNING);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_WORDLINEMODE);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_TYPE);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_UNDERLINECOLOR);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_CHARACTEREMPHASIS);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_CHARACTERRELIEF);
-
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_SETTINGS);
-
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_COLUMN_ALIGNMENT);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_COLUMN_WIDTH);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_COLUMN_NUMBERFORMAT);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_COLUMN_RELPOSITION);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_COLUMN_HIDDEN);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_LAYOUTINFORMATION);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_COLUMN_HELPTEXT);
- DECLARE_CONSTASCII_USTRING(CONFIGKEY_COLUMN_CONTROLDEFAULT);
-}
-
-#endif // DBACCESS_SHARED_CFGSTRINGS_HRC
diff --git a/dbaccess/source/inc/registrationhelper.hxx b/dbaccess/source/inc/registrationhelper.hxx
index dd02ed5226a3..940fb7fe6fca 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 9b8ca2c52bb3..cc0847be8d60 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_FAIL("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/cfg_reghelper.cxx b/dbaccess/source/shared/cfg_reghelper.cxx
deleted file mode 100644
index e4565b27e9f3..000000000000
--- a/dbaccess/source/shared/cfg_reghelper.cxx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_dbaccess.hxx"
-
-#include "cfg_reghelper.hxx"
-
-#include <osl/diagnose.h>
-#include <comphelper/sequence.hxx>
-
-namespace dbacfg
-{
-
- #define _REGISTRATIONHELPER_CXX_INCLUDED_INDIRECTLY_
- #include "registrationhelper.cxx"
- #undef _REGISTRATIONHELPER_CXX_INCLUDED_INDIRECTLY_
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/shared/cfgstrings.cxx b/dbaccess/source/shared/cfgstrings.cxx
deleted file mode 100644
index a08cb3227a28..000000000000
--- a/dbaccess/source/shared/cfgstrings.cxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_dbaccess.hxx"
-#include "cfgstrings.hrc"
-
-namespace dbacfg
-{
-#include "stringconstants.inc"
-
- //============================================================
- //= configuration key names
- //============================================================
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DBLINK_CONNECTURL, "URL");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DBLINK_USER, "User");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DBLINK_TABLEFILTER, "TableFilter");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DBLINK_TABLETYEFILTER, "TableTypeFilter");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DBLINK_LOGINTIMEOUT, "LoginTimeout");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DBLINK_PASSWORDREQUIRED, "IsPasswordRequired");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DBLINK_SUPPRESSVERSIONCL, "SuppressVersionColumns");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DBLINK_BOOKMARKS, "Bookmarks");
-
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_QRYDESCR_COMMAND, "Command");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_QRYDESCR_ESCAPE_PROCESSING, "EscapeProcessing");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_QRYDESCR_UPDATE_TABLENAME, "UpdateTableName");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_QRYDESCR_UPDATE_SCHEMANAME, "UpdateSchemaName");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_QRYDESCR_UPDATE_CATALOGNAME, "UpdateCatalogName");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_QRYDESCR_COLUMNS, "Columns");
-
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_SETTINGS, "Settings");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FILTER, "Filter");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_APPLYFILTER, "ApplyFilter");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_ORDER, "Order");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_ROW_HEIGHT, "RowHeight");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_LAYOUTINFORMATION, "LayoutInformation");
-
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_TEXTCOLOR, "TextColor");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_NAME, "Font/Name");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_HEIGHT, "Font/Height");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_WIDTH, "Font/Width");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_STYLENAME, "Font/StyleName");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_FAMILY, "Font/Family");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_CHARSET, "Font/CharSet");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_PITCH, "Font/Pitch");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_CHARACTERWIDTH, "Font/CharacterWidth");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_WEIGHT, "Font/Weight");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_SLANT, "Font/Slant");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_UNDERLINE, "Font/UnderLine");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_STRIKEOUT, "Font/Strikeout");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_ORIENTATION, "Font/Orientation");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_KERNING, "Font/Kerning");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_WORDLINEMODE, "Font/WordLineMode");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_TYPE, "Font/Type");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_UNDERLINECOLOR, "TextLineColor");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_CHARACTEREMPHASIS, "CharacterEmphasis");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_DEFSET_FONT_CHARACTERRELIEF, "CharacterRelief");
-
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_COLUMN_ALIGNMENT, "Align");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_COLUMN_WIDTH, "Width");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_COLUMN_NUMBERFORMAT, "FormatKey");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_COLUMN_RELPOSITION, "Position");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_COLUMN_HIDDEN, "Hidden");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_COLUMN_HELPTEXT, "HelpText");
- IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_COLUMN_CONTROLDEFAULT, "ControlDefault");
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/shared/makefile.mk b/dbaccess/source/shared/makefile.mk
index ff40184d8232..7906623eb327 100644
--- a/dbaccess/source/shared/makefile.mk
+++ b/dbaccess/source/shared/makefile.mk
@@ -32,7 +32,6 @@ LIBTARGET=NO
TARGET=shared
LIB1TARGET=$(SLB)$/dbushared.lib
LIB2TARGET=$(SLB)$/fltshared.lib
-LIB3TARGET=$(SLB)$/cfgshared.lib
LIB4TARGET=$(SLB)$/sdbtshared.lib
# --- Settings ----------------------------------
@@ -44,12 +43,10 @@ LIB4TARGET=$(SLB)$/sdbtshared.lib
# --- Files -------------------------------------
EXCEPTIONSFILES= \
$(SLO)$/dbu_reghelper.obj \
- $(SLO)$/cfg_reghelper.obj \
$(SLO)$/flt_reghelper.obj
SLOFILES= \
$(EXCEPTIONSFILES) \
- $(SLO)$/cfgstrings.obj \
$(SLO)$/xmlstrings.obj \
$(SLO)$/dbustrings.obj
@@ -61,10 +58,6 @@ LIB2OBJFILES= \
$(SLO)$/flt_reghelper.obj \
$(SLO)$/xmlstrings.obj
-LIB3OBJFILES= \
- $(SLO)$/cfg_reghelper.obj \
- $(SLO)$/cfgstrings.obj
-
LIB4OBJFILES= \
$(SLO)$/sdbtstrings.obj
diff --git a/dbaccess/source/shared/registrationhelper.cxx b/dbaccess/source/shared/registrationhelper.cxx
index 878b9cec5688..9f5d05da122c 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/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 639d74115353..f98da6c7026f 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -483,10 +483,6 @@ sal_Bool OApplicationController::Construct(Window* _pParent)
return sal_False;
}
- OSL_ENSURE( getView(), "OApplicationController::Construct: have no view!" );
- if ( getView() )
- getView()->enableSeparator( );
-
// now that we have a view we can create the clipboard listener
m_aSystemClipboard = TransferableDataHelper::CreateFromSystemClipboard( getView() );
m_aSystemClipboard.StartClipboardListening( );
diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx
index fd484c686616..8067846c2c1e 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -128,7 +128,7 @@ namespace dbaui
OTableCopyHelper m_aTableCopyHelper;
TransferableClipboardListener*
m_pClipbordNotifier; // notifier for changes in the clipboard
- ULONG m_nAsyncDrop;
+ sal_uLong m_nAsyncDrop;
OAsyncronousLink m_aControllerConnectedEvent;
OAsyncronousLink m_aSelectContainerEvent;
PreviewMode m_ePreviewMode; // the mode of the preview
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index 1af86b65d2d7..ee76fd318f44 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -751,8 +751,8 @@ void OApplicationController::onLoadedMenu(const Reference< ::com::sun::star::fra
MenuBar* pMenu = pSystemWindow ? pSystemWindow->GetMenuBar() : NULL;
if ( pMenu )
{
- USHORT nMenuItems = pMenu->GetItemCount();
- for ( USHORT i = 0; i < nMenuItems; ++i )
+ sal_uInt16 nMenuItems = pMenu->GetItemCount();
+ for ( sal_uInt16 i = 0; i < nMenuItems; ++i )
aMnemonicGenerator.RegisterMnemonic( pMenu->GetItemText( pMenu->GetItemId( i ) ) );
}
// - the icons should use automatic ones
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 4cfce1d3ab95..1644305e27af 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -139,7 +139,7 @@ namespace
class OTablePreviewWindow : public Window
{
DECL_LINK(OnDisableInput, void*);
- void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt);
public:
@@ -162,7 +162,7 @@ namespace
// -----------------------------------------------------------------------------
IMPL_LINK(OTablePreviewWindow, OnDisableInput, void*, EMPTYARG)
{
- EnableInput(FALSE);
+ EnableInput(sal_False);
return 0L;
}
// -----------------------------------------------------------------------------
@@ -225,7 +225,7 @@ OAppDetailPageHelper::OAppDetailPageHelper(Window* _pParent,OAppBorderWindow& _r
m_aTBPreview.SetHelpId(HID_APP_VIEW_PREVIEW_CB);
m_aTBPreview.SetDropdownClickHdl( LINK( this, OAppDetailPageHelper, OnDropdownClickHdl ) );
m_aTBPreview.EnableMenuStrings();
- m_aTBPreview.Enable(TRUE);
+ m_aTBPreview.Enable(sal_True);
m_aBorder.SetUniqueId(UID_APP_VIEW_PREVIEW_1);
@@ -289,7 +289,7 @@ void OAppDetailPageHelper::selectAll()
int nPos = getVisibleControlIndex();
if ( nPos < E_ELEMENT_TYPE_COUNT )
{
- m_pLists[nPos]->SelectAll(TRUE);
+ m_pLists[nPos]->SelectAll(sal_True);
}
}
// -----------------------------------------------------------------------------
@@ -453,7 +453,7 @@ void OAppDetailPageHelper::selectElements(const Sequence< ::rtl::OUString>& _aNa
if ( nPos < E_ELEMENT_TYPE_COUNT )
{
DBTreeListBox& rTree = *m_pLists[nPos];
- rTree.SelectAll(FALSE);
+ rTree.SelectAll(sal_False);
const ::rtl::OUString* pIter = _aNames.getConstArray();
const ::rtl::OUString* pEnd = pIter + _aNames.getLength();
for(;pIter != pEnd;++pIter)
@@ -602,7 +602,7 @@ SvLBoxEntry* OAppDetailPageHelper::getEntry( const Point& _aPosPixel) const
SvLBoxEntry* pReturn = NULL;
int nPos = getVisibleControlIndex();
if ( nPos < E_ELEMENT_TYPE_COUNT )
- pReturn = m_pLists[nPos]->GetEntry( _aPosPixel,TRUE );
+ pReturn = m_pLists[nPos]->GetEntry( _aPosPixel,sal_True );
return pReturn;
}
// -----------------------------------------------------------------------------
@@ -634,14 +634,14 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon
SvLBoxEntry* pEntry = m_pLists[E_TABLE]->First();
if ( pEntry )
m_pLists[E_TABLE]->Expand(pEntry);
- m_pLists[E_TABLE]->SelectAll(FALSE);
+ m_pLists[E_TABLE]->SelectAll(sal_False);
}
setDetailPage(m_pLists[E_TABLE]);
}
// -----------------------------------------------------------------------------
-void OAppDetailPageHelper::getElementIcons( ElementType _eType, USHORT& _rImageId )
+void OAppDetailPageHelper::getElementIcons( ElementType _eType, sal_uInt16& _rImageId)
{
ImageProvider aImageProvider;
_rImageId = 0;
@@ -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;
+ sal_uInt16 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] )
@@ -697,7 +698,7 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA
{
fillNames( _xContainer, _eType, nImageId, NULL );
- m_pLists[_eType]->SelectAll(FALSE);
+ m_pLists[_eType]->SelectAll(sal_False);
}
setDetailPage(m_pLists[_eType]);
}
@@ -711,7 +712,7 @@ void OAppDetailPageHelper::setDetailPage(Window* _pWindow)
pCurrent->Hide();
showPreview(NULL);
- BOOL bHasFocus = FALSE;
+ sal_Bool bHasFocus = sal_False;
m_aFL.Show();
{
bHasFocus = pCurrent->HasChildPathFocus();
@@ -719,7 +720,7 @@ void OAppDetailPageHelper::setDetailPage(Window* _pWindow)
}
m_aTBPreview.Show();
m_aBorder.Show();
- switchPreview(m_ePreviewMode,TRUE);
+ switchPreview(m_ePreviewMode,sal_True);
if ( bHasFocus )
_pWindow->GrabFocus();
@@ -743,7 +744,7 @@ namespace
// -----------------------------------------------------------------------------
void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContainer, const ElementType _eType,
- const USHORT _nImageId, SvLBoxEntry* _pParent )
+ const sal_uInt16 _nImageId, SvLBoxEntry* _pParent )
{
OSL_ENSURE(_xContainer.is(),"Data source is NULL! -> GPF");
OSL_ENSURE( ( _eType >= E_TABLE ) && ( _eType < E_ELEMENT_TYPE_COUNT ), "OAppDetailPageHelper::fillNames: invalid type!" );
@@ -766,7 +767,7 @@ void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContaine
Reference<XNameAccess> xSubElements(_xContainer->getByName(*pIter),UNO_QUERY);
if ( xSubElements.is() )
{
- pEntry = pList->InsertEntry( *pIter, _pParent, FALSE, LIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) );
+ pEntry = pList->InsertEntry( *pIter, _pParent, sal_False, LIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) );
getBorderWin().getView()->getAppController().containerFound( Reference< XContainer >( xSubElements, UNO_QUERY ) );
fillNames( xSubElements, _eType, _nImageId, pEntry );
}
@@ -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);
@@ -892,13 +893,13 @@ SvLBoxEntry* OAppDetailPageHelper::elementAdded(ElementType _eType,const ::rtl::
}
}
- USHORT nImageId = 0;
+ sal_uInt16 nImageId = 0;
getElementIcons( _eType, nImageId );
Reference<XNameAccess> xContainer(_rObject,UNO_QUERY);
if ( xContainer.is() )
{
const sal_Int32 nFolderIndicator = lcl_getFolderIndicatorForType( _eType );
- pRet = pTreeView->InsertEntry( _rName, pEntry, FALSE, LIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) );
+ pRet = pTreeView->InsertEntry( _rName, pEntry, sal_False, LIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) );
fillNames( xContainer, _eType, nImageId, pRet );
}
else
@@ -1029,7 +1030,7 @@ sal_Bool OAppDetailPageHelper::isPreviewEnabled()
return m_ePreviewMode != E_PREVIEWNONE;
}
// -----------------------------------------------------------------------------
-void OAppDetailPageHelper::switchPreview(PreviewMode _eMode,BOOL _bForce)
+void OAppDetailPageHelper::switchPreview(PreviewMode _eMode,sal_Bool _bForce)
{
if ( m_ePreviewMode != _eMode || _bForce )
{
@@ -1254,7 +1255,7 @@ void OAppDetailPageHelper::KeyInput( const KeyEvent& rKEvt )
OSL_PRECOND( pCurrentView, "OAppDetailPageHelper::KeyInput: how this?" );
KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction(); (void)eFunc;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
if ( ( KEY_RETURN == nCode ) && pCurrentView )
{
@@ -1317,11 +1318,11 @@ OPreviewWindow::OPreviewWindow(Window* _pParent)
ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------------
-BOOL OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const
+sal_Bool OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const
{
const Size aWinSize( GetOutputSizePixel() );
Size aNewSize( LogicToPixel( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode() ) );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( aNewSize.Width() && aNewSize.Height() )
{
@@ -1344,7 +1345,7 @@ BOOL OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangl
( aWinSize.Height() - aNewSize.Height() ) >> 1 );
rResultRect = Rectangle( aNewPos, aNewSize );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
index 465299e10a23..69a050c8e2ea 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
@@ -70,8 +70,8 @@ namespace dbaui
@return
<TRUE/> when successfull
*/
- BOOL ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const;
- void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ sal_Bool ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const;
+ void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt);
public:
@@ -119,7 +119,7 @@ namespace dbaui
/** retrieves the resource ids of the images representing elements of the given type
*/
- void getElementIcons( ElementType _eType, USHORT& _rImageId );
+ void getElementIcons( ElementType _eType, sal_uInt16& _rImageId);
/** fills the names in the listbox
@param _xContainer
@@ -133,7 +133,7 @@ namespace dbaui
*/
void fillNames( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xContainer,
const ElementType _eType,
- const USHORT _nImageId,
+ const sal_uInt16 _nImageId,
SvLBoxEntry* _pParent );
/** sets the detail page
@@ -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* );
@@ -344,7 +344,7 @@ namespace dbaui
@param _bForce
Force the preview to be resetted
*/
- void switchPreview(PreviewMode _eMode,BOOL _bForce = FALSE);
+ void switchPreview(PreviewMode _eMode,sal_Bool _bForce = sal_False);
/** shows the Preview of the content when it is enabled.
@param _xContent
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index 4e629c52d1ed..e328587d8760 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -71,7 +71,7 @@ using ::com::sun::star::sdb::application::NamedDatabaseObject;
#define SPACEBETWEENENTRIES 4
// -----------------------------------------------------------------------------
-TaskEntry::TaskEntry( const sal_Char* _pAsciiUNOCommand, USHORT _nHelpID, USHORT _nTitleResourceID, bool _bHideWhenDisabled )
+TaskEntry::TaskEntry( const sal_Char* _pAsciiUNOCommand, sal_uInt16 _nHelpID, sal_uInt16 _nTitleResourceID, bool _bHideWhenDisabled )
:sUNOCommand( ::rtl::OUString::createFromAscii( _pAsciiUNOCommand ) )
,nHelpID( _nHelpID )
,sTitle( ModuleRes( _nTitleResourceID ) )
@@ -86,7 +86,7 @@ OCreationList::OCreationList( OTasksWindow& _rParent )
,m_pMouseDownEntry( NULL )
,m_pLastActiveEntry( NULL )
{
- USHORT nSize = SPACEBETWEENENTRIES;
+ sal_uInt16 nSize = SPACEBETWEENENTRIES;
SetSpaceBetweenEntries(nSize);
SetSelectionMode( NO_SELECTION );
SetExtendedWinBits( EWB_NO_AUTO_CURENTRY );
@@ -116,7 +116,7 @@ void OCreationList::PreparePaint( SvLBoxEntry* _pEntry )
{
// draw a selection background
bool bIsMouseDownEntry = ( _pEntry == m_pMouseDownEntry );
- DrawSelectionBackground( GetBoundingRect( _pEntry ), bIsMouseDownEntry ? 1 : 2, FALSE, TRUE, FALSE );
+ DrawSelectionBackground( GetBoundingRect( _pEntry ), bIsMouseDownEntry ? 1 : 2, sal_False, sal_True, sal_False );
if ( bIsMouseDownEntry )
{
@@ -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 ) );
OSL_ENSURE( pEntry, "OCreationList::ExecuteSearchEntry: invalid entry!" );
@@ -307,7 +307,7 @@ bool OCreationList::setCurrentEntryInvalidate( SvLBoxEntry* _pEntry )
// -----------------------------------------------------------------------------
void OCreationList::updateHelpText()
{
- USHORT nHelpTextId = 0;
+ sal_uInt16 nHelpTextId = 0;
if ( GetCurEntry() )
nHelpTextId = reinterpret_cast< TaskEntry* >( GetCurEntry()->GetUserData() )->nHelpID;
m_rTaskWindow.setHelpText( nHelpTextId );
@@ -424,7 +424,7 @@ void OTasksWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_B
m_aDescription.SetControlFont(aFont);
}
// -----------------------------------------------------------------------------
-void OTasksWindow::setHelpText(USHORT _nId)
+void OTasksWindow::setHelpText(sal_uInt16 _nId)
{
DBG_CHKTHIS(OTasksWindow,NULL);
if ( _nId )
@@ -518,7 +518,7 @@ void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList )
}
m_aCreation.Show();
- m_aCreation.SelectAll(FALSE);
+ m_aCreation.SelectAll(sal_False);
m_aHelpText.Show();
m_aDescription.Show();
m_aFL.Show();
diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx
index 06aa8ecb4411..df890bbafb4b 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;
@@ -99,14 +99,14 @@ namespace dbaui
struct TaskEntry
{
::rtl::OUString sUNOCommand;
- USHORT nHelpID;
+ sal_uInt16 nHelpID;
String sTitle;
bool bHideWhenDisabled;
// TODO: we should be consistent in the task pane and the menus/toolbars:
// If an entry is disabled in the latter, it should also be disabled in the former.
// If an entry is *hidden* in the former, it should also be hidden in the latter.
- TaskEntry( const sal_Char* _pAsciiUNOCommand, USHORT _nHelpID, USHORT _nTitleResourceID, bool _bHideWhenDisabled = false );
+ TaskEntry( const sal_Char* _pAsciiUNOCommand, sal_uInt16 _nHelpID, sal_uInt16 _nTitleResourceID, bool _bHideWhenDisabled = false );
};
typedef ::std::vector< TaskEntry > TaskEntryList;
@@ -115,7 +115,7 @@ namespace dbaui
/// the tasks available in the pane
TaskEntryList aTasks;
/// the resource ID for the title of the pane
- USHORT nTitleId;
+ sal_uInt16 nTitleId;
};
class OTasksWindow : public Window
@@ -127,7 +127,7 @@ namespace dbaui
OApplicationDetailView* m_pDetailView;
DECL_LINK( OnEntrySelectHdl, SvTreeListBox* );
- void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt);
public:
@@ -148,7 +148,7 @@ namespace dbaui
}
void Clear();
- void setHelpText(USHORT _nId);
+ void setHelpText(sal_uInt16 _nId);
};
//==================================================================
class OApplicationDetailView : public OSplitterView
@@ -162,7 +162,7 @@ namespace dbaui
::std::vector< TaskPaneData > m_aTaskPaneData;
MnemonicGenerator m_aExternalMnemonics;
- void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt);
diff --git a/dbaccess/source/ui/app/AppIconControl.cxx b/dbaccess/source/ui/app/AppIconControl.cxx
index 2fb94bb6b77f..c6c3f2e480a2 100644
--- a/dbaccess/source/ui/app/AppIconControl.cxx
+++ b/dbaccess/source/ui/app/AppIconControl.cxx
@@ -53,9 +53,9 @@ OApplicationIconControl::OApplicationIconControl(Window* _pParent)
struct CategoryDescriptor
{
- USHORT nLabelResId;
+ sal_uInt16 nLabelResId;
ElementType eType;
- USHORT nImageResId;
+ sal_uInt16 nImageResId;
} aCategories[] = {
{ RID_STR_TABLES_CONTAINER, E_TABLE, IMG_TABLEFOLDER_TREE_L },
{ RID_STR_QUERIES_CONTAINER, E_QUERY, IMG_QUERYFOLDER_TREE_L },
@@ -71,14 +71,14 @@ OApplicationIconControl::OApplicationIconControl(Window* _pParent)
pEntry->SetUserData( new ElementType( aCategories[i].eType ) );
}
- SetChoiceWithCursor( TRUE );
+ SetChoiceWithCursor( sal_True );
SetSelectionMode(SINGLE_SELECTION);
}
// -----------------------------------------------------------------------------
OApplicationIconControl::~OApplicationIconControl()
{
- ULONG nCount = GetEntryCount();
- for ( ULONG i = 0; i < nCount; ++i )
+ sal_uLong nCount = GetEntryCount();
+ for ( sal_uLong i = 0; i < nCount; ++i )
{
SvxIconChoiceCtrlEntry* pEntry = GetEntry( i );
if ( pEntry )
diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx
index fc8e885928e7..36475115d972 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.cxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.cxx
@@ -124,7 +124,7 @@ void OApplicationSwapWindow::DataChanged( const DataChangedEvent& rDCEvt )
void OApplicationSwapWindow::clearSelection()
{
m_aIconControl.SetNoSelection();
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SvxIconChoiceCtrlEntry* pEntry = m_aIconControl.GetSelectedEntry(nPos);
if ( pEntry )
m_aIconControl.InvalidateEntry(pEntry);
@@ -151,7 +151,7 @@ bool OApplicationSwapWindow::interceptKeyInput( const KeyEvent& _rEvent )
// -----------------------------------------------------------------------------
ElementType OApplicationSwapWindow::getElementType() const
{
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SvxIconChoiceCtrlEntry* pEntry = m_aIconControl.GetSelectedEntry(nPos);
return ( pEntry ) ? *static_cast<ElementType*>(pEntry->GetUserData()) : E_NONE;
}
@@ -176,7 +176,7 @@ bool OApplicationSwapWindow::onContainerSelected( ElementType _eType )
// -----------------------------------------------------------------------------
IMPL_LINK(OApplicationSwapWindow, OnContainerSelectHdl, SvtIconChoiceCtrl*, _pControl)
{
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SvxIconChoiceCtrlEntry* pEntry = _pControl->GetSelectedEntry( nPos );
ElementType eType = E_NONE;
if ( pEntry )
@@ -196,9 +196,9 @@ IMPL_LINK(OApplicationSwapWindow, ChangeToLastSelected, void*, EMPTYARG)
// -----------------------------------------------------------------------------
void OApplicationSwapWindow::selectContainer(ElementType _eType)
{
- ULONG nCount = m_aIconControl.GetEntryCount();
+ sal_uLong nCount = m_aIconControl.GetEntryCount();
SvxIconChoiceCtrlEntry* pEntry = NULL;
- for (ULONG i=0; i < nCount; ++i)
+ for (sal_uLong i=0; i < nCount; ++i)
{
pEntry = m_aIconControl.GetEntry(i);
if ( pEntry && *static_cast<ElementType*>(pEntry->GetUserData()) == _eType )
diff --git a/dbaccess/source/ui/app/AppSwapWindow.hxx b/dbaccess/source/ui/app/AppSwapWindow.hxx
index bc5cd2abb1df..89d535806bd9 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.hxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.hxx
@@ -44,7 +44,7 @@ namespace dbaui
ElementType m_eLastType;
OAppBorderWindow& m_rBorderWin;
- void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
DECL_LINK( OnContainerSelectHdl, SvtIconChoiceCtrl* );
DECL_LINK( ChangeToLastSelected, void* );
@@ -65,8 +65,8 @@ namespace dbaui
inline void cut() { }
inline void paste() { }
- inline ULONG GetEntryCount() const { return m_aIconControl.GetEntryCount(); }
- inline SvxIconChoiceCtrlEntry* GetEntry( ULONG nPos ) const { return m_aIconControl.GetEntry(nPos); }
+ inline sal_uLong GetEntryCount() const { return m_aIconControl.GetEntryCount(); }
+ inline SvxIconChoiceCtrlEntry* GetEntry( sal_uLong nPos ) const { return m_aIconControl.GetEntry(nPos); }
inline Rectangle GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const { return m_aIconControl.GetBoundingBox(pEntry); }
/** automatically creates mnemonics for the icon/texts in our left hand side panel
diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx
index f487353a5163..e2473432e8cc 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.cxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.cxx
@@ -38,7 +38,7 @@ namespace dbaui
{
DBG_NAME(OTitleWindow)
-OTitleWindow::OTitleWindow(Window* _pParent,USHORT _nTitleId,WinBits _nBits,BOOL _bShift)
+OTitleWindow::OTitleWindow(Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits,sal_Bool _bShift)
: Window(_pParent,_nBits | WB_DIALOGCONTROL)
, m_aSpace1(this)
, m_aSpace2(this)
@@ -100,7 +100,7 @@ void OTitleWindow::Resize()
}
}
// -----------------------------------------------------------------------------
-void OTitleWindow::setTitle(USHORT _nTitleId)
+void OTitleWindow::setTitle(sal_uInt16 _nTitleId)
{
if ( _nTitleId != 0 )
{
diff --git a/dbaccess/source/ui/app/AppTitleWindow.hxx b/dbaccess/source/ui/app/AppTitleWindow.hxx
index 8f230d9d9e1c..ab1719977f23 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.hxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.hxx
@@ -38,12 +38,12 @@ namespace dbaui
FixedText m_aSpace2;
FixedText m_aTitle;
Window* m_pChild;
- BOOL m_bShift;
- void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ sal_Bool m_bShift;
+ void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt);
public:
- OTitleWindow(Window* _pParent,USHORT _nTitleId,WinBits _nBits,BOOL _bShift = TRUE);
+ OTitleWindow(Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits,sal_Bool _bShift = sal_True);
virtual ~OTitleWindow();
// window overloads
@@ -67,7 +67,7 @@ namespace dbaui
@param _nTitleId
The resource id of the title text.
*/
- void setTitle(USHORT _nTitleId);
+ void setTitle(sal_uInt16 _nTitleId);
/** Gets the min Width in Pixel which is needed to display the whole
diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx
index 19584f86646d..4974a3ef6333 100644
--- a/dbaccess/source/ui/app/AppView.cxx
+++ b/dbaccess/source/ui/app/AppView.cxx
@@ -83,7 +83,7 @@ OAppBorderWindow::OAppBorderWindow(OApplicationView* _pParent,PreviewMode _ePrev
SetBorderStyle(WINDOW_BORDER_MONO);
- m_pPanel = new OTitleWindow(this,STR_DATABASE,WB_BORDER | WB_DIALOGCONTROL ,FALSE);
+ m_pPanel = new OTitleWindow(this,STR_DATABASE,WB_BORDER | WB_DIALOGCONTROL ,sal_False);
m_pPanel->SetBorderStyle(WINDOW_BORDER_MONO);
OApplicationSwapWindow* pSwap = new OApplicationSwapWindow( m_pPanel, *this );
pSwap->Show();
diff --git a/dbaccess/source/ui/app/app.src b/dbaccess/source/ui/app/app.src
index b723d282bb14..431f434fcea3 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;
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 1bdeb80ba45d..29e243823b67 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -739,6 +739,26 @@ sal_Bool SbaXDataBrowserController::reloadForm( const Reference< XLoadable >& _r
if (::comphelper::getBOOL(xFormSet->getPropertyValue(PROPERTY_ESCAPE_PROCESSING)))
xFormSet->getPropertyValue(PROPERTY_SINGLESELECTQUERYCOMPOSER) >>= m_xParser;
+ {
+ const Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY );
+ const Reference< XSingleSelectQueryAnalyzer > xAnalyzer( xRowSetProps->getPropertyValue( PROPERTY_SINGLESELECTQUERYCOMPOSER ), UNO_QUERY );
+ if ( xAnalyzer.is() )
+ {
+ const Reference< XIndexAccess > xOrderColumns( xAnalyzer->getOrderColumns(), UNO_SET_THROW );
+ const sal_Int32 nOrderColumns( xOrderColumns->getCount() );
+ for ( sal_Int32 c=0; c<nOrderColumns; ++c )
+ {
+ const Reference< XPropertySet > xOrderColumn( xOrderColumns->getByIndex(c), UNO_QUERY_THROW );
+ ::rtl::OUString sColumnName;
+ OSL_VERIFY( xOrderColumn->getPropertyValue( PROPERTY_NAME ) >>= sColumnName);
+ ::rtl::OUString sTableName;
+ OSL_VERIFY( xOrderColumn->getPropertyValue( PROPERTY_TABLENAME ) >>= sTableName);
+ (void)sColumnName;
+ (void)sTableName;
+ }
+ }
+ }
+
Reference< XWarningsSupplier > xWarnings( _rxLoadable, UNO_QUERY );
if ( xWarnings.is() )
{
@@ -809,7 +829,8 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent)
m_xColumnsSupplier.set(m_xRowSet,UNO_QUERY);
m_xLoadable.set(m_xRowSet,UNO_QUERY);
- if (!InitializeForm(m_xRowSet))
+ Reference< XPropertySet > xFormProperties( m_xRowSet, UNO_QUERY );
+ if ( !InitializeForm( xFormProperties ) )
return sal_False;
m_xGridModel = CreateGridModel();
@@ -1207,11 +1228,7 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t
}
- // the filter or the sort criterias have changed ? -> update our parser
- if (evt.PropertyName.equals(PROPERTY_ACTIVECOMMAND))
- {
- }
- else if (evt.PropertyName.equals(PROPERTY_FILTER))
+ if (evt.PropertyName.equals(PROPERTY_FILTER))
{
InvalidateFeature(ID_BROWSER_REMOVEFILTER);
}
@@ -1851,25 +1868,50 @@ void SbaXDataBrowserController::applyParserFilter(const ::rtl::OUString& _rOldFi
setCurrentColumnPosition(nPos);
}
+
//------------------------------------------------------------------------------
Reference< XSingleSelectQueryComposer > SbaXDataBrowserController::createParser_nothrow()
{
- Reference< XSingleSelectQueryComposer > xRet;
+ Reference< XSingleSelectQueryComposer > xComposer;
try
{
- Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY_THROW);
- const Reference<XMultiServiceFactory> xFactory(::dbtools::getConnection(getRowSet()),UNO_QUERY_THROW);
- xRet.set(xFactory->createInstance(SERVICE_NAME_SINGLESELECTQUERYCOMPOSER),UNO_QUERY_THROW);
- xRet->setElementaryQuery(::comphelper::getString(xFormSet->getPropertyValue(PROPERTY_ACTIVECOMMAND)));
- xRet->setFilter(::comphelper::getString(xFormSet->getPropertyValue(PROPERTY_FILTER)));
- xRet->setHavingClause(::comphelper::getString(xFormSet->getPropertyValue(PROPERTY_HAVING_CLAUSE)));
- xRet->setOrder(::comphelper::getString(xFormSet->getPropertyValue(PROPERTY_ORDER)));
+ const Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW );
+ const Reference< XMultiServiceFactory > xFactory(
+ xRowSetProps->getPropertyValue( PROPERTY_ACTIVE_CONNECTION ), UNO_QUERY_THROW );
+ xComposer.set( xFactory->createInstance( SERVICE_NAME_SINGLESELECTQUERYCOMPOSER ), UNO_QUERY_THROW );
+
+ ::rtl::OUString sActiveCommand;
+ OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ACTIVECOMMAND ) >>= sActiveCommand );
+ if ( sActiveCommand.getLength() > 0 )
+ {
+ xComposer->setElementaryQuery( sActiveCommand );
+ }
+ else
+ {
+ ::rtl::OUString sCommand;
+ OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_COMMAND ) >>= sCommand );
+ sal_Int32 nCommandType = CommandType::COMMAND;
+ OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_COMMAND_TYPE ) >>= nCommandType );
+ xComposer->setCommand( sCommand, nCommandType );
+ }
+
+ ::rtl::OUString sFilter;
+ OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_FILTER ) >>= sFilter );
+ xComposer->setFilter( sFilter );
+
+ ::rtl::OUString sHavingClause;
+ OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_HAVING_CLAUSE ) >>= sHavingClause );
+ xComposer->setHavingClause( sHavingClause );
+
+ ::rtl::OUString sOrder;
+ OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ORDER ) >>= sOrder );
+ xComposer->setOrder( sOrder );
}
- catch(Exception&)
+ catch ( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
- return xRet;
+ return xComposer;
}
//------------------------------------------------------------------------------
void SbaXDataBrowserController::ExecuteFilterSortCrit(sal_Bool bFilter)
@@ -1891,10 +1933,8 @@ void SbaXDataBrowserController::ExecuteFilterSortCrit(sal_Bool bFilter)
{
DlgFilterCrit aDlg( getBrowserView(), getORB(), xCon, xParser, xSup->getColumns() );
String aFilter;
- if(!aDlg.Execute())
- {
- return; // if so we don't need to actualize the grid
- }
+ if ( !aDlg.Execute() )
+ return; // if so we don't need to update the grid
aDlg.BuildWherePart();
}
else
@@ -2683,7 +2723,6 @@ void SbaXDataBrowserController::initializeParser() const
{ // (only if the statement isn't native)
// (it is allowed to use the PROPERTY_ISPASSTHROUGH : _after_ loading a form it is valid)
xFormSet->getPropertyValue(PROPERTY_SINGLESELECTQUERYCOMPOSER) >>= m_xParser;
- }
}
catch(Exception&)
{
diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx
index f7286e6a9377..337cd3b01177 100644
--- a/dbaccess/source/ui/browser/brwview.cxx
+++ b/dbaccess/source/ui/browser/brwview.cxx
@@ -334,8 +334,8 @@ long UnoDataBrowserView::PreNotify( NotifyEvent& rNEvt )
{
const KeyEvent* pKeyEvt = rNEvt.GetKeyEvent();
const KeyCode& rKeyCode = pKeyEvt->GetKeyCode();
- if ( ( rKeyCode == KeyCode( KEY_E, TRUE, TRUE, FALSE, FALSE ) )
- || ( rKeyCode == KeyCode( KEY_TAB, TRUE, FALSE, FALSE, FALSE ) )
+ if ( ( rKeyCode == KeyCode( KEY_E, sal_True, sal_True, sal_False, sal_False ) )
+ || ( rKeyCode == KeyCode( KEY_TAB, sal_True, sal_False, sal_False, sal_False ) )
)
{
if ( m_pTreeView && m_pVclControl && m_pTreeView->HasChildPathFocus() )
diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx
index c0e3157bfb75..ff4817eba056 100644
--- a/dbaccess/source/ui/browser/dataview.cxx
+++ b/dbaccess/source/ui/browser/dataview.cxx
@@ -35,7 +35,6 @@
#include <comphelper/namedvaluecollection.hxx>
#include <sfx2/app.hxx>
#include <sfx2/imgmgr.hxx>
-#include <vcl/fixed.hxx>
#include "IController.hxx"
#include "UITools.hxx"
#include <sfx2/sfx.hrc>
@@ -84,11 +83,12 @@ namespace dbaui
:Window(pParent,nStyle)
,m_xServiceFactory(_rFactory)
,m_rController( _rController )
- ,m_pSeparator( NULL )
+ ,m_aSeparator( this )
{
DBG_CTOR(ODataView,NULL);
m_rController.acquire();
m_pAccel.reset(::svt::AcceleratorExecute::createAcceleratorHelper());
+ m_aSeparator.Show();
}
// -------------------------------------------------------------------------
@@ -101,30 +101,10 @@ namespace dbaui
{
DBG_DTOR(ODataView,NULL);
- enableSeparator( sal_False );
m_rController.release();
}
// -------------------------------------------------------------------------
- void ODataView::enableSeparator( const sal_Bool _bEnable )
- {
- if ( _bEnable == isSeparatorEnabled() )
- // nothing to do
- return;
-
- if ( _bEnable )
- {
- m_pSeparator = new FixedLine( this );
- m_pSeparator->Show( );
- }
- else
- {
- ::std::auto_ptr<FixedLine> aTemp(m_pSeparator);
- m_pSeparator = NULL;
- }
- Resize();
- }
- // -------------------------------------------------------------------------
void ODataView::resizeDocumentView( Rectangle& /*_rPlayground*/ )
{
}
@@ -148,15 +128,10 @@ namespace dbaui
{
Rectangle aPlayground( _rPlayground );
- // position thew separator
- if ( m_pSeparator )
- {
- Size aSeparatorSize = Size( aPlayground.GetWidth(), 2 );
-
- m_pSeparator->SetPosSizePixel( aPlayground.TopLeft(), aSeparatorSize );
-
- aPlayground.Top() += aSeparatorSize.Height() + 1;
- }
+ // position the separator
+ const Size aSeparatorSize = Size( aPlayground.GetWidth(), 2 );
+ m_aSeparator.SetPosSizePixel( aPlayground.TopLeft(), aSeparatorSize );
+ aPlayground.Top() += aSeparatorSize.Height() + 1;
// position the controls of the document's view
resizeDocumentView( aPlayground );
diff --git a/dbaccess/source/ui/browser/dbexchange.cxx b/dbaccess/source/ui/browser/dbexchange.cxx
index 21b4fc2d2172..0273c7f5a746 100644
--- a/dbaccess/source/ui/browser/dbexchange.cxx
+++ b/dbaccess/source/ui/browser/dbexchange.cxx
@@ -180,7 +180,7 @@ namespace dbaui
// -----------------------------------------------------------------------------
sal_Bool ODataClipboard::GetData( const DataFlavor& rFlavor )
{
- const ULONG nFormat = SotExchange::GetFormat(rFlavor);
+ const sal_uLong nFormat = SotExchange::GetFormat(rFlavor);
switch (nFormat)
{
case SOT_FORMAT_RTF:
diff --git a/dbaccess/source/ui/browser/dbtreemodel.hxx b/dbaccess/source/ui/browser/dbtreemodel.hxx
index b0afe70a5fe1..12ce3ed3925a 100644
--- a/dbaccess/source/ui/browser/dbtreemodel.hxx
+++ b/dbaccess/source/ui/browser/dbtreemodel.hxx
@@ -42,8 +42,8 @@
// tables holds the nameaccess for the tables
// table holds the table
-#define CONTAINER_QUERIES ULONG( 0 )
-#define CONTAINER_TABLES ULONG( 1 )
+#define CONTAINER_QUERIES sal_uLong( 0 )
+#define CONTAINER_TABLES sal_uLong( 1 )
namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } }
diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
index 76fa37d62bf8..0c1212c650fc 100644
--- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
+++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
@@ -243,8 +243,8 @@ void SbaTableQueryBrowser::notifyHiContrastChanged()
}
// find the proper item, and set its icons
- USHORT nCount = pEntryLoop->ItemCount();
- for (USHORT i=0;i<nCount;++i)
+ sal_uInt16 nCount = pEntryLoop->ItemCount();
+ for (sal_uInt16 i=0;i<nCount;++i)
{
SvLBoxItem* pItem = pEntryLoop->GetItem(i);
if ( !pItem || ( pItem->IsA() != SV_ITEM_ID_LBOXCONTEXTBMP ) )
diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx
index 0b3e76a54115..68053fbbc234 100644
--- a/dbaccess/source/ui/browser/exsrcbrw.cxx
+++ b/dbaccess/source/ui/browser/exsrcbrw.cxx
@@ -124,7 +124,7 @@ Reference< XRowSet > SbaExternalSourceBrowser::CreateForm()
}
//------------------------------------------------------------------------------
-sal_Bool SbaExternalSourceBrowser::InitializeForm(const Reference< XRowSet > & /*xForm*/)
+sal_Bool SbaExternalSourceBrowser::InitializeForm(const Reference< XPropertySet > & /*i_formProperties*/)
{
return sal_True;
}
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index eaa199d78184..9dc5609a734c 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -336,7 +336,7 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen
throw RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("unable to create a view")), *this );
if ( m_bReadOnly || m_bPreview )
- pView->EnableInput( FALSE );
+ pView->EnableInput( sal_False );
impl_initialize();
}
@@ -635,6 +635,18 @@ void OGenericUnoController::InvalidateFeature_Impl()
// -----------------------------------------------------------------------
void OGenericUnoController::ImplInvalidateFeature( sal_Int32 _nId, const Reference< XStatusListener >& _xListener, sal_Bool _bForceBroadcast )
{
+#if OSL_DEBUG_LEVEL > 0
+ if ( _nId != -1 )
+ {
+ SupportedFeatures::iterator aFeaturePos = ::std::find_if(
+ m_aSupportedFeatures.begin(),
+ m_aSupportedFeatures.end(),
+ ::std::bind2nd( CompareFeatureById(), _nId )
+ );
+ OSL_ENSURE( aFeaturePos != m_aSupportedFeatures.end(), "OGenericUnoController::ImplInvalidateFeature: invalidating an unsupported feature is suspicious, at least!" );
+ }
+#endif
+
FeatureListener aListener;
aListener.nId = _nId;
aListener.xListener = _xListener;
@@ -1318,9 +1330,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 59a841993472..eebcc013788d 100644
--- a/dbaccess/source/ui/browser/sbabrw.src
+++ b/dbaccess/source/ui/browser/sbabrw.src
@@ -188,14 +188,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/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 9e39ac173874..3e4fc21d64fe 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -811,7 +811,7 @@ SbaGridControl::SbaGridControl(Reference< XMultiServiceFactory > _rM,
:FmGridControl(_rM,pParent, _pPeer, nBits)
,m_pMasterListener(NULL)
,m_nAsyncDropEvent(0)
- ,m_nCurrentActionColId((USHORT)-1)
+ ,m_nCurrentActionColId((sal_uInt16)-1)
,m_bActivatingForDrop(sal_False)
{
DBG_CTOR(SbaGridControl ,NULL);
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 73727f4fd21b..875900b76106 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -68,6 +68,7 @@
#include <com/sun/star/form/XForm.hpp>
#include <com/sun/star/form/XGridColumnFactory.hpp>
#include <com/sun/star/form/XLoadable.hpp>
+#include <com/sun/star/form/XReset.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
@@ -420,8 +421,146 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent)
return sal_True;
}
-// -------------------------------------------------------------------------
-sal_Bool SbaTableQueryBrowser::InitializeForm(const Reference< ::com::sun::star::sdbc::XRowSet > & _rxForm)
+// ---------------------------------------------------------------------------------------------------------------------
+namespace
+{
+ // -----------------------------------------------------------------------------------------------------------------
+ struct SelectValueByName : public ::std::unary_function< ::rtl::OUString, Any >
+ {
+ const Any& operator()( ::rtl::OUString const& i_name ) const
+ {
+ return m_rCollection.get( i_name );
+ }
+
+ SelectValueByName( ::comphelper::NamedValueCollection const& i_collection )
+ :m_rCollection( i_collection )
+ {
+ }
+
+ ::comphelper::NamedValueCollection const& m_rCollection;
+ };
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow()
+{
+ try
+ {
+ Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW );
+ sal_Bool bEscapeProcessing = sal_False;
+ OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ESCAPE_PROCESSING ) >>= bEscapeProcessing );
+ if ( !bEscapeProcessing )
+ // don't touch or interpret anything if escape processing is disabled
+ return;
+
+ Reference< XSingleSelectQueryComposer > xComposer( createParser_nothrow() );
+ if ( !xComposer.is() )
+ // can't do anything. Already reported via assertion in createParser_nothrow.
+ return;
+
+ // the tables participating in the statement
+ const Reference< XTablesSupplier > xSuppTables( xComposer, UNO_QUERY_THROW );
+ const Reference< XNameAccess > xTableNames( xSuppTables->getTables(), UNO_QUERY_THROW );
+
+ // the columns participating in the statement
+ const Reference< XColumnsSupplier > xSuppColumns( xComposer, UNO_QUERY_THROW );
+ const Reference< XNameAccess > xColumnNames( xSuppColumns->getColumns(), UNO_QUERY_THROW );
+
+ // .............................................................................................................
+ // check if the order columns apply to tables which really exist in the statement
+ const Reference< XIndexAccess > xOrderColumns( xComposer->getOrderColumns(), UNO_SET_THROW );
+ const sal_Int32 nOrderColumns( xOrderColumns->getCount() );
+ bool invalidColumn = false;
+ for ( sal_Int32 c=0; ( c < nOrderColumns ) && !invalidColumn; ++c )
+ {
+ const Reference< XPropertySet > xOrderColumn( xOrderColumns->getByIndex(c), UNO_QUERY_THROW );
+ ::rtl::OUString sTableName;
+ OSL_VERIFY( xOrderColumn->getPropertyValue( PROPERTY_TABLENAME ) >>= sTableName );
+ ::rtl::OUString sColumnName;
+ OSL_VERIFY( xOrderColumn->getPropertyValue( PROPERTY_NAME ) >>= sColumnName );
+
+ if ( sTableName.getLength() == 0 )
+ {
+ if ( !xColumnNames->hasByName( sColumnName ) )
+ {
+ invalidColumn = true;
+ break;
+ }
+ }
+ else
+ {
+ if ( !xTableNames->hasByName( sTableName ) )
+ {
+ invalidColumn = true;
+ break;
+ }
+
+ const Reference< XColumnsSupplier > xSuppTableColumns( xTableNames->getByName( sTableName ), UNO_QUERY_THROW );
+ const Reference< XNameAccess > xTableColumnNames( xSuppTableColumns->getColumns(), UNO_QUERY_THROW );
+ if ( !xTableColumnNames->hasByName( sColumnName ) )
+ {
+ invalidColumn = true;
+ break;
+ }
+ }
+ }
+
+ if ( invalidColumn )
+ {
+ // reset the complete order statement at both the row set and the parser
+ const ::rtl::OUString sEmptyOrder;
+ xRowSetProps->setPropertyValue( PROPERTY_ORDER, makeAny( sEmptyOrder ) );
+ xComposer->setOrder( sEmptyOrder );
+ }
+
+ // .............................................................................................................
+ // check if the columns participating in the filter refer to existing tables
+ // TODO: there's no API at all for this. The method which comes nearest to what we need is
+ // "getStructuredFilter", but it returns pure column names only. That is, for a statement like
+ // "SELECT * FROM <table> WHERE <other_table>.<column> = <value>", it will return "<column>". But
+ // there's no API at all to retrieve the information about "<other_table>" - which is what would
+ // be needed here.
+ // That'd be a chance to replace getStructuredFilter with something more reasonable. This method
+ // has at least one other problem: For a clause like "<column> != <value>", it will return "<column>"
+ // as column name, "NOT_EQUAL" as operator, and "!= <value>" as value, effectively duplicating the
+ // information about the operator, and beding all clients to manually remove the "!=" from the value
+ // string.
+ // So, what really would be handy, is some
+ // XNormalizedFilter getNormalizedFilter();
+ // with
+ // interface XDisjunctiveFilterExpression
+ // {
+ // XConjunctiveFilterTerm getTerm( int index );
+ // }
+ // interface XConjunctiveFilterTerm
+ // {
+ // ComparisonPredicate getPredicate( int index );
+ // }
+ // struct ComparisonPredicate
+ // {
+ // XComparisonOperand Lhs;
+ // SQLFilterOperator Operator;
+ // XComparisonOperand Rhs;
+ // }
+ // interface XComparisonOperand
+ // {
+ // SQLFilterOperand Type;
+ // XPropertySet getColumn();
+ // string getLiteral();
+ // ...
+ // }
+ // enum SQLFilterOperand { Column, Literal, ... }
+ //
+ // ... or something like this ....
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+sal_Bool SbaTableQueryBrowser::InitializeForm( const Reference< XPropertySet > & i_formProperties )
{
if(!m_pCurrentlyDisplayed)
return sal_True;
@@ -429,50 +568,46 @@ sal_Bool SbaTableQueryBrowser::InitializeForm(const Reference< ::com::sun::star:
// this method set all format settings from the orignal table or query
try
{
- // we send all properties at once, maybe the implementation is clever enough to handle one big PropertiesChanged
- // more effective than many small PropertyChanged ;)
- Sequence< ::rtl::OUString> aProperties(3);
- Sequence< Any> aValues(3);
-
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(m_pCurrentlyDisplayed->GetUserData());
- OSL_ENSURE( pData, "SbaTableQueryBrowser::InitializeForm: No user data set at the currently displayed entry!" );
- OSL_ENSURE( pData->xObjectProperties.is(), "SbaTableQueryBrowser::InitializeForm: No table available!" );
+ ENSURE_OR_RETURN_FALSE( pData, "SbaTableQueryBrowser::InitializeForm: No user data set at the currently displayed entry!" );
+ ENSURE_OR_RETURN_FALSE( pData->xObjectProperties.is(), "SbaTableQueryBrowser::InitializeForm: No table available!" );
+
+ Reference< XPropertySetInfo > xPSI( pData->xObjectProperties->getPropertySetInfo(), UNO_SET_THROW );
+
+ ::comphelper::NamedValueCollection aPropertyValues;
- if ( pData->xObjectProperties.is() )
+ const ::rtl::OUString aTransferProperties[] =
{
- sal_Int32 nPos = 0;
- // is the filter intially applied ?
- aProperties.getArray()[nPos] = PROPERTY_APPLYFILTER;
- aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_APPLYFILTER);
+ PROPERTY_APPLYFILTER,
+ PROPERTY_FILTER,
+ PROPERTY_HAVING_CLAUSE,
+ PROPERTY_ORDER
+ };
+ for ( size_t i=0; i < sizeof( aTransferProperties ) / sizeof( aTransferProperties[0] ); ++i )
+ {
+ if ( !xPSI->hasPropertyByName( aTransferProperties[i] ) )
+ continue;
+ aPropertyValues.put( aTransferProperties[i], pData->xObjectProperties->getPropertyValue( aTransferProperties[i] ) );
+ }
- // the initial filter
- aProperties.getArray()[nPos] = PROPERTY_FILTER;
- aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_FILTER);
+ const ::std::vector< ::rtl::OUString > aNames( aPropertyValues.getNames() );
+ Sequence< ::rtl::OUString > aPropNames( aNames.size() );
+ ::std::copy( aNames.begin(), aNames.end(), aPropNames.getArray() );
- if ( pData->xObjectProperties->getPropertySetInfo()->hasPropertyByName(PROPERTY_HAVING_CLAUSE) )
- {
- aProperties.realloc(aProperties.getLength()+1);
- aValues.realloc(aValues.getLength()+1);
- // the initial having clause
- aProperties.getArray()[nPos] = PROPERTY_HAVING_CLAUSE;
- aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_HAVING_CLAUSE);
- }
+ Sequence< Any > aPropValues( aNames.size() );
+ ::std::transform( aNames.begin(), aNames.end(), aPropValues.getArray(), SelectValueByName( aPropertyValues ) );
- // the initial ordering
- aProperties.getArray()[nPos] = PROPERTY_ORDER;
- aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_ORDER);
+ Reference< XMultiPropertySet > xFormMultiSet( i_formProperties, UNO_QUERY_THROW );
+ xFormMultiSet->setPropertyValues( aPropNames, aPropValues );
- Reference< XMultiPropertySet > xFormMultiSet(_rxForm, UNO_QUERY);
- xFormMultiSet->setPropertyValues(aProperties, aValues);
- }
+ impl_sanitizeRowSetClauses_nothrow();
}
- catch(Exception&)
+ catch ( const Exception& )
{
- OSL_FAIL("SbaTableQueryBrowser::InitializeForm : something went wrong !");
+ DBG_UNHANDLED_EXCEPTION();
return sal_False;
}
-
return sal_True;
}
@@ -481,8 +616,8 @@ void SbaTableQueryBrowser::initializePreviewMode()
{
if ( getBrowserView() && getBrowserView()->getVclControl() )
{
- getBrowserView()->getVclControl()->AlwaysEnableInput( FALSE );
- getBrowserView()->getVclControl()->EnableInput( FALSE );
+ getBrowserView()->getVclControl()->AlwaysEnableInput( sal_False );
+ getBrowserView()->getVclControl()->EnableInput( sal_False );
getBrowserView()->getVclControl()->ForceHideScrollbars( sal_True );
}
Reference< XPropertySet > xDataSourceSet(getRowSet(), UNO_QUERY);
@@ -602,6 +737,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
::std::vector< NamedValue > aInitialValues;
::std::vector< ::rtl::OUString > aCopyProperties;
+ Any aDefault;
switch(nType)
{
@@ -618,6 +754,8 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TriState" ) ),
makeAny( sal_Bool( ColumnValue::NO_NULLS != nNullable ) )
) );
+ if ( ColumnValue::NO_NULLS == nNullable )
+ aDefault <<= (sal_Int16)STATE_NOCHECK;
}
break;
@@ -659,18 +797,17 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
Reference< XPropertySetInfo > xGridColPSI( xGridCol->getPropertySetInfo(), UNO_SET_THROW );
// calculate the default
- Any aDefault;
if ( xGridColPSI->hasPropertyByName( PROPERTY_CONTROLDEFAULT ) )
- aDefault = xColumn->getPropertyValue( PROPERTY_CONTROLDEFAULT );
-
- // default value
- if ( nType == DataType::BIT || nType == DataType::BOOLEAN )
{
- if ( aDefault.hasValue() )
- aDefault <<= (comphelper::getString(aDefault).toInt32() == 0) ? (sal_Int16)STATE_NOCHECK : (sal_Int16)STATE_CHECK;
- else
- aDefault <<= ((sal_Int16)STATE_DONTKNOW);
-
+ aDefault = xColumn->getPropertyValue( PROPERTY_CONTROLDEFAULT );
+ // default value
+ if ( nType == DataType::BIT || nType == DataType::BOOLEAN )
+ {
+ if ( aDefault.hasValue() )
+ aDefault <<= (comphelper::getString(aDefault).toInt32() == 0) ? (sal_Int16)STATE_NOCHECK : (sal_Int16)STATE_CHECK;
+ else
+ aDefault <<= ((sal_Int16)STATE_DONTKNOW);
+ }
}
if ( aDefault.hasValue() )
@@ -2004,7 +2141,7 @@ void SbaTableQueryBrowser::implAddDatasource(const String& _rDbName, Image& _rDb
m_pTreeView->getListBox().InsertEntry(
_rQueryName, _rQueryImage, _rQueryImage, pDatasourceEntry,
- TRUE /*ChildsOnDemand*/, LIST_APPEND, pQueriesData );
+ sal_True /*ChildsOnDemand*/, LIST_APPEND, pQueriesData );
}
// the child for the tables container
@@ -2014,7 +2151,7 @@ void SbaTableQueryBrowser::implAddDatasource(const String& _rDbName, Image& _rDb
m_pTreeView->getListBox().InsertEntry(
_rTableName, _rTableImage, _rTableImage, pDatasourceEntry,
- TRUE /*ChildsOnDemand*/, LIST_APPEND, pTablesData );
+ sal_True /*ChildsOnDemand*/, LIST_APPEND, pTablesData );
}
}
@@ -2289,77 +2426,82 @@ sal_Bool SbaTableQueryBrowser::implSelect(const ::svx::ODataAccessDescriptor& _r
sal_Bool SbaTableQueryBrowser::implLoadAnything(const ::rtl::OUString& _rDataSourceName, const ::rtl::OUString& _rCommand,
const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing, const SharedConnection& _rxConnection)
{
- Reference<XPropertySet> xProp(getRowSet(),UNO_QUERY);
- if(xProp.is())
+ try
{
- Reference< ::com::sun::star::form::XLoadable > xLoadable(xProp,UNO_QUERY);
- try
+ Reference<XPropertySet> xProp( getRowSet(), UNO_QUERY_THROW );
+ Reference< XLoadable > xLoadable( xProp, UNO_QUERY_THROW );
+ // the values allowing the RowSet to re-execute
+ xProp->setPropertyValue(PROPERTY_DATASOURCENAME, makeAny(_rDataSourceName));
+ if(_rxConnection.is())
+ xProp->setPropertyValue( PROPERTY_ACTIVE_CONNECTION, makeAny( _rxConnection.getTyped() ) );
+
+ // set this _before_ setting the connection, else the rowset would rebuild it ...
+ xProp->setPropertyValue(PROPERTY_COMMAND_TYPE, makeAny(_nCommandType));
+ xProp->setPropertyValue(PROPERTY_COMMAND, makeAny(_rCommand));
+ xProp->setPropertyValue(PROPERTY_ESCAPE_PROCESSING, ::cppu::bool2any(_bEscapeProcessing));
+ if ( m_bPreview )
{
- // the values allowing the RowSet to re-execute
- xProp->setPropertyValue(PROPERTY_DATASOURCENAME, makeAny(_rDataSourceName));
- if(_rxConnection.is())
- xProp->setPropertyValue( PROPERTY_ACTIVE_CONNECTION, makeAny( _rxConnection.getTyped() ) );
-
- // set this _before_ setting the connection, else the rowset would rebuild it ...
- xProp->setPropertyValue(PROPERTY_COMMAND_TYPE, makeAny(_nCommandType));
- xProp->setPropertyValue(PROPERTY_COMMAND, makeAny(_rCommand));
- xProp->setPropertyValue(PROPERTY_ESCAPE_PROCESSING, ::cppu::bool2any(_bEscapeProcessing));
- if ( m_bPreview )
- {
- xProp->setPropertyValue(PROPERTY_FETCHDIRECTION, makeAny(FetchDirection::FORWARD));
- }
+ xProp->setPropertyValue(PROPERTY_FETCHDIRECTION, makeAny(FetchDirection::FORWARD));
+ }
- // the formatter depends on the data source we're working on, so rebuild it here ...
- initFormatter();
+ // the formatter depends on the data source we're working on, so rebuild it here ...
+ initFormatter();
- // switch the grid to design mode while loading
- getBrowserView()->getGridControl()->setDesignMode(sal_True);
- InitializeForm(getRowSet());
+ // switch the grid to design mode while loading
+ getBrowserView()->getGridControl()->setDesignMode(sal_True);
+ InitializeForm( xProp );
- sal_Bool bSuccess = sal_True;
+ sal_Bool bSuccess = sal_True;
+ {
{
- {
- Reference< XNameContainer > xColContainer(getFormComponent(), UNO_QUERY);
- // first we have to clear the grid
- clearGridColumns(xColContainer);
- }
- FormErrorHelper aHelper(this);
- // load the form
- bSuccess = reloadForm(xLoadable);
-
- // initialize the model
- InitializeGridModel(getFormComponent());
-
- if ( m_bPreview )
- initializePreviewMode();
-
- LoadFinished(sal_True);
+ Reference< XNameContainer > xColContainer(getFormComponent(), UNO_QUERY);
+ // first we have to clear the grid
+ clearGridColumns(xColContainer);
}
+ FormErrorHelper aHelper(this);
+ // load the form
+ bSuccess = reloadForm(xLoadable);
- InvalidateAll();
- return bSuccess;
- }
- catch( const SQLException& e )
- {
- Any aException( ::cppu::getCaughtException() );
- showError( SQLExceptionInfo( aException ) );
- }
- catch( const WrappedTargetException& e )
- {
- SQLException aSql;
- if ( e.TargetException.isExtractableTo( ::cppu::UnoType< SQLException >::get() ) )
- showError( SQLExceptionInfo( e.TargetException ) );
- else
+ // initialize the model
+ InitializeGridModel(getFormComponent());
+
+ Any aVal = xProp->getPropertyValue(PROPERTY_ISNEW);
+ if (aVal.hasValue() && ::comphelper::getBOOL(aVal))
{
- DBG_UNHANDLED_EXCEPTION();
+ // then set the default values and the parameters given from the parent
+ Reference< XReset> xReset(xProp, UNO_QUERY);
+ xReset->reset();
}
+
+ if ( m_bPreview )
+ initializePreviewMode();
+
+ LoadFinished(sal_True);
}
- catch(Exception&)
+
+ InvalidateAll();
+ return bSuccess;
+ }
+ catch( const SQLException& e )
+ {
+ Any aException( ::cppu::getCaughtException() );
+ showError( SQLExceptionInfo( aException ) );
+ }
+ catch( const WrappedTargetException& e )
+ {
+ SQLException aSql;
+ if ( e.TargetException.isExtractableTo( ::cppu::UnoType< SQLException >::get() ) )
+ showError( SQLExceptionInfo( e.TargetException ) );
+ else
{
DBG_UNHANDLED_EXCEPTION();
}
}
+ catch(Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
InvalidateAll();
return sal_False;
diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx
index db9bd6809d7a..36c89d858be5 100644
--- a/dbaccess/source/ui/control/ColumnControlWindow.cxx
+++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx
@@ -93,7 +93,7 @@ void OColumnControlWindow::DeactivateAggregate( EControlType eType )
}
}
// -----------------------------------------------------------------------------
-void OColumnControlWindow::CellModified(long /*nRow*/, USHORT /*nColId*/ )
+void OColumnControlWindow::CellModified(long /*nRow*/, sal_uInt16 /*nColId*/ )
{
saveCurrentFieldDescData();
}
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index e9d903697dba..a4f2f0a24eeb 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -814,7 +814,7 @@ void OFieldDescControl::ArrangeAggregates()
{
Control* pctrlInputControl; // das eigentliche Control zur Eingabe
Control* pctrlTextControl; // das Label dazu
- USHORT nPosSizeArgument; // das zweite Argument fuer SetPosSize
+ sal_uInt16 nPosSizeArgument; // das zweite Argument fuer SetPosSize
};
AGGREGATE_DESCRIPTION adAggregates[] = {
{ m_pColumnName, m_pColumnNameText, 1},
@@ -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));
@@ -1079,7 +1079,7 @@ void OFieldDescControl::InitializeControl(Control* _pControl,ULONG _nHelpId,bool
_pControl->EnableClipSiblings();
}
// -----------------------------------------------------------------------------
-FixedText* OFieldDescControl::CreateText(USHORT _nTextRes)
+FixedText* OFieldDescControl::CreateText(sal_uInt16 _nTextRes)
{
FixedText* pFixedText = new FixedText( this );
pFixedText->SetText( ModuleRes(_nTextRes) );
@@ -1087,15 +1087,15 @@ FixedText* OFieldDescControl::CreateText(USHORT _nTextRes)
return pFixedText;
}
// -----------------------------------------------------------------------------
-OPropNumericEditCtrl* OFieldDescControl::CreateNumericControl(USHORT _nHelpStr,short _nProperty,ULONG _nHelpId)
+OPropNumericEditCtrl* OFieldDescControl::CreateNumericControl(sal_uInt16 _nHelpStr,short _nProperty,const rtl::OString& _sHelpId)
{
OPropNumericEditCtrl* pControl = new OPropNumericEditCtrl( this, _nHelpStr, _nProperty, WB_BORDER );
pControl->SetDecimalDigits(0);
pControl->SetMin(0);
pControl->SetMax(0x7FFFFFFF); // soll draussen geaendert werden, wenn noetig
- pControl->SetStrictFormat(TRUE);
+ pControl->SetStrictFormat(sal_True);
- InitializeControl(pControl,_nHelpId,false);
+ InitializeControl(pControl,_sHelpId,false);
return pControl;
}
@@ -1535,7 +1535,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
if(m_pType)
{
- USHORT nPos = pFieldType.get() ? m_pType->GetEntryPos(String(pFieldDescr->getTypeInfo()->aUIName)) : LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nPos = pFieldType.get() ? m_pType->GetEntryPos(String(pFieldDescr->getTypeInfo()->aUIName)) : LISTBOX_ENTRY_NOTFOUND;
if(nPos == LISTBOX_ENTRY_NOTFOUND)
{
const OTypeInfoMap* pMap = getTypeInfo();
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index 2c9ab0b8b841..df2ac9b6e4b6 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -74,14 +74,14 @@ namespace dbaui
Reference< XPropertySet> m_xDestDef;
- void fillListBox(const Reference< XPropertySet>& _xDest,long nRow,USHORT nColumnId);
+ void fillListBox(const Reference< XPropertySet>& _xDest,long nRow,sal_uInt16 nColumnId);
/** returns the column id for the editbrowsebox
@param _nColId
the column id SOURCE_COLUMN or DEST_COLUMN
@return the current column id eihter SOURCE_COLUMN or DEST_COLUMN depends on the connection data
*/
- USHORT getColumnIdent( USHORT _nColId ) const;
+ sal_uInt16 getColumnIdent( sal_uInt16 _nColId ) const;
public:
ORelationControl( OTableListBoxControl* pParent,const OJoinTableView::OTableWindowMap* _pTableMap );
virtual ~ORelationControl();
@@ -107,16 +107,16 @@ namespace dbaui
virtual long PreNotify(NotifyEvent& rNEvt );
- virtual BOOL IsTabAllowed(BOOL bForward) const;
+ virtual sal_Bool IsTabAllowed(sal_Bool bForward) const;
virtual void Init(const TTableConnectionData::value_type& _pConnData);
virtual void Init() { ORelationControl_Base::Init(); }
- virtual void InitController( ::svt::CellControllerRef& rController, long nRow, USHORT nCol );
- virtual ::svt::CellController* GetController( long nRow, USHORT nCol );
- virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColId ) const;
- virtual BOOL SeekRow( long nRow );
- virtual BOOL SaveModified();
- virtual String GetCellText( long nRow, USHORT nColId ) const;
+ virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol );
+ virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol );
+ virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const;
+ virtual sal_Bool SeekRow( long nRow );
+ virtual sal_Bool SaveModified();
+ virtual String GetCellText( long nRow, sal_uInt16 nColId ) const;
virtual void CellModified();
@@ -188,7 +188,7 @@ namespace dbaui
// not the first call
RowRemoved(0, GetRowCount());
- RowInserted(0, m_pConnData->GetConnLineDataList()->size() + 1, TRUE); // add one extra row
+ RowInserted(0, m_pConnData->GetConnLineDataList()->size() + 1, sal_True); // add one extra row
}
//------------------------------------------------------------------------------
void ORelationControl::Resize()
@@ -227,20 +227,20 @@ namespace dbaui
}
//------------------------------------------------------------------------------
- BOOL ORelationControl::IsTabAllowed(BOOL bForward) const
+ sal_Bool ORelationControl::IsTabAllowed(sal_Bool bForward) const
{
DBG_CHKTHIS(ORelationControl,NULL);
long nRow = GetCurRow();
- USHORT nCol = GetCurColumnId();
+ sal_uInt16 nCol = GetCurColumnId();
- BOOL bRet = !(( ( bForward && (nCol == DEST_COLUMN) && (nRow == GetRowCount() - 1)))
+ sal_Bool bRet = !(( ( bForward && (nCol == DEST_COLUMN) && (nRow == GetRowCount() - 1)))
|| (!bForward && (nCol == SOURCE_COLUMN) && (nRow == 0)));
return bRet && EditBrowseBox::IsTabAllowed(bForward);
}
//------------------------------------------------------------------------------
- BOOL ORelationControl::SaveModified()
+ sal_Bool ORelationControl::SaveModified()
{
DBG_CHKTHIS(ORelationControl,NULL);
sal_Int32 nRow = GetCurRow();
@@ -267,19 +267,19 @@ namespace dbaui
}
}
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------------
- USHORT ORelationControl::getColumnIdent( USHORT _nColId ) const
+ sal_uInt16 ORelationControl::getColumnIdent( sal_uInt16 _nColId ) const
{
- USHORT nId = _nColId;
+ sal_uInt16 nId = _nColId;
if ( m_pConnData->getReferencingTable() != m_pBoxControl->getReferencingTable() )
nId = ( _nColId == SOURCE_COLUMN) ? DEST_COLUMN : SOURCE_COLUMN;
return nId;
}
//------------------------------------------------------------------------------
- String ORelationControl::GetCellText( long nRow, USHORT nColId ) const
+ String ORelationControl::GetCellText( long nRow, sal_uInt16 nColId ) const
{
DBG_CHKTHIS(ORelationControl,NULL);
String sText;
@@ -300,22 +300,22 @@ namespace dbaui
}
//------------------------------------------------------------------------------
- void ORelationControl::InitController( CellControllerRef& /*rController*/, long nRow, USHORT nColumnId )
+ void ORelationControl::InitController( CellControllerRef& /*rController*/, long nRow, sal_uInt16 nColumnId )
{
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:
// ?????????
@@ -333,27 +333,27 @@ namespace dbaui
m_pListCell->SelectEntry( sName );
}
- m_pListCell->SetHelpId(nHelpId);
+ m_pListCell->SetHelpId(sHelpId);
}
}
//------------------------------------------------------------------------------
- CellController* ORelationControl::GetController( long /*nRow*/, USHORT /*nColumnId*/ )
+ CellController* ORelationControl::GetController( long /*nRow*/, sal_uInt16 /*nColumnId*/ )
{
DBG_CHKTHIS(ORelationControl,NULL);
return new ListBoxCellController( m_pListCell.get() );
}
//------------------------------------------------------------------------------
- BOOL ORelationControl::SeekRow( long nRow )
+ sal_Bool ORelationControl::SeekRow( long nRow )
{
DBG_CHKTHIS(ORelationControl,NULL);
m_nDataPos = nRow;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------------
- void ORelationControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColumnId ) const
+ void ORelationControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(ORelationControl,NULL);
String aText =const_cast< ORelationControl*>(this)->GetCellText( m_nDataPos, nColumnId );
@@ -371,7 +371,7 @@ namespace dbaui
rDev.SetClipRegion();
}
// -----------------------------------------------------------------------------
- void ORelationControl::fillListBox(const Reference< XPropertySet>& _xDest,long /*_nRow*/,USHORT /*nColumnId*/)
+ void ORelationControl::fillListBox(const Reference< XPropertySet>& _xDest,long /*_nRow*/,sal_uInt16 /*nColumnId*/)
{
m_pListCell->Clear();
try
@@ -400,7 +400,7 @@ namespace dbaui
void ORelationControl::setWindowTables(const OTableWindow* _pSource,const OTableWindow* _pDest)
{
// wenn ich hier gerade editiere, ausblenden
- BOOL bWasEditing = IsEditing();
+ sal_Bool bWasEditing = IsEditing();
if ( bWasEditing )
DeactivateCell();
@@ -636,7 +636,7 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
if ( pLines->size() >= static_cast<sal_uInt32>(m_pRC_Tables->GetRowCount()) )
{
m_pRC_Tables->DeactivateCell();
- m_pRC_Tables->RowInserted(m_pRC_Tables->GetRowCount(), pLines->size() - static_cast<sal_uInt32>(m_pRC_Tables->GetRowCount()) + 1, TRUE);
+ m_pRC_Tables->RowInserted(m_pRC_Tables->GetRowCount(), pLines->size() - static_cast<sal_uInt32>(m_pRC_Tables->GetRowCount()) + 1, sal_True);
m_pRC_Tables->ActivateCell();
}
}
@@ -691,9 +691,9 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
m_pRC_Tables->lateInit();
}
// -----------------------------------------------------------------------------
- BOOL OTableListBoxControl::SaveModified()
+ sal_Bool OTableListBoxControl::SaveModified()
{
- BOOL bRet = m_pRC_Tables->SaveModified();
+ sal_Bool bRet = m_pRC_Tables->SaveModified();
m_pRC_Tables->getData()->normalizeLines();
return bRet;
}
diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx
index 991dca50d804..afb6fa777352 100644
--- a/dbaccess/source/ui/control/TableGrantCtrl.cxx
+++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx
@@ -46,14 +46,14 @@ using namespace ::com::sun::star::uno;
using namespace ::dbaui;
using namespace ::svt;
-const USHORT COL_TABLE_NAME = 1;
-const USHORT COL_SELECT = 2;
-const USHORT COL_INSERT = 3;
-const USHORT COL_DELETE = 4;
-const USHORT COL_UPDATE = 5;
-const USHORT COL_ALTER = 6;
-const USHORT COL_REF = 7;
-const USHORT COL_DROP = 8;
+const sal_uInt16 COL_TABLE_NAME = 1;
+const sal_uInt16 COL_SELECT = 2;
+const sal_uInt16 COL_INSERT = 3;
+const sal_uInt16 COL_DELETE = 4;
+const sal_uInt16 COL_UPDATE = 5;
+const sal_uInt16 COL_ALTER = 6;
+const sal_uInt16 COL_REF = 7;
+const sal_uInt16 COL_DROP = 8;
DBG_NAME(OTableGrantControl)
@@ -65,13 +65,13 @@ OTableGrantControl::OTableGrantControl( Window* pParent,const ResId& _RsId)
,m_pCheckCell( NULL )
,m_pEdit( NULL )
,m_nDataPos( 0 )
- ,m_bEnable(TRUE)
+ ,m_bEnable(sal_True)
,m_nDeactivateEvent(0)
{
DBG_CTOR(OTableGrantControl,NULL);
//////////////////////////////////////////////////////////////////////
// Spalten einfuegen
- USHORT i=1;
+ sal_uInt16 i=1;
InsertDataColumn( i, String(ModuleRes(STR_TABLE_PRIV_NAME) ), 75);
FreezeColumn(i++);
InsertDataColumn( i++, String(ModuleRes(STR_TABLE_PRIV_SELECT)), 75);
@@ -144,11 +144,11 @@ void OTableGrantControl::Init()
if(!m_pCheckCell)
{
m_pCheckCell = new CheckBoxControl( &GetDataWindow() );
- m_pCheckCell->GetBox().EnableTriState(FALSE);
+ m_pCheckCell->GetBox().EnableTriState(sal_False);
m_pEdit = new Edit( &GetDataWindow() );
m_pEdit->SetReadOnly();
- m_pEdit->Enable(FALSE);
+ m_pEdit->Enable(sal_False);
}
UpdateTables();
@@ -204,17 +204,17 @@ IMPL_LINK(OTableGrantControl, AsynchDeactivate, void*, EMPTYARG)
}
//------------------------------------------------------------------------------
-BOOL OTableGrantControl::IsTabAllowed(BOOL bForward) const
+sal_Bool OTableGrantControl::IsTabAllowed(sal_Bool bForward) const
{
DBG_CHKTHIS(OTableGrantControl,NULL);
long nRow = GetCurRow();
- USHORT nCol = GetCurColumnId();
+ sal_uInt16 nCol = GetCurColumnId();
if (bForward && (nCol == 2) && (nRow == GetRowCount() - 1))
- return FALSE;
+ return sal_False;
if (!bForward && (nCol == 1) && (nRow == 0))
- return FALSE;
+ return sal_False;
return EditBrowseBox::IsTabAllowed(bForward);
}
@@ -226,16 +226,16 @@ BOOL OTableGrantControl::IsTabAllowed(BOOL bForward) const
xAuth->revokePrivileges(sTableName,PrivilegeObject::TABLE,what)
//------------------------------------------------------------------------------
-BOOL OTableGrantControl::SaveModified()
+sal_Bool OTableGrantControl::SaveModified()
{
DBG_CHKTHIS(OTableGrantControl,NULL);
sal_Int32 nRow = GetCurRow();
if(nRow == -1 || nRow >= m_aTableNames.getLength())
- return FALSE;
+ return sal_False;
::rtl::OUString sTableName = m_aTableNames[nRow];
- BOOL bErg = TRUE;
+ sal_Bool bErg = sal_True;
try
{
@@ -274,7 +274,7 @@ BOOL OTableGrantControl::SaveModified()
}
catch(SQLException& e)
{
- bErg = FALSE;
+ bErg = sal_False;
::dbaui::showError(::dbtools::SQLExceptionInfo(e),GetParent(),m_xORB);
}
if(bErg && Controller().Is())
@@ -286,7 +286,7 @@ BOOL OTableGrantControl::SaveModified()
}
//------------------------------------------------------------------------------
-String OTableGrantControl::GetCellText( long nRow, USHORT nColId ) const
+String OTableGrantControl::GetCellText( long nRow, sal_uInt16 nColId ) const
{
DBG_CHKTHIS(OTableGrantControl,NULL);
if(COL_TABLE_NAME == nColId)
@@ -301,7 +301,7 @@ String OTableGrantControl::GetCellText( long nRow, USHORT nColId ) const
}
//------------------------------------------------------------------------------
-void OTableGrantControl::InitController( CellControllerRef& /*rController*/, long nRow, USHORT nColumnId )
+void OTableGrantControl::InitController( CellControllerRef& /*rController*/, long nRow, sal_uInt16 nColumnId )
{
DBG_CHKTHIS(OTableGrantControl,NULL);
String sTablename = m_aTableNames[nRow];
@@ -312,7 +312,7 @@ void OTableGrantControl::InitController( CellControllerRef& /*rController*/, lon
{
// get the privileges from the user
TTablePrivilegeMap::const_iterator aFind = findPrivilege(nRow);
- m_pCheckCell->GetBox().Check(aFind != m_aPrivMap.end() ? isAllowed(nColumnId,aFind->second.nRights) : FALSE);
+ m_pCheckCell->GetBox().Check(aFind != m_aPrivMap.end() ? isAllowed(nColumnId,aFind->second.nRights) : sal_False);
}
}
// -----------------------------------------------------------------------------
@@ -347,7 +347,7 @@ void OTableGrantControl::fillPrivilege(sal_Int32 _nRow) const
}
}
// -----------------------------------------------------------------------------
-sal_Bool OTableGrantControl::isAllowed(USHORT _nColumnId,sal_Int32 _nPrivilege) const
+sal_Bool OTableGrantControl::isAllowed(sal_uInt16 _nColumnId,sal_Int32 _nPrivilege) const
{
sal_Bool bAllowed = sal_False;
switch (_nColumnId)
@@ -389,7 +389,7 @@ void OTableGrantControl::setGrantUser(const Reference< XAuthorizable>& _xGrantUs
m_xGrantUser = _xGrantUser;
}
//------------------------------------------------------------------------------
-CellController* OTableGrantControl::GetController( long nRow, USHORT nColumnId )
+CellController* OTableGrantControl::GetController( long nRow, sal_uInt16 nColumnId )
{
DBG_CHKTHIS(OTableGrantControl,NULL);
@@ -417,7 +417,7 @@ CellController* OTableGrantControl::GetController( long nRow, USHORT nColumnId )
return pController;
}
//------------------------------------------------------------------------------
-BOOL OTableGrantControl::SeekRow( long nRow )
+sal_Bool OTableGrantControl::SeekRow( long nRow )
{
DBG_CHKTHIS(OTableGrantControl,NULL);
m_nDataPos = nRow;
@@ -426,7 +426,7 @@ BOOL OTableGrantControl::SeekRow( long nRow )
}
//------------------------------------------------------------------------------
-void OTableGrantControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColumnId ) const
+void OTableGrantControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(OTableGrantControl,NULL);
@@ -436,7 +436,7 @@ void OTableGrantControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect,
if(aFind != m_aPrivMap.end())
PaintTristate(rDev, rRect, isAllowed(nColumnId,aFind->second.nRights) ? STATE_CHECK : STATE_NOCHECK,isAllowed(nColumnId,aFind->second.nWithGrant));
else
- PaintTristate(rDev, rRect, STATE_NOCHECK,FALSE);
+ PaintTristate(rDev, rRect, STATE_NOCHECK,sal_False);
}
else
{
@@ -477,11 +477,11 @@ OTableGrantControl::TTablePrivilegeMap::const_iterator OTableGrantControl::findP
// -----------------------------------------------------------------------------
Reference< XAccessible > OTableGrantControl::CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos )
{
- USHORT nColumnId = GetColumnId( _nColumnPos );
+ sal_uInt16 nColumnId = GetColumnId( _nColumnPos );
if(nColumnId != COL_TABLE_NAME)
{
TriState eState = STATE_NOCHECK;
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
TTablePrivilegeMap::const_iterator aFind = findPrivilege(_nRow);
if(aFind != m_aPrivMap.end())
{
diff --git a/dbaccess/source/ui/control/charsetlistbox.cxx b/dbaccess/source/ui/control/charsetlistbox.cxx
index 040e1fd41242..cc092ccfe3b3 100644
--- a/dbaccess/source/ui/control/charsetlistbox.cxx
+++ b/dbaccess/source/ui/control/charsetlistbox.cxx
@@ -99,7 +99,7 @@ namespace dbaui
}
//--------------------------------------------------------------------
- bool CharSetListBox::StoreSelectedCharSet( SfxItemSet& _rSet, const USHORT _nItemId )
+ bool CharSetListBox::StoreSelectedCharSet( SfxItemSet& _rSet, const sal_uInt16 _nItemId )
{
bool bChangedSomething = false;
if ( GetSelectEntryPos() != GetSavedValue() )
diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx
index 70d7a6450448..d649647e70b0 100644
--- a/dbaccess/source/ui/control/curledit.cxx
+++ b/dbaccess/source/ui/control/curledit.cxx
@@ -41,7 +41,7 @@ namespace dbaui
//=========================================================================
//= OConnectionURLEdit
//=========================================================================
-OConnectionURLEdit::OConnectionURLEdit(Window* _pParent, const ResId& _rResId,BOOL _bShowPrefix)
+OConnectionURLEdit::OConnectionURLEdit(Window* _pParent, const ResId& _rResId,sal_Bool _bShowPrefix)
:Edit(_pParent, _rResId)
,m_pTypeCollection(NULL)
,m_pForcedPrefix(NULL)
@@ -144,7 +144,7 @@ String OConnectionURLEdit::GetText() const
return Edit::GetText();
}
// -----------------------------------------------------------------------------
-void OConnectionURLEdit::ShowPrefix(BOOL _bShowPrefix)
+void OConnectionURLEdit::ShowPrefix(sal_Bool _bShowPrefix)
{
m_bShowPrefix = _bShowPrefix;
if ( m_pForcedPrefix )
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 653f80138a6c..075b8b6bab6d 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -97,7 +97,7 @@ DBTreeListBox::DBTreeListBox( Window* pParent, const Reference< XMultiServiceFac
// -----------------------------------------------------------------------------
void DBTreeListBox::init()
{
- USHORT nSize = SPACEBETWEENENTRIES;
+ sal_uInt16 nSize = SPACEBETWEENENTRIES;
SetSpaceBetweenEntries(nSize);
m_aTimer.SetTimeout(900);
@@ -109,6 +109,8 @@ void DBTreeListBox::init()
SetNodeDefaultImages( );
EnableContextMenuHandling();
+
+ SetStyle( GetStyle() | WB_QUICK_SEARCH );
}
//------------------------------------------------------------------------
DBTreeListBox::~DBTreeListBox()
@@ -124,8 +126,8 @@ SvLBoxEntry* DBTreeListBox::GetEntryPosByName( const String& aName, SvLBoxEntry*
SvLBoxEntry* pEntry = NULL;
if ( pChilds )
{
- ULONG nCount = pChilds->Count();
- for (ULONG i=0; i < nCount; ++i)
+ sal_uLong nCount = pChilds->Count();
+ for (sal_uLong i=0; i < nCount; ++i)
{
pEntry = static_cast<SvLBoxEntry*>(pChilds->GetObject(i));
SvLBoxString* pItem = (SvLBoxString*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
@@ -349,7 +351,7 @@ void DBTreeListBox::RequestHelp( const HelpEvent& rHEvt )
void DBTreeListBox::KeyInput( const KeyEvent& rKEvt )
{
KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction();
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
sal_Bool bHandled = sal_False;
if(eFunc != KEYFUNC_DONTKNOW)
@@ -409,12 +411,12 @@ void DBTreeListBox::KeyInput( const KeyEvent& rKEvt )
SvTreeListBox::KeyInput(rKEvt);
}
// -----------------------------------------------------------------------------
-BOOL DBTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& /*_aSelection*/)
+sal_Bool DBTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& /*_aSelection*/)
{
return m_aEditingHandler.Call(pEntry) != 0;
}
// -----------------------------------------------------------------------------
-BOOL DBTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText )
+sal_Bool DBTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText )
{
DBTreeEditedEntry aEntry;
aEntry.pEntry = pEntry;
@@ -426,11 +428,11 @@ BOOL DBTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText
}
SetEntryText(pEntry,aEntry.aNewText);
- return FALSE; // we never want that the base change our text
+ return sal_False; // we never want that the base change our text
}
// -----------------------------------------------------------------------------
-BOOL DBTreeListBox::DoubleClickHdl()
+sal_Bool DBTreeListBox::DoubleClickHdl()
{
long nResult = aDoubleClickHdl.Call( this );
// continue default processing if the DoubleClickHandler didn't handle it
@@ -467,12 +469,12 @@ namespace
if ( !_pPopup )
return;
- USHORT nCount = _pPopup->GetItemCount();
- for (USHORT i=0; i < nCount; ++i)
+ sal_uInt16 nCount = _pPopup->GetItemCount();
+ for (sal_uInt16 i=0; i < nCount; ++i)
{
if ( _pPopup->GetItemType(i) != MENUITEM_SEPARATOR )
{
- USHORT nId = _pPopup->GetItemId(i);
+ sal_uInt16 nId = _pPopup->GetItemId(i);
PopupMenu* pSubPopUp = _pPopup->GetPopupMenu(nId);
if ( pSubPopUp )
{
@@ -499,14 +501,14 @@ namespace
{
void lcl_adjustMenuItemIDs( Menu& _rMenu, IController& _rCommandController )
{
- USHORT nCount = _rMenu.GetItemCount();
- for ( USHORT pos = 0; pos < nCount; ++pos )
+ sal_uInt16 nCount = _rMenu.GetItemCount();
+ for ( sal_uInt16 pos = 0; pos < nCount; ++pos )
{
// do not adjust separators
if ( _rMenu.GetItemType( pos ) == MENUITEM_SEPARATOR )
continue;
- USHORT nId = _rMenu.GetItemId(pos);
+ sal_uInt16 nId = _rMenu.GetItemId(pos);
String aCommand = _rMenu.GetItemCommand( nId );
PopupMenu* pPopup = _rMenu.GetPopupMenu( nId );
if ( pPopup )
@@ -515,7 +517,7 @@ namespace
continue;
}
- const USHORT nCommandId = _rCommandController.registerCommandURL( aCommand );
+ const sal_uInt16 nCommandId = _rCommandController.registerCommandURL( aCommand );
_rMenu.InsertItem( nCommandId, _rMenu.GetItemText( nId ), _rMenu.GetItemImage( nId ),
_rMenu.GetItemBits( nId ), pos );
@@ -535,14 +537,14 @@ namespace
uno::Reference< frame::XFrame> xFrame;
if ( xController.is() )
xFrame = xController->getFrame();
- USHORT nCount = _rMenu.GetItemCount();
- for ( USHORT pos = 0; pos < nCount; ++pos )
+ sal_uInt16 nCount = _rMenu.GetItemCount();
+ for ( sal_uInt16 pos = 0; pos < nCount; ++pos )
{
// do not adjust separators
if ( _rMenu.GetItemType( pos ) == MENUITEM_SEPARATOR )
continue;
- USHORT nId = _rMenu.GetItemId(pos);
+ sal_uInt16 nId = _rMenu.GetItemId(pos);
String aCommand = _rMenu.GetItemCommand( nId );
PopupMenu* pPopup = _rMenu.GetPopupMenu( nId );
if ( pPopup )
@@ -552,7 +554,7 @@ namespace
}
if ( xFrame.is() )
- _rMenu.SetItemImage(nId,framework::GetImageFromURL(xFrame,aCommand,FALSE));
+ _rMenu.SetItemImage(nId,framework::GetImageFromURL(xFrame,aCommand,sal_False));
}
}
// =========================================================================
@@ -696,7 +698,7 @@ PopupMenu* DBTreeListBox::CreateContextMenu( void )
}
// -----------------------------------------------------------------------------
-void DBTreeListBox::ExcecuteContextMenuAction( USHORT _nSelectedPopupEntry )
+void DBTreeListBox::ExcecuteContextMenuAction( sal_uInt16 _nSelectedPopupEntry )
{
if ( m_pContextMenuProvider && _nSelectedPopupEntry )
m_pContextMenuProvider->getCommandController().executeChecked( _nSelectedPopupEntry, Sequence< PropertyValue >() );
diff --git a/dbaccess/source/ui/control/listviewitems.cxx b/dbaccess/source/ui/control/listviewitems.cxx
index 2f2c7afd2a60..74193e682409 100644
--- a/dbaccess/source/ui/control/listviewitems.cxx
+++ b/dbaccess/source/ui/control/listviewitems.cxx
@@ -55,7 +55,7 @@ namespace dbaui
}
//------------------------------------------------------------------------
- USHORT OBoldListboxString::IsA()
+ sal_uInt16 OBoldListboxString::IsA()
{
return SV_ITEM_ID_BOLDLBSTRING;
}
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx
index c95a48c84079..e02b7c000501 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -197,8 +197,8 @@ namespace dbaui
// Place icon left of text and both centered in the button.
SetModeImage( GetCommandIcon( ".uno:Open", m_sModule ) );
- EnableImageDisplay( TRUE );
- EnableTextDisplay( TRUE );
+ EnableImageDisplay( sal_True );
+ EnableTextDisplay( sal_True );
SetImageAlign( IMAGEALIGN_LEFT );
SetStyle( GetStyle() | WB_CENTER );
}
@@ -257,7 +257,7 @@ namespace dbaui
String sDecodedURL = aURL.GetMainURL( INetURLObject::NO_DECODE );
- USHORT nPos = InsertEntry( sTitle );
+ sal_uInt16 nPos = InsertEntry( sTitle );
m_aURLs.insert( MapIndexToStringPair::value_type( nPos, StringPair( sDecodedURL, sFilter ) ) );
}
}
@@ -272,7 +272,7 @@ namespace dbaui
String OpenDocumentListBox::GetSelectedDocumentURL() const
{
String sURL;
- USHORT nSelected = GetSelectEntryPos();
+ sal_uInt16 nSelected = GetSelectEntryPos();
if ( LISTBOX_ENTRY_NOTFOUND != GetSelectEntryPos() )
sURL = impl_getDocumentAtIndex( nSelected ).first;
return sURL;
@@ -282,14 +282,14 @@ namespace dbaui
String OpenDocumentListBox::GetSelectedDocumentFilter() const
{
String sFilter;
- USHORT nSelected = GetSelectEntryPos();
+ sal_uInt16 nSelected = GetSelectEntryPos();
if ( LISTBOX_ENTRY_NOTFOUND != GetSelectEntryPos() )
sFilter = impl_getDocumentAtIndex( nSelected ).second;
return sFilter;
}
//--------------------------------------------------------------------
- OpenDocumentListBox::StringPair OpenDocumentListBox::impl_getDocumentAtIndex( USHORT _nListIndex, bool _bSystemNotation ) const
+ OpenDocumentListBox::StringPair OpenDocumentListBox::impl_getDocumentAtIndex( sal_uInt16 _nListIndex, bool _bSystemNotation ) const
{
MapIndexToStringPair::const_iterator pos = m_aURLs.find( _nListIndex );
OSL_ENSURE( pos != m_aURLs.end(), "OpenDocumentListBox::impl_getDocumentAtIndex: invalid index!" );
@@ -316,7 +316,7 @@ namespace dbaui
return;
Point aRequestPos( ScreenToOutputPixel( _rHEvt.GetMousePosPixel() ) );
- USHORT nItemIndex = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nItemIndex = LISTBOX_ENTRY_NOTFOUND;
if ( GetIndexForPoint( aRequestPos, nItemIndex ) != -1 )
{
Rectangle aItemRect( GetBoundingRectangle( nItemIndex ) );
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 3eee26f30959..1caa8917be8b 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -69,7 +69,7 @@ OSqlEdit::OSqlEdit( OQueryTextView* pParent, WinBits nWinStyle ) :
m_ColorConfig.AddListener(this);
//#i97044#
- EnableFocusSelectionHide( FALSE );
+ EnableFocusSelectionHide( sal_False );
}
//------------------------------------------------------------------------------
@@ -127,11 +127,11 @@ IMPL_LINK(OSqlEdit, OnUndoActionTimer, void*, EMPTYARG)
if(aText != m_strOrigText)
{
OJoinController& rController = m_pView->getContainerWindow()->getDesignView()->getController();
- SfxUndoManager* pUndoMgr = rController.getUndoMgr();
+ SfxUndoManager& rUndoMgr = rController.GetUndoManager();
OSqlEditUndoAct* pUndoAct = new OSqlEditUndoAct( this );
pUndoAct->SetOriginalText( m_strOrigText );
- pUndoMgr->AddUndoAction( pUndoAct );
+ rUndoMgr.AddUndoAction( pUndoAct );
rController.InvalidateFeature(SID_UNDO);
rController.InvalidateFeature(SID_REDO);
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index 9dd0a24ebbbf..c1c12947cb9b 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -131,8 +131,8 @@ void OTableTreeListBox::notifyHiContrastChanged()
SvLBoxEntry* pEntryLoop = First();
while (pEntryLoop)
{
- USHORT nCount = pEntryLoop->ItemCount();
- for (USHORT i=0;i<nCount;++i)
+ sal_uInt16 nCount = pEntryLoop->ItemCount();
+ for (sal_uInt16 i=0;i<nCount;++i)
{
SvLBoxItem* pItem = pEntryLoop->GetItem(i);
if ( pItem && pItem->IsA() == SV_ITEM_ID_LBOXCONTEXTBMP)
@@ -298,7 +298,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn
sRootEntryText = String(ModuleRes(STR_ALL_VIEWS));
else
sRootEntryText = String(ModuleRes(STR_ALL_TABLES_AND_VIEWS));
- InsertEntry( sRootEntryText, NULL, FALSE, LIST_APPEND, reinterpret_cast< void* >( DatabaseObjectContainer::TABLES ) );
+ InsertEntry( sRootEntryText, NULL, sal_False, LIST_APPEND, reinterpret_cast< void* >( DatabaseObjectContainer::TABLES ) );
}
if ( _rTables.empty() )
@@ -344,7 +344,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn
{
SvLBoxEntry* pFolder = GetEntryPosByName( *folder, pRootEntry );
if ( !pFolder )
- pFolder = InsertEntry( *folder, pRootEntry, FALSE, LIST_APPEND, reinterpret_cast< void* >( nFolderType ) );
+ pFolder = InsertEntry( *folder, pRootEntry, sal_False, LIST_APPEND, reinterpret_cast< void* >( nFolderType ) );
}
}
}
@@ -481,7 +481,7 @@ SvLBoxEntry* OTableTreeListBox::implAddEntry(
{
SvLBoxEntry* pFolder = GetEntryPosByName( rFirstName, pParentEntry );
if ( !pFolder )
- pFolder = InsertEntry( rFirstName, pParentEntry, FALSE, LIST_APPEND, reinterpret_cast< void* >( nFirstFolderType ) );
+ pFolder = InsertEntry( rFirstName, pParentEntry, sal_False, LIST_APPEND, reinterpret_cast< void* >( nFirstFolderType ) );
pParentEntry = pFolder;
}
@@ -489,14 +489,14 @@ SvLBoxEntry* OTableTreeListBox::implAddEntry(
{
SvLBoxEntry* pFolder = GetEntryPosByName( rSecondName, pParentEntry );
if ( !pFolder )
- pFolder = InsertEntry( rSecondName, pParentEntry, FALSE, LIST_APPEND, reinterpret_cast< void* >( nSecondFolderType ) );
+ pFolder = InsertEntry( rSecondName, pParentEntry, sal_False, LIST_APPEND, reinterpret_cast< void* >( nSecondFolderType ) );
pParentEntry = pFolder;
}
SvLBoxEntry* pRet = NULL;
if ( !_bCheckName || !GetEntryPosByName( sName, pParentEntry ) )
{
- pRet = InsertEntry( sName, pParentEntry, FALSE, LIST_APPEND );
+ pRet = InsertEntry( sName, pParentEntry, sal_False, LIST_APPEND );
Image aImage;
m_pImageProvider->getImages( _rTableName, DatabaseObject::TABLE, aImage );
diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx
index 009f63edba3a..5f36c9678b99 100644
--- a/dbaccess/source/ui/control/toolboxcontroller.cxx
+++ b/dbaccess/source/ui/control/toolboxcontroller.cxx
@@ -67,7 +67,7 @@ namespace dbaui
namespace
{
- void lcl_copy(Menu* _pMenu,USHORT _nMenuId,USHORT _nMenuPos,ToolBox* _pToolBox,USHORT _nToolId,const ::rtl::OUString& _sCommand)
+ void lcl_copy(Menu* _pMenu,sal_uInt16 _nMenuId,sal_uInt16 _nMenuPos,ToolBox* _pToolBox,sal_uInt16 _nToolId,const ::rtl::OUString& _sCommand)
{
if ( _pMenu->GetItemType(_nMenuPos) != MENUITEM_STRING )
_pToolBox->SetItemImage(_nToolId, _pMenu->GetItemImage(_nMenuId));
@@ -140,10 +140,10 @@ namespace dbaui
ToolBox* pToolBox = static_cast<ToolBox*>(VCLUnoHelper::GetWindow(getParent()));
if ( pToolBox )
{
- USHORT nCount = pToolBox->GetItemCount();
- for (USHORT nPos = 0; nPos < nCount; ++nPos)
+ sal_uInt16 nCount = pToolBox->GetItemCount();
+ for (sal_uInt16 nPos = 0; nPos < nCount; ++nPos)
{
- USHORT nItemId = pToolBox->GetItemId(nPos);
+ sal_uInt16 nItemId = pToolBox->GetItemId(nPos);
if ( pToolBox->GetItemCommand(nItemId) == String(m_aCommandURL) )
{
m_nToolBoxId = nItemId;
@@ -167,10 +167,10 @@ namespace dbaui
if ( m_aCommandURL == aFind->first && !Event.IsEnabled )
{
::std::auto_ptr<PopupMenu> pMenu = getMenu();
- USHORT nCount = pMenu->GetItemCount();
- for (USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pMenu->GetItemCount();
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
- USHORT nItemId = pMenu->GetItemId(i);
+ sal_uInt16 nItemId = pMenu->GetItemId(i);
aFind = m_aStates.find(pMenu->GetItemCommand(nItemId));
if ( aFind != m_aStates.end() && aFind->second )
{
@@ -202,13 +202,13 @@ namespace dbaui
short nImageType = hasBigImages() ? ImageType::SIZE_LARGE : ImageType::SIZE_DEFAULT;
Sequence< ::rtl::OUString> aSeq(1);
- USHORT nCount = pMenu->GetItemCount();
- for (USHORT nPos = 0; nPos < nCount; ++nPos)
+ sal_uInt16 nCount = pMenu->GetItemCount();
+ for (sal_uInt16 nPos = 0; nPos < nCount; ++nPos)
{
if ( pMenu->GetItemType( nPos ) == MENUITEM_SEPARATOR )
continue;
- USHORT nItemId = pMenu->GetItemId(nPos);
+ sal_uInt16 nItemId = pMenu->GetItemId(nPos);
aSeq[0] = pMenu->GetItemCommand(nItemId);
Sequence< Reference<XGraphic> > aImages = xImageMgr->getImages(nImageType,aSeq);
@@ -242,7 +242,7 @@ namespace dbaui
ToolBox* pToolBox = static_cast<ToolBox*>(VCLUnoHelper::GetWindow(getParent()));
::std::auto_ptr<PopupMenu> pMenu = getMenu();
- USHORT nSelected = pMenu->Execute(pToolBox, pToolBox->GetItemRect( m_nToolBoxId ),POPUPMENU_EXECUTE_DOWN);
+ sal_uInt16 nSelected = pMenu->Execute(pToolBox, pToolBox->GetItemRect( m_nToolBoxId ),POPUPMENU_EXECUTE_DOWN);
// "cleanup" the toolbox state
Point aPoint = pToolBox->GetItemRect( m_nToolBoxId ).TopLeft();
MouseEvent aLeave( aPoint, 0, MOUSE_LEAVEWINDOW | MOUSE_SYNTHETIC );
diff --git a/dbaccess/source/ui/dlg/AdabasStat.cxx b/dbaccess/source/ui/dlg/AdabasStat.cxx
index 26f6d9537086..25710d04abfc 100644
--- a/dbaccess/source/ui/dlg/AdabasStat.cxx
+++ b/dbaccess/source/ui/dlg/AdabasStat.cxx
@@ -119,8 +119,8 @@ OAdabasStatistics::OAdabasStatistics( Window* pParent,
double nUsedPages = xRow->getInt(1) / 256;
double nFreePages = xRow->getInt(2) / 256;
- m_ET_SIZE.SetText(::rtl::OUString::valueOf((INT32)nUsedPages));
- m_ET_FREESIZE.SetText(::rtl::OUString::valueOf((INT32)nFreePages));
+ m_ET_SIZE.SetText(::rtl::OUString::valueOf((sal_Int32)nUsedPages));
+ m_ET_FREESIZE.SetText(::rtl::OUString::valueOf((sal_Int32)nFreePages));
m_ET_MEMORYUSING.SetValue(static_cast<sal_Int32>(((nUsedPages-nFreePages)/nUsedPages)*100));
}
else
diff --git a/dbaccess/source/ui/dlg/AdabasStat.src b/dbaccess/source/ui/dlg/AdabasStat.src
index 418729d4564e..476750f7b531 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 425e713094f3..258eec3a2acf 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 f250dad416cb..89e3a8d8439a 100644
--- a/dbaccess/source/ui/dlg/CollectionView.cxx
+++ b/dbaccess/source/ui/dlg/CollectionView.cxx
@@ -213,7 +213,7 @@ IMPL_LINK( OCollectionView, Save_Click, PushButton*, EMPTYARG )
return 0;
}
m_aName.SetText(sName);
- EndDialog( TRUE );
+ EndDialog( sal_True );
}
}
catch( const Exception& )
@@ -300,7 +300,7 @@ IMPL_LINK( OCollectionView, Dbl_Click_FileView, SvtFileView*, EMPTYARG )
// -----------------------------------------------------------------------------
void OCollectionView::initCurrentPath()
{
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
try
{
if ( m_xContent.is() )
diff --git a/dbaccess/source/ui/dlg/CollectionView.src b/dbaccess/source/ui/dlg/CollectionView.src
index 0d26722a7033..e431a6502e81 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 51838459da45..a82c26a13161 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -70,7 +70,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
@@ -142,7 +142,7 @@ DBG_NAME(OConnectionHelper)
m_aConnectionURL.Show();
m_aConnectionURL.ShowPrefix( ::dbaccess::DST_JDBC == m_pCollection->determineType(m_eType) );
- BOOL bEnableBrowseButton = m_pCollection->supportsBrowsing( m_eType );
+ sal_Bool bEnableBrowseButton = m_pCollection->supportsBrowsing( m_eType );
m_aPB_Connection.Show( bEnableBrowseButton );
SFX_ITEMSET_GET(_rSet, pUrlItem, SfxStringItem, DSID_CONNECTURL, sal_True);
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index d4d210482ce2..63cac64f6095 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -71,7 +71,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
@@ -133,6 +133,8 @@ namespace dbaui
m_aTestJavaDriver.SetClickHdl(LINK(this,OConnectionTabPage,OnTestJavaClickHdl));
FreeResource();
+
+ LayoutHelper::fitSizeRightAligned( m_aTestConnection );
}
// -----------------------------------------------------------------------
@@ -257,7 +259,7 @@ namespace dbaui
String sUrl = pUrlItem->GetValue();
setURL( sUrl );
- const BOOL bEnableJDBC = m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC;
+ const sal_Bool bEnableJDBC = m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC;
if ( !pJdbcDrvItem->GetValue().Len() )
{
String sDefaultJdbcDriverName = m_pCollection->getJavaDriverClass(m_eType);
@@ -347,7 +349,7 @@ namespace dbaui
{
}
- USHORT nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
+ sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
OSQLMessageBox aMsg( this, String( ModuleRes( nMessage ) ), String() );
aMsg.Execute();
return 0L;
@@ -356,7 +358,7 @@ namespace dbaui
bool OConnectionTabPage::checkTestConnection()
{
OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
- BOOL bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0);
+ sal_Bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0);
if ( m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC )
bEnableTestConnection = bEnableTestConnection && (m_aJavaDriver.GetText().Len() != 0);
m_aTestConnection.Enable(bEnableTestConnection);
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hxx b/dbaccess/source/ui/dlg/ConnectionPage.hxx
index 140ea6792efc..bd0034a22a91 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.hxx
@@ -74,7 +74,7 @@ namespace dbaui
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& _rAttrSet );
- virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs);
+ virtual sal_Bool FillItemSet (SfxItemSet& _rCoreAttrs);
virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.src b/dbaccess/source/ui/dlg/ConnectionPage.src
index 61515a2589a8..63c400b0a77a 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/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
index a311acd6d8cf..6ee4c808aeb5 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
@@ -133,7 +133,7 @@ namespace dbaui
//= OConnectionTabPageSetup
//========================================================================
DBG_NAME(OConnectionTabPageSetup)
- OConnectionTabPageSetup::OConnectionTabPageSetup(Window* pParent, USHORT _rId, const SfxItemSet& _rCoreAttrs, USHORT _nHelpTextResId, USHORT _nHeaderResId, USHORT _nUrlResId)
+ OConnectionTabPageSetup::OConnectionTabPageSetup(Window* pParent, sal_uInt16 _rId, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId)
:OConnectionHelper(pParent, ModuleRes(_rId), _rCoreAttrs)
,m_bUserGrabFocus(sal_True)
,m_aFT_HelpText(this, ModuleRes(FT_AUTOWIZARDHELPTEXT))
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
index e5ad2d732f93..0fd31cf58101 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
@@ -69,7 +69,7 @@ namespace dbaui
static OGenericAdministrationPage* CreateUserDefinedTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
- virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs);
+ virtual sal_Bool FillItemSet (SfxItemSet& _rCoreAttrs);
virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
@@ -87,7 +87,7 @@ namespace dbaui
protected:
- OConnectionTabPageSetup(Window* pParent, USHORT _rId, const SfxItemSet& _rCoreAttrs, USHORT _nHelpTextResId, USHORT _nHeaderResId, USHORT _nUrlResId);
+ OConnectionTabPageSetup(Window* pParent, sal_uInt16 _rId, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId);
virtual bool checkTestConnection();
// nControlFlags ist eine Kombination der CBTP_xxx-Konstanten
virtual ~OConnectionTabPageSetup();
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index aef7cdce199a..83506495c575 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -333,7 +333,7 @@ DBG_NAME(OMySQLIntroPageSetup)
// -----------------------------------------------------------------------
- BOOL OMySQLIntroPageSetup::FillItemSet(SfxItemSet& /*_rSet*/)
+ sal_Bool OMySQLIntroPageSetup::FillItemSet(SfxItemSet& /*_rSet*/)
{
OSL_ENSURE(sal_False,"Who called me?! Please ask oj for more information.");
return sal_True;
@@ -421,7 +421,7 @@ DBG_NAME(OMySQLIntroPageSetup)
//========================================================================
//= OMySQLJDBCConnectionPageSetup
//========================================================================
- OGeneralSpecialJDBCConnectionPageSetup::OGeneralSpecialJDBCConnectionPageSetup( Window* pParent,USHORT _nResId, const SfxItemSet& _rCoreAttrs ,USHORT _nPortId, USHORT _nDefaultPortResId, USHORT _nHelpTextResId, USHORT _nHeaderTextResId, USHORT _nDriverClassId)
+ OGeneralSpecialJDBCConnectionPageSetup::OGeneralSpecialJDBCConnectionPageSetup( Window* pParent,sal_uInt16 _nResId, const SfxItemSet& _rCoreAttrs ,sal_uInt16 _nPortId, sal_uInt16 _nDefaultPortResId, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderTextResId, sal_uInt16 _nDriverClassId)
:OGenericAdministrationPage(pParent, ModuleRes(_nResId), _rCoreAttrs)
,m_aFTHelpText (this, ModuleRes(FT_AUTOWIZARDHELPTEXT))
,m_aFTDatabasename (this, ModuleRes(FT_AUTODATABASENAME))
@@ -579,7 +579,7 @@ DBG_NAME(OMySQLIntroPageSetup)
{
}
- USHORT nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
+ sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
OSQLMessageBox aMsg( this, String( ModuleRes( nMessage ) ), String() );
aMsg.Execute();
return 0L;
@@ -674,7 +674,7 @@ DBG_NAME(OMySQLIntroPageSetup)
bool OJDBCConnectionPageSetup::checkTestConnection()
{
OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
- BOOL bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0);
+ sal_Bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0);
bEnableTestConnection = bEnableTestConnection && (m_aETDriverClass.GetText().Len() != 0);
return bEnableTestConnection;
}
@@ -698,7 +698,7 @@ DBG_NAME(OMySQLIntroPageSetup)
{
}
- USHORT nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
+ sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
OSQLMessageBox aMsg( this, String( ModuleRes( nMessage ) ), String() );
aMsg.Execute();
return 0L;
@@ -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/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index 48c0931b946e..00fe40ffbce1 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -56,7 +56,7 @@ namespace dbaui
class OSpreadSheetConnectionPageSetup : public OConnectionTabPageSetup
{
public:
- virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
+ virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs );
static OGenericAdministrationPage* CreateSpreadSheetTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
OSpreadSheetConnectionPageSetup(Window* pParent, const SfxItemSet& _rCoreAttrs);
@@ -77,7 +77,7 @@ namespace dbaui
class OTextConnectionPageSetup : public OConnectionTabPageSetup
{
public:
- virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
+ virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs );
static OGenericAdministrationPage* CreateTextTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
OTextConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs );
OTextConnectionHelper* m_pTextConnectionHelper;
@@ -101,7 +101,7 @@ namespace dbaui
class OLDAPConnectionPageSetup : public OGenericAdministrationPage
{
public:
- virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
+ virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs );
static OGenericAdministrationPage* CreateLDAPTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
OLDAPConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs );
virtual Link getControlModifiedLink() { return LINK(this, OLDAPConnectionPageSetup, OnEditModified); }
@@ -144,7 +144,7 @@ namespace dbaui
virtual void fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList );
virtual void fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList );
- virtual BOOL FillItemSet( SfxItemSet& _rCoreAttrs );
+ virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs );
virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
virtual Link getControlModifiedLink();
@@ -160,18 +160,18 @@ namespace dbaui
{
public:
OGeneralSpecialJDBCConnectionPageSetup( Window* pParent
- , USHORT _nResId
+ , sal_uInt16 _nResId
, const SfxItemSet& _rCoreAttrs
- , USHORT _nPortId
- , USHORT _nDefaultPortResId
- , USHORT _nHelpTextResId
- , USHORT _nHeaderTextResId
- , USHORT _nDriverClassId );
+ , sal_uInt16 _nPortId
+ , sal_uInt16 _nDefaultPortResId
+ , sal_uInt16 _nHelpTextResId
+ , sal_uInt16 _nHeaderTextResId
+ , sal_uInt16 _nDriverClassId );
static OGenericAdministrationPage* CreateMySQLJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
static OGenericAdministrationPage* CreateOracleJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
protected:
- virtual BOOL FillItemSet( SfxItemSet& _rCoreAttrs );
+ virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs );
virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
@@ -194,7 +194,7 @@ namespace dbaui
PushButton m_aPBTestJavaDriver;
String m_sDefaultJdbcDriverName;
- USHORT m_nPortId;
+ sal_uInt16 m_nPortId;
};
@@ -210,7 +210,7 @@ namespace dbaui
protected:
virtual bool checkTestConnection();
- virtual BOOL FillItemSet( SfxItemSet& _rCoreAttrs );
+ virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs );
virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
@@ -250,7 +250,7 @@ namespace dbaui
protected:
- virtual BOOL FillItemSet(SfxItemSet& _rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& _rSet);
virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
@@ -277,7 +277,7 @@ namespace dbaui
class OAuthentificationPageSetup : public OGenericAdministrationPage
{
public:
- virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
+ virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs );
static OGenericAdministrationPage* CreateAuthentificationTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
OAuthentificationPageSetup(Window* pParent, const SfxItemSet& _rCoreAttrs);
@@ -304,7 +304,7 @@ namespace dbaui
class OFinalDBPageSetup : public OGenericAdministrationPage
{
public:
- virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
+ virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs );
static OGenericAdministrationPage* CreateFinalDBTabPageSetup( Window* pParent, const SfxItemSet& _rAttrSet);
FixedText m_aFTFinalHeader;
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 6a067dbbfafc..da3bb881d30d 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -108,7 +108,7 @@ using namespace com::sun::star::frame;
//-------------------------------------------------------------------------
namespace
{
- sal_Bool implCheckItemType( SfxItemSet& _rSet, const USHORT _nId, const TypeId _nExpectedItemType )
+ sal_Bool implCheckItemType( SfxItemSet& _rSet, const sal_uInt16 _nId, const TypeId _nExpectedItemType )
{
sal_Bool bCorrectType = sal_False;
@@ -726,7 +726,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const SfxItemSet& _r
++aDirect
)
{
- const SfxPoolItem* pCurrentItem = _rSource.GetItem((USHORT)aDirect->first);
+ const SfxPoolItem* pCurrentItem = _rSource.GetItem((sal_uInt16)aDirect->first);
if (pCurrentItem)
{
sal_Int16 nAttributes = PropertyAttribute::READONLY;
@@ -785,7 +785,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
::std::vector< sal_Int32>::iterator aDetailsEnd = aDetailIds.end();
for (::std::vector< sal_Int32>::iterator aIter = aDetailIds.begin();aIter != aDetailsEnd ; ++aIter)
{
- const SfxPoolItem* pCurrent = _rSource.GetItem((USHORT)*aIter);
+ const SfxPoolItem* pCurrent = _rSource.GetItem((sal_uInt16)*aIter);
aTranslation = m_aIndirectPropTranslator.find(*aIter);
if ( pCurrent && (m_aIndirectPropTranslator.end() != aTranslation) )
{
@@ -1118,7 +1118,7 @@ void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest)
::dbaccess::ODsnTypeCollection* pCollection = pTypeCollection->getCollection();
OSL_ENSURE(pCollection, "ODbAdminDialog::getDatasourceType: invalid type collection!");
- USHORT nPortNumberId = 0;
+ sal_uInt16 nPortNumberId = 0;
sal_Int32 nPortNumber = -1;
String sNewHostName;
String sUrlPart;
diff --git a/dbaccess/source/ui/dlg/DriverSettings.cxx b/dbaccess/source/ui/dlg/DriverSettings.cxx
index 23390d34bba2..2408297e20cf 100644
--- a/dbaccess/source/ui/dlg/DriverSettings.cxx
+++ b/dbaccess/source/ui/dlg/DriverSettings.cxx
@@ -78,7 +78,7 @@ void ODriversSettings::getSupportedIndirectSettings( const ::rtl::OUString& _sUR
}
}
#endif
- typedef ::std::pair<USHORT, ::rtl::OUString> TProperties;
+ typedef ::std::pair<sal_uInt16, ::rtl::OUString> TProperties;
TProperties aProps[] = { TProperties(DSID_SHOWDELETEDROWS,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowDeleted")))
,TProperties(DSID_CHARSET,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharSet")))
,TProperties(DSID_FIELDDELIMITER,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FieldDelimiter")))
diff --git a/dbaccess/source/ui/dlg/ExtensionNotPresent.cxx b/dbaccess/source/ui/dlg/ExtensionNotPresent.cxx
deleted file mode 100644
index 9aa06d59e1d3..000000000000
--- a/dbaccess/source/ui/dlg/ExtensionNotPresent.cxx
+++ /dev/null
@@ -1,208 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-#include "precompiled_dbaccess.hxx"
-
-#include "dbaccess_helpid.hrc"
-#include "dbu_resource.hrc"
-#include "ExtensionNotPresent.hrc"
-#include "ExtensionNotPresent.hxx"
-#include "moduledbu.hxx"
-#include "UITools.hxx"
-
-/** === begin UNO includes === **/
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-/** === end UNO includes === **/
-
-#include <connectivity/dbconversion.hxx>
-#include <unotools/syslocale.hxx>
-#include <svx/globlmn.hrc>
-#include <svx/svxids.hrc>
-#include <svtools/langhelp.hxx>
-#include <tools/debug.hxx>
-#include <tools/diagnose_ex.h>
-#include <unotools/confignode.hxx>
-#include <vcl/msgbox.hxx>
-
-
-namespace dbaui
-{
-using namespace ::com::sun::star;
-using namespace ::comphelper;
-
-#define UNISTRING(s) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s))
-
-DBG_NAME( dbu_OExtensionNotPresentDialog )
-//========================================================================
-// class OExtensionNotPresentDialog
-//========================================================================
- OExtensionNotPresentDialog::OExtensionNotPresentDialog( Window* _pParent, uno::Reference< lang::XMultiServiceFactory > _xORB)
- : ModalDialog( _pParent, ModuleRes(RID_EXTENSION_NOT_PRESENT_DLG) )
- ,m_aFI_WARNING(this, ModuleRes(FI_WARNING))
- ,m_aFT_TEXT(this, ModuleRes(FT_TEXT ) )
- ,m_aPB_DOWNLOAD(this, ModuleRes(PB_DOWNLOAD))
- ,m_aPB_CANCEL(this, ModuleRes(PB_CANCEL))
- ,m_xMultiServiceFactory(_xORB)
-{
- DBG_CTOR( dbu_OExtensionNotPresentDialog, NULL);
-
- try
- {
- SvtSysLocale aSysLocale;
- m_nLocale = aSysLocale.GetLocaleData().getLocale();
- }
- catch(uno::Exception&)
- {
- }
-
- // set a ClickHandler for the 'Download' button
- m_aPB_DOWNLOAD.SetClickHdl( LINK( this, OExtensionNotPresentDialog, Download_Click ) );
-
- // get message string out of the resource
- String sText = String( ModuleRes( RID_STR_EXTENSION_NOT_PRESENT ) );
- String sExtensionName = getFromConfigurationExtension("Name");
- sText.SearchAndReplaceAscii("%RPT_EXTENSION_NAME", sExtensionName);
-
- m_aFT_TEXT.SetText(sText);
-
- // calulate the size of the text field
- Rectangle aPrimaryRect( Point(0,0), m_aFT_TEXT.GetSizePixel() );
- Rectangle aSuggestedRect( GetTextRect( aPrimaryRect, sText, TEXT_DRAW_MULTILINE | TEXT_DRAW_LEFT ) );
-
- Size aTempSize = LogicToPixel( Size(LEFT_PADDING + RIGHT_PADDING, 1), MAP_APPFONT); // real pixel size of LEFT and RIGHT_PADDING
- sal_Int32 nWidthWithoutFixedText = aTempSize.getWidth() ;
- sal_Int32 nHeightWithoutFixedText = GetSizePixel().getHeight() - m_aFT_TEXT.GetSizePixel().getHeight();
-
- Size aNewSize = aSuggestedRect.GetSize();
- m_aFT_TEXT.SetSizePixel( aNewSize );
- sal_Int32 nNewWidth = nWidthWithoutFixedText + aSuggestedRect.GetWidth();
- sal_Int32 nNewHeight = nHeightWithoutFixedText + aSuggestedRect.GetHeight();
-
- // set new window width & height
- Size aDialogWindowSize = GetSizePixel();
- aDialogWindowSize.setWidth( nNewWidth );
- aDialogWindowSize.setHeight( nNewHeight );
- SetSizePixel(aDialogWindowSize);
-
- // move Action items
- sal_Int32 nWindowWidth = GetSizePixel().getWidth();
- sal_Int32 nWindowHeight = GetSizePixel().getHeight();
-
- Size aButtonSize = LogicToPixel( Size(BUTTON_WIDTH, BUTTON_HEIGHT), MAP_APPFONT); // real pixel size of a button
-
- Point aNewPos = m_aPB_DOWNLOAD.GetPosPixel();
- aNewPos.setX(nWindowWidth / 2 - m_aPB_DOWNLOAD.GetSizePixel().getWidth() - 8);
- aNewPos.setY(nWindowHeight - aButtonSize.getHeight() - 5);
- m_aPB_DOWNLOAD.SetPosPixel(aNewPos );
-
- aNewPos = m_aPB_CANCEL.GetPosPixel();
- aNewPos.setX(nWindowWidth / 2 + 8);
- aNewPos.setY(nWindowHeight - aButtonSize.getHeight() - 5);
- m_aPB_CANCEL.SetPosPixel(aNewPos );
-
- m_aFI_WARNING.SetImage(WarningBox::GetStandardImage());
-
- Resize();
- FreeResource();
-}
-
-//------------------------------------------------------------------------
-OExtensionNotPresentDialog::~OExtensionNotPresentDialog()
-{
- DBG_DTOR( dbu_OExtensionNotPresentDialog, NULL);
-}
-// -----------------------------------------------------------------------------
-short OExtensionNotPresentDialog::Execute()
-{
- DBG_CHKTHIS( dbu_OExtensionNotPresentDialog,NULL);
- short nRet = ModalDialog::Execute();
- // RET_OK
- // RET_NO
- return nRet;
-}
-
-//------------------------------------------------------------------------------
-
-uno::Reference< com::sun::star::system::XSystemShellExecute > OExtensionNotPresentDialog::getShellExecuter() const
-{
- uno::Reference<com::sun::star::system::XSystemShellExecute> xExecuter( m_xMultiServiceFactory->createInstance( UNISTRING( "com.sun.star.system.SystemShellExecute" )), uno::UNO_QUERY_THROW);
- return xExecuter;
-}
-// -----------------------------------------------------------------------------
-rtl::OUString OExtensionNotPresentDialog::getFromConfigurationExtension(rtl::OUString const& _sPropertyName) const
-{
- // get the URL to open in a browser from Configuration
- static const ::rtl::OUString sConfigName( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.ReportDesign/Extension" ) );
-
- ::utl::OConfigurationTreeRoot aConfiguration( ::utl::OConfigurationTreeRoot::createWithServiceFactory( m_xMultiServiceFactory, sConfigName ) );
-
- rtl::OUString aValue;
- aConfiguration.getNodeValue( _sPropertyName ) >>= aValue;
- return aValue;
-}
-
-// -----------------------------------------------------------------------------
-rtl::OUString OExtensionNotPresentDialog::getFromConfigurationExtension(rtl::OString const& _sPropertyName) const
-{
- return getFromConfigurationExtension(rtl::OStringToOUString( _sPropertyName, RTL_TEXTENCODING_UTF8) );
-}
-
-// -----------------------------------------------------------------------------
-// handle the click on the download button
-IMPL_LINK( OExtensionNotPresentDialog, Download_Click, PushButton*, EMPTYARG )
-{
- try
- {
- EndDialog( TRUE );
-
- rtl::OUString suDownloadURL = getFromConfigurationExtension("DownloadURL");
- if (suDownloadURL.getLength() == 0)
- {
- // fallback
- suDownloadURL = UNISTRING("http://extensions.libreoffice.org");
- }
-
- // open such URL in a browser
- localizeWebserviceURI(suDownloadURL);
- uno::Reference< com::sun::star::system::XSystemShellExecute > xShellExecute( getShellExecuter() );
- xShellExecute->execute( suDownloadURL, ::rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
- }
- catch( const uno::Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- return 0;
-}
-
-// =============================================================================
-} // rptui
-// =============================================================================
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/ExtensionNotPresent.hrc b/dbaccess/source/ui/dlg/ExtensionNotPresent.hrc
deleted file mode 100644
index 712193982075..000000000000
--- 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/ExtensionNotPresent.src b/dbaccess/source/ui/dlg/ExtensionNotPresent.src
deleted file mode 100644
index b224714cd482..000000000000
--- a/dbaccess/source/ui/dlg/ExtensionNotPresent.src
+++ /dev/null
@@ -1,81 +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.
- *
- ************************************************************************/
-#include "ExtensionNotPresent.hrc"
-#include "dbaccess_helpid.hrc"
-#include "dbu_resource.hrc"
-#include <svx/globlmn.hrc>
-#include <svx/svxids.hrc>
-
-
-String RID_STR_EXTENSION_NOT_PRESENT
-{
- // #i96130# use hard coded name
- Text [ en-US ] = "To open a report you require the extension Sunâ„¢ Report Builder.\n\nClick 'Download...' to download and install the extension.";
-};
-
-ModalDialog RID_EXTENSION_NOT_PRESENT_DLG
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( DLG_WIDTH , DLG_HEIGHT ) ;
- Text [ en-US ] = "%PRODUCTNAME %PRODUCTVERSION" ;
- HelpId = HID_EXTENSION_NOT_PRESENT_DLG;
- Moveable = TRUE ;
- Closeable = TRUE ;
-
- // most of the calulated values here are overridden by the ExtensionNotPresent ctor itself.
- FixedImage FI_WARNING
- {
- Pos = MAP_APPFONT (CELL_PADDING / 2, CELL_PADDING) ;
- Size = (32, 32);
- Fixed=BMP_EXCEPTION_WARNING;
- };
-
-
- FixedText FT_TEXT
- {
- Pos = MAP_APPFONT ( 32 , CELL_PADDING ) ;
- Size = MAP_APPFONT ( DLG_WIDTH - LEFT_PADDING - RIGHT_PADDING , 3 * (FIXEDTEXT_HEIGHT + 2) ) ;
- // Text will set outside from RID_STR_EXTENSION_NOT_PRESENT
- };
-
- PushButton PB_DOWNLOAD
- {
- Pos = MAP_APPFONT ( DLG_WIDTH / 2 - (CELL_PADDING/2) - BUTTON_WIDTH, ACTION_LINE_START ) ;
- Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
- DefButton = TRUE ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Download..." ;
- };
-
- CancelButton PB_CANCEL
- {
- Pos = MAP_APPFONT ( DLG_WIDTH / 2 + (CELL_PADDING/2), ACTION_LINE_START) ;
- Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
- TabStop = TRUE ;
- };
-};
diff --git a/dbaccess/source/ui/dlg/RelationDlg.cxx b/dbaccess/source/ui/dlg/RelationDlg.cxx
index 947bec14a021..7618e732fd1a 100644
--- a/dbaccess/source/ui/dlg/RelationDlg.cxx
+++ b/dbaccess/source/ui/dlg/RelationDlg.cxx
@@ -63,7 +63,7 @@ DBG_NAME(ORelationDialog)
//========================================================================
ORelationDialog::ORelationDialog( OJoinTableView* pParent,
const TTableConnectionData::value_type& pConnectionData,
- BOOL bAllowTableSelect )
+ sal_Bool bAllowTableSelect )
:ModalDialog( pParent, ModuleRes(DLG_REL_PROPERTIES) )
,m_pTableMap(pParent->GetTabWinMap())
@@ -83,7 +83,7 @@ ORelationDialog::ORelationDialog( OJoinTableView* pParent,
,aPB_HELP( this, ModuleRes( PB_HELP ) )
,m_pOrigConnData( pConnectionData )
- ,m_bTriedOneUpdate(FALSE)
+ ,m_bTriedOneUpdate(sal_False)
{
DBG_CTOR(ORelationDialog,NULL);
@@ -121,18 +121,18 @@ void ORelationDialog::Init(const TTableConnectionData::value_type& _pConnectionD
{
case KeyRule::NO_ACTION:
case KeyRule::RESTRICT:
- aRB_NoCascUpd.Check( TRUE );
+ aRB_NoCascUpd.Check( sal_True );
break;
case KeyRule::CASCADE:
- aRB_CascUpd.Check( TRUE );
+ aRB_CascUpd.Check( sal_True );
break;
case KeyRule::SET_NULL:
- aRB_CascUpdNull.Check( TRUE );
+ aRB_CascUpdNull.Check( sal_True );
break;
case KeyRule::SET_DEFAULT:
- aRB_CascUpdDefault.Check( TRUE );
+ aRB_CascUpdDefault.Check( sal_True );
break;
}
@@ -141,18 +141,18 @@ void ORelationDialog::Init(const TTableConnectionData::value_type& _pConnectionD
{
case KeyRule::NO_ACTION:
case KeyRule::RESTRICT:
- aRB_NoCascDel.Check( TRUE );
+ aRB_NoCascDel.Check( sal_True );
break;
case KeyRule::CASCADE:
- aRB_CascDel.Check( TRUE );
+ aRB_CascDel.Check( sal_True );
break;
case KeyRule::SET_NULL:
- aRB_CascDelNull.Check( TRUE );
+ aRB_CascDelNull.Check( sal_True );
break;
case KeyRule::SET_DEFAULT:
- aRB_CascDelDefault.Check( TRUE );
+ aRB_CascDelDefault.Check( sal_True );
break;
}
}
@@ -171,7 +171,7 @@ IMPL_LINK( ORelationDialog, OKClickHdl, Button*, /*pButton*/ )
{
//////////////////////////////////////////////////////////////////////
// RadioButtons auslesen
- UINT16 nAttrib = 0;
+ sal_uInt16 nAttrib = 0;
// Delete Rules
if( aRB_NoCascDel.IsChecked() )
@@ -200,7 +200,7 @@ IMPL_LINK( ORelationDialog, OKClickHdl, Button*, /*pButton*/ )
m_pTableControl->SaveModified();
- //// wenn die ComboBoxen fuer die Tabellenauswahl enabled sind (Constructor mit bAllowTableSelect==TRUE), dann muss ich in die
+ //// wenn die ComboBoxen fuer die Tabellenauswahl enabled sind (Constructor mit bAllowTableSelect==sal_True), dann muss ich in die
//// Connection auch die Tabellennamen stecken
//m_pConnData->SetSourceWinName(m_pTableControl->getSourceWinName());
//m_pConnData->SetDestWinName(m_pTableControl->getDestWinName());
@@ -227,7 +227,7 @@ IMPL_LINK( ORelationDialog, OKClickHdl, Button*, /*pButton*/ )
DBG_UNHANDLED_EXCEPTION();
}
- m_bTriedOneUpdate = TRUE;
+ m_bTriedOneUpdate = sal_True;
// this means that the original connection may be lost (if m_pConnData was not a newly created but an
// existent conn to be modified), which we reflect by returning RET_NO (see ::Execute)
diff --git a/dbaccess/source/ui/dlg/RelationDlg.src b/dbaccess/source/ui/dlg/RelationDlg.src
index 908cbab62c92..90602e37c4a9 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 fe392d82cbe0..17fcf7861e51 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 34a42a048931..74c8c1ed8098 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.cxx b/dbaccess/source/ui/dlg/UserAdminDlg.cxx
index 5e7e28158777..2ef473cef14d 100644
--- a/dbaccess/source/ui/dlg/UserAdminDlg.cxx
+++ b/dbaccess/source/ui/dlg/UserAdminDlg.cxx
@@ -134,7 +134,7 @@ DBG_NAME(OUserAdminDlg)
return nRet;
}
//-------------------------------------------------------------------------
- void OUserAdminDlg::PageCreated(USHORT _nId, SfxTabPage& _rPage)
+ void OUserAdminDlg::PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage)
{
// register ourself as modified listener
static_cast<OGenericAdministrationPage&>(_rPage).SetServiceFactory(m_pImpl->getORB());
diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.src b/dbaccess/source/ui/dlg/UserAdminDlg.src
index 5509820d1828..5b07b43093b5 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 cfdc2dd3842f..2a27a78ed32a 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -79,7 +79,7 @@ namespace dbaui
private:
const String m_sDisabledText;
String m_sUserText;
- BOOL m_bLastKnownEnabledState;
+ sal_Bool m_bLastKnownEnabledState;
};
//--------------------------------------------------------------------
@@ -151,7 +151,7 @@ namespace dbaui
//====================================================================
//--------------------------------------------------------------------
MySQLNativeSettings::MySQLNativeSettings( Window& _rParent, const Link& _rControlModificationLink )
- :Control( &_rParent, ModuleRes( RID_MYSQL_NATIVE_SETTINGS ).SetAutoRelease( FALSE ) )
+ :Control( &_rParent, ModuleRes( RID_MYSQL_NATIVE_SETTINGS ).SetAutoRelease( sal_False ) )
,m_aDatabaseNameLabel ( this, ModuleRes( FT_MYSQL_DATABASE_NAME ) )
,m_aDatabaseName ( this, ModuleRes( ED_MYSQL_DATABASE_NAME ) )
,m_aHostPortRadio ( this, ModuleRes( RB_MYSQL_HOST_PORT ) )
@@ -219,7 +219,7 @@ namespace dbaui
}
//--------------------------------------------------------------------
- BOOL MySQLNativeSettings::FillItemSet( SfxItemSet& _rSet )
+ sal_Bool MySQLNativeSettings::FillItemSet( SfxItemSet& _rSet )
{
sal_Bool bChangedSomething = sal_False;
diff --git a/dbaccess/source/ui/dlg/admincontrols.hxx b/dbaccess/source/ui/dlg/admincontrols.hxx
index cd3246cdc332..83353be4b8d0 100644
--- a/dbaccess/source/ui/dlg/admincontrols.hxx
+++ b/dbaccess/source/ui/dlg/admincontrols.hxx
@@ -70,7 +70,7 @@ namespace dbaui
void fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList );
void fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList );
- BOOL FillItemSet( SfxItemSet& _rCoreAttrs );
+ sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs );
void implInitControls( const SfxItemSet& _rSet );
bool canAdvance() const;
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index acfc272d2e7e..2bf12cf82740 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -215,7 +215,7 @@ namespace dbaui
return true;
}
// -----------------------------------------------------------------------
- void OGenericAdministrationPage::fillBool( SfxItemSet& _rSet, CheckBox* _pCheckBox, USHORT _nID, sal_Bool& _bChangedSomething, bool _bRevertValue )
+ void OGenericAdministrationPage::fillBool( SfxItemSet& _rSet, CheckBox* _pCheckBox, sal_uInt16 _nID, sal_Bool& _bChangedSomething, bool _bRevertValue )
{
if ( (_pCheckBox != NULL ) && ( _pCheckBox->GetState() != _pCheckBox->GetSavedValue() ) )
{
@@ -237,16 +237,16 @@ namespace dbaui
}
}
// -----------------------------------------------------------------------
- void OGenericAdministrationPage::fillInt32(SfxItemSet& _rSet,NumericField* _pEdit,USHORT _nID,sal_Bool& _bChangedSomething)
+ void OGenericAdministrationPage::fillInt32(SfxItemSet& _rSet,NumericField* _pEdit,sal_uInt16 _nID,sal_Bool& _bChangedSomething)
{
if( (_pEdit != NULL) && (_pEdit->GetValue() != _pEdit->GetSavedValue().ToInt32()) )
{
- _rSet.Put(SfxInt32Item(_nID, static_cast<INT32>(_pEdit->GetValue())));
+ _rSet.Put(SfxInt32Item(_nID, static_cast<sal_Int32>(_pEdit->GetValue())));
_bChangedSomething = sal_True;
}
}
// -----------------------------------------------------------------------
- void OGenericAdministrationPage::fillString(SfxItemSet& _rSet,Edit* _pEdit,USHORT _nID,sal_Bool& _bChangedSomething)
+ void OGenericAdministrationPage::fillString(SfxItemSet& _rSet,Edit* _pEdit,sal_uInt16 _nID,sal_Bool& _bChangedSomething)
{
if( (_pEdit != NULL) && (_pEdit->GetText() != _pEdit->GetSavedValue()) )
{
@@ -305,7 +305,7 @@ namespace dbaui
return 0L;
}
- void OGenericAdministrationPage::SetHeaderText( USHORT _nFTResId, USHORT _StringResId)
+ void OGenericAdministrationPage::SetHeaderText( sal_uInt16 _nFTResId, sal_uInt16 _StringResId)
{
delete(m_pFT_HeaderText);
m_pFT_HeaderText = new FixedText(this, ModuleRes(_nFTResId));
@@ -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 95a6f63d01ec..51fd7f025965 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -216,7 +216,7 @@ namespace dbaui
@param _bRevertValue
set to <TRUE/> if the display value should be reverted before putting it into the set
*/
- static void fillBool( SfxItemSet& _rSet, CheckBox* _pCheckBox, USHORT _nID, sal_Bool& _bChangedSomething, bool _bRevertValue = false);
+ static void fillBool( SfxItemSet& _rSet, CheckBox* _pCheckBox, sal_uInt16 _nID, sal_Bool& _bChangedSomething, bool _bRevertValue = false);
/** fills the int value into the item set when the value changed.
@param _rSet
@@ -228,7 +228,7 @@ namespace dbaui
@param _bChangedSomething
<TRUE/> if something changed otherwise <FALSE/>
*/
- static void fillInt32(SfxItemSet& _rSet,NumericField* _pEdit,USHORT _nID,sal_Bool& _bChangedSomething);
+ static void fillInt32(SfxItemSet& _rSet,NumericField* _pEdit,sal_uInt16 _nID,sal_Bool& _bChangedSomething);
/** fills the String value into the item set when the value changed.
@param _rSet
@@ -240,12 +240,12 @@ namespace dbaui
@param _bChangedSomething
<TRUE/> if something changed otherwise <FALSE/>
*/
- static void fillString(SfxItemSet& _rSet,Edit* _pEdit,USHORT _nID,sal_Bool& _bChangedSomething);
+ static void fillString(SfxItemSet& _rSet,Edit* _pEdit,sal_uInt16 _nID,sal_Bool& _bChangedSomething);
protected:
// used to set the right Pane header of a wizard to bold
void SetControlFontWeight(Window* _pWindow, FontWeight _eWeight = WEIGHT_BOLD);
- void SetHeaderText( USHORT _nFTResId, USHORT _StringResId);
+ void SetHeaderText( sal_uInt16 _nFTResId, sal_uInt16 _StringResId);
/** This link be used for controls where the tabpage does not need to take any special action when the control
is modified. The implementation just calls callModifiedHdl.
@@ -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 a0f0365fb22b..9af7714a1cdc 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)
@@ -174,7 +174,7 @@ BSTR PromptEdit(long hWnd,BSTR connstr)
// Prompt for connection information.
hr = dlPrompt->PromptEdit((IDispatch **)&piTmpConnection,&pbSuccess);
- if( SUCCEEDED( hr ) && FALSE == pbSuccess ) //if user press cancel then FALSE == pbSuccess
+ if( SUCCEEDED( hr ) && sal_False == pbSuccess ) //if user press cancel then sal_False == pbSuccess
{
piTmpConnection->Release( );
dlPrompt->Release( );
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index 3c0ca82d77fa..540e26982039 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -374,15 +374,15 @@ OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext )
m_aQueryList.SetSelectHdl( LINK( this, OAddTableDlg, TableListSelectHdl ) );
//////////////////////////////////////////////////////////////////////
- m_aTableList.EnableInplaceEditing( FALSE );
- m_aTableList.SetWindowBits(WB_BORDER | WB_HASLINES |WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HASLINESATROOT | WB_SORT | WB_HSCROLL );
+ m_aTableList.EnableInplaceEditing( sal_False );
+ 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();
m_aTableList.suppressEmptyFolders();
//////////////////////////////////////////////////////////////////////
- m_aQueryList.EnableInplaceEditing( FALSE );
+ m_aQueryList.EnableInplaceEditing( sal_False );
m_aQueryList.SetSelectionMode( SINGLE_SELECTION );
//////////////////////////////////////////////////////////////////////
@@ -419,15 +419,15 @@ void OAddTableDlg::impl_switchTo( ObjectList _eList )
switch ( _eList )
{
case Tables:
- m_aTableList.Show( TRUE ); m_aCaseTables.Check( TRUE );
- m_aQueryList.Show( FALSE ); m_aCaseQueries.Check( FALSE );
+ m_aTableList.Show( sal_True ); m_aCaseTables.Check( sal_True );
+ m_aQueryList.Show( sal_False ); m_aCaseQueries.Check( sal_False );
m_pCurrentList.reset( new TableListFacade( m_aTableList, m_rContext.getConnection() ) );
m_aTableList.GrabFocus();
break;
case Queries:
- m_aTableList.Show( FALSE ); m_aCaseTables.Check( FALSE );
- m_aQueryList.Show( TRUE ); m_aCaseQueries.Check( TRUE );
+ m_aTableList.Show( sal_False ); m_aCaseTables.Check( sal_False );
+ m_aQueryList.Show( sal_True ); m_aCaseQueries.Check( sal_True );
m_pCurrentList.reset( new QueryListFacade( m_aQueryList, m_rContext.getConnection() ) );
m_aQueryList.GrabFocus();
break;
@@ -501,7 +501,7 @@ IMPL_LINK( OAddTableDlg, OnTypeSelected, void*, /*EMPTY_ARG*/ )
}
//------------------------------------------------------------------------------
-BOOL OAddTableDlg::Close()
+sal_Bool OAddTableDlg::Close()
{
m_rContext.onWindowClosing( this );
return ModelessDialog::Close();
diff --git a/dbaccess/source/ui/dlg/adtabdlg.src b/dbaccess/source/ui/dlg/adtabdlg.src
index ecff324d7ec9..deb914dd831d 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.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index f64231b60dc2..d7dec225f1a8 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -70,9 +70,9 @@ namespace dbaui
struct BooleanSettingDesc
{
CheckBox** ppControl; // the dialog's control which displays this setting
- USHORT nControlResId; // the resource ID to load the control from
- USHORT nItemId; // the ID of the item (in an SfxItemSet) which corresponds to this setting
- bool bInvertedDisplay; // true if and only if the checkbox is checked when the item is FALSE, and vice versa
+ sal_uInt16 nControlResId; // the resource ID to load the control from
+ sal_uInt16 nItemId; // the ID of the item (in an SfxItemSet) which corresponds to this setting
+ bool bInvertedDisplay; // true if and only if the checkbox is checked when the item is sal_False, and vice versa
};
//========================================================================
@@ -98,9 +98,12 @@ namespace dbaui
,m_pPrimaryKeySupport(NULL)
,m_pBooleanComparisonModeLabel( NULL )
,m_pBooleanComparisonMode( NULL )
+ ,m_pMaxRowScanLabel( NULL )
+ ,m_pMaxRowScan( NULL )
,m_aControlDependencies()
,m_aBooleanSettings()
,m_bHasBooleanComparisonMode( _rDSMeta.getFeatureSet().has( DSID_BOOLEANCOMPARISON ) )
+ ,m_bHasMaxRowScan( _rDSMeta.getFeatureSet().has( DSID_MAX_ROW_SCAN ) )
{
impl_initBooleanSettings();
@@ -111,17 +114,17 @@ namespace dbaui
++setting
)
{
- USHORT nItemId = setting->nItemId;
+ sal_uInt16 nItemId = setting->nItemId;
if ( rFeatures.has( nItemId ) )
{
- USHORT nResourceId = setting->nControlResId;
+ sal_uInt16 nResourceId = setting->nControlResId;
(*setting->ppControl) = new CheckBox( this, ModuleRes( nResourceId ) );
(*setting->ppControl)->SetClickHdl( getControlModifiedLink() );
// check whether this must be a tristate check box
const SfxPoolItem& rItem = _rCoreAttrs.Get( nItemId );
if ( rItem.ISA( OptionalBoolItem ) )
- (*setting->ppControl)->EnableTriState( TRUE );
+ (*setting->ppControl)->EnableTriState( sal_True );
}
}
@@ -165,6 +168,21 @@ namespace dbaui
m_pBooleanComparisonModeLabel->SetPosPixel( Point( aLabelPos.X(), aLabelPos.Y() - nMoveUp ) );
m_pBooleanComparisonMode->SetPosPixel( Point( aControlPos.X(), aControlPos.Y() - nMoveUp ) );
}
+ // create the controls for the max row scan
+ if ( m_bHasMaxRowScan )
+ {
+ m_pMaxRowScanLabel = new FixedText( this, ModuleRes( FT_MAXROWSCAN ) );
+ m_pMaxRowScan = new NumericField( this, ModuleRes( NF_MAXROWSCAN ) );
+ m_pMaxRowScan->SetModifyHdl(getControlModifiedLink());
+ m_pMaxRowScan->SetUseThousandSep(sal_False);
+
+ Point aLabelPos( m_pMaxRowScanLabel->GetPosPixel() );
+ Point aControlPos( m_pMaxRowScan->GetPosPixel() );
+ long nMoveUp = aControlPos.Y() - aPos.Y();
+
+ m_pMaxRowScanLabel->SetPosPixel( Point( aLabelPos.X(), aLabelPos.Y() - nMoveUp ) );
+ m_pMaxRowScan->SetPosPixel( Point( aControlPos.X(), aControlPos.Y() - nMoveUp ) );
+ }
FreeResource();
}
@@ -191,6 +209,8 @@ namespace dbaui
DELETEZ( m_pPrimaryKeySupport );
DELETEZ( m_pBooleanComparisonModeLabel );
DELETEZ( m_pBooleanComparisonMode );
+ DELETEZ( m_pMaxRowScanLabel );
+ DELETEZ( m_pMaxRowScan );
}
// -----------------------------------------------------------------------
@@ -231,6 +251,10 @@ namespace dbaui
{
_rControlList.push_back( new ODisableWrapper< FixedText >( m_pBooleanComparisonModeLabel ) );
}
+ if ( m_bHasMaxRowScan )
+ {
+ _rControlList.push_back( new ODisableWrapper< FixedText >( m_pMaxRowScanLabel ) );
+ }
}
// -----------------------------------------------------------------------
@@ -249,6 +273,8 @@ namespace dbaui
if ( m_bHasBooleanComparisonMode )
_rControlList.push_back( new OSaveValueWrapper< ListBox >( m_pBooleanComparisonMode ) );
+ if ( m_bHasMaxRowScan )
+ _rControlList.push_back(new OSaveValueWrapper<NumericField>(m_pMaxRowScan));
}
// -----------------------------------------------------------------------
@@ -293,7 +319,7 @@ namespace dbaui
}
else
{
- BOOL bValue = *aValue;
+ sal_Bool bValue = *aValue;
if ( setting->bInvertedDisplay )
bValue = !bValue;
(*setting->ppControl)->Check( bValue );
@@ -304,7 +330,13 @@ namespace dbaui
if ( m_bHasBooleanComparisonMode )
{
SFX_ITEMSET_GET( _rSet, pBooleanComparison, SfxInt32Item, DSID_BOOLEANCOMPARISON, sal_True );
- m_pBooleanComparisonMode->SelectEntryPos( static_cast< USHORT >( pBooleanComparison->GetValue() ) );
+ m_pBooleanComparisonMode->SelectEntryPos( static_cast< sal_uInt16 >( pBooleanComparison->GetValue() ) );
+ }
+
+ if ( m_bHasMaxRowScan )
+ {
+ SFX_ITEMSET_GET(_rSet, pMaxRowScan, SfxInt32Item, DSID_MAX_ROW_SCAN, sal_True);
+ m_pMaxRowScan->SetValue(pMaxRowScan->GetValue());
}
OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue);
@@ -335,6 +367,10 @@ namespace dbaui
bChangedSomething = sal_True;
}
}
+ if ( m_bHasMaxRowScan )
+ {
+ fillInt32(_rSet,m_pMaxRowScan,DSID_MAX_ROW_SCAN,bChangedSomething);
+ }
return bChangedSomething;
}
@@ -487,7 +523,7 @@ namespace dbaui
}
//-------------------------------------------------------------------------
- void AdvancedSettingsDialog::PageCreated(USHORT _nId, SfxTabPage& _rPage)
+ void AdvancedSettingsDialog::PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage)
{
// register ourself as modified listener
static_cast<OGenericAdministrationPage&>(_rPage).SetServiceFactory(m_pImpl->getORB());
diff --git a/dbaccess/source/ui/dlg/advancedsettings.hrc b/dbaccess/source/ui/dlg/advancedsettings.hrc
index 8abc5d8810d2..193fdf5f3853 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.hrc
+++ b/dbaccess/source/ui/dlg/advancedsettings.hrc
@@ -69,7 +69,9 @@
#define FT_AUTOINCREMENTVALUE 1
#define FT_RETRIEVE_AUTO 2
#define FT_BOOLEANCOMPARISON 3
+#define FT_MAXROWSCAN 4
#define LB_BOOLEANCOMPARISON 1
+#define NF_MAXROWSCAN 1
#endif // DBAUI_ADVANCEDSETTINGS_HRC
diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx b/dbaccess/source/ui/dlg/advancedsettings.hxx
index f4c6e75e4f3f..6a6ae93f9f8e 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.hxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.hxx
@@ -38,6 +38,7 @@
#include <svtools/dialogcontrolling.hxx>
#include <vcl/lstbox.hxx>
+#include <vcl/field.hxx>
#include <vector>
@@ -77,15 +78,19 @@ namespace dbaui
FixedText* m_pBooleanComparisonModeLabel;
ListBox* m_pBooleanComparisonMode;
+ FixedText* m_pMaxRowScanLabel;
+ NumericField* m_pMaxRowScan;
+
::svt::ControlDependencyManager
m_aControlDependencies;
BooleanSettingDescs m_aBooleanSettings;
bool m_bHasBooleanComparisonMode;
+ bool m_bHasMaxRowScan;
public:
- virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
+ virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs );
SpecialSettingsPage(Window* pParent, const SfxItemSet& _rCoreAttrs, const DataSourceMetaData& _rDSMeta );
@@ -123,7 +128,7 @@ namespace dbaui
m_aControlDependencies;
public:
- virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs);
+ virtual sal_Bool FillItemSet (SfxItemSet& _rCoreAttrs);
GeneratedValuesPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
protected:
diff --git a/dbaccess/source/ui/dlg/advancedsettings.src b/dbaccess/source/ui/dlg/advancedsettings.src
index 4c5a7d924d33..9a2dc467d586 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.src
+++ b/dbaccess/source/ui/dlg/advancedsettings.src
@@ -249,10 +249,29 @@
WORKAROUND \
}; \
+#define AUTO_MAXROWSCAN(AUTO_Y) \
+ FixedText FT_MAXROWSCAN \
+ { \
+ Pos = MAP_APPFONT ( START_X , AUTO_Y + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 ) ; \
+ Size = MAP_APPFONT ( 100 , CHECKBOX_HEIGHT ); \
+ Text [ en-US ] = "Rows to scan column types"; \
+ }; \
+ NumericField NF_MAXROWSCAN \
+ { \
+ Pos = MAP_APPFONT ( START_X + 100, AUTO_Y ) ; \
+ Size = MAP_APPFONT ( 60 , EDIT_HEIGHT ) ; \
+ TabStop = TRUE ; \
+ NoThousandSep = TRUE; \
+ Border = TRUE; \
+ HelpId = HID_DSADMIN_MAXROWSCAN; \
+ }; \
+
+
//-------------------------------------------------------------------------
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 +330,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 ) ;
@@ -332,6 +352,7 @@ TabPage PAGE_ADVANCED_SETTINGS_SPECIAL
AUTO_ESCAPE_DATETIME( 14*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS )
AUTO_PRIMARY_KEY_SUPPORT( 15*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 15*CHECKBOX_HEIGHT + RELATED_CONTROLS )
AUTO_BOOLEANCOMPARISON( 16*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 )
+ AUTO_MAXROWSCAN( 17*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 )
};
//-------------------------------------------------------------------------
@@ -349,7 +370,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.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index 9b23a33cb20e..510b1864eb0b 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -109,7 +109,7 @@ short ODbAdminDialog::Ok()
}
//-------------------------------------------------------------------------
-void ODbAdminDialog::PageCreated(USHORT _nId, SfxTabPage& _rPage)
+void ODbAdminDialog::PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage)
{
// register ourself as modified listener
static_cast<OGenericAdministrationPage&>(_rPage).SetServiceFactory(m_pImpl->getORB());
@@ -124,7 +124,7 @@ void ODbAdminDialog::PageCreated(USHORT _nId, SfxTabPage& _rPage)
}
// -----------------------------------------------------------------------------
-void ODbAdminDialog::addDetailPage(USHORT _nPageId, USHORT _nTextId, CreateTabPage _pCreateFunc)
+void ODbAdminDialog::addDetailPage(sal_uInt16 _nPageId, sal_uInt16 _nTextId, CreateTabPage _pCreateFunc)
{
// open our own resource block, as the page titles are strings local to this block
LocalResourceAccess aDummy(DLG_DATABASE_ADMINISTRATION, RSC_TABDIALOG);
@@ -409,6 +409,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp
*pCounter++ = new SfxBoolItem(DSID_ESCAPE_DATETIME, sal_True);
*pCounter++ = new SfxStringItem(DSID_NAMED_PIPE, String());
*pCounter++ = new OptionalBoolItem( DSID_PRIMARY_KEY_SUPPORT );
+ *pCounter++ = new SfxInt32Item(DSID_MAX_ROW_SCAN, 100);
// create the pool
static SfxItemInfo const aItemInfos[DSID_LAST_ITEM_ID - DSID_FIRST_ITEM_ID + 1] =
@@ -471,6 +472,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp
{0,0},
{0,0},
{0,0},
+ {0,0},
{0,0}
};
diff --git a/dbaccess/source/ui/dlg/dbadmin.src b/dbaccess/source/ui/dlg/dbadmin.src
index e0fb99ac299a..e5eae80b5406 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 0c0bd3a48504..44ef3f024e3a 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 8e0cd31b521e..ea4341914e82 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.hxx b/dbaccess/source/ui/dlg/dbfindex.hxx
index 59b1f0f66f1e..c10b2362027b 100644
--- a/dbaccess/source/ui/dlg/dbfindex.hxx
+++ b/dbaccess/source/ui/dlg/dbfindex.hxx
@@ -126,7 +126,7 @@ protected:
String m_aDSN;
TableInfoList m_aTableInfoList;
TableIndexList m_aFreeIndexList;
- BOOL m_bCaseSensitiv;
+ sal_Bool m_bCaseSensitiv;
void Init();
void SetCtrls();
diff --git a/dbaccess/source/ui/dlg/dbfindex.src b/dbaccess/source/ui/dlg/dbfindex.src
index 8c253554ffde..ca8b6e4a3622 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/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx
index 5624420c904f..3333f06c0380 100644
--- a/dbaccess/source/ui/dlg/dbwiz.cxx
+++ b/dbaccess/source/ui/dlg/dbwiz.cxx
@@ -258,7 +258,7 @@ void ODbTypeWizDialog::clearPassword()
// -----------------------------------------------------------------------------
TabPage* ODbTypeWizDialog::createPage(WizardState _nState)
{
- USHORT nStringId = STR_PAGETITLE_ADVANCED;
+ sal_uInt16 nStringId = STR_PAGETITLE_ADVANCED;
TabPage* pPage = NULL;
switch(_nState)
{
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index fb3a27decc66..c02f603c99eb 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -76,7 +76,7 @@ namespace dbaui
//========================================================================
DBG_NAME(OCommonBehaviourTabPage)
//------------------------------------------------------------------------
- OCommonBehaviourTabPage::OCommonBehaviourTabPage(Window* pParent, USHORT nResId, const SfxItemSet& _rCoreAttrs,
+ OCommonBehaviourTabPage::OCommonBehaviourTabPage(Window* pParent, sal_uInt16 nResId, const SfxItemSet& _rCoreAttrs,
sal_uInt32 nControlFlags,bool _bFreeResource)
:OGenericAdministrationPage(pParent, ModuleRes(nResId), _rCoreAttrs)
@@ -500,7 +500,7 @@ namespace dbaui
//========================================================================
//= OMySQLJDBCDetailsPage
//========================================================================
- OGeneralSpecialJDBCDetailsPage::OGeneralSpecialJDBCDetailsPage( Window* pParent,USHORT _nResId, const SfxItemSet& _rCoreAttrs ,USHORT _nPortId)
+ OGeneralSpecialJDBCDetailsPage::OGeneralSpecialJDBCDetailsPage( Window* pParent,sal_uInt16 _nResId, const SfxItemSet& _rCoreAttrs ,sal_uInt16 _nPortId)
:OCommonBehaviourTabPage(pParent, _nResId, _rCoreAttrs, CBTP_USE_CHARSET ,false)
,m_aFL_1 (this, ModuleRes( FL_SEPARATOR1) )
,m_aFTHostname (this, ModuleRes(FT_HOSTNAME))
@@ -531,9 +531,9 @@ namespace dbaui
else
{
m_bUseClass = false;
- m_aFTDriverClass.Show(FALSE);
- m_aEDDriverClass.Show(FALSE);
- m_aTestJavaDriver.Show(FALSE);
+ m_aFTDriverClass.Show(sal_False);
+ m_aEDDriverClass.Show(sal_False);
+ m_aTestJavaDriver.Show(sal_False);
}
m_aFTSocket.Show(PAGE_MYSQL_JDBC == _nResId && !m_bUseClass);
@@ -648,7 +648,7 @@ namespace dbaui
{
}
- USHORT nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
+ sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
OSQLMessageBox aMsg( this, String( ModuleRes( nMessage ) ), String() );
aMsg.Execute();
return 0L;
@@ -900,7 +900,7 @@ namespace dbaui
IMPL_LINK( OAdabasDetailsPage, AttributesChangedHdl, void *, EMPTYARG )
{
m_CB_SHUTDB.Enable(m_ET_CTRLUSERNAME.GetText().Len() && m_ET_CTRLPASSWORD.GetText().Len());
- bAttrsChanged = TRUE;
+ bAttrsChanged = sal_True;
callModifiedHdl();
return 0;
}
diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx
index 2d304430e865..6d48d2fd2711 100644
--- a/dbaccess/source/ui/dlg/detailpages.hxx
+++ b/dbaccess/source/ui/dlg/detailpages.hxx
@@ -81,9 +81,9 @@ namespace dbaui
sal_uInt32 m_nControlFlags;
public:
- virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs);
+ virtual sal_Bool FillItemSet (SfxItemSet& _rCoreAttrs);
- OCommonBehaviourTabPage(Window* pParent, USHORT nResId, const SfxItemSet& _rCoreAttrs, sal_uInt32 nControlFlags,bool _bFreeResource = true);
+ OCommonBehaviourTabPage(Window* pParent, sal_uInt16 nResId, const SfxItemSet& _rCoreAttrs, sal_uInt32 nControlFlags,bool _bFreeResource = true);
protected:
// nControlFlags ist eine Kombination der CBTP_xxx-Konstanten
@@ -105,7 +105,7 @@ namespace dbaui
class ODbaseDetailsPage : public OCommonBehaviourTabPage
{
public:
- virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
+ virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs );
ODbaseDetailsPage(Window* pParent, const SfxItemSet& _rCoreAttrs);
private:
@@ -148,7 +148,7 @@ namespace dbaui
class OOdbcDetailsPage : public OCommonBehaviourTabPage
{
public:
- virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
+ virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs );
OOdbcDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
protected:
@@ -167,7 +167,7 @@ namespace dbaui
class OUserDriverDetailsPage : public OCommonBehaviourTabPage
{
public:
- virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
+ virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs );
OUserDriverDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
protected:
@@ -198,15 +198,15 @@ namespace dbaui
{
public:
OGeneralSpecialJDBCDetailsPage( Window* pParent
- , USHORT _nResId
+ , sal_uInt16 _nResId
, const SfxItemSet& _rCoreAttrs
- , USHORT _nPortId
+ , sal_uInt16 _nPortId
);
protected:
- virtual BOOL FillItemSet( SfxItemSet& _rCoreAttrs );
+ virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs );
virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
@@ -227,7 +227,7 @@ namespace dbaui
PushButton m_aTestJavaDriver;
String m_sDefaultJdbcDriverName;
- USHORT m_nPortId;
+ sal_uInt16 m_nPortId;
bool m_bUseClass;
};
@@ -250,7 +250,7 @@ namespace dbaui
CheckBox m_aPasswordRequired;
protected:
- virtual BOOL FillItemSet( SfxItemSet& _rCoreAttrs );
+ virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs );
virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
@@ -262,7 +262,7 @@ namespace dbaui
class OAdabasDetailsPage : public OCommonBehaviourTabPage
{
public:
- virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs);
+ virtual sal_Bool FillItemSet (SfxItemSet& _rCoreAttrs);
OAdabasDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
protected:
@@ -289,7 +289,7 @@ namespace dbaui
CheckBox m_CB_SHUTDB;
PushButton m_PB_STAT;
String m_sUser;
- BOOL bAttrsChanged;
+ sal_Bool bAttrsChanged;
DECL_LINK( AttributesChangedHdl, void * );
DECL_LINK( UserSettingsHdl, void * );
@@ -303,7 +303,7 @@ namespace dbaui
class OLDAPDetailsPage : public OCommonBehaviourTabPage
{
public:
- virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
+ virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs );
OLDAPDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
protected:
@@ -343,7 +343,7 @@ namespace dbaui
class OTextDetailsPage : public OCommonBehaviourTabPage
{
public:
- virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
+ virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs );
OTextDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
OTextConnectionHelper* m_pTextConnectionHelper;
diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx
index d964da262c30..99692ffc2961 100644
--- a/dbaccess/source/ui/dlg/directsql.cxx
+++ b/dbaccess/source/ui/dlg/directsql.cxx
@@ -171,7 +171,7 @@ DBG_NAME(DirectSQLDialog)
{
m_aStatementHistory.pop_front();
m_aNormalizedHistory.pop_front();
- m_pSQLHistory->RemoveEntry((USHORT)0);
+ m_pSQLHistory->RemoveEntry((sal_uInt16)0);
}
}
@@ -299,7 +299,7 @@ DBG_NAME(DirectSQLDialog)
if (_bUpdateListBox)
{
// selecte the normalized statement in the list box
- m_pSQLHistory->SelectEntryPos((USHORT)_nHistoryPos);
+ m_pSQLHistory->SelectEntryPos((sal_uInt16)_nHistoryPos);
OSL_ENSURE(m_pSQLHistory->GetSelectEntry() == m_aNormalizedHistory[_nHistoryPos],
"DirectSQLDialog::switchToHistory: inconsistent listbox entries!");
}
diff --git a/dbaccess/source/ui/dlg/directsql.src b/dbaccess/source/ui/dlg/directsql.src
index 74d9b3b69775..5428535c365a 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/dlgattr.cxx b/dbaccess/source/ui/dlg/dlgattr.cxx
index 4294d5e5b96e..e77c20704d26 100644
--- a/dbaccess/source/ui/dlg/dlgattr.cxx
+++ b/dbaccess/source/ui/dlg/dlgattr.cxx
@@ -51,7 +51,7 @@ using namespace dbaui;
DBG_NAME(SbaSbAttrDlg)
//==================================================================
-SbaSbAttrDlg::SbaSbAttrDlg(Window* pParent, const SfxItemSet* pCellAttrs, SvNumberFormatter* pFormatter, USHORT nFlags, BOOL bRow)
+SbaSbAttrDlg::SbaSbAttrDlg(Window* pParent, const SfxItemSet* pCellAttrs, SvNumberFormatter* pFormatter, sal_uInt16 nFlags, sal_Bool bRow)
: SfxTabDialog(pParent, ModuleRes( DLG_ATTR ), pCellAttrs )
,aTitle(ModuleRes(ST_ROW))
{
@@ -88,7 +88,7 @@ void SbaSbAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
{
case RID_SVXPAGE_NUMBERFORMAT:
{
- aSet.Put (SvxNumberInfoItem( pNumberInfoItem->GetNumberFormatter(), (const USHORT)SID_ATTR_NUMBERFORMAT_INFO));
+ aSet.Put (SvxNumberInfoItem( pNumberInfoItem->GetNumberFormatter(), (const sal_uInt16)SID_ATTR_NUMBERFORMAT_INFO));
rTabPage.PageCreated(aSet);
}
break;
diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx
index d9466a39663e..d9c7c6af7572 100644
--- a/dbaccess/source/ui/dlg/dlgsave.cxx
+++ b/dbaccess/source/ui/dlg/dlgsave.cxx
@@ -185,7 +185,7 @@ namespace
_rList.InsertEntry( sValue );
}
- USHORT nPos = _rList.GetEntryPos( String( _rCurrent ) );
+ sal_uInt16 nPos = _rList.GetEntryPos( String( _rCurrent ) );
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
_rList.SelectEntryPos( nPos );
else
@@ -269,7 +269,7 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent,
sTable,
::dbtools::eInDataManipulation);
- USHORT nPos = m_pImpl->m_aCatalog.GetEntryPos(String(sCatalog));
+ sal_uInt16 nPos = m_pImpl->m_aCatalog.GetEntryPos(String(sCatalog));
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
m_pImpl->m_aCatalog.SelectEntryPos(nPos);
@@ -289,7 +289,7 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent,
m_pImpl->m_aPB_CANCEL.SetPosPixel(Point(m_pImpl->m_aPB_CANCEL.GetPosPixel().X(),aPos.Y()));
m_pImpl->m_aPB_HELP.SetPosPixel(Point(m_pImpl->m_aPB_HELP.GetPosPixel().X(),aPos.Y()));
- USHORT nLength = m_pImpl->m_xMetaData.is() ? static_cast<USHORT>(m_pImpl->m_xMetaData->getMaxTableNameLength()) : 0;
+ sal_uInt16 nLength = m_pImpl->m_xMetaData.is() ? static_cast<sal_uInt16>(m_pImpl->m_xMetaData->getMaxTableNameLength()) : 0;
nLength = nLength ? nLength : EDIT_NOLIMIT;
m_pImpl->m_aTitle.SetMaxTextLen(nLength);
diff --git a/dbaccess/source/ui/dlg/dlgsave.src b/dbaccess/source/ui/dlg/dlgsave.src
index 5ebc5374155c..bc94b77eee37 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 875ee79b99f5..556c53974c9a 100644
--- a/dbaccess/source/ui/dlg/dlgsize.src
+++ b/dbaccess/source/ui/dlg/dlgsize.src
@@ -24,11 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- //---------------------------------------------------------------------------
- //
- // (c) Copyright 1996 - 2000 by Star Division GmbH, Hamburg, Germany
- //
- //---------------------------------------------------------------------------
#ifndef DBAUI_DLGSIZE_HRC
#include "dlgsize.hrc"
@@ -56,6 +51,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 +65,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 +108,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 +122,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.cxx b/dbaccess/source/ui/dlg/dsselect.cxx
index 0f787bcc996d..e6bbb8494e16 100644
--- a/dbaccess/source/ui/dlg/dsselect.cxx
+++ b/dbaccess/source/ui/dlg/dsselect.cxx
@@ -182,7 +182,7 @@ IMPL_LINK( ODatasourceSelectDialog, CreateDBClickHdl, PushButton*, /*pButton*/ )
if ( xPropInfo->hasPropertyByName(PROPERTY_PASSWORD) )
{
m_pOutputSet->Put(SfxStringItem(DSID_PASSWORD, ::comphelper::getString(xProp->getPropertyValue(PROPERTY_PASSWORD))));
- m_pOutputSet->Put(SfxBoolItem(DSID_PASSWORDREQUIRED, TRUE));
+ m_pOutputSet->Put(SfxBoolItem(DSID_PASSWORDREQUIRED, sal_True));
}
if ( xPropInfo->hasPropertyByName(PROPERTY_CACHESIZE) )
m_pOutputSet->Put(SfxInt32Item(DSID_CONN_CACHESIZE, ::comphelper::getINT32(xProp->getPropertyValue(PROPERTY_CACHESIZE))));
@@ -197,11 +197,11 @@ IMPL_LINK( ODatasourceSelectDialog, CreateDBClickHdl, PushButton*, /*pButton*/ )
}
// -----------------------------------------------------------------------
-BOOL ODatasourceSelectDialog::Close()
+sal_Bool ODatasourceSelectDialog::Close()
{
#ifdef HAVE_ODBC_ADMINISTRATION
if ( m_pODBCManagement.get() && m_pODBCManagement->isRunning() )
- return FALSE;
+ return sal_False;
#endif
return ModalDialog::Close();
diff --git a/dbaccess/source/ui/dlg/dsselect.hxx b/dbaccess/source/ui/dlg/dsselect.hxx
index 555464635b84..34050aff9cb9 100644
--- a/dbaccess/source/ui/dlg/dsselect.hxx
+++ b/dbaccess/source/ui/dlg/dsselect.hxx
@@ -76,7 +76,7 @@ public:
inline String GetSelected() const { return m_aDatasource.GetSelectEntry();}
void Select( const String& _rEntry ) { m_aDatasource.SelectEntry(_rEntry); }
- virtual BOOL Close();
+ virtual sal_Bool Close();
protected:
DECL_LINK( ListDblClickHdl, ListBox * );
diff --git a/dbaccess/source/ui/dlg/dsselect.src b/dbaccess/source/ui/dlg/dsselect.src
index 8c59a26d1a16..d6a8855559a2 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/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 311bea0cc1ad..060f83d43853 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -505,7 +505,7 @@ namespace dbaui
}
//-------------------------------------------------------------------------
- BOOL OGeneralPage::FillItemSet(SfxItemSet& _rCoreAttrs)
+ sal_Bool OGeneralPage::FillItemSet(SfxItemSet& _rCoreAttrs)
{
sal_Bool bChangedSomething = sal_False;
@@ -530,7 +530,7 @@ namespace dbaui
if ( bCommitTypeSelection )
{
- USHORT nEntry = m_pDatasourceType->GetSelectEntryPos();
+ sal_uInt16 nEntry = m_pDatasourceType->GetSelectEntryPos();
::rtl::OUString sURLPrefix = m_aURLPrefixes[nEntry];
if (m_DBWizardMode)
{
diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx
index ad28e2dc0692..5bd2dbe189fa 100644
--- a/dbaccess/source/ui/dlg/generalpage.hxx
+++ b/dbaccess/source/ui/dlg/generalpage.hxx
@@ -132,7 +132,7 @@ namespace dbaui
protected:
// SfxTabPage overridables
- virtual BOOL FillItemSet(SfxItemSet& _rCoreAttrs);
+ virtual sal_Bool FillItemSet(SfxItemSet& _rCoreAttrs);
virtual void Reset(const SfxItemSet& _rCoreAttrs);
virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
diff --git a/dbaccess/source/ui/dlg/indexdialog.src b/dbaccess/source/ui/dlg/indexdialog.src
index 05b294d3aa07..2071684c37b6 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 0a7ddefb13f9..8fa615d28a52 100644
--- a/dbaccess/source/ui/dlg/makefile.mk
+++ b/dbaccess/source/ui/dlg/makefile.mk
@@ -137,7 +137,6 @@ SLOFILES+= $(SLO)$/adodatalinks.obj
.ENDIF
# --- Targets ----------------------------------
-
.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 8c340af17611..baf20415e4d6 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 479c0743953b..20b0adb0cb44 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 6e8b61debff5..1f78123c6096 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 f93fe24b8766..6d273b5c53aa 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 ) ;
diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx
index caa2b79e9a17..75f60ec28d81 100644
--- a/dbaccess/source/ui/dlg/queryorder.cxx
+++ b/dbaccess/source/ui/dlg/queryorder.cxx
@@ -89,7 +89,7 @@ DlgOrderCrit::DlgOrderCrit( Window * pParent,
AllSettings aSettings( GetSettings() );
StyleSettings aStyle( aSettings.GetStyleSettings() );
- aStyle.SetAutoMnemonic( FALSE );
+ aStyle.SetAutoMnemonic( sal_False );
aSettings.SetStyleSettings( aStyle );
SetSettings( aSettings );
diff --git a/dbaccess/source/ui/dlg/queryorder.src b/dbaccess/source/ui/dlg/queryorder.src
index 318df3045aa1..7c349dda037b 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 ) ;
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index dcf5ade1d83c..8636a152dc9a 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -47,6 +47,8 @@
#include "UITools.hxx"
#include "moduledbu.hxx"
+#include <tools/urlobj.hxx>
+
#define BUTTONID_MORE BUTTONID_RETRY + 1
#define DIALOG_WIDTH 220
@@ -89,12 +91,12 @@ namespace
class ImageProvider : public IImageProvider
{
private:
- USHORT m_defaultImageID;
+ sal_uInt16 m_defaultImageID;
mutable Image m_defaultImage;
public:
- ImageProvider( USHORT _defaultImageID )
+ ImageProvider( sal_uInt16 _defaultImageID )
:m_defaultImageID( _defaultImageID )
{
}
@@ -113,7 +115,7 @@ namespace
private:
String m_label;
public:
- LabelProvider( USHORT _labelResourceID )
+ LabelProvider( sal_uInt16 _labelResourceID )
:m_label( ModuleRes( _labelResourceID ) )
{
}
@@ -143,7 +145,7 @@ namespace
::boost::shared_ptr< IImageProvider > getImageProvider( SQLExceptionInfo::TYPE _eType ) const
{
::boost::shared_ptr< IImageProvider >* ppProvider( &m_pErrorImage );
- USHORT nNormalImageID( BMP_EXCEPTION_ERROR );
+ sal_uInt16 nNormalImageID( BMP_EXCEPTION_ERROR );
switch ( _eType )
{
@@ -169,7 +171,7 @@ namespace
::boost::shared_ptr< ILabelProvider > getLabelProvider( SQLExceptionInfo::TYPE _eType, bool _bSubLabel ) const
{
::boost::shared_ptr< ILabelProvider >* ppProvider( &m_pErrorLabel );
- USHORT nLabelID( STR_EXCEPTION_ERROR );
+ sal_uInt16 nLabelID( STR_EXCEPTION_ERROR );
switch ( _eType )
{
@@ -356,7 +358,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( );
@@ -470,7 +472,7 @@ namespace
void lcl_addButton( ButtonDialog& _rDialog, StandardButtonType _eType, bool _bDefault )
{
- USHORT nButtonID = 0;
+ sal_uInt16 nButtonID = 0;
switch ( _eType )
{
case BUTTON_YES: nButtonID = BUTTONID_YES; break;
@@ -645,11 +647,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 979fdd3709df..94b2e394d527 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 cf04d792d241..9b5e771b2173 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -102,7 +102,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();
@@ -583,7 +583,7 @@ DBG_NAME(OTableSubscriptionPage)
}
//------------------------------------------------------------------------
- BOOL OTableSubscriptionPage::FillItemSet( SfxItemSet& _rCoreAttrs )
+ sal_Bool OTableSubscriptionPage::FillItemSet( SfxItemSet& _rCoreAttrs )
{
sal_Bool bValid, bReadonly;
getFlags(_rCoreAttrs, bValid, bReadonly);
diff --git a/dbaccess/source/ui/dlg/tablespage.hxx b/dbaccess/source/ui/dlg/tablespage.hxx
index a15e7e159e53..81566ed7faf5 100644
--- a/dbaccess/source/ui/dlg/tablespage.hxx
+++ b/dbaccess/source/ui/dlg/tablespage.hxx
@@ -68,7 +68,7 @@ namespace dbaui
OTableSubscriptionDialog* m_pTablesDlg;
public:
- virtual BOOL FillItemSet(SfxItemSet& _rCoreAttrs);
+ virtual sal_Bool FillItemSet(SfxItemSet& _rCoreAttrs);
virtual int DeactivatePage(SfxItemSet* _pSet);
using OGenericAdministrationPage::DeactivatePage;
@@ -105,7 +105,7 @@ namespace dbaui
::com::sun::star::uno::Sequence< ::rtl::OUString > collectDetailedSelection() const;
/// (un)check all entries
- void CheckAll( BOOL bCheck = sal_True );
+ void CheckAll( sal_Bool bCheck = sal_True );
virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
diff --git a/dbaccess/source/ui/dlg/textconnectionsettings.src b/dbaccess/source/ui/dlg/textconnectionsettings.src
index cca76e7f65a3..b34a056076a8 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/ColumnControlWindow.hxx b/dbaccess/source/ui/inc/ColumnControlWindow.hxx
index d0376cbf76dc..5cd8d93a337a 100644
--- a/dbaccess/source/ui/inc/ColumnControlWindow.hxx
+++ b/dbaccess/source/ui/inc/ColumnControlWindow.hxx
@@ -63,7 +63,7 @@ namespace dbaui
virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos);
virtual sal_Bool isAutoIncrementValueEnabled() const;
virtual ::rtl::OUString getAutoIncrementValue() const;
- virtual void CellModified(long nRow, USHORT nColId );
+ virtual void CellModified(long nRow, sal_uInt16 nColId );
public:
OColumnControlWindow(Window* pParent
diff --git a/dbaccess/source/ui/inc/ConnectionLine.hxx b/dbaccess/source/ui/inc/ConnectionLine.hxx
index a8070ecd183e..ff4640a3b3e2 100644
--- a/dbaccess/source/ui/inc/ConnectionLine.hxx
+++ b/dbaccess/source/ui/inc/ConnectionLine.hxx
@@ -67,13 +67,13 @@ namespace dbaui
virtual OConnectionLine& operator=( const OConnectionLine& rLine );
Rectangle GetBoundingRect();
- BOOL RecalcLine();
+ sal_Bool RecalcLine();
void Draw( OutputDevice* pOutDev );
bool CheckHit( const Point& rMousePos ) const;
String GetSourceFieldName() const { return m_pData->GetSourceFieldName(); }
String GetDestFieldName() const { return m_pData->GetDestFieldName(); }
- BOOL IsValid() const;
+ sal_Bool IsValid() const;
Rectangle GetSourceTextPos() const;
Rectangle GetDestTextPos() const;
diff --git a/dbaccess/source/ui/inc/ExtensionNotPresent.hxx b/dbaccess/source/ui/inc/ExtensionNotPresent.hxx
deleted file mode 100644
index dcea387599ea..000000000000
--- a/dbaccess/source/ui/inc/ExtensionNotPresent.hxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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_HXX
-#define DBU_EXTENSIONNOTPRESENT_HXX
-
-#include <vcl/dialog.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/lstbox.hxx>
-#include <vcl/field.hxx>
-#include <vcl/button.hxx>
-#include <com/sun/star/report/XReportDefinition.hpp>
-#include <com/sun/star/lang/Locale.hpp>
-
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
-
-namespace dbaui
-{
-
-/*************************************************************************
-|*
-|* Groups and Sorting dialog
-|*
-\************************************************************************/
-class OExtensionNotPresentDialog : public ModalDialog
-{
- FixedImage m_aFI_WARNING;
- FixedText m_aFT_TEXT;
-
- PushButton m_aPB_DOWNLOAD;
- CancelButton m_aPB_CANCEL;
-
- ::com::sun::star::lang::Locale m_nLocale;
- com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > m_xMultiServiceFactory;
-
- DECL_LINK(Download_Click,PushButton*);
-
- // not CopyCTOR, no self assignment
- OExtensionNotPresentDialog(const OExtensionNotPresentDialog&);
- void operator =(const OExtensionNotPresentDialog&);
-
- // get some values out of the configuration
- rtl::OUString getFromConfigurationExtension(rtl::OUString const& _sPropertyName) const;
- rtl::OUString getFromConfigurationExtension(rtl::OString const& _sPropertyName) const; // syntactic sugar
-
- ::com::sun::star::uno::Reference< ::com::sun::star::system::XSystemShellExecute > getShellExecuter() const;
-
-public:
- OExtensionNotPresentDialog( Window* pParent, com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > );
- virtual ~OExtensionNotPresentDialog();
- virtual short Execute();
-
- inline String getText() const { return m_aFT_TEXT.GetText(); }
-};
-// =============================================================================
-} // namespace rptui
-// =============================================================================
-#endif // DBU_EXTENSIONNOTPRESENT_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/FieldControls.hxx b/dbaccess/source/ui/inc/FieldControls.hxx
index 5ccb33bb70dc..661f66a96bda 100644
--- a/dbaccess/source/ui/inc/FieldControls.hxx
+++ b/dbaccess/source/ui/inc/FieldControls.hxx
@@ -39,7 +39,7 @@ namespace dbaui
{
namespace
{
- void lcl_setSpecialReadOnly( BOOL _bReadOnly, Window* _pWin )
+ void lcl_setSpecialReadOnly( sal_Bool _bReadOnly, Window* _pWin )
{
StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings();
const Color& rNewColor = _bReadOnly ? aSystemStyle.GetDialogColor() : aSystemStyle.GetFieldColor();
@@ -55,14 +55,14 @@ namespace dbaui
short m_nPos;
String m_strHelpText;
public:
- inline OPropColumnEditCtrl(Window* pParent, ::rtl::OUString& _rAllowedChars, USHORT nHelpId, short nPosition = -1, WinBits nWinStyle = 0);
+ inline OPropColumnEditCtrl(Window* pParent, ::rtl::OUString& _rAllowedChars, sal_uInt16 nHelpId, short nPosition = -1, WinBits nWinStyle = 0);
- inline BOOL IsModified() const { return GetText() != GetSavedValue(); }
+ inline sal_Bool IsModified() const { return GetText() != GetSavedValue(); }
short GetPos() const { return m_nPos; }
String GetHelp() const { return m_strHelpText; }
- virtual void SetSpecialReadOnly(BOOL _bReadOnly)
+ virtual void SetSpecialReadOnly(sal_Bool _bReadOnly)
{
SetReadOnly(_bReadOnly);
lcl_setSpecialReadOnly(_bReadOnly,this);
@@ -70,7 +70,7 @@ namespace dbaui
};
inline OPropColumnEditCtrl::OPropColumnEditCtrl(Window* pParent,
::rtl::OUString& _rAllowedChars,
- USHORT nHelpId,
+ sal_uInt16 nHelpId,
short nPosition,
WinBits nWinStyle)
:OSQLNameEdit(pParent, _rAllowedChars,nWinStyle)
@@ -86,28 +86,28 @@ namespace dbaui
String m_strHelpText;
public:
- inline OPropEditCtrl(Window* pParent, USHORT nHelpId, short nPosition = -1, WinBits nWinStyle = 0);
- inline OPropEditCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition = -1);
+ inline OPropEditCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition = -1, WinBits nWinStyle = 0);
+ inline OPropEditCtrl(Window* pParent, sal_uInt16 nHelpId, const ResId& _rRes,short nPosition = -1);
- inline BOOL IsModified() const { return GetText() != GetSavedValue(); }
+ inline sal_Bool IsModified() const { return GetText() != GetSavedValue(); }
short GetPos() const { return m_nPos; }
String GetHelp() const { return m_strHelpText; }
- virtual void SetSpecialReadOnly(BOOL _bReadOnly)
+ virtual void SetSpecialReadOnly(sal_Bool _bReadOnly)
{
SetReadOnly(_bReadOnly);
lcl_setSpecialReadOnly(_bReadOnly,this);
}
};
- inline OPropEditCtrl::OPropEditCtrl(Window* pParent, USHORT nHelpId, short nPosition, WinBits nWinStyle)
+ inline OPropEditCtrl::OPropEditCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition, WinBits nWinStyle)
:Edit(pParent, nWinStyle)
,m_nPos(nPosition)
{
m_strHelpText =String(ModuleRes(nHelpId));
}
- inline OPropEditCtrl::OPropEditCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition)
+ inline OPropEditCtrl::OPropEditCtrl(Window* pParent, sal_uInt16 nHelpId, const ResId& _rRes,short nPosition)
:Edit(pParent, _rRes)
,m_nPos(nPosition)
{
@@ -121,28 +121,28 @@ namespace dbaui
String m_strHelpText;
public:
- inline OPropNumericEditCtrl(Window* pParent, USHORT nHelpId, short nPosition = -1, WinBits nWinStyle = 0);
- inline OPropNumericEditCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition = -1);
+ inline OPropNumericEditCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition = -1, WinBits nWinStyle = 0);
+ inline OPropNumericEditCtrl(Window* pParent, sal_uInt16 nHelpId, const ResId& _rRes,short nPosition = -1);
- inline BOOL IsModified() const { return GetText() != GetSavedValue(); }
+ inline sal_Bool IsModified() const { return GetText() != GetSavedValue(); }
short GetPos() const { return m_nPos; }
String GetHelp() const { return m_strHelpText; }
- virtual void SetSpecialReadOnly(BOOL _bReadOnly)
+ virtual void SetSpecialReadOnly(sal_Bool _bReadOnly)
{
SetReadOnly(_bReadOnly);
lcl_setSpecialReadOnly(_bReadOnly,this);
}
};
- inline OPropNumericEditCtrl::OPropNumericEditCtrl(Window* pParent, USHORT nHelpId, short nPosition, WinBits nWinStyle)
+ inline OPropNumericEditCtrl::OPropNumericEditCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition, WinBits nWinStyle)
:NumericField(pParent, nWinStyle)
,m_nPos(nPosition)
{
m_strHelpText =String(ModuleRes(nHelpId));
}
- inline OPropNumericEditCtrl::OPropNumericEditCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition)
+ inline OPropNumericEditCtrl::OPropNumericEditCtrl(Window* pParent, sal_uInt16 nHelpId, const ResId& _rRes,short nPosition)
:NumericField(pParent, _rRes)
,m_nPos(nPosition)
{
@@ -156,28 +156,28 @@ namespace dbaui
String m_strHelpText;
public:
- inline OPropListBoxCtrl(Window* pParent, USHORT nHelpId, short nPosition = -1, WinBits nWinStyle = 0);
- inline OPropListBoxCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition = -1);
+ inline OPropListBoxCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition = -1, WinBits nWinStyle = 0);
+ inline OPropListBoxCtrl(Window* pParent, sal_uInt16 nHelpId, const ResId& _rRes,short nPosition = -1);
- inline BOOL IsModified() const { return GetSelectEntryPos() != GetSavedValue(); }
+ inline sal_Bool IsModified() const { return GetSelectEntryPos() != GetSavedValue(); }
short GetPos() const { return m_nPos; }
String GetHelp() const { return m_strHelpText; }
- virtual void SetSpecialReadOnly(BOOL _bReadOnly)
+ virtual void SetSpecialReadOnly(sal_Bool _bReadOnly)
{
SetReadOnly(_bReadOnly);
lcl_setSpecialReadOnly(_bReadOnly,this);
}
};
- inline OPropListBoxCtrl::OPropListBoxCtrl(Window* pParent, USHORT nHelpId, short nPosition, WinBits nWinStyle)
+ inline OPropListBoxCtrl::OPropListBoxCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition, WinBits nWinStyle)
:ListBox(pParent, nWinStyle)
,m_nPos(nPosition)
{
m_strHelpText =String(ModuleRes(nHelpId));
}
- inline OPropListBoxCtrl::OPropListBoxCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition)
+ inline OPropListBoxCtrl::OPropListBoxCtrl(Window* pParent, sal_uInt16 nHelpId, const ResId& _rRes,short nPosition)
:ListBox(pParent, _rRes)
,m_nPos(nPosition)
{
diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx
index 38c270610a5f..cd038229deab 100644
--- a/dbaccess/source/ui/inc/FieldDescControl.hxx
+++ b/dbaccess/source/ui/inc/FieldDescControl.hxx
@@ -115,7 +115,7 @@ namespace dbaui
ScrollBar* m_pHorzScroll;
TOTypeInfoSP m_pPreviousType;
- USHORT nCurChildId;
+ sal_uInt16 nCurChildId;
short m_nPos;
XubString aYes;
XubString aNo;
@@ -124,7 +124,7 @@ namespace dbaui
long m_nOldHThumb;
sal_Int32 m_nWidth;
- ULONG nDelayedGrabFocusEvent;
+ sal_uLong nDelayedGrabFocusEvent;
sal_Bool m_bAdded;
bool m_bRightAligned;
@@ -143,16 +143,16 @@ namespace dbaui
void UpdateFormatSample(OFieldDescription* pFieldDescr);
void ArrangeAggregates();
- void SetPosSize( Control** ppControl, long nRow, USHORT nCol );
+ void SetPosSize( Control** ppControl, long nRow, sal_uInt16 nCol );
void ScrollAggregate(Control* pText, Control* pInput, Control* pButton, long nDeltaX, long nDeltaY);
void ScrollAllAggregates();
sal_Bool isTextFormat(const OFieldDescription* _pFieldDescr,sal_uInt32& _nFormatKey) const;
void Contruct();
- OPropNumericEditCtrl* CreateNumericControl(USHORT _nHelpStr,short _nProperty,ULONG _nHelpId);
- FixedText* CreateText(USHORT _nTextRes);
- void InitializeControl(Control* _pControl,ULONG _nHelpId,bool _bAddChangeHandler);
+ OPropNumericEditCtrl* CreateNumericControl(sal_uInt16 _nHelpStr,short _nProperty,const rtl::OString& _sHelpId);
+ FixedText* CreateText(sal_uInt16 _nTextRes);
+ void InitializeControl(Control* _pControl,const rtl::OString& _sHelpId,bool _bAddChangeHandler);
protected:
inline void setRightAligned() { m_bRightAligned = true; }
@@ -167,15 +167,15 @@ namespace dbaui
virtual void ActivateAggregate( EControlType eType );
virtual void DeactivateAggregate( EControlType eType );
- virtual BOOL IsReadOnly() { return FALSE; };
+ virtual sal_Bool IsReadOnly() { return sal_False; };
// Sind von den abgeleiteten Klassen zu impl.
virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const = 0;
virtual ::com::sun::star::lang::Locale GetLocale() const = 0;
- virtual void CellModified(long nRow, USHORT nColId ) = 0;
- virtual void SetModified(BOOL bModified); // base implementation is empty
+ virtual void CellModified(long nRow, sal_uInt16 nColId ) = 0;
+ virtual void SetModified(sal_Bool bModified); // base implementation is empty
virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) = 0;
virtual const OTypeInfoMap* getTypeInfo() const = 0;
@@ -199,9 +199,9 @@ namespace dbaui
void SaveData( OFieldDescription* pFieldDescr );
// void SaveData( OColumn* pColumn);
- void SetControlText( USHORT nControlId, const String& rText );
- String GetControlText( USHORT nControlId );
- void SetReadOnly( BOOL bReadOnly );
+ void SetControlText( sal_uInt16 nControlId, const String& rText );
+ String GetControlText( sal_uInt16 nControlId );
+ void SetReadOnly( sal_Bool bReadOnly );
// Resize aufegrufen
void CheckScrollBars();
diff --git a/dbaccess/source/ui/inc/GeneralUndo.hxx b/dbaccess/source/ui/inc/GeneralUndo.hxx
index 29e4d09e5670..de99bd3706f3 100644
--- a/dbaccess/source/ui/inc/GeneralUndo.hxx
+++ b/dbaccess/source/ui/inc/GeneralUndo.hxx
@@ -46,7 +46,7 @@ namespace dbaui
public:
TYPEINFO();
- OCommentUndoAction(USHORT nCommentID) { m_strComment = String(ModuleRes(nCommentID)); }
+ OCommentUndoAction(sal_uInt16 nCommentID) { m_strComment = String(ModuleRes(nCommentID)); }
virtual UniString GetComment() const { return m_strComment; }
};
diff --git a/dbaccess/source/ui/inc/JoinController.hxx b/dbaccess/source/ui/inc/JoinController.hxx
index 5f7af2163220..cc35323db7fd 100644
--- a/dbaccess/source/ui/inc/JoinController.hxx
+++ b/dbaccess/source/ui/inc/JoinController.hxx
@@ -35,9 +35,7 @@
#include "JoinDesignView.hxx"
#include "TableConnectionData.hxx"
#include "TableWindowData.hxx"
-#ifndef _MEMORY_
#include <memory>
-#endif
#include <boost/shared_ptr.hpp>
namespace comphelper
diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx
index 72f5d054345e..48073242a301 100644
--- a/dbaccess/source/ui/inc/JoinTableView.hxx
+++ b/dbaccess/source/ui/inc/JoinTableView.hxx
@@ -103,7 +103,7 @@ namespace dbaui
OTableConnection* m_pSelectedConn;
- BOOL m_bTrackingInitiallyMoved;
+ sal_Bool m_bTrackingInitiallyMoved;
DECL_LINK(OnDragScrollTimer, void*);
@@ -137,7 +137,7 @@ namespace dbaui
void NotifyTitleClicked( OTableWindow* pTabWin, const Point rMousePos );
- virtual void AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, BOOL bNewTable = FALSE);
+ virtual void AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, sal_Bool bNewTable = sal_False);
virtual void RemoveTabWin( OTableWindow* pTabWin );
// alle TabWins verstecken (NICHT loeschen, sie werden in eine Undo-Action gepackt)
@@ -165,8 +165,8 @@ namespace dbaui
*/
void addConnection(OTableConnection* _pConnection,sal_Bool _bAddData = sal_True);
- BOOL ScrollPane( long nDelta, BOOL bHoriz, BOOL bPaintScrollBars );
- ULONG GetTabWinCount();
+ sal_Bool ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPaintScrollBars );
+ sal_uLong GetTabWinCount();
Point GetScrollOffset() const { return m_aScrollOffset; }
OJoinDesignView* getDesignView() const { return m_pView; }
@@ -184,7 +184,7 @@ namespace dbaui
const ::std::vector<OTableConnection*>* getTableConnections() const { return &m_vTableConnection; }
- BOOL ExistsAConn(const OTableWindow* pFromWin) const;
+ sal_Bool ExistsAConn(const OTableWindow* pFromWin) const;
/** getTableConnections searchs for all connections of a table
@param _pFromWin the table for which connections should be found
@@ -216,7 +216,7 @@ namespace dbaui
virtual void ClearAll();
// wird vom AddTabDlg benutzt, um festzustellen, ob noch Tabellen hinzugefuegt werden duerfen
- virtual BOOL IsAddAllowed();
+ virtual sal_Bool IsAddAllowed();
virtual long PreNotify(NotifyEvent& rNEvt);
// DnD stuff
@@ -250,7 +250,7 @@ namespace dbaui
<TRUE/> if the area is visible otherwise <FALSE/>
*/
- BOOL isMovementAllowed(const Point& _rPoint,const Size& _rSize);
+ sal_Bool isMovementAllowed(const Point& _rPoint,const Size& _rSize);
Size getRealOutputSize() const { return m_aOutputSize; }
@@ -303,7 +303,7 @@ namespace dbaui
private:
void InitColors();
- BOOL ScrollWhileDragging();
+ sal_Bool ScrollWhileDragging();
/** executePopup opens the context menu to delate a connection
@param _aPos the position where the popup menu should appear
diff --git a/dbaccess/source/ui/inc/QueryTableView.hxx b/dbaccess/source/ui/inc/QueryTableView.hxx
index 5bd45e30ccb9..8089b1a2744b 100644
--- a/dbaccess/source/ui/inc/QueryTableView.hxx
+++ b/dbaccess/source/ui/inc/QueryTableView.hxx
@@ -72,14 +72,14 @@ namespace dbaui
// Basisklasse ueberschrieben : Fenster kreieren und loeschen
// (eigentlich nicht wirklich LOESCHEN, es geht in die Verantwortung einer UNDO-Action ueber)
- virtual void AddTabWin( const ::rtl::OUString& _rTableName, const ::rtl::OUString& _rAliasName, BOOL bNewTable = FALSE );
+ virtual void AddTabWin( const ::rtl::OUString& _rTableName, const ::rtl::OUString& _rAliasName, sal_Bool bNewTable = sal_False );
virtual void RemoveTabWin(OTableWindow* pTabWin);
// und ein AddTabWin, das einen Alias vorgibt
- void AddTabWin(const ::rtl::OUString& strDatabase, const ::rtl::OUString& strTableName, const ::rtl::OUString& strAlias, BOOL bNewTable = FALSE);
+ void AddTabWin(const ::rtl::OUString& strDatabase, const ::rtl::OUString& strTableName, const ::rtl::OUString& strAlias, sal_Bool bNewTable = sal_False);
// TabWin suchen
OQueryTableWindow* FindTable(const String& rAliasName);
- BOOL FindTableFromField(const String& rFieldName, OTableFieldDescRef& rInfo, USHORT& rCnt);
+ sal_Bool FindTableFromField(const String& rFieldName, OTableFieldDescRef& rInfo, sal_uInt16& rCnt);
// Basisklasse ueberschrieben : Connections kreieren und loeschen
virtual void AddConnection(const OJoinExchangeData& jxdSource, const OJoinExchangeData& jxdDest);
@@ -96,7 +96,7 @@ namespace dbaui
// natuerlich alle Connections an diesen Fenstern und alle Abfrage-Spalten, die auf diesen Tabellen basierten.
// TabWin anzeigen oder verstecken (NICHT kreieren oder loeschen)
- BOOL ShowTabWin(OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction,sal_Bool _bAppend);
+ sal_Bool ShowTabWin(OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction,sal_Bool _bAppend);
void HideTabWin(OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction);
// Sichbarkeit eines TabWins sicherstellen (+ Invalidieren der Connections)
@@ -114,15 +114,15 @@ namespace dbaui
virtual void ClearAll();
// wird vom AddTabDlg benutzt, um festzustellen, ob noch Tabellen hinzugefuegt werden duerfen
- //virtual BOOL IsAddAllowed();
+ //virtual sal_Bool IsAddAllowed();
// eine neu Connection bekanntgeben und einfuegen lassen, wenn nicht schon existent
- void NotifyTabConnection(const OQueryTableConnection& rNewConn, BOOL _bCreateUndoAction = TRUE);
+ void NotifyTabConnection(const OQueryTableConnection& rNewConn, sal_Bool _bCreateUndoAction = sal_True);
Link SetTabWinsChangeHandler(const Link& lnk) { Link lnkRet = m_lnkTabWinsChangeHandler; m_lnkTabWinsChangeHandler = lnk; return lnkRet; }
// der Handler bekommt einen Zeiger auf eine TabWinsChangeNotification-Struktur
- BOOL ExistsAVisitedConn(const OQueryTableWindow* pFrom) const;
+ sal_Bool ExistsAVisitedConn(const OQueryTableWindow* pFrom) const;
virtual OTableWindowData* CreateImpl(const ::rtl::OUString& _rComposedName
,const ::rtl::OUString& _sTableName
diff --git a/dbaccess/source/ui/inc/RTableConnectionData.hxx b/dbaccess/source/ui/inc/RTableConnectionData.hxx
index 184e0e97cbdb..096f97ba4675 100644
--- a/dbaccess/source/ui/inc/RTableConnectionData.hxx
+++ b/dbaccess/source/ui/inc/RTableConnectionData.hxx
@@ -35,10 +35,10 @@
namespace dbaui
{
- const UINT16 CARDINAL_UNDEFINED = 0x0000;
- const UINT16 CARDINAL_ONE_MANY = 0x0001;
- const UINT16 CARDINAL_MANY_ONE = 0x0002;
- const UINT16 CARDINAL_ONE_ONE = 0x0004;
+ const sal_uInt16 CARDINAL_UNDEFINED = 0x0000;
+ const sal_uInt16 CARDINAL_ONE_MANY = 0x0001;
+ const sal_uInt16 CARDINAL_MANY_ONE = 0x0002;
+ const sal_uInt16 CARDINAL_ONE_ONE = 0x0004;
class OConnectionLineData;
//==================================================================
@@ -54,9 +54,9 @@ namespace dbaui
sal_Int32 m_nDeleteRules;
sal_Int32 m_nCardinality;
- BOOL checkPrimaryKey(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& i_xTable,EConnectionSide _eEConnectionSide) const;
- BOOL IsSourcePrimKey() const { return checkPrimaryKey(getReferencingTable()->getTable(),JTCS_FROM); }
- BOOL IsDestPrimKey() const { return checkPrimaryKey(getReferencedTable()->getTable(),JTCS_TO); }
+ sal_Bool checkPrimaryKey(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& i_xTable,EConnectionSide _eEConnectionSide) const;
+ sal_Bool IsSourcePrimKey() const { return checkPrimaryKey(getReferencingTable()->getTable(),JTCS_FROM); }
+ sal_Bool IsDestPrimKey() const { return checkPrimaryKey(getReferencedTable()->getTable(),JTCS_TO); }
protected:
virtual OConnectionLineDataRef CreateLineDataObj();
@@ -78,7 +78,7 @@ namespace dbaui
@return true if successful
*/
- virtual BOOL Update();
+ virtual sal_Bool Update();
void SetCardinality();
@@ -89,9 +89,9 @@ namespace dbaui
inline sal_Int32 GetDeleteRules() const { return m_nDeleteRules; }
inline sal_Int32 GetCardinality() const { return m_nCardinality; }
- BOOL IsConnectionPossible();
+ sal_Bool IsConnectionPossible();
void ChangeOrientation();
- BOOL DropRelation();
+ sal_Bool DropRelation();
};
}
diff --git a/dbaccess/source/ui/inc/RelationControl.hxx b/dbaccess/source/ui/inc/RelationControl.hxx
index 55983b1dff6e..62b812f4f98f 100644
--- a/dbaccess/source/ui/inc/RelationControl.hxx
+++ b/dbaccess/source/ui/inc/RelationControl.hxx
@@ -74,7 +74,7 @@ namespace dbaui
/** enables the relation control
*
- * \param _bEnable when TRUE enables it, otherwise disable it.
+ * \param _bEnable when sal_True enables it, otherwise disable it.
*/
void enableRelation(bool _bEnable);
@@ -90,7 +90,7 @@ namespace dbaui
void lateUIInit(Window* _pTableSeparator = NULL);
void lateInit();
- BOOL SaveModified();
+ sal_Bool SaveModified();
TTableWindowData::value_type getReferencingTable() const;
diff --git a/dbaccess/source/ui/inc/RelationController.hxx b/dbaccess/source/ui/inc/RelationController.hxx
index 3b0e375f8537..38253627fcc5 100644
--- a/dbaccess/source/ui/inc/RelationController.hxx
+++ b/dbaccess/source/ui/inc/RelationController.hxx
@@ -44,7 +44,7 @@ namespace dbaui
{
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xTables;
::std::auto_ptr<WaitObject> m_pWaitObject;
- ULONG m_nThreadEvent;
+ sal_uLong m_nThreadEvent;
sal_Bool m_bRelationsPossible;
protected:
// all the features which should be handled by this class
diff --git a/dbaccess/source/ui/inc/RelationDlg.hxx b/dbaccess/source/ui/inc/RelationDlg.hxx
index bbd66b2ba7b8..7320a8d14908 100644
--- a/dbaccess/source/ui/inc/RelationDlg.hxx
+++ b/dbaccess/source/ui/inc/RelationDlg.hxx
@@ -71,12 +71,12 @@ namespace dbaui
TTableConnectionData::value_type m_pOrigConnData;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
- BOOL m_bTriedOneUpdate;
+ sal_Bool m_bTriedOneUpdate;
public:
ORelationDialog(OJoinTableView* pParent,
const TTableConnectionData::value_type& pConnectionData,
- BOOL bAllowTableSelect = FALSE );
+ sal_Bool bAllowTableSelect = sal_False );
virtual ~ORelationDialog();
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection(){ return m_xConnection; }
diff --git a/dbaccess/source/ui/inc/RelationTableView.hxx b/dbaccess/source/ui/inc/RelationTableView.hxx
index b7213e440754..d708cbac1424 100644
--- a/dbaccess/source/ui/inc/RelationTableView.hxx
+++ b/dbaccess/source/ui/inc/RelationTableView.hxx
@@ -47,7 +47,7 @@ namespace dbaui
bool m_bInRemove;
virtual void ConnDoubleClicked( OTableConnection* pConnection );
- virtual void AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, BOOL bNewTable = FALSE);
+ virtual void AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, sal_Bool bNewTable = sal_False);
virtual OTableWindow* createWindow(const TTableWindowData::value_type& _pData);
@@ -73,7 +73,7 @@ namespace dbaui
void AddNewRelation();
// reisst den Dialog fuer eine voellig neue Relation hoch
// wird vom AddTabDlg benutzt, um festzustellen, ob noch Tabellen hinzugefuegt werden duerfen
- virtual BOOL IsAddAllowed();
+ virtual sal_Bool IsAddAllowed();
virtual void lookForUiActivities();
};
diff --git a/dbaccess/source/ui/inc/TableConnection.hxx b/dbaccess/source/ui/inc/TableConnection.hxx
index 5eb3429ce931..8d4629c36425 100644
--- a/dbaccess/source/ui/inc/TableConnection.hxx
+++ b/dbaccess/source/ui/inc/TableConnection.hxx
@@ -53,7 +53,7 @@ namespace dbaui
m_pData;
OJoinTableView* m_pParent;
- BOOL m_bSelected;
+ sal_Bool m_bSelected;
void Init();
/** clearLineData loops through the vector and deletes all lines
@@ -77,8 +77,8 @@ namespace dbaui
void Select();
void Deselect();
- BOOL IsSelected() const { return m_bSelected; }
- BOOL CheckHit( const Point& rMousePos ) const;
+ sal_Bool IsSelected() const { return m_bSelected; }
+ sal_Bool CheckHit( const Point& rMousePos ) const;
bool InvalidateConnection();
void UpdateLineList();
diff --git a/dbaccess/source/ui/inc/TableConnectionData.hxx b/dbaccess/source/ui/inc/TableConnectionData.hxx
index ec85e99dc825..79ccd802d564 100644
--- a/dbaccess/source/ui/inc/TableConnectionData.hxx
+++ b/dbaccess/source/ui/inc/TableConnectionData.hxx
@@ -78,14 +78,14 @@ namespace dbaui
virtual OTableConnectionData* NewInstance() const;
// (von OTableConnectionData abgeleitete Klasse muessen entsprechend eine Instanz ihrer Klasse liefern)
- BOOL SetConnLine( USHORT nIndex, const String& rSourceFieldName, const String& rDestFieldName );
- BOOL AppendConnLine( const ::rtl::OUString& rSourceFieldName, const ::rtl::OUString& rDestFieldName );
- void ResetConnLines( BOOL bUseDefaults = TRUE );
+ sal_Bool SetConnLine( sal_uInt16 nIndex, const String& rSourceFieldName, const String& rDestFieldName );
+ sal_Bool AppendConnLine( const ::rtl::OUString& rSourceFieldName, const ::rtl::OUString& rDestFieldName );
+ void ResetConnLines( sal_Bool bUseDefaults = sal_True );
/** normalizeLines moves the empty lines to the back
*/
void normalizeLines();
- // loescht die Liste der ConnLines, bei bUseDefaults == TRUE werden danach MAX_CONN_COUNT neue Dummy-Linien eingefuegt
+ // loescht die Liste der ConnLines, bei bUseDefaults == sal_True werden danach MAX_CONN_COUNT neue Dummy-Linien eingefuegt
OConnectionLineDataVec* GetConnLineDataList(){ return &m_vConnLineData; }
@@ -102,7 +102,7 @@ namespace dbaui
@return true if successful
*/
- virtual BOOL Update(){ return TRUE; }
+ virtual sal_Bool Update(){ return sal_True; }
};
typedef ::std::vector< ::boost::shared_ptr<OTableConnectionData> > TTableConnectionData;
diff --git a/dbaccess/source/ui/inc/TableController.hxx b/dbaccess/source/ui/inc/TableController.hxx
index 5b61c5ada9eb..5747cd20ac10 100644
--- a/dbaccess/source/ui/inc/TableController.hxx
+++ b/dbaccess/source/ui/inc/TableController.hxx
@@ -110,9 +110,6 @@ namespace dbaui
virtual void impl_onModifyChanged();
- // const ::connectivity::OSQLParseNode* getParseTree() const { return m_aSqlIterator.getParseTree();}
- // need for undo's and redo's
- SfxUndoManager* getUndoMgr();
inline ::std::vector< ::boost::shared_ptr<OTableRow> >* getRows() { return &m_vRowList; }
/// returns the postion of the the first empty row
diff --git a/dbaccess/source/ui/inc/TableDesignControl.hxx b/dbaccess/source/ui/inc/TableDesignControl.hxx
index 9acd1fbf02eb..0e905a459cc2 100644
--- a/dbaccess/source/ui/inc/TableDesignControl.hxx
+++ b/dbaccess/source/ui/inc/TableDesignControl.hxx
@@ -49,25 +49,25 @@ namespace dbaui
long m_nDataPos; // derzeit benoetigte Zeile
long m_nCurrentPos; // Aktuelle Position der ausgewaehlten Column
private:
- USHORT m_nCurUndoActId;
+ sal_uInt16 m_nCurUndoActId;
protected:
- BOOL m_bCurrentModified;
- BOOL m_bUpdatable;
- BOOL m_bClipboardFilled;
+ sal_Bool m_bCurrentModified;
+ sal_Bool m_bUpdatable;
+ sal_Bool m_bClipboardFilled;
public:
OTableRowView(Window* pParent);
virtual ~OTableRowView();
- virtual void SetCellData( long nRow, USHORT nColId, const TOTypeInfoSP& _pTypeInfo ) = 0;
- virtual void SetCellData( long nRow, USHORT nColId, const ::com::sun::star::uno::Any& _rNewData ) = 0;
- virtual ::com::sun::star::uno::Any GetCellData( long nRow, USHORT nColId ) = 0;
- virtual void SetControlText( long nRow, USHORT nColId, const String& rText ) = 0;
- virtual String GetControlText( long nRow, USHORT nColId ) = 0;
+ virtual void SetCellData( long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) = 0;
+ virtual void SetCellData( long nRow, sal_uInt16 nColId, const ::com::sun::star::uno::Any& _rNewData ) = 0;
+ virtual ::com::sun::star::uno::Any GetCellData( long nRow, sal_uInt16 nColId ) = 0;
+ virtual void SetControlText( long nRow, sal_uInt16 nColId, const String& rText ) = 0;
+ virtual String GetControlText( long nRow, sal_uInt16 nColId ) = 0;
virtual OTableDesignView* GetView() const = 0;
- USHORT GetCurUndoActId(){ return m_nCurUndoActId; }
+ sal_uInt16 GetCurUndoActId(){ return m_nCurUndoActId; }
// IClipboardTest
virtual void cut();
@@ -86,8 +86,8 @@ namespace dbaui
virtual sal_Bool IsInsertNewAllowed( long nRow ) = 0;
virtual sal_Bool IsDeleteAllowed( long nRow ) = 0;
- virtual BOOL IsUpdatable() const {return m_bUpdatable;}
- virtual void SetUpdatable( BOOL bUpdate=TRUE );
+ virtual sal_Bool IsUpdatable() const {return m_bUpdatable;}
+ virtual void SetUpdatable( sal_Bool bUpdate=sal_True );
virtual RowStatus GetRowStatus(long nRow) const;
virtual void KeyInput(const KeyEvent& rEvt);
diff --git a/dbaccess/source/ui/inc/TableDesignHelpBar.hxx b/dbaccess/source/ui/inc/TableDesignHelpBar.hxx
index 71ce5f029b96..a3bef0769a8c 100644
--- a/dbaccess/source/ui/inc/TableDesignHelpBar.hxx
+++ b/dbaccess/source/ui/inc/TableDesignHelpBar.hxx
@@ -45,7 +45,7 @@ namespace dbaui
private:
String m_sHelpText;
MultiLineEdit* m_pTextWin;
- USHORT m_nDummy;
+ sal_uInt16 m_nDummy;
protected:
virtual void Resize();
diff --git a/dbaccess/source/ui/inc/TableDesignView.hxx b/dbaccess/source/ui/inc/TableDesignView.hxx
index b7bc8356ed76..9f4a96b6844d 100644
--- a/dbaccess/source/ui/inc/TableDesignView.hxx
+++ b/dbaccess/source/ui/inc/TableDesignView.hxx
@@ -46,7 +46,7 @@ namespace dbaui
OTableFieldDescWin* m_pFieldDescWin;
OTableEditorCtrl* m_pEditorCtrl;
- void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
void ArrangeChilds( long nSplitPos ,Rectangle& rRect);
DECL_LINK( SplitHdl, Splitter* );
protected:
diff --git a/dbaccess/source/ui/inc/TableGrantCtrl.hxx b/dbaccess/source/ui/inc/TableGrantCtrl.hxx
index bc4679434a0f..a0010fdbc82d 100644
--- a/dbaccess/source/ui/inc/TableGrantCtrl.hxx
+++ b/dbaccess/source/ui/inc/TableGrantCtrl.hxx
@@ -62,8 +62,8 @@ class OTableGrantControl : public ::svt::EditBrowseBox
::svt::CheckBoxControl* m_pCheckCell;
Edit* m_pEdit;
long m_nDataPos;
- BOOL m_bEnable;
- ULONG m_nDeactivateEvent;
+ sal_Bool m_bEnable;
+ sal_uLong m_nDeactivateEvent;
public:
OTableGrantControl( Window* pParent,const ResId& _RsId);
@@ -91,13 +91,13 @@ protected:
virtual long PreNotify(NotifyEvent& rNEvt );
- virtual BOOL IsTabAllowed(BOOL bForward) const;
- virtual void InitController( ::svt::CellControllerRef& rController, long nRow, USHORT nCol );
- virtual ::svt::CellController* GetController( long nRow, USHORT nCol );
- virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColId ) const;
- virtual BOOL SeekRow( long nRow );
- virtual BOOL SaveModified();
- virtual String GetCellText( long nRow, USHORT nColId ) const;
+ virtual sal_Bool IsTabAllowed(sal_Bool bForward) const;
+ virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol );
+ virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol );
+ virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const;
+ virtual sal_Bool SeekRow( long nRow );
+ virtual sal_Bool SaveModified();
+ virtual String GetCellText( long nRow, sal_uInt16 nColId ) const;
virtual void CellModified();
@@ -105,7 +105,7 @@ private:
DECL_LINK( AsynchActivate, void* );
DECL_LINK( AsynchDeactivate, void* );
- sal_Bool isAllowed(USHORT _nColumnId,sal_Int32 _nPrivilege) const;
+ sal_Bool isAllowed(sal_uInt16 _nColumnId,sal_Int32 _nPrivilege) const;
void fillPrivilege(sal_Int32 _nRow) const;
TTablePrivilegeMap::const_iterator findPrivilege(sal_Int32 _nRow) const;
};
diff --git a/dbaccess/source/ui/inc/TableRow.hxx b/dbaccess/source/ui/inc/TableRow.hxx
index 9f29ea2b1684..9e02a0df0662 100644
--- a/dbaccess/source/ui/inc/TableRow.hxx
+++ b/dbaccess/source/ui/inc/TableRow.hxx
@@ -59,8 +59,8 @@ namespace dbaui
void SetFieldType( const TOTypeInfoSP& _pType, sal_Bool _bForce = sal_False );
- void SetPrimaryKey( BOOL bSet );
- BOOL IsPrimaryKey() const;
+ void SetPrimaryKey( sal_Bool bSet );
+ sal_Bool IsPrimaryKey() const;
/** returns the current position in the table.
@return
diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx
index 323656ca869d..382a278dee2c 100644
--- a/dbaccess/source/ui/inc/TableWindow.hxx
+++ b/dbaccess/source/ui/inc/TableWindow.hxx
@@ -45,11 +45,11 @@ namespace dbaui
{
//////////////////////////////////////////////////////////////////////////
// Flags fuer die Groessenanpassung der SbaJoinTabWins
- const UINT16 SIZING_NONE = 0x0000;
- const UINT16 SIZING_TOP = 0x0001;
- const UINT16 SIZING_BOTTOM = 0x0002;
- const UINT16 SIZING_LEFT = 0x0004;
- const UINT16 SIZING_RIGHT = 0x0008;
+ const sal_uInt16 SIZING_NONE = 0x0000;
+ const sal_uInt16 SIZING_TOP = 0x0001;
+ const sal_uInt16 SIZING_BOTTOM = 0x0002;
+ const sal_uInt16 SIZING_LEFT = 0x0004;
+ const sal_uInt16 SIZING_RIGHT = 0x0008;
class OTableWindowListBox;
class OJoinDesignView;
@@ -76,8 +76,8 @@ namespace dbaui
m_pContainerListener;
sal_Int32 m_nMoveCount; // how often the arrow keys was pressed
sal_Int32 m_nMoveIncrement; // how many pixel we should move
- UINT16 m_nSizingFlags;
- BOOL m_bActive;
+ sal_uInt16 m_nSizingFlags;
+ sal_Bool m_bActive;
void Draw3DBorder( const Rectangle& rRect );
// OContainerListener
@@ -94,7 +94,7 @@ namespace dbaui
virtual OTableWindowListBox* CreateListBox();
// wird im ERSTEN Init aufgerufen
- BOOL FillListBox();
+ sal_Bool FillListBox();
// wird in JEDEM Init aufgerufen
virtual void OnEntryDoubleClicked(SvLBoxEntry* /*pEntry*/) { }
@@ -106,7 +106,7 @@ namespace dbaui
@return
<TRUE/> when the table could handle the keyevent.
*/
- BOOL HandleKeyInput( const KeyEvent& rEvt );
+ sal_Bool HandleKeyInput( const KeyEvent& rEvt );
/** delete the user data with the equal type as created within createUserData
@param _pUserData
@@ -137,7 +137,7 @@ namespace dbaui
virtual ~OTableWindow();
// spaeter Constructor, siehe auch CreateListbox und FillListbox
- virtual BOOL Init();
+ virtual sal_Bool Init();
OJoinTableView* getTableView();
const OJoinTableView* getTableView() const;
@@ -147,11 +147,11 @@ namespace dbaui
void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize );
String getTitle() const;
- void SetBoldTitle( BOOL bBold );
+ void SetBoldTitle( sal_Bool bBold );
void setActive(sal_Bool _bActive = sal_True);
void Remove();
- BOOL IsActiveWindow(){ return m_bActive; }
+ sal_Bool IsActiveWindow(){ return m_bActive; }
::rtl::OUString GetTableName() const { return m_pData->GetTableName(); }
::rtl::OUString GetWinName() const { return m_pData->GetWinName(); }
@@ -169,7 +169,7 @@ namespace dbaui
inline ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > GetOriginalColumns() const { return m_pData->getColumns(); }
inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > GetTable() const { return m_pData->getTable(); }
- UINT16 GetSizingFlags() const { return m_nSizingFlags; }
+ sal_uInt16 GetSizingFlags() const { return m_nSizingFlags; }
/** set the sizing flag to the direction
@param _rPos
The EndPosition after resizing.
@@ -193,7 +193,7 @@ namespace dbaui
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
// habe ich Connections nach aussen ?
- BOOL ExistsAConn() const;
+ sal_Bool ExistsAConn() const;
void EnumValidFields(::std::vector< ::rtl::OUString>& arrstrFields);
diff --git a/dbaccess/source/ui/inc/TableWindowData.hxx b/dbaccess/source/ui/inc/TableWindowData.hxx
index aa44a8d6d5f5..9a3bd21f1664 100644
--- a/dbaccess/source/ui/inc/TableWindowData.hxx
+++ b/dbaccess/source/ui/inc/TableWindowData.hxx
@@ -80,16 +80,16 @@ namespace dbaui
inline ::rtl::OUString GetWinName() const { return m_aWinName; }
inline Point GetPosition() const { return m_aPosition; }
inline Size GetSize() const { return m_aSize; }
- inline BOOL IsShowAll() const { return m_bShowAll; }
+ inline sal_Bool IsShowAll() const { return m_bShowAll; }
inline bool isQuery() const { return m_bIsQuery; }
inline bool isValid() const { return m_bIsValid; } // it is either a table or query but it is known
- BOOL HasPosition() const;
- BOOL HasSize() const;
+ sal_Bool HasPosition() const;
+ sal_Bool HasSize() const;
inline void SetWinName( const ::rtl::OUString& rWinName ) { m_aWinName = rWinName; }
inline void SetPosition( const Point& rPos ) { m_aPosition=rPos; }
inline void SetSize( const Size& rSize ) { m_aSize = rSize; }
- inline void ShowAll( BOOL bAll ) { m_bShowAll = bAll; }
+ inline void ShowAll( sal_Bool bAll ) { m_bShowAll = bAll; }
inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> getTable() const { ::osl::MutexGuard aGuard( m_aMutex ); return m_xTable; }
inline ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> getKeys() const { ::osl::MutexGuard aGuard( m_aMutex ); return m_xKeys; }
diff --git a/dbaccess/source/ui/inc/TableWindowListBox.hxx b/dbaccess/source/ui/inc/TableWindowListBox.hxx
index a3de07dac935..bf8fab0ac395 100644
--- a/dbaccess/source/ui/inc/TableWindowListBox.hxx
+++ b/dbaccess/source/ui/inc/TableWindowListBox.hxx
@@ -66,12 +66,12 @@ namespace dbaui
Point m_aMousePos;
OTableWindow* m_pTabWin;
- ULONG m_nDropEvent;
- ULONG m_nUiEvent;
+ sal_uLong m_nDropEvent;
+ sal_uLong m_nUiEvent;
OJoinDropData m_aDropInfo;
- BOOL m_bReallyScrolled : 1;
- BOOL m_bDragSource : 1;
+ sal_Bool m_bReallyScrolled : 1;
+ sal_Bool m_bDragSource : 1;
protected:
virtual void LoseFocus();
diff --git a/dbaccess/source/ui/inc/TokenWriter.hxx b/dbaccess/source/ui/inc/TokenWriter.hxx
index 637d6430d36e..e3b2ffcb3efb 100644
--- a/dbaccess/source/ui/inc/TokenWriter.hxx
+++ b/dbaccess/source/ui/inc/TokenWriter.hxx
@@ -124,8 +124,8 @@ namespace dbaui
//for set the tablename
void setSTableName(const ::rtl::OUString &_sTableName){ m_sDefaultTableName = _sTableName; }
- virtual BOOL Write(); // Export
- virtual BOOL Read(); // Import
+ virtual sal_Bool Write(); // Export
+ virtual sal_Bool Read(); // Import
void initialize(const ::svx::ODataAccessDescriptor& _aDataDescriptor);
void dispose();
@@ -161,8 +161,8 @@ namespace dbaui
: ODatabaseImportExport(_rxConnection,_rxNumberF,_rM)
{}
- virtual BOOL Write();
- virtual BOOL Read();
+ virtual sal_Bool Write();
+ virtual sal_Bool Read();
};
// =========================================================================
// HTML Im- und Export
@@ -180,7 +180,7 @@ namespace dbaui
char sIndent[nIndentMax+1];
sal_Int16 m_nIndent;
#if OSL_DEBUG_LEVEL > 0
- BOOL m_bCheckFont;
+ sal_Bool m_bCheckFont;
#endif
void WriteHeader();
@@ -205,8 +205,8 @@ namespace dbaui
: ODatabaseImportExport(_rxConnection,_rxNumberF,_rM)
{}
- virtual BOOL Write();
- virtual BOOL Read();
+ virtual sal_Bool Write();
+ virtual sal_Bool Read();
};
// =========================================================================
@@ -242,8 +242,8 @@ namespace dbaui
: ODatabaseImportExport(_rxConnection,NULL,_rM)
{}
- virtual BOOL Write();
- virtual BOOL Read();
+ virtual sal_Bool Write();
+ virtual sal_Bool Read();
private:
using ODatabaseImportExport::initialize;
diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx
index 6da9a71b2726..c4c8ccb96d74 100644
--- a/dbaccess/source/ui/inc/UITools.hxx
+++ b/dbaccess/source/ui/inc/UITools.hxx
@@ -292,7 +292,7 @@ namespace dbaui
@param _xDatasource
Asked for the properties.
@param _rAutoIncrementValueEnabled
- <OUT/> Set to TRUE when the property was set in the datasource.
+ <OUT/> Set to sal_True when the property was set in the datasource.
@param _rsAutoIncrementValue
<OUT/> Set to the value when the property was set in the datasource.
*/
@@ -304,7 +304,7 @@ namespace dbaui
@param _xConnection
Used to get the datasource as parent from the connection.
@param _rAutoIncrementValueEnabled
- <OUT/> Set to TRUE when the property was set in the datasource.
+ <OUT/> Set to sal_True when the property was set in the datasource.
@param _rsAutoIncrementValue
<OUT/> Set to the value when the property was set in the datasource.
*/
@@ -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
@@ -363,7 +363,7 @@ namespace dbaui
@return
RET_YES, RET_NO, RET_ALL
*/
- sal_Int32 askForUserAction(Window* _pParent,USHORT _nTitle,USHORT _nText,sal_Bool _bAll,const ::rtl::OUString& _sName);
+ sal_Int32 askForUserAction(Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _nText,sal_Bool _bAll,const ::rtl::OUString& _sName);
/** creates a new view from a query or table
@param _sName
diff --git a/dbaccess/source/ui/inc/UserAdminDlg.hxx b/dbaccess/source/ui/inc/UserAdminDlg.hxx
index 3b510f9a8926..6315528cda88 100644
--- a/dbaccess/source/ui/inc/UserAdminDlg.hxx
+++ b/dbaccess/source/ui/inc/UserAdminDlg.hxx
@@ -59,7 +59,7 @@ namespace dbaui
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
sal_Bool m_bOwnConnection;
protected:
- virtual void PageCreated(USHORT _nId, SfxTabPage& _rPage);
+ virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage);
public:
OUserAdminDlg( Window* _pParent
,SfxItemSet* _pItems
diff --git a/dbaccess/source/ui/inc/VertSplitView.hxx b/dbaccess/source/ui/inc/VertSplitView.hxx
index 32f35779288e..b9d52b36fabd 100644
--- a/dbaccess/source/ui/inc/VertSplitView.hxx
+++ b/dbaccess/source/ui/inc/VertSplitView.hxx
@@ -40,7 +40,7 @@ namespace dbaui
Window* m_pRight;
sal_Bool m_bVertical;
- void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
DECL_LINK( SplitHdl, Splitter* );
protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt);
diff --git a/dbaccess/source/ui/inc/WCPage.hxx b/dbaccess/source/ui/inc/WCPage.hxx
index d0f1eed2a761..f754e5d9429d 100644
--- a/dbaccess/source/ui/inc/WCPage.hxx
+++ b/dbaccess/source/ui/inc/WCPage.hxx
@@ -61,8 +61,8 @@ namespace dbaui
OWizColumnSelect* m_pPage2;
OWizNormalExtend* m_pPage3;
- BOOL m_bPKeyAllowed;
- BOOL m_bUseHeaderAllowed;
+ sal_Bool m_bPKeyAllowed;
+ sal_Bool m_bUseHeaderAllowed;
DECL_LINK( AppendDataClickHdl, Button* );
@@ -75,17 +75,17 @@ namespace dbaui
public:
virtual void Reset();
virtual void ActivatePage();
- virtual BOOL LeavePage();
+ virtual sal_Bool LeavePage();
virtual String GetTitle() const ;
OCopyTable( Window * pParent );
virtual ~OCopyTable();
- inline BOOL IsOptionDefData() const { return m_aRB_DefData.IsChecked(); }
- inline BOOL IsOptionDef() const { return m_aRB_Def.IsChecked(); }
- inline BOOL IsOptionAppendData() const { return m_aRB_AppendData.IsChecked(); }
- inline BOOL IsOptionView() const { return m_aRB_View.IsChecked(); }
- inline BOOL UseHeaderLine() const { return m_aCB_UseHeaderLine.IsChecked(); }
+ inline sal_Bool IsOptionDefData() const { return m_aRB_DefData.IsChecked(); }
+ inline sal_Bool IsOptionDef() const { return m_aRB_Def.IsChecked(); }
+ inline sal_Bool IsOptionAppendData() const { return m_aRB_AppendData.IsChecked(); }
+ inline sal_Bool IsOptionView() const { return m_aRB_View.IsChecked(); }
+ inline sal_Bool UseHeaderLine() const { return m_aCB_UseHeaderLine.IsChecked(); }
String GetKeyName() const { return m_edKeyName.GetText(); }
void setCreateStyleAction();
@@ -95,7 +95,7 @@ namespace dbaui
}
inline void disallowUseHeaderLine()
{
- m_bUseHeaderAllowed = FALSE;
+ m_bUseHeaderAllowed = sal_False;
m_aCB_UseHeaderLine.Disable();
}
diff --git a/dbaccess/source/ui/inc/WColumnSelect.hxx b/dbaccess/source/ui/inc/WColumnSelect.hxx
index 8c0f16228bd2..a0819255f615 100644
--- a/dbaccess/source/ui/inc/WColumnSelect.hxx
+++ b/dbaccess/source/ui/inc/WColumnSelect.hxx
@@ -83,7 +83,7 @@ namespace dbaui
void enableButtons();
- USHORT adjustColumnPosition(ListBox* _pLeft,
+ sal_uInt16 adjustColumnPosition(ListBox* _pLeft,
const ::rtl::OUString& _sColumnName,
ODatabaseExport::TColumnVector::size_type nCurrentPos,
const ::comphelper::TStringMixEqualFunctor& _aCase);
diff --git a/dbaccess/source/ui/inc/adtabdlg.hxx b/dbaccess/source/ui/inc/adtabdlg.hxx
index 214e5f9113e3..d2d7c6d8a98e 100644
--- a/dbaccess/source/ui/inc/adtabdlg.hxx
+++ b/dbaccess/source/ui/inc/adtabdlg.hxx
@@ -109,7 +109,7 @@ namespace dbaui
IAddTableDialogContext& _rContext );
private:
- virtual BOOL Close();
+ virtual sal_Bool Close();
bool impl_isAddAllowed();
void impl_addTable();
diff --git a/dbaccess/source/ui/inc/advancedsettingsdlg.hxx b/dbaccess/source/ui/inc/advancedsettingsdlg.hxx
index 092afbb98108..6afc8f6ddd1c 100644
--- a/dbaccess/source/ui/inc/advancedsettingsdlg.hxx
+++ b/dbaccess/source/ui/inc/advancedsettingsdlg.hxx
@@ -59,7 +59,7 @@ namespace dbaui
SfxItemSet* m_pItemSet;
protected:
- virtual void PageCreated(USHORT _nId, SfxTabPage& _rPage);
+ virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage);
public:
AdvancedSettingsDialog( Window* _pParent
diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx
index ccc53bc650c7..47c510a68840 100644
--- a/dbaccess/source/ui/inc/brwctrlr.hxx
+++ b/dbaccess/source/ui/inc/brwctrlr.hxx
@@ -123,7 +123,7 @@ namespace dbaui
// members for asynchronous load operations
FormControllerImpl* m_pFormControllerImpl; // implementing the XFormController
- ULONG m_nPendingLoadFinished; // the event used to tell ourself that the load is finished
+ sal_uLong m_nPendingLoadFinished; // the event used to tell ourself that the load is finished
sal_uInt16 m_nFormActionNestingLevel; // see enter-/leaveFormAction
sal_Bool m_bLoadCanceled : 1; // the load was canceled somehow
@@ -255,7 +255,8 @@ namespace dbaui
// (probably this needs not to be overloaded, but you may return anything you want as long as it
// supports the ::com::sun::star::form::DatabaseForm service. For instance you may want to create an adapter here which
// is synchronized with a foreign ::com::sun::star::form::DatabaseForm you got elsewhere)
- virtual sal_Bool InitializeForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xForm) = 0;
+ virtual sal_Bool InitializeForm(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_formProperties ) = 0;
// called immediately after a successfull CreateForm
// do any initialization (data source etc.) here. the form should be fully functional after that.
// return sal_False if you didn't succeed (don't throw exceptions, they won't be caught)
@@ -326,8 +327,11 @@ namespace dbaui
/// loads or reloads the form
virtual sal_Bool reloadForm(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable >& _rxLoadable);
- virtual sal_Bool preReloadForm(){ return sal_False; }
- virtual void postReloadForm(){}
+ virtual sal_Bool preReloadForm(){ return sal_False; }
+ virtual void postReloadForm(){}
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer >
+ createParser_nothrow();
private:
void setCurrentModified( sal_Bool _bSet );
@@ -347,7 +351,6 @@ namespace dbaui
void addColumnListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel);
void impl_checkForCannotSelectUnfiltered( const ::dbtools::SQLExceptionInfo& _rError );
- ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > createParser_nothrow();
// time to check the CUT/COPY/PASTE-slot-states
DECL_LINK( OnInvalidateClipboard, AutoTimer* );
diff --git a/dbaccess/source/ui/inc/charsetlistbox.hxx b/dbaccess/source/ui/inc/charsetlistbox.hxx
index 0f581e61b670..c0fde800c2e4 100644
--- a/dbaccess/source/ui/inc/charsetlistbox.hxx
+++ b/dbaccess/source/ui/inc/charsetlistbox.hxx
@@ -53,7 +53,7 @@ namespace dbaui
~CharSetListBox();
void SelectEntryByIanaName( const String& _rIanaName );
- bool StoreSelectedCharSet( SfxItemSet& _rSet, const USHORT _nItemId );
+ bool StoreSelectedCharSet( SfxItemSet& _rSet, const sal_uInt16 _nItemId );
private:
OCharsetDisplay m_aCharSets;
diff --git a/dbaccess/source/ui/inc/curledit.hxx b/dbaccess/source/ui/inc/curledit.hxx
index 5983f252c8e5..1257cf31f4f1 100644
--- a/dbaccess/source/ui/inc/curledit.hxx
+++ b/dbaccess/source/ui/inc/curledit.hxx
@@ -52,10 +52,10 @@ class OConnectionURLEdit : public Edit
m_pTypeCollection;
FixedText* m_pForcedPrefix;
String m_sSaveValueNoPrefix;
- BOOL m_bShowPrefix; // when <TRUE> the prefix will be visible, otherwise not
+ sal_Bool m_bShowPrefix; // when <TRUE> the prefix will be visible, otherwise not
public:
- OConnectionURLEdit(Window* pParent, const ResId& rResId,BOOL _bShowPrefix = FALSE);
+ OConnectionURLEdit(Window* pParent, const ResId& rResId,sal_Bool _bShowPrefix = sal_False);
~OConnectionURLEdit();
public:
@@ -69,7 +69,7 @@ public:
@param _bShowPrefix
If <TRUE/> than the prefix will be visible, otherwise not.
*/
- void ShowPrefix(BOOL _bShowPrefix);
+ void ShowPrefix(sal_Bool _bShowPrefix);
/// get the currently set text, excluding the prefix indicating the type
virtual String GetTextNoPrefix() const;
/// set a new text, leave the current prefix unchanged
diff --git a/dbaccess/source/ui/inc/dbadmin.hxx b/dbaccess/source/ui/inc/dbadmin.hxx
index c01550fb8647..a01314d188c1 100644
--- a/dbaccess/source/ui/inc/dbadmin.hxx
+++ b/dbaccess/source/ui/inc/dbadmin.hxx
@@ -62,7 +62,7 @@ private:
sal_Bool m_bApplied : 1; /// sal_True if any changes have been applied while the dialog was executing
sal_Bool m_bUIEnabled : 1; /// <TRUE/> if the UI is enabled, false otherwise. Cannot be switched back to <TRUE/>, once it is <FALSE/>
- USHORT m_nMainPageID;
+ sal_uInt16 m_nMainPageID;
public:
/** ctor. The itemset given should have been created by <method>createItemSet</method> and should be destroyed
@@ -104,9 +104,9 @@ public:
protected:
// adds a new detail page and remove all the old ones
- void addDetailPage(USHORT _nPageId,USHORT _nTextId,CreateTabPage pCreateFunc);
+ void addDetailPage(sal_uInt16 _nPageId,sal_uInt16 _nTextId,CreateTabPage pCreateFunc);
- virtual void PageCreated(USHORT _nId, SfxTabPage& _rPage);
+ virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage);
virtual short Ok();
protected:
diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx
index 4a7cbf0131c6..86e8ee277226 100644
--- a/dbaccess/source/ui/inc/dbtreelistbox.hxx
+++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx
@@ -132,13 +132,13 @@ namespace dbaui
virtual void InitEntry( SvLBoxEntry* pEntry, const XubString& aStr, const Image& aCollEntryBmp, const Image& aExpEntryBmp, SvLBoxButtonKind eButtonKind);
// enable editing for tables/views and queries
- virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection& );
- virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
+ virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
- virtual BOOL DoubleClickHdl();
+ virtual sal_Bool DoubleClickHdl();
virtual PopupMenu* CreateContextMenu( void );
- virtual void ExcecuteContextMenuAction( USHORT nSelectedPopupEntry );
+ virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry );
void SetEnterKeyHdl(const Link& rNewHdl) {m_aEnterKeyHdl = rNewHdl;}
diff --git a/dbaccess/source/ui/inc/dbu_dlg.hrc b/dbaccess/source/ui/inc/dbu_dlg.hrc
index 7e1b7df0d100..b107a0014dbb 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 c08d6597e829..7ba85bc6dfcb 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/inc/dlgattr.hxx b/dbaccess/source/ui/inc/dlgattr.hxx
index a1a3c82ec76a..e4fe6e158c96 100644
--- a/dbaccess/source/ui/inc/dlgattr.hxx
+++ b/dbaccess/source/ui/inc/dlgattr.hxx
@@ -50,10 +50,10 @@ namespace dbaui
SvxNumberInfoItem* pNumberInfoItem;
public:
- SbaSbAttrDlg( Window * pParent, const SfxItemSet*, SvNumberFormatter*, USHORT nFlags = TP_ATTR_CHAR , BOOL bRow = FALSE);
+ SbaSbAttrDlg( Window * pParent, const SfxItemSet*, SvNumberFormatter*, sal_uInt16 nFlags = TP_ATTR_CHAR , sal_Bool bRow = sal_False);
~SbaSbAttrDlg();
- virtual void PageCreated( USHORT nPageId, SfxTabPage& rTabPage );
+ virtual void PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage );
};
//.........................................................................
} // namespace dbaui
diff --git a/dbaccess/source/ui/inc/dlgsize.hxx b/dbaccess/source/ui/inc/dlgsize.hxx
index 3617c72e4a47..7b2e0152d226 100644
--- a/dbaccess/source/ui/inc/dlgsize.hxx
+++ b/dbaccess/source/ui/inc/dlgsize.hxx
@@ -58,7 +58,7 @@ namespace dbaui
HelpButton aPB_HELP;
public:
- DlgSize( Window * pParent, sal_Int32 nVal, BOOL bRow, sal_Int32 _nAlternativeStandard = -1 );
+ DlgSize( Window * pParent, sal_Int32 nVal, sal_Bool bRow, sal_Int32 _nAlternativeStandard = -1 );
~DlgSize();
sal_Int32 GetValue();
diff --git a/dbaccess/source/ui/inc/dsitems.hxx b/dbaccess/source/ui/inc/dsitems.hxx
index 7437d8b54b6c..9cc4d85808c8 100644
--- a/dbaccess/source/ui/inc/dsitems.hxx
+++ b/dbaccess/source/ui/inc/dsitems.hxx
@@ -93,6 +93,7 @@ typedef sal_Int32 ItemID;
#define DSID_ESCAPE_DATETIME 57
#define DSID_NAMED_PIPE 58
#define DSID_PRIMARY_KEY_SUPPORT 59
+#define DSID_MAX_ROW_SCAN 60
// don't forget to adjust DSID_LAST_ITEM_ID below!
@@ -100,7 +101,7 @@ typedef sal_Int32 ItemID;
//= item range. Adjust this if you introduce new items above
#define DSID_FIRST_ITEM_ID DSID_NAME
-#define DSID_LAST_ITEM_ID DSID_PRIMARY_KEY_SUPPORT
+#define DSID_LAST_ITEM_ID DSID_MAX_ROW_SCAN
#endif // _DBAUI_DATASOURCEITEMS_HXX_
diff --git a/dbaccess/source/ui/inc/dsmeta.hxx b/dbaccess/source/ui/inc/dsmeta.hxx
index a7a0d5c6c80b..5efa09c0c3cb 100644
--- a/dbaccess/source/ui/inc/dsmeta.hxx
+++ b/dbaccess/source/ui/inc/dsmeta.hxx
@@ -133,6 +133,7 @@ namespace dbaui
|| has( DSID_IGNORECURRENCY )
|| has( DSID_ESCAPE_DATETIME )
|| has( DSID_PRIMARY_KEY_SUPPORT )
+ || has( DSID_MAX_ROW_SCAN )
;
}
diff --git a/dbaccess/source/ui/inc/exsrcbrw.hxx b/dbaccess/source/ui/inc/exsrcbrw.hxx
index 2fbd64bc99d5..34b6e96ec86d 100644
--- a/dbaccess/source/ui/inc/exsrcbrw.hxx
+++ b/dbaccess/source/ui/inc/exsrcbrw.hxx
@@ -97,7 +97,7 @@ namespace dbaui
~SbaExternalSourceBrowser();
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > CreateForm();
- virtual sal_Bool InitializeForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xForm);
+ virtual sal_Bool InitializeForm( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_formProperties );
virtual sal_Bool LoadForm();
diff --git a/dbaccess/source/ui/inc/imageprovider.hxx b/dbaccess/source/ui/inc/imageprovider.hxx
index b6563801c8c1..e3b5489203b0 100644
--- a/dbaccess/source/ui/inc/imageprovider.hxx
+++ b/dbaccess/source/ui/inc/imageprovider.hxx
@@ -125,7 +125,7 @@ namespace dbaui
the resource ID image to be used for the object type. Must be fed into a
ModuleRes instance to actually load the image.
*/
- USHORT getDefaultImageResourceID(
+ sal_uInt16 getDefaultImageResourceID(
sal_Int32 _nDatabaseObjectType
);
diff --git a/dbaccess/source/ui/inc/listviewitems.hxx b/dbaccess/source/ui/inc/listviewitems.hxx
index 6d5394667111..3cf5ba748681 100644
--- a/dbaccess/source/ui/inc/listviewitems.hxx
+++ b/dbaccess/source/ui/inc/listviewitems.hxx
@@ -52,7 +52,7 @@ namespace dbaui
{
}
- virtual USHORT IsA();
+ virtual sal_uInt16 IsA();
virtual void Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry);
virtual void InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* _pViewData);
diff --git a/dbaccess/source/ui/inc/moduledbu.hxx b/dbaccess/source/ui/inc/moduledbu.hxx
index a57513f6c5e7..4297cdef693a 100644
--- a/dbaccess/source/ui/inc/moduledbu.hxx
+++ b/dbaccess/source/ui/inc/moduledbu.hxx
@@ -94,7 +94,7 @@ public:
class ModuleRes : public ::ResId
{
public:
- ModuleRes(USHORT _nId) : ResId(_nId, *OModule::getResManager()) { }
+ ModuleRes(sal_uInt16 _nId) : ResId(_nId, *OModule::getResManager()) { }
};
//.........................................................................
diff --git a/dbaccess/source/ui/inc/opendoccontrols.hxx b/dbaccess/source/ui/inc/opendoccontrols.hxx
index 3e0e53e2d653..b4c73bfb9521 100644
--- a/dbaccess/source/ui/inc/opendoccontrols.hxx
+++ b/dbaccess/source/ui/inc/opendoccontrols.hxx
@@ -66,7 +66,7 @@ namespace dbaui
{
private:
typedef ::std::pair< String, String > StringPair;
- typedef ::std::map< USHORT, StringPair > MapIndexToStringPair;
+ typedef ::std::map< sal_uInt16, StringPair > MapIndexToStringPair;
::rtl::OUString m_sModule;
MapIndexToStringPair m_aURLs;
@@ -80,7 +80,7 @@ namespace dbaui
protected:
virtual void RequestHelp( const HelpEvent& _rHEvt );
- StringPair impl_getDocumentAtIndex( USHORT _nListIndex, bool _bSystemNotation = false ) const;
+ StringPair impl_getDocumentAtIndex( sal_uInt16 _nListIndex, bool _bSystemNotation = false ) const;
private:
void impl_init( const sal_Char* _pAsciiModuleName );
diff --git a/dbaccess/source/ui/inc/propertystorage.hxx b/dbaccess/source/ui/inc/propertystorage.hxx
index ef88f585631e..689e7998f6cf 100644
--- a/dbaccess/source/ui/inc/propertystorage.hxx
+++ b/dbaccess/source/ui/inc/propertystorage.hxx
@@ -63,7 +63,7 @@ namespace dbaui
//====================================================================
//= SetItemPropertyStorage
//====================================================================
- typedef USHORT ItemId;
+ typedef sal_uInt16 ItemId;
/** a PropertyStorage implementation which stores the value in an item set
*/
diff --git a/dbaccess/source/ui/inc/querycontroller.hxx b/dbaccess/source/ui/inc/querycontroller.hxx
index 0f2813cd0b05..363c5517050e 100644
--- a/dbaccess/source/ui/inc/querycontroller.hxx
+++ b/dbaccess/source/ui/inc/querycontroller.hxx
@@ -100,7 +100,7 @@ namespace dbaui
sal_Int32 m_nVisibleRows; // which rows the selection browse should show
sal_Int32 m_nSplitPos; // the position of the splitter
sal_Int32 m_nCommandType; // the type of the object we're designing
- sal_Bool m_bGraphicalDesign; // are we in the graphical design mode (TRUE) or in the text design (FALSE)?
+ sal_Bool m_bGraphicalDesign; // are we in the graphical design mode (sal_True) or in the text design (sal_False)?
sal_Bool m_bDistinct; // true when you want "select distinct" otherwise false
sal_Bool m_bViewAlias; // show the alias row in the design view
sal_Bool m_bViewTable; // show the table row in the design view
diff --git a/dbaccess/source/ui/inc/queryfilter.hxx b/dbaccess/source/ui/inc/queryfilter.hxx
index bfb10cae1924..2e4dd3c9e662 100644
--- a/dbaccess/source/ui/inc/queryfilter.hxx
+++ b/dbaccess/source/ui/inc/queryfilter.hxx
@@ -115,10 +115,10 @@ namespace dbaui
DECL_LINK( ListSelectHdl, ListBox * );
DECL_LINK( ListSelectCompHdl, ListBox * );
- void SetLine( USHORT nIdx,const ::com::sun::star::beans::PropertyValue& _rItem,sal_Bool _bOr );
+ void SetLine( sal_uInt16 nIdx,const ::com::sun::star::beans::PropertyValue& _rItem,sal_Bool _bOr );
void EnableLines();
sal_Int32 GetOSQLPredicateType( const String& _rSelectedPredicate ) const;
- USHORT GetSelectionPos(sal_Int32 eType,const ListBox& rListBox) const;
+ sal_uInt16 GetSelectionPos(sal_Int32 eType,const ListBox& rListBox) const;
sal_Bool getCondition(const ListBox& _rField,const ListBox& _rComp,const Edit& _rValue,::com::sun::star::beans::PropertyValue& _rFilter) const;
void fillLines(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& _aValues);
diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx
index 0f91c8fa06d8..0d3dc746fa2b 100644
--- a/dbaccess/source/ui/inc/sbagrid.hxx
+++ b/dbaccess/source/ui/inc/sbagrid.hxx
@@ -240,7 +240,7 @@ namespace dbaui
sal_Int32 m_nAsyncDropEvent;
- USHORT m_nCurrentActionColId;
+ sal_uInt16 m_nCurrentActionColId;
// ui actions (e.g. a context menu) may be performed on columns which aren't the current one
// and aren't selected, so we have to track this column id
diff --git a/dbaccess/source/ui/inc/singledoccontroller.hxx b/dbaccess/source/ui/inc/singledoccontroller.hxx
new file mode 100755
index 000000000000..c738bd94e81c
--- /dev/null
+++ b/dbaccess/source/ui/inc/singledoccontroller.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ * 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 DBAUI_SINGLEDOCCONTROLLER_HXX
+#define DBAUI_SINGLEDOCCONTROLLER_HXX
+
+#include "dbsubcomponentcontroller.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/document/XUndoManagerSupplier.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/implbase1.hxx>
+
+class SfxUndoAction;
+class SfxUndoManager;
+
+//......................................................................................................................
+namespace dbaui
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= OSingleDocumentController
+ //==================================================================================================================
+ struct OSingleDocumentController_Data;
+ typedef ::cppu::ImplInheritanceHelper1 < DBSubComponentController
+ , ::com::sun::star::document::XUndoManagerSupplier
+ > OSingleDocumentController_Base;
+ class OSingleDocumentController : public OSingleDocumentController_Base
+ {
+ protected:
+ OSingleDocumentController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxORB );
+ virtual ~OSingleDocumentController();
+
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ public:
+ /// need for undo's and redo's
+ SfxUndoManager& GetUndoManager() const;
+
+ /// complete clears the Undo/Redo stacks
+ void ClearUndoManager();
+
+ /** addUndoActionAndInvalidate adds an undo action to the undoManager,
+ additionally invalidates the UNDO and REDO slot
+ @param pAction the undo action to add
+ */
+ void addUndoActionAndInvalidate( SfxUndoAction* pAction );
+
+ // OGenericUnoController
+ virtual FeatureState GetState( sal_uInt16 nId ) const;
+ virtual void Execute( sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs );
+
+ // XUndoManagerSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManager > SAL_CALL getUndoManager( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
+
+ private:
+ ::std::auto_ptr< OSingleDocumentController_Data > m_pData;
+ };
+
+//......................................................................................................................
+} // namespace dbaui
+//......................................................................................................................
+
+#endif // DBAUI_SINGLEDOCCONTROLLER_HXX
diff --git a/dbaccess/source/ui/inc/sqledit.hxx b/dbaccess/source/ui/inc/sqledit.hxx
index 3ad5a4d93460..2e98ce3ac3c6 100644
--- a/dbaccess/source/ui/inc/sqledit.hxx
+++ b/dbaccess/source/ui/inc/sqledit.hxx
@@ -44,8 +44,8 @@ namespace dbaui
Link m_lnkTextModifyHdl;
String m_strOrigText; // wird beim Undo wiederhergestellt
OQueryTextView* m_pView;
- BOOL m_bAccelAction; // Wird bei Cut, Copy, Paste gesetzt
- BOOL m_bStopTimer;
+ sal_Bool m_bAccelAction; // Wird bei Cut, Copy, Paste gesetzt
+ sal_Bool m_bStopTimer;
utl::SourceViewConfig m_SourceViewConfig;
svtools::ColorConfig m_ColorConfig;
@@ -70,7 +70,7 @@ namespace dbaui
using MultiLineEditSyntaxHighlight::SetText;
// own functionality
- BOOL IsInAccelAct();
+ sal_Bool IsInAccelAct();
void SetTextModifyHdl(const Link& lnk) { m_lnkTextModifyHdl = lnk; }
// bitte nicht SetModifyHdl benutzen, den brauche ich selber, der hier wird von dem damit gesetzten Handler
diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx
index be184aa8acc2..ad026e81c9f2 100644
--- a/dbaccess/source/ui/inc/unodatbr.hxx
+++ b/dbaccess/source/ui/inc/unodatbr.hxx
@@ -120,12 +120,12 @@ namespace dbaui
Splitter* m_pSplitter;
SvLBoxTreeList* m_pTreeModel; // contains the datasources of the registry
SvLBoxEntry* m_pCurrentlyDisplayed;
- ULONG m_nAsyncDrop;
+ sal_uLong m_nAsyncDrop;
- sal_Int16 m_nBorder; // TRUE when border should be shown
+ sal_Int16 m_nBorder; // sal_True when border should be shown
sal_Bool m_bQueryEscapeProcessing : 1; // the escape processing flag of the query currently loaded (if any)
- sal_Bool m_bShowMenu; // if TRUE the menu should be visible otherwise not
+ sal_Bool m_bShowMenu; // if sal_True the menu should be visible otherwise not
sal_Bool m_bInSuspend;
sal_Bool m_bEnableBrowser;
::boost::optional< bool >
@@ -222,7 +222,7 @@ namespace dbaui
protected:
// SbaXDataBrowserController overridables
- virtual sal_Bool InitializeForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xForm);
+ virtual sal_Bool InitializeForm( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_formProperties );
virtual sal_Bool InitializeGridModel(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xGrid);
virtual sal_Bool preReloadForm();
@@ -485,6 +485,10 @@ namespace dbaui
of the load process
*/
void initializePreviewMode();
+
+ /** checks whether the Order/Filter clauses set at our row set are valid, removes them if not so
+ */
+ void impl_sanitizeRowSetClauses_nothrow();
};
// .........................................................................
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index b2cf2a0fb2d6..3bbee441e9cb 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -116,10 +116,10 @@ ODatabaseExport::ODatabaseExport(sal_Int32 nRows,
,m_nRows(1)
,m_nRowCount(0)
,m_nDefToken( gsl_getSystemTextEncoding() )
- ,m_bError(FALSE)
- ,m_bInTbl(FALSE)
- ,m_bHead(TRUE)
- ,m_bDontAskAgain(FALSE)
+ ,m_bError(sal_False)
+ ,m_bInTbl(sal_False)
+ ,m_bHead(sal_True)
+ ,m_bDontAskAgain(sal_False)
,m_bIsAutoIncrement(_bAutoIncrementEnabled)
,m_bFoundTable(sal_False)
,m_bCheckOnly(sal_False)
@@ -175,7 +175,7 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection,
,m_nDefToken( gsl_getSystemTextEncoding() )
,m_bError(sal_False)
,m_bInTbl(sal_False)
- ,m_bHead(TRUE)
+ ,m_bHead(sal_True)
,m_bDontAskAgain(sal_False)
,m_bIsAutoIncrement(sal_False)
,m_bFoundTable(sal_False)
@@ -785,9 +785,9 @@ void ODatabaseExport::showErrorDialog(const ::com::sun::star::sdbc::SQLException
OSQLWarningBox aBox( NULL, aMsg, WB_YES_NO | WB_DEF_NO );
if (aBox.Execute() == RET_YES)
- m_bDontAskAgain = TRUE;
+ m_bDontAskAgain = sal_True;
else
- m_bError = TRUE;
+ m_bError = sal_True;
}
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx
index 414fc9e6cb4e..d4b4c4c5e329 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -111,7 +111,7 @@ OHTMLReader::OHTMLReader(SvStream& rIn,const SharedConnection& _rxConnection,
DBG_CTOR(OHTMLReader,NULL);
SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) );
// If the file starts with a BOM, switch to UCS2.
- SetSwitchToUCS2( TRUE );
+ SetSwitchToUCS2( sal_True );
}
// ---------------------------------------------------------------------------
OHTMLReader::OHTMLReader(SvStream& rIn,
@@ -133,7 +133,7 @@ OHTMLReader::OHTMLReader(SvStream& rIn,
DBG_CTOR(OHTMLReader,NULL);
SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) );
// If the file starts with a BOM, switch to UCS2.
- SetSwitchToUCS2( TRUE );
+ SetSwitchToUCS2( sal_True );
}
// ---------------------------------------------------------------------------
OHTMLReader::~OHTMLReader()
@@ -186,7 +186,7 @@ void OHTMLReader::NextToken( int nToken )
case HTML_THEAD_ON:
case HTML_TBODY_ON:
{
- sal_uInt32 nTell = rInput.Tell(); // verändert vielleicht die Position des Streams
+ sal_uInt32 nTell = rInput.Tell(); // ver�ndert vielleicht die Position des Streams
if ( !m_xTable.is() )
{// erste Zeile als Header verwenden
m_bError = !CreateTable(nToken);
@@ -326,7 +326,7 @@ void OHTMLReader::NextToken( int nToken )
void OHTMLReader::fetchOptions()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::fetchOptions" );
- m_bInTbl = TRUE;
+ m_bInTbl = sal_True;
const HTMLOptions* options = GetOptions();
sal_Int16 nArrLen = options->Count();
for ( sal_Int16 i = 0; i < nArrLen; i++ )
@@ -488,7 +488,7 @@ sal_Bool OHTMLReader::CreateTable(int nToken)
case HTML_TABLEDATA_ON:
case HTML_TABLEHEADER_ON:
TableDataOn(eVal);
- bTableHeader = TRUE;
+ bTableHeader = sal_True;
break;
case HTML_TABLEDATA_OFF:
case HTML_TABLEHEADER_OFF:
@@ -513,7 +513,7 @@ sal_Bool OHTMLReader::CreateTable(int nToken)
case HTML_TITLE_ON:
case HTML_CAPTION_ON:
- bCaption = TRUE;
+ bCaption = sal_True;
break;
case HTML_TITLE_OFF:
case HTML_CAPTION_OFF:
diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx
index 70b127cc2ec6..dd346d10063a 100644
--- a/dbaccess/source/ui/misc/RowSetDrop.cxx
+++ b/dbaccess/source/ui/misc/RowSetDrop.cxx
@@ -107,19 +107,19 @@ void ORowSetImportExport::initialize()
}
}
// -----------------------------------------------------------------------------
-BOOL ORowSetImportExport::Write()
+sal_Bool ORowSetImportExport::Write()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "ORowSetImportExport::Write" );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL ORowSetImportExport::Read()
+sal_Bool ORowSetImportExport::Read()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "ORowSetImportExport::Read" );
// check if there is any column to copy
if(::std::find_if(m_aColumnMapping.begin(),m_aColumnMapping.end(),
::std::bind2nd(::std::greater<sal_Int32>(),0)) == m_aColumnMapping.end())
- return FALSE;
+ return sal_False;
sal_Bool bContinue = sal_True;
if(m_aSelection.getLength())
{
@@ -165,7 +165,7 @@ BOOL ORowSetImportExport::Read()
}
}
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
sal_Bool ORowSetImportExport::insertNewRow()
diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx
index c6132232b1c8..fb25f77d70f1 100644
--- a/dbaccess/source/ui/misc/RtfReader.cxx
+++ b/dbaccess/source/ui/misc/RtfReader.cxx
@@ -162,7 +162,7 @@ void ORTFReader::NextToken( int nToken )
bool bInsertRow = true;
if ( !m_xTable.is() ) // erste Zeile als Header verwenden
{
- sal_uInt32 nTell = rInput.Tell(); // verändert vielleicht die Position des Streams
+ sal_uInt32 nTell = rInput.Tell(); // ver�ndert vielleicht die Position des Streams
m_bError = !CreateTable(nToken);
bInsertRow = m_bAppendFirstLine;
@@ -192,7 +192,7 @@ void ORTFReader::NextToken( int nToken )
eraseTokens();
}
- m_bInTbl = TRUE; // jetzt befinden wir uns in einer Tabellenbeschreibung
+ m_bInTbl = sal_True; // jetzt befinden wir uns in einer Tabellenbeschreibung
break;
case RTF_TEXTTOKEN:
case RTF_SINGLECHAR:
@@ -215,7 +215,7 @@ void ORTFReader::NextToken( int nToken )
}
break;
case RTF_ROW:
- // es kann vorkommen, daß die letzte Celle nicht mit \cell abgeschlossen ist
+ // es kann vorkommen, da� die letzte Celle nicht mit \cell abgeschlossen ist
try
{
insertValueIntoColumn();
@@ -249,7 +249,7 @@ void ORTFReader::NextToken( int nToken )
}
break;
case RTF_INTBL:
- m_bInTbl = TRUE;
+ m_bInTbl = sal_True;
break;
case RTF_TEXTTOKEN:
case RTF_SINGLECHAR:
@@ -294,7 +294,7 @@ sal_Bool ORTFReader::CreateTable(int nToken)
if(m_bInTbl)
aColumnName.Erase();
- m_bInTbl = TRUE;
+ m_bInTbl = sal_True;
break;
case RTF_TEXTTOKEN:
case RTF_SINGLECHAR:
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index 55c55a2a15dc..fa0ebaa5d23c 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -362,24 +362,24 @@ void ODatabaseImportExport::initialize()
m_bInInitialize = sal_False;
}
// -----------------------------------------------------------------------------
-BOOL ODatabaseImportExport::Write()
+sal_Bool ODatabaseImportExport::Write()
{
if ( m_bNeedToReInitialize )
{
if ( !m_bInInitialize )
initialize();
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL ODatabaseImportExport::Read()
+sal_Bool ODatabaseImportExport::Read()
{
if ( m_bNeedToReInitialize )
{
if ( !m_bInInitialize )
initialize();
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
void ODatabaseImportExport::impl_initializeRowMember_throw()
@@ -395,7 +395,7 @@ void ODatabaseImportExport::impl_initializeRowMember_throw()
}
}
//======================================================================
-BOOL ORTFImportExport::Write()
+sal_Bool ORTFImportExport::Write()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "ORTFImportExport::Write" );
ODatabaseImportExport::Write();
@@ -403,10 +403,10 @@ BOOL ORTFImportExport::Write()
(*m_pStream) << OOO_STRING_SVTOOLS_RTF_ANSI << ODatabaseImportExport::sNewLine;
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252;
- BOOL bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight );
- BOOL bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant );
- BOOL bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline );
- BOOL bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout );
+ sal_Bool bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight );
+ sal_Bool bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant );
+ sal_Bool bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline );
+ sal_Bool bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout );
sal_Int32 nColor = 0;
if(m_xObject.is())
@@ -570,7 +570,7 @@ BOOL ORTFImportExport::Write()
}
(*m_pStream) << '}' << ODatabaseImportExport::sNewLine;
- (*m_pStream) << (BYTE) 0;
+ (*m_pStream) << (sal_uInt8) 0;
return ((*m_pStream).GetError() == SVSTREAM_OK);
}
// -----------------------------------------------------------------------------
@@ -593,10 +593,10 @@ void ORTFImportExport::appendRow(::rtl::OString* pHorzChar,sal_Int32 _nColumnCou
(*m_pStream) << ODatabaseImportExport::sNewLine;
}
- const BOOL bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight );
- const BOOL bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant );
- const BOOL bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline );
- const BOOL bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout );
+ const sal_Bool bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight );
+ const sal_Bool bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant );
+ const sal_Bool bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline );
+ const sal_Bool bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout );
static const ::rtl::OString aFS2("\\fs20\\f1\\cf0\\cb1");
::comphelper::ComponentContext aContext(m_xFactory);
Reference< XRowSet > xRowSet(m_xRow,UNO_QUERY);
@@ -641,7 +641,7 @@ void ORTFImportExport::appendRow(::rtl::OString* pHorzChar,sal_Int32 _nColumnCou
++k;
}
//-------------------------------------------------------------------
-BOOL ORTFImportExport::Read()
+sal_Bool ORTFImportExport::Read()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "ORTFImportExport::Read" );
ODatabaseImportExport::Read();
@@ -677,7 +677,7 @@ const char OHTMLImportExport::sIndentSource[nIndentMax+1] = "\t\t\t\t\t\t\t\t\t\
//========================================================================
#define OUT_PROLOGUE() ((*m_pStream) << sHTML30_Prologue << ODatabaseImportExport::sNewLine << ODatabaseImportExport::sNewLine)
#define TAG_ON( tag ) HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag )
-#define TAG_OFF( tag ) HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag, FALSE )
+#define TAG_OFF( tag ) HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag, sal_False )
#define OUT_STR( str ) HTMLOutFuncs::Out_String( (*m_pStream), str )
#define OUT_LF() (*m_pStream) << ODatabaseImportExport::sNewLine << GetIndentStr()
#define lcl_OUT_LF() (*m_pStream) << ODatabaseImportExport::sNewLine
@@ -695,7 +695,7 @@ OHTMLImportExport::OHTMLImportExport(const ::svx::ODataAccessDescriptor& _aDataD
: ODatabaseImportExport(_aDataDescriptor,_rM,_rxNumberF,rExchange)
,m_nIndent(0)
#if OSL_DEBUG_LEVEL > 0
- ,m_bCheckFont(FALSE)
+ ,m_bCheckFont(sal_False)
#endif
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::OHTMLImportExport" );
@@ -706,7 +706,7 @@ OHTMLImportExport::OHTMLImportExport(const ::svx::ODataAccessDescriptor& _aDataD
sIndent[0] = 0;
}
//-------------------------------------------------------------------
-BOOL OHTMLImportExport::Write()
+sal_Bool OHTMLImportExport::Write()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::Write" );
ODatabaseImportExport::Write();
@@ -725,7 +725,7 @@ BOOL OHTMLImportExport::Write()
return sal_False;
}
//-------------------------------------------------------------------
-BOOL OHTMLImportExport::Read()
+sal_Bool OHTMLImportExport::Read()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::Read" );
ODatabaseImportExport::Read();
@@ -1015,12 +1015,12 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_I
{
fVal = m_xFormatter->convertStringToNumber(nFormat,rValue);
ByteString aTmpString(aStrTD);
- HTMLOutFuncs::CreateTableDataOptionsValNum( aTmpString, FALSE, fVal,nFormat, *pFormatter );
+ HTMLOutFuncs::CreateTableDataOptionsValNum( aTmpString, sal_False, fVal,nFormat, *pFormatter );
}
catch(Exception&)
{
ByteString aTmpString(aStrTD);
- HTMLOutFuncs::CreateTableDataOptionsValNum( aTmpString, FALSE, fVal,nFormat, *pFormatter );
+ HTMLOutFuncs::CreateTableDataOptionsValNum( aTmpString, sal_False, fVal,nFormat, *pFormatter );
}
}
@@ -1028,10 +1028,10 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_I
FontOn();
- BOOL bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight );
- BOOL bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant );
- BOOL bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline );
- BOOL bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout );
+ sal_Bool bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight );
+ sal_Bool bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant );
+ sal_Bool bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline );
+ sal_Bool bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout );
if ( bBold ) TAG_ON( OOO_STRING_SVTOOLS_HTML_bold );
if ( bItalic ) TAG_ON( OOO_STRING_SVTOOLS_HTML_italic );
@@ -1058,7 +1058,7 @@ void OHTMLImportExport::FontOn()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::FontOn" );
#if OSL_DEBUG_LEVEL > 0
- m_bCheckFont = TRUE;
+ m_bCheckFont = sal_True;
#endif
// <FONT FACE="xxx">
@@ -1091,7 +1091,7 @@ inline void OHTMLImportExport::FontOff()
OSL_ENSURE(m_bCheckFont,"Kein FontOn() gerufen");
TAG_OFF( OOO_STRING_SVTOOLS_HTML_font );
#if OSL_DEBUG_LEVEL > 0
- m_bCheckFont = FALSE;
+ m_bCheckFont = sal_False;
#endif
}
//-----------------------------------------------------------------------
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 0a949d24703e..5dd44e9d721c 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;
@@ -1451,7 +1451,7 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
return pTypeInfo;
}
// -----------------------------------------------------------------------------
-sal_Int32 askForUserAction(Window* _pParent,USHORT _nTitle,USHORT _nText,sal_Bool _bAll,const ::rtl::OUString& _sName)
+sal_Int32 askForUserAction(Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _nText,sal_Bool _bAll,const ::rtl::OUString& _sName)
{
SolarMutexGuard aGuard;
String aMsg = String(ModuleRes(_nText));
diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx
index 8428db9fc420..b0df6f61f1b5 100644
--- a/dbaccess/source/ui/misc/WCPage.cxx
+++ b/dbaccess/source/ui/misc/WCPage.cxx
@@ -82,7 +82,7 @@ OCopyTable::OCopyTable( Window * pParent )
,m_edKeyName( this, ModuleRes( ET_KEYNAME ) )
,m_pPage2(NULL)
,m_pPage3(NULL)
- ,m_bUseHeaderAllowed(TRUE)
+ ,m_bUseHeaderAllowed(sal_True)
{
DBG_CTOR(OCopyTable,NULL);
@@ -93,7 +93,7 @@ OCopyTable::OCopyTable( Window * pParent )
if ( !m_pParent->supportsViews() )
m_aRB_View.Disable();
- m_aCB_UseHeaderLine.Check(TRUE);
+ m_aCB_UseHeaderLine.Check(sal_True);
m_bPKeyAllowed = m_pParent->supportsPrimaryKey();
m_aCB_PrimaryColumn.Enable(m_bPKeyAllowed);
@@ -263,7 +263,7 @@ sal_Bool OCopyTable::LeavePage()
void OCopyTable::ActivatePage()
{
DBG_CHKTHIS(OCopyTable,NULL);
- m_pParent->GetOKButton().Enable( TRUE );
+ m_pParent->GetOKButton().Enable( sal_True );
m_nOldOperation = m_pParent->getOperation();
m_edTableName.GrabFocus();
m_aCB_UseHeaderLine.Check(m_pParent->UseHeaderLine());
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index 84a2a917ac27..07affc1c2015 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -147,7 +147,7 @@ void OWizColumnSelect::ActivatePage( )
ODatabaseExport::TColumnVector::const_iterator aEnd = pDestColumns->end();
for(;aIter != aEnd;++aIter)
{
- USHORT nPos = m_lbNewColumnNames.InsertEntry((*aIter)->first);
+ sal_uInt16 nPos = m_lbNewColumnNames.InsertEntry((*aIter)->first);
m_lbNewColumnNames.SetEntryData(nPos,new OFieldDescription(*((*aIter)->second)));
m_lbOrgColumnNames.RemoveEntry((*aIter)->first);
}
@@ -355,7 +355,7 @@ void OWizColumnSelect::moveColumn( ListBox* _pRight,
OSL_ENSURE( aPos != pSrcVector->end(),"Invalid position for the iterator here!");
ODatabaseExport::TColumnVector::size_type nPos = (aPos - pSrcVector->begin()) - adjustColumnPosition(_pLeft, _sColumnName, (aPos - pSrcVector->begin()), _aCase);
- _pRight->SetEntryData( _pRight->InsertEntry( (*aIter).first, sal::static_int_cast< USHORT >(nPos)),aSrcIter->second );
+ _pRight->SetEntryData( _pRight->InsertEntry( (*aIter).first, sal::static_int_cast< sal_uInt16 >(nPos)),aSrcIter->second );
_rRightColumns.push_back((*aIter).first);
m_pParent->removeColumnNameFromNameMap(_sColumnName);
}
@@ -366,12 +366,12 @@ void OWizColumnSelect::moveColumn( ListBox* _pRight,
// not enough. We need to take into acccount what fields have
// been removed earlier and adjust accordingly. Based on the
// algorithm employed in moveColumn().
-USHORT OWizColumnSelect::adjustColumnPosition( ListBox* _pLeft,
+sal_uInt16 OWizColumnSelect::adjustColumnPosition( ListBox* _pLeft,
const ::rtl::OUString& _sColumnName,
ODatabaseExport::TColumnVector::size_type nCurrentPos,
const ::comphelper::TStringMixEqualFunctor& _aCase)
{
- USHORT nAdjustedPos = 0;
+ sal_uInt16 nAdjustedPos = 0;
// if returning all entries to their original position,
// then there is no need to adjust the positions.
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 779c8f4d7c92..8f3222181146 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -73,8 +73,8 @@ OWizNameMatching::OWizNameMatching( Window* pParent)
m_CTRL_RIGHT.SetSelectHdl(LINK(this,OWizNameMatching,TableListRightSelectHdl));
m_CTRL_RIGHT.EnableCheckButton( NULL );
- m_CTRL_LEFT.SetWindowBits( WB_FORCE_MAKEVISIBLE );
- m_CTRL_RIGHT.SetWindowBits( WB_FORCE_MAKEVISIBLE );
+ m_CTRL_LEFT.SetStyle( m_CTRL_LEFT.GetStyle() | WB_FORCE_MAKEVISIBLE );
+ m_CTRL_RIGHT.SetStyle( m_CTRL_RIGHT.GetStyle() | WB_FORCE_MAKEVISIBLE );
m_sSourceText = m_FT_TABLE_LEFT.GetText();
m_sSourceText.AppendAscii("\n");
@@ -258,7 +258,7 @@ IMPL_LINK( OWizNameMatching, TableListClickHdl, void*, /*NOTINTERESTEDIN*/ )
SvLBoxEntry* pEntry = m_CTRL_LEFT.FirstSelected();
if(pEntry)
{
- ULONG nPos = m_CTRL_LEFT.GetModel()->GetAbsPos(pEntry);
+ sal_uLong nPos = m_CTRL_LEFT.GetModel()->GetAbsPos(pEntry);
SvLBoxEntry* pOldEntry = m_CTRL_RIGHT.FirstSelected();
if(pOldEntry && nPos != m_CTRL_RIGHT.GetModel()->GetAbsPos(pOldEntry))
{
@@ -267,7 +267,7 @@ IMPL_LINK( OWizNameMatching, TableListClickHdl, void*, /*NOTINTERESTEDIN*/ )
pOldEntry = m_CTRL_RIGHT.GetEntry(nPos);
if(pOldEntry)
{
- ULONG nNewPos = m_CTRL_LEFT.GetModel()->GetAbsPos(m_CTRL_LEFT.GetFirstEntryInView());
+ sal_uLong nNewPos = m_CTRL_LEFT.GetModel()->GetAbsPos(m_CTRL_LEFT.GetFirstEntryInView());
if ( nNewPos - nPos == 1 )
--nNewPos;
m_CTRL_RIGHT.MakeVisible(m_CTRL_RIGHT.GetEntry(nNewPos),sal_True);
@@ -292,7 +292,7 @@ IMPL_LINK( OWizNameMatching, TableListRightSelectHdl, void*, /*NOTINTERESTEDIN*/
SvLBoxEntry* pEntry = m_CTRL_RIGHT.FirstSelected();
if(pEntry)
{
- ULONG nPos = m_CTRL_RIGHT.GetModel()->GetAbsPos(pEntry);
+ sal_uLong nPos = m_CTRL_RIGHT.GetModel()->GetAbsPos(pEntry);
SvLBoxEntry* pOldEntry = m_CTRL_LEFT.FirstSelected();
if(pOldEntry && nPos != m_CTRL_LEFT.GetModel()->GetAbsPos(pOldEntry))
{
@@ -301,7 +301,7 @@ IMPL_LINK( OWizNameMatching, TableListRightSelectHdl, void*, /*NOTINTERESTEDIN*/
pOldEntry = m_CTRL_LEFT.GetEntry(nPos);
if(pOldEntry)
{
- ULONG nNewPos = m_CTRL_RIGHT.GetModel()->GetAbsPos(m_CTRL_RIGHT.GetFirstEntryInView());
+ sal_uLong nNewPos = m_CTRL_RIGHT.GetModel()->GetAbsPos(m_CTRL_RIGHT.GetFirstEntryInView());
if ( nNewPos - nPos == 1 )
nNewPos--;
m_CTRL_LEFT.MakeVisible(m_CTRL_LEFT.GetEntry(nNewPos),sal_True);
@@ -366,7 +366,7 @@ OColumnTreeBox::OColumnTreeBox( Window* pParent, const ResId& rResId )
{
SetDragDropMode( 0 );
EnableInplaceEditing( sal_False );
- SetWindowBits(WB_BORDER | WB_HASBUTTONS | WB_HSCROLL);
+ SetStyle(GetStyle() | WB_BORDER | WB_HASBUTTONS | WB_HSCROLL);
SetSelectionMode( SINGLE_SELECTION );
}
//------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index 86007e933533..2991ba00bf32 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;
@@ -128,8 +130,8 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
if ( getMetaData().is() && !getMetaData()->supportsMixedCaseQuotedIdentifiers() )
{
bCase = sal_False;
- USHORT nCount = aListBox.GetEntryCount();
- for (USHORT i=0 ; !bDoubleName && i < nCount ; ++i)
+ sal_uInt16 nCount = aListBox.GetEntryCount();
+ for (sal_uInt16 i=0 ; !bDoubleName && i < nCount ; ++i)
{
::rtl::OUString sEntry(aListBox.GetEntry(i));
bDoubleName = sNewName.equalsIgnoreAsciiCase(sEntry);
@@ -330,7 +332,7 @@ void OWizTypeSelect::ActivatePage( )
Reset();
m_bFirstTime = bOldFirstTime;
- m_lbColumnNames.SelectEntryPos(static_cast<USHORT>(m_nDisplayRow));
+ m_lbColumnNames.SelectEntryPos(static_cast<sal_uInt16>(m_nDisplayRow));
m_nDisplayRow = 0;
m_lbColumnNames.GetSelectHdl().Call(&m_lbColumnNames);
}
diff --git a/dbaccess/source/ui/misc/WizardPages.src b/dbaccess/source/ui/misc/WizardPages.src
index c52576702594..360ab879a102 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/dbaundomanager.cxx b/dbaccess/source/ui/misc/dbaundomanager.cxx
new file mode 100755
index 000000000000..1e60a027a693
--- /dev/null
+++ b/dbaccess/source/ui/misc/dbaundomanager.cxx
@@ -0,0 +1,395 @@
+/*************************************************************************
+ * 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.
+ *
+ ************************************************************************/
+
+#include "precompiled_dbaccess.hxx"
+
+#include "dbaundomanager.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/lang/DisposedException.hpp>
+/** === end UNO includes === **/
+
+#include <svl/undo.hxx>
+#include <vcl/svapp.hxx>
+#include <vos/mutex.hxx>
+#include <framework/undomanagerhelper.hxx>
+
+//......................................................................................................................
+namespace dbaui
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::document::XUndoManager;
+ using ::com::sun::star::lang::DisposedException;
+ using ::com::sun::star::document::UndoContextNotClosedException;
+ using ::com::sun::star::document::UndoFailedException;
+ using ::com::sun::star::document::EmptyUndoStackException;
+ using ::com::sun::star::util::InvalidStateException;
+ using ::com::sun::star::document::XUndoAction;
+ using ::com::sun::star::lang::IllegalArgumentException;
+ using ::com::sun::star::document::XUndoManagerListener;
+ using ::com::sun::star::util::NotLockedException;
+ using ::com::sun::star::lang::NoSupportException;
+ /** === end UNO using === **/
+
+ //==================================================================================================================
+ //= UndoManager_Impl
+ //==================================================================================================================
+ struct UndoManager_Impl : public ::framework::IUndoManagerImplementation
+ {
+ UndoManager_Impl( UndoManager& i_antiImpl, ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex )
+ :rAntiImpl( i_antiImpl )
+ ,rParent( i_parent )
+ ,rMutex( i_mutex )
+ ,bDisposed( false )
+ ,aUndoManager()
+ ,aUndoHelper( *this )
+ {
+ }
+
+ virtual ~UndoManager_Impl()
+ {
+ }
+
+ UndoManager& rAntiImpl;
+ ::cppu::OWeakObject& rParent;
+ ::osl::Mutex& rMutex;
+ bool bDisposed;
+ SfxUndoManager aUndoManager;
+ ::framework::UndoManagerHelper aUndoHelper;
+
+ // IUndoManagerImplementation
+ virtual ::svl::IUndoManager& getImplUndoManager();
+ virtual Reference< XUndoManager > getThis();
+ };
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::svl::IUndoManager& UndoManager_Impl::getImplUndoManager()
+ {
+ return aUndoManager;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XUndoManager > UndoManager_Impl::getThis()
+ {
+ return static_cast< XUndoManager* >( &rAntiImpl );
+ }
+
+ //==============================================================================================================
+ //= OslMutexFacade
+ //==============================================================================================================
+ class OslMutexFacade : public ::framework::IMutex
+ {
+ public:
+ OslMutexFacade( ::osl::Mutex& i_mutex )
+ :m_rMutex( i_mutex )
+ {
+ }
+
+ virtual void acquire();
+ virtual void release();
+
+ private:
+ ::osl::Mutex& m_rMutex;
+ };
+
+ //--------------------------------------------------------------------------------------------------------------
+ void OslMutexFacade::acquire()
+ {
+ m_rMutex.acquire();
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ void OslMutexFacade::release()
+ {
+ m_rMutex.release();
+ }
+
+ //==============================================================================================================
+ //= UndoManagerMethodGuard
+ //==============================================================================================================
+ /** guard for public UNO methods of the UndoManager
+ */
+ class UndoManagerMethodGuard : public ::framework::IMutexGuard
+ {
+ public:
+ UndoManagerMethodGuard( UndoManager_Impl& i_impl )
+ :m_aGuard( i_impl.rMutex )
+ ,m_aMutexFacade( i_impl.rMutex )
+ {
+ // throw if the instance is already disposed
+ if ( i_impl.bDisposed )
+ throw DisposedException( ::rtl::OUString(), i_impl.getThis() );
+ }
+ virtual ~UndoManagerMethodGuard()
+ {
+ }
+
+ // IMutexGuard
+ virtual ::framework::IMutex& getGuardedMutex();
+
+ // IGuard
+ virtual void clear();
+ virtual void reset();
+
+ private:
+ ::osl::ResettableMutexGuard m_aGuard;
+ OslMutexFacade m_aMutexFacade;
+ };
+
+ //--------------------------------------------------------------------------------------------------------------
+ ::framework::IMutex& UndoManagerMethodGuard::getGuardedMutex()
+ {
+ return m_aMutexFacade;
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ void UndoManagerMethodGuard::clear()
+ {
+ m_aGuard.clear();
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ void UndoManagerMethodGuard::reset()
+ {
+ m_aGuard.reset();
+ }
+
+ //==================================================================================================================
+ //= UndoManager
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ UndoManager::UndoManager( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex )
+ :m_pImpl( new UndoManager_Impl( *this, i_parent, i_mutex ) )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ UndoManager::~UndoManager()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ SfxUndoManager& UndoManager::GetSfxUndoManager() const
+ {
+ return m_pImpl->aUndoManager;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL UndoManager::acquire( ) throw ()
+ {
+ m_pImpl->rParent.acquire();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL UndoManager::release( ) throw ()
+ {
+ m_pImpl->rParent.release();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UndoManager::disposing()
+ {
+ {
+ ::osl::MutexGuard aGuard( m_pImpl->rMutex );
+ m_pImpl->bDisposed = true;
+ }
+ m_pImpl->aUndoHelper.disposing();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL UndoManager::enterUndoContext( const ::rtl::OUString& i_title ) throw (RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ m_pImpl->aUndoHelper.enterUndoContext( i_title, aGuard );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL UndoManager::enterHiddenUndoContext( ) throw (EmptyUndoStackException, RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ m_pImpl->aUndoHelper.enterHiddenUndoContext( aGuard );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL UndoManager::leaveUndoContext( ) throw (InvalidStateException, RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ m_pImpl->aUndoHelper.leaveUndoContext( aGuard );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL UndoManager::addUndoAction( const Reference< XUndoAction >& i_action ) throw (IllegalArgumentException, RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ m_pImpl->aUndoHelper.addUndoAction( i_action, aGuard );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL UndoManager::undo( ) throw (EmptyUndoStackException, UndoContextNotClosedException, UndoFailedException, RuntimeException)
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ // (all our UndoActions work directly on VCL code, usually, so ...)
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ m_pImpl->aUndoHelper.undo( aGuard );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL UndoManager::redo( ) throw (EmptyUndoStackException, UndoContextNotClosedException, UndoFailedException, RuntimeException)
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ // (all our UndoActions work directly on VCL code, usually, so ...)
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ m_pImpl->aUndoHelper.redo( aGuard );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL UndoManager::isUndoPossible( ) throw (RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ return m_pImpl->aUndoHelper.isUndoPossible();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL UndoManager::isRedoPossible( ) throw (RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ return m_pImpl->aUndoHelper.isRedoPossible();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL UndoManager::getCurrentUndoActionTitle( ) throw (EmptyUndoStackException, RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ return m_pImpl->aUndoHelper.getCurrentUndoActionTitle();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL UndoManager::getCurrentRedoActionTitle( ) throw (EmptyUndoStackException, RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ return m_pImpl->aUndoHelper.getCurrentRedoActionTitle();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL UndoManager::getAllUndoActionTitles( ) throw (RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ return m_pImpl->aUndoHelper.getAllUndoActionTitles();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL UndoManager::getAllRedoActionTitles( ) throw (RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ return m_pImpl->aUndoHelper.getAllRedoActionTitles();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL UndoManager::clear( ) throw (UndoContextNotClosedException, RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ m_pImpl->aUndoHelper.clear( aGuard );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL UndoManager::clearRedo( ) throw (UndoContextNotClosedException, RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ m_pImpl->aUndoHelper.clearRedo( aGuard );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL UndoManager::reset( ) throw (RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ m_pImpl->aUndoHelper.reset( aGuard );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL UndoManager::addUndoManagerListener( const Reference< XUndoManagerListener >& i_listener ) throw (RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ m_pImpl->aUndoHelper.addUndoManagerListener( i_listener );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL UndoManager::removeUndoManagerListener( const Reference< XUndoManagerListener >& i_listener ) throw (RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ m_pImpl->aUndoHelper.removeUndoManagerListener( i_listener );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL UndoManager::lock( ) throw (RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ m_pImpl->aUndoHelper.lock();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL UndoManager::unlock( ) throw (NotLockedException, RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ m_pImpl->aUndoHelper.unlock();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL UndoManager::isLocked( ) throw (RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ return m_pImpl->aUndoHelper.isLocked();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XInterface > SAL_CALL UndoManager::getParent( ) throw (RuntimeException)
+ {
+ UndoManagerMethodGuard aGuard( *m_pImpl );
+ return *&m_pImpl->rParent;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL UndoManager::setParent( const Reference< XInterface >& i_parent ) throw (NoSupportException, RuntimeException)
+ {
+ (void)i_parent;
+ throw NoSupportException( ::rtl::OUString(), m_pImpl->getThis() );
+ }
+
+//......................................................................................................................
+} // namespace dbaui
+//......................................................................................................................
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
new file mode 100644
index 000000000000..eb1b34710ff8
--- /dev/null
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -0,0 +1,672 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_dbaccess.hxx"
+
+#include "browserids.hxx"
+#include "commontypes.hxx"
+#include "dataview.hxx"
+#include "dbu_misc.hrc"
+#include "dbustrings.hrc"
+#include "moduledbu.hxx"
+#include "dbsubcomponentcontroller.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/frame/XUntitledNumbers.hpp>
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/sdb/XDocumentDataSource.hpp>
+#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
+#include <com/sun/star/sdbc/XDataSource.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/frame/XUntitledNumbers.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/sequence.hxx>
+#include <comphelper/types.hxx>
+#include <connectivity/dbexception.hxx>
+#include <connectivity/dbtools.hxx>
+#include <cppuhelper/typeprovider.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <toolkit/unohlp.hxx>
+#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
+#include <vcl/msgbox.hxx>
+
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::beans::XPropertySet;
+ using ::com::sun::star::util::XNumberFormatter;
+ using ::com::sun::star::lang::XMultiServiceFactory;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::sdbc::XConnection;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::container::XChild;
+ using ::com::sun::star::sdbc::XDataSource;
+ using ::com::sun::star::util::XNumberFormatter;
+ using ::com::sun::star::util::XNumberFormatsSupplier;
+ using ::com::sun::star::frame::XFrame;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::sdbc::SQLException;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::beans::PropertyValue;
+ using ::com::sun::star::frame::XModel;
+ using ::com::sun::star::sdb::XOfficeDatabaseDocument;
+ using ::com::sun::star::awt::XWindow;
+ using ::com::sun::star::sdbc::XDatabaseMetaData;
+ using ::com::sun::star::sdb::XDocumentDataSource;
+ using ::com::sun::star::document::XEmbeddedScripts;
+ using ::com::sun::star::lang::IllegalArgumentException;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::frame::XUntitledNumbers;
+ using ::com::sun::star::beans::PropertyVetoException;
+ /** === end UNO using === **/
+
+ class DataSourceHolder
+ {
+ public:
+ DataSourceHolder()
+ {
+ }
+
+ DataSourceHolder( const Reference< XDataSource >& _rxDataSource )
+ {
+ m_xDataSource = _rxDataSource;
+ Reference< XDocumentDataSource > xDocDS( m_xDataSource, UNO_QUERY );
+ if ( xDocDS.is() )
+ m_xDocument = xDocDS->getDatabaseDocument();
+
+ m_xDataSourceProps.set( m_xDataSource, UNO_QUERY );
+ }
+
+ const Reference< XDataSource >& getDataSource() const { return m_xDataSource; }
+ const Reference< XPropertySet >& getDataSourceProps() const { return m_xDataSourceProps; }
+ const Reference< XOfficeDatabaseDocument > getDatabaseDocument() const { return m_xDocument; }
+
+ bool is() const { return m_xDataSource.is(); }
+
+ void clear()
+ {
+ m_xDataSource.clear();
+ m_xDocument.clear();
+ }
+
+ private:
+ Reference< XDataSource > m_xDataSource;
+ Reference< XPropertySet > m_xDataSourceProps;
+ Reference< XOfficeDatabaseDocument > m_xDocument;
+ };
+
+ struct DBSubComponentController_Impl
+ {
+ private:
+ ::boost::optional< bool > m_aDocScriptSupport;
+
+ public:
+ OModuleClient m_aModuleClient;
+ ::dbtools::SQLExceptionInfo m_aCurrentError;
+
+ ::cppu::OInterfaceContainerHelper
+ m_aModifyListeners;
+
+ // <properties>
+ SharedConnection m_xConnection;
+ ::dbtools::DatabaseMetaData m_aSdbMetaData;
+ // </properties>
+ ::rtl::OUString m_sDataSourceName; // the data source we're working for
+ DataSourceHolder m_aDataSource;
+ Reference< XModel > m_xDocument;
+ Reference< XNumberFormatter > m_xFormatter; // a number formatter working with the connection's NumberFormatsSupplier
+ sal_Int32 m_nDocStartNumber;
+ sal_Bool m_bSuspended; // is true when the controller was already suspended
+ sal_Bool m_bEditable; // is the control readonly or not
+ sal_Bool m_bModified; // is the data modified
+ bool m_bNotAttached;
+
+ DBSubComponentController_Impl( ::osl::Mutex& i_rMutex )
+ :m_aDocScriptSupport()
+ ,m_aModifyListeners( i_rMutex )
+ ,m_nDocStartNumber(0)
+ ,m_bSuspended( sal_False )
+ ,m_bEditable(sal_True)
+ ,m_bModified(sal_False)
+ ,m_bNotAttached(true)
+ {
+ }
+
+ bool documentHasScriptSupport() const
+ {
+ OSL_PRECOND( !!m_aDocScriptSupport,
+ "DBSubComponentController_Impl::documentHasScriptSupport: not completely initialized, yet - don't know!?" );
+ return !!m_aDocScriptSupport && *m_aDocScriptSupport;
+ }
+
+ void setDocumentScriptSupport( const bool _bSupport )
+ {
+ OSL_PRECOND( !m_aDocScriptSupport,
+ "DBSubComponentController_Impl::setDocumentScriptSupport: already initialized!" );
+ m_aDocScriptSupport = ::boost::optional< bool >( _bSupport );
+ }
+ };
+
+ //====================================================================
+ //= DBSubComponentController
+ //====================================================================
+ //--------------------------------------------------------------------
+ DBSubComponentController::DBSubComponentController(const Reference< XMultiServiceFactory >& _rxORB)
+ :DBSubComponentController_Base( _rxORB )
+ ,m_pImpl( new DBSubComponentController_Impl( getMutex() ) )
+ {
+ }
+
+ //--------------------------------------------------------------------
+ DBSubComponentController::~DBSubComponentController()
+ {
+ }
+
+ //--------------------------------------------------------------------
+ void DBSubComponentController::impl_initialize()
+ {
+ OGenericUnoController::impl_initialize();
+
+ const ::comphelper::NamedValueCollection& rArguments( getInitParams() );
+
+ Reference< XConnection > xConnection;
+ xConnection = rArguments.getOrDefault( (::rtl::OUString)PROPERTY_ACTIVE_CONNECTION, xConnection );
+
+ if ( !xConnection.is() )
+ ::dbtools::isEmbeddedInDatabase( getModel(), xConnection );
+
+ if ( xConnection.is() )
+ initializeConnection( xConnection );
+
+ bool bShowError = true;
+ if ( !isConnected() )
+ {
+ reconnect( sal_False );
+ bShowError = false;
+ }
+ if ( !isConnected() )
+ {
+ if ( bShowError )
+ connectionLostMessage();
+ throw IllegalArgumentException();
+ }
+ }
+
+ //--------------------------------------------------------------------
+ Any SAL_CALL DBSubComponentController::queryInterface(const Type& _rType) throw (RuntimeException)
+ {
+ if ( _rType.equals( XScriptInvocationContext::static_type() ) )
+ {
+ if ( m_pImpl->documentHasScriptSupport() )
+ return makeAny( Reference< XScriptInvocationContext >( this ) );
+ return Any();
+ }
+
+ return DBSubComponentController_Base::queryInterface( _rType );
+ }
+
+ //--------------------------------------------------------------------
+ Sequence< Type > SAL_CALL DBSubComponentController::getTypes( ) throw (RuntimeException)
+ {
+ Sequence< Type > aTypes( DBSubComponentController_Base::getTypes() );
+ if ( !m_pImpl->documentHasScriptSupport() )
+ {
+ Sequence< Type > aStrippedTypes( aTypes.getLength() - 1 );
+ ::std::remove_copy_if(
+ aTypes.getConstArray(),
+ aTypes.getConstArray() + aTypes.getLength(),
+ aStrippedTypes.getArray(),
+ ::std::bind2nd( ::std::equal_to< Type >(), XScriptInvocationContext::static_type() )
+ );
+ aTypes = aStrippedTypes;
+ }
+ return aTypes;
+ }
+
+ //--------------------------------------------------------------------
+ void DBSubComponentController::initializeConnection( const Reference< XConnection >& _rxForeignConn )
+ {
+ DBG_ASSERT( !isConnected(), "DBSubComponentController::initializeConnection: not to be called when already connected!" );
+ // usually this gets called from within initialize of derived classes ...
+ if ( isConnected() )
+ disconnect();
+
+ m_pImpl->m_xConnection.reset( _rxForeignConn, SharedConnection::NoTakeOwnership );
+ m_pImpl->m_aSdbMetaData.reset( m_pImpl->m_xConnection );
+ startConnectionListening( m_pImpl->m_xConnection );
+
+ // get the data source the connection belongs to
+ try
+ {
+ // determine our data source
+ OSL_PRECOND( !m_pImpl->m_aDataSource.is(), "DBSubComponentController::initializeConnection: already a data source in this phase?" );
+ {
+ Reference< XChild > xConnAsChild( m_pImpl->m_xConnection, UNO_QUERY );
+ Reference< XDataSource > xDS;
+ if ( xConnAsChild.is() )
+ xDS = Reference< XDataSource >( xConnAsChild->getParent(), UNO_QUERY );
+
+ // (take the indirection through XDataSource to ensure we have a correct object ....)
+ m_pImpl->m_aDataSource = xDS;
+ }
+ OSL_POSTCOND( m_pImpl->m_aDataSource.is(), "DBSubComponentController::initializeConnection: unable to obtain the data source object!" );
+
+ if ( m_pImpl->m_bNotAttached )
+ {
+ Reference< XUntitledNumbers > xUntitledProvider( getDatabaseDocument(), UNO_QUERY );
+ m_pImpl->m_nDocStartNumber = 1;
+ if ( xUntitledProvider.is() )
+ m_pImpl->m_nDocStartNumber = xUntitledProvider->leaseNumber( static_cast< XWeak* >( this ) );
+ }
+
+ // determine the availability of script support in our document. Our own XScriptInvocationContext
+ // interface depends on this
+ m_pImpl->setDocumentScriptSupport( Reference< XEmbeddedScripts >( getDatabaseDocument(), UNO_QUERY ).is() );
+
+ // get a number formatter
+ Reference< XPropertySet > xDataSourceProps( m_pImpl->m_aDataSource.getDataSourceProps(), UNO_SET_THROW );
+ xDataSourceProps->getPropertyValue( PROPERTY_NAME ) >>= m_pImpl->m_sDataSourceName;
+ DBG_ASSERT( m_pImpl->m_sDataSourceName.getLength(), "DBSubComponentController::initializeConnection: invalid data source name!" );
+ Reference< XNumberFormatsSupplier> xSupplier = ::dbtools::getNumberFormats(m_pImpl->m_xConnection);
+ if(xSupplier.is())
+ {
+ m_pImpl->m_xFormatter = Reference< XNumberFormatter >(getORB()
+ ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatter")), UNO_QUERY);
+ m_pImpl->m_xFormatter->attachNumberFormatsSupplier(xSupplier);
+ }
+ OSL_ENSURE(m_pImpl->m_xFormatter.is(),"No NumberFormatter!");
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //--------------------------------------------------------------------
+ void DBSubComponentController::reconnect( sal_Bool _bUI )
+ {
+ OSL_ENSURE(!m_pImpl->m_bSuspended, "Cannot reconnect while suspended!");
+
+ stopConnectionListening( m_pImpl->m_xConnection );
+ m_pImpl->m_aSdbMetaData.reset( NULL );
+ m_pImpl->m_xConnection.clear();
+
+ // reconnect
+ sal_Bool bReConnect = sal_True;
+ if ( _bUI )
+ {
+ QueryBox aQuery( getView(), ModuleRes(QUERY_CONNECTION_LOST) );
+ bReConnect = ( RET_YES == aQuery.Execute() );
+ }
+
+ // now really reconnect ...
+ if ( bReConnect )
+ {
+ m_pImpl->m_xConnection.reset( connect( m_pImpl->m_aDataSource.getDataSource(), NULL ), SharedConnection::TakeOwnership );
+ m_pImpl->m_aSdbMetaData.reset( m_pImpl->m_xConnection );
+ }
+
+ // invalidate all slots
+ InvalidateAll();
+ }
+
+ //--------------------------------------------------------------------
+ void DBSubComponentController::disconnect()
+ {
+ stopConnectionListening(m_pImpl->m_xConnection);
+ m_pImpl->m_aSdbMetaData.reset( NULL );
+ m_pImpl->m_xConnection.clear();
+
+ InvalidateAll();
+ }
+
+ //--------------------------------------------------------------------
+ void DBSubComponentController::losingConnection()
+ {
+ // our connection was disposed so we need a new one
+ reconnect( sal_True );
+ InvalidateAll();
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL DBSubComponentController::disposing()
+ {
+ DBSubComponentController_Base::disposing();
+
+ disconnect();
+
+ attachFrame( Reference < XFrame >() );
+
+ m_pImpl->m_aDataSource.clear();
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL DBSubComponentController::disposing(const EventObject& _rSource) throw( RuntimeException )
+ {
+ if ( _rSource.Source == getConnection() )
+ {
+ if ( !m_pImpl->m_bSuspended // when already suspended then we don't have to reconnect
+ && !getBroadcastHelper().bInDispose
+ && !getBroadcastHelper().bDisposed
+ && isConnected()
+ )
+ {
+ losingConnection();
+ }
+ else
+ {
+ m_pImpl->m_xConnection.reset( m_pImpl->m_xConnection, SharedConnection::NoTakeOwnership );
+ // this prevents the "disposeComponent" call in disconnect
+ disconnect();
+ }
+ }
+ else
+ DBSubComponentController_Base::disposing( _rSource );
+ }
+
+ //--------------------------------------------------------------------
+ void DBSubComponentController::appendError( const ::rtl::OUString& _rErrorMessage, const ::dbtools::StandardSQLState _eSQLState,
+ const sal_Int32 _nErrorCode )
+ {
+ m_pImpl->m_aCurrentError.append( ::dbtools::SQLExceptionInfo::SQL_EXCEPTION, _rErrorMessage, getStandardSQLStateAscii( _eSQLState ),
+ _nErrorCode );
+ }
+ //--------------------------------------------------------------------
+ void DBSubComponentController::clearError()
+ {
+ m_pImpl->m_aCurrentError = ::dbtools::SQLExceptionInfo();
+ }
+
+ //--------------------------------------------------------------------
+ sal_Bool DBSubComponentController::hasError() const
+ {
+ return m_pImpl->m_aCurrentError.isValid();
+ }
+
+ //--------------------------------------------------------------------
+ const ::dbtools::SQLExceptionInfo& DBSubComponentController::getError() const
+ {
+ return m_pImpl->m_aCurrentError;
+ }
+
+ //--------------------------------------------------------------------
+ void DBSubComponentController::displayError()
+ {
+ showError( m_pImpl->m_aCurrentError );
+ }
+
+ //--------------------------------------------------------------------
+ sal_Bool SAL_CALL DBSubComponentController::suspend(sal_Bool bSuspend) throw( RuntimeException )
+ {
+ m_pImpl->m_bSuspended = bSuspend;
+ if ( !bSuspend && !isConnected() )
+ reconnect(sal_True);
+
+
+ return sal_True;
+ }
+
+ // -----------------------------------------------------------------------------
+ sal_Bool SAL_CALL DBSubComponentController::attachModel( const Reference< XModel > & _rxModel) throw( RuntimeException )
+ {
+ if ( !_rxModel.is() )
+ return sal_False;
+ if ( !DBSubComponentController_Base::attachModel( _rxModel ) )
+ return sal_False;
+
+ m_pImpl->m_bNotAttached = false;
+ if ( m_pImpl->m_nDocStartNumber == 1 )
+ releaseNumberForComponent();
+
+ Reference< XUntitledNumbers > xUntitledProvider( _rxModel, UNO_QUERY );
+ m_pImpl->m_nDocStartNumber = 1;
+ if ( xUntitledProvider.is() )
+ m_pImpl->m_nDocStartNumber = xUntitledProvider->leaseNumber( static_cast< XWeak* >( this ) );
+
+ return sal_True;
+ }
+
+ // -----------------------------------------------------------------------------
+ void DBSubComponentController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& _rArgs)
+ {
+ if ( _nId == ID_BROWSER_CLOSE )
+ {
+ closeTask();
+ return;
+ }
+
+ DBSubComponentController_Base::Execute( _nId, _rArgs );
+ InvalidateFeature( _nId );
+ }
+
+ // -----------------------------------------------------------------------------
+ ::rtl::OUString DBSubComponentController::getDataSourceName() const
+ {
+ ::rtl::OUString sName;
+ Reference< XPropertySet > xDataSourceProps( m_pImpl->m_aDataSource.getDataSourceProps() );
+ if ( xDataSourceProps.is() )
+ xDataSourceProps->getPropertyValue(PROPERTY_NAME) >>= sName;
+ return sName;
+ }
+ // -----------------------------------------------------------------------------
+ void DBSubComponentController::connectionLostMessage() const
+ {
+ String aMessage(ModuleRes(RID_STR_CONNECTION_LOST));
+ Reference< XWindow > xWindow = getTopMostContainerWindow();
+ Window* pWin = NULL;
+ if ( xWindow.is() )
+ pWin = VCLUnoHelper::GetWindow(xWindow);
+ if ( !pWin )
+ pWin = getView()->Window::GetParent();
+
+ InfoBox(pWin, aMessage).Execute();
+ }
+ // -----------------------------------------------------------------------------
+ const Reference< XConnection >& DBSubComponentController::getConnection() const
+ {
+ return m_pImpl->m_xConnection;
+ }
+
+ // -----------------------------------------------------------------------------
+ sal_Bool DBSubComponentController::isReadOnly() const
+ {
+ return !m_pImpl->m_bEditable;
+ }
+
+ // -----------------------------------------------------------------------------
+ sal_Bool DBSubComponentController::isEditable() const
+ {
+ return m_pImpl->m_bEditable;
+ }
+
+ // -----------------------------------------------------------------------------
+ void DBSubComponentController::setEditable(sal_Bool _bEditable)
+ {
+ m_pImpl->m_bEditable = _bEditable;
+ }
+
+ // -----------------------------------------------------------------------------
+ const ::dbtools::DatabaseMetaData& DBSubComponentController::getSdbMetaData() const
+ {
+ return m_pImpl->m_aSdbMetaData;
+ }
+
+ // -----------------------------------------------------------------------------
+ sal_Bool DBSubComponentController::isConnected() const
+ {
+ return m_pImpl->m_xConnection.is();
+ }
+
+ // -----------------------------------------------------------------------------
+ Reference< XDatabaseMetaData > DBSubComponentController::getMetaData( ) const
+ {
+ Reference< XDatabaseMetaData > xMeta;
+ try
+ {
+ if ( isConnected() )
+ xMeta.set( m_pImpl->m_xConnection->getMetaData(), UNO_SET_THROW );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return xMeta;
+ }
+
+ // -----------------------------------------------------------------------------
+ const Reference< XPropertySet >& DBSubComponentController::getDataSource() const
+ {
+ return m_pImpl->m_aDataSource.getDataSourceProps();
+ }
+
+ // -----------------------------------------------------------------------------
+ sal_Bool DBSubComponentController::haveDataSource() const
+ {
+ return m_pImpl->m_aDataSource.is();
+ }
+
+ // -----------------------------------------------------------------------------
+ Reference< XModel > DBSubComponentController::getDatabaseDocument() const
+ {
+ return Reference< XModel >( m_pImpl->m_aDataSource.getDatabaseDocument(), UNO_QUERY );
+ }
+
+ // -----------------------------------------------------------------------------
+ Reference< XNumberFormatter > DBSubComponentController::getNumberFormatter() const
+ {
+ return m_pImpl->m_xFormatter;
+ }
+
+ // -----------------------------------------------------------------------------
+ Reference< XModel > DBSubComponentController::getPrivateModel() const
+ {
+ return getDatabaseDocument();
+ }
+ // -----------------------------------------------------------------------------
+ // XTitle
+ ::rtl::OUString SAL_CALL DBSubComponentController::getTitle()
+ throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( getMutex() );
+ if ( m_bExternalTitle )
+ return impl_getTitleHelper_throw()->getTitle ();
+
+ ::rtl::OUStringBuffer sTitle;
+ Reference< XTitle > xTitle(getPrivateModel(),UNO_QUERY);
+ if ( xTitle.is() )
+ {
+ sTitle.append( xTitle->getTitle() );
+ sTitle.appendAscii(" : ");
+ }
+ sTitle.append( getPrivateTitle() );
+ return sTitle.makeStringAndClear();
+ }
+
+ // -----------------------------------------------------------------------------
+ sal_Int32 DBSubComponentController::getCurrentStartNumber() const
+ {
+ return m_pImpl->m_nDocStartNumber;
+ }
+
+ // -----------------------------------------------------------------------------
+ Reference< XEmbeddedScripts > SAL_CALL DBSubComponentController::getScriptContainer() throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( getMutex() );
+ if ( !m_pImpl->documentHasScriptSupport() )
+ return NULL;
+
+ return Reference< XEmbeddedScripts >( getDatabaseDocument(), UNO_QUERY_THROW );
+ }
+
+ // -----------------------------------------------------------------------------
+ void SAL_CALL DBSubComponentController::addModifyListener( const Reference< XModifyListener >& i_Listener ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( getMutex() );
+ m_pImpl->m_aModifyListeners.addInterface( i_Listener );
+ }
+
+ // -----------------------------------------------------------------------------
+ void SAL_CALL DBSubComponentController::removeModifyListener( const Reference< XModifyListener >& i_Listener ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( getMutex() );
+ m_pImpl->m_aModifyListeners.removeInterface( i_Listener );
+ }
+
+ // -----------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL DBSubComponentController::isModified( ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( getMutex() );
+ return impl_isModified();
+ }
+
+ // -----------------------------------------------------------------------------
+ void SAL_CALL DBSubComponentController::setModified( ::sal_Bool i_bModified ) throw (PropertyVetoException, RuntimeException)
+ {
+ ::osl::ClearableMutexGuard aGuard( getMutex() );
+
+ if ( m_pImpl->m_bModified == i_bModified )
+ return;
+
+ m_pImpl->m_bModified = i_bModified;
+ impl_onModifyChanged();
+
+ EventObject aEvent( *this );
+ aGuard.clear();
+ m_pImpl->m_aModifyListeners.notifyEach( &XModifyListener::modified, aEvent );
+ }
+
+ // -----------------------------------------------------------------------------
+ sal_Bool DBSubComponentController::impl_isModified() const
+ {
+ return m_pImpl->m_bModified;
+ }
+
+ // -----------------------------------------------------------------------------
+ void DBSubComponentController::impl_onModifyChanged()
+ {
+ InvalidateFeature( ID_BROWSER_SAVEDOC );
+ if ( isFeatureSupported( ID_BROWSER_SAVEASDOC ) )
+ InvalidateFeature( ID_BROWSER_SAVEASDOC );
+ }
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
+
diff --git a/dbaccess/source/ui/misc/dbumiscres.src b/dbaccess/source/ui/misc/dbumiscres.src
index ae5979c0a96a..974b36e68005 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/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx
index cdf891af86df..945489cf7b62 100644
--- a/dbaccess/source/ui/misc/dsmeta.cxx
+++ b/dbaccess/source/ui/misc/dsmeta.cxx
@@ -94,6 +94,7 @@ namespace dbaui
{ DSID_IGNORECURRENCY, "IgnoreCurrency" },
{ DSID_ESCAPE_DATETIME, "EscapeDateTime" },
{ DSID_PRIMARY_KEY_SUPPORT, "PrimaryKeySupport" },
+ { DSID_MAX_ROW_SCAN, "MaxRowScan" },
{ 0, NULL }
};
return s_aMappings;
diff --git a/dbaccess/source/ui/misc/imageprovider.cxx b/dbaccess/source/ui/misc/imageprovider.cxx
index 959f02a20ef1..7d7ce2764d0c 100644
--- a/dbaccess/source/ui/misc/imageprovider.cxx
+++ b/dbaccess/source/ui/misc/imageprovider.cxx
@@ -97,7 +97,7 @@ namespace dbaui
//................................................................
static void lcl_getTableImageResourceID_nothrow( const ImageProvider_Data& _rData, const ::rtl::OUString& _rName,
- USHORT& _out_rResourceID )
+ sal_uInt16& _out_rResourceID)
{
_out_rResourceID = 0;
try
@@ -165,7 +165,7 @@ namespace dbaui
if ( !_out_rImage )
{
// no -> determine by type
- USHORT nImageResourceID = 0;
+ sal_uInt16 nImageResourceID = 0;
lcl_getTableImageResourceID_nothrow( *m_pData, _rName, nImageResourceID );
if ( nImageResourceID && !_out_rImage )
@@ -178,16 +178,16 @@ namespace dbaui
Image ImageProvider::getDefaultImage( sal_Int32 _nDatabaseObjectType )
{
Image aObjectImage;
- USHORT nImageResourceID( getDefaultImageResourceID( _nDatabaseObjectType ) );
+ sal_uInt16 nImageResourceID( getDefaultImageResourceID( _nDatabaseObjectType) );
if ( nImageResourceID )
aObjectImage = Image( ModuleRes( nImageResourceID ) );
return aObjectImage;
}
//--------------------------------------------------------------------
- USHORT ImageProvider::getDefaultImageResourceID( sal_Int32 _nDatabaseObjectType )
+ sal_uInt16 ImageProvider::getDefaultImageResourceID( sal_Int32 _nDatabaseObjectType)
{
- USHORT nImageResourceID( 0 );
+ sal_uInt16 nImageResourceID( 0 );
switch ( _nDatabaseObjectType )
{
case DatabaseObject::QUERY:
@@ -212,7 +212,7 @@ namespace dbaui
//--------------------------------------------------------------------
Image ImageProvider::getFolderImage( sal_Int32 _nDatabaseObjectType )
{
- USHORT nImageResourceID( 0 );
+ sal_uInt16 nImageResourceID( 0 );
switch ( _nDatabaseObjectType )
{
case DatabaseObject::QUERY:
diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx
index d0bca46d2e16..897514b3a185 100644
--- a/dbaccess/source/ui/misc/linkeddocuments.cxx
+++ b/dbaccess/source/ui/misc/linkeddocuments.cxx
@@ -46,7 +46,7 @@
#include <com/sun/star/ucb/OpenCommandArgument.hpp>
#include <com/sun/star/ucb/OpenMode.hpp>
#include <com/sun/star/task/XJobExecutor.hpp>
-#include <cppuhelper/extract.hxx>
+#include <comphelper/extract.hxx>
#include <comphelper/types.hxx>
#include <vcl/msgbox.hxx>
#include <ucbhelper/content.hxx>
@@ -60,7 +60,6 @@
#include <sfx2/app.hxx>
#include <basic/sbx.hxx>
#include <basic/sbuno.hxx>
-#include <sfx2/macrconf.hxx>
#include <svtools/ehdl.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <com/sun/star/container/XHierarchicalNameContainer.hpp>
diff --git a/dbaccess/source/ui/misc/makefile.mk b/dbaccess/source/ui/misc/makefile.mk
index 7f9bbed56023..534d90e3995c 100644
--- a/dbaccess/source/ui/misc/makefile.mk
+++ b/dbaccess/source/ui/misc/makefile.mk
@@ -25,8 +25,8 @@
#
#*************************************************************************
-PRJ=..$/..$/..
-PRJINC=$(PRJ)$/source
+PRJ=../../..
+PRJINC=$(PRJ)/source
PRJNAME=dbaccess
TARGET=uimisc
@@ -35,50 +35,53 @@ ENABLE_EXCEPTIONS=TRUE
# --- Settings ----------------------------------
.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
+.INCLUDE : $(PRJ)/util/makefile.pmk
# --- Files -------------------------------------
# ... resource files ............................
SRS1NAME=$(TARGET)
-SRC1FILES = \
- dbumiscres.src \
+SRC1FILES = \
+ dbumiscres.src \
WizardPages.src
# ... object files ............................
-SLOFILES= \
- $(SLO)$/asyncmodaldialog.obj \
- $(SLO)$/imageprovider.obj \
- $(SLO)$/singledoccontroller.obj \
- $(SLO)$/datasourceconnector.obj \
- $(SLO)$/linkeddocuments.obj \
- $(SLO)$/indexcollection.obj \
- $(SLO)$/UITools.obj \
- $(SLO)$/WCPage.obj \
- $(SLO)$/WCopyTable.obj \
- $(SLO)$/WTypeSelect.obj \
- $(SLO)$/TokenWriter.obj \
- $(SLO)$/HtmlReader.obj \
- $(SLO)$/RtfReader.obj \
- $(SLO)$/propertysetitem.obj \
- $(SLO)$/databaseobjectview.obj \
- $(SLO)$/DExport.obj \
- $(SLO)$/uiservices.obj \
- $(SLO)$/RowSetDrop.obj \
- $(SLO)$/TableCopyHelper.obj \
- $(SLO)$/moduledbu.obj \
- $(SLO)$/WColumnSelect.obj \
- $(SLO)$/WExtendPages.obj \
- $(SLO)$/WNameMatch.obj \
- $(SLO)$/ToolBoxHelper.obj \
- $(SLO)$/stringlistitem.obj \
- $(SLO)$/charsets.obj \
- $(SLO)$/defaultobjectnamecheck.obj \
- $(SLO)$/dsmeta.obj \
- $(SLO)$/controllerframe.obj \
- $(SLO)$/propertystorage.obj
+SLOFILES= \
+ $(SLO)/asyncmodaldialog.obj \
+ $(SLO)/imageprovider.obj \
+ $(SLO)/singledoccontroller.obj \
+ $(SLO)/dbsubcomponentcontroller.obj \
+ $(SLO)/datasourceconnector.obj \
+ $(SLO)/linkeddocuments.obj \
+ $(SLO)/indexcollection.obj \
+ $(SLO)/UITools.obj \
+ $(SLO)/WCPage.obj \
+ $(SLO)/WCopyTable.obj \
+ $(SLO)/WTypeSelect.obj \
+ $(SLO)/TokenWriter.obj \
+ $(SLO)/HtmlReader.obj \
+ $(SLO)/RtfReader.obj \
+ $(SLO)/propertysetitem.obj \
+ $(SLO)/databaseobjectview.obj \
+ $(SLO)/DExport.obj \
+ $(SLO)/uiservices.obj \
+ $(SLO)/RowSetDrop.obj \
+ $(SLO)/TableCopyHelper.obj \
+ $(SLO)/moduledbu.obj \
+ $(SLO)/WColumnSelect.obj \
+ $(SLO)/WExtendPages.obj \
+ $(SLO)/WNameMatch.obj \
+ $(SLO)/ToolBoxHelper.obj \
+ $(SLO)/stringlistitem.obj \
+ $(SLO)/charsets.obj \
+ $(SLO)/defaultobjectnamecheck.obj \
+ $(SLO)/dsmeta.obj \
+ $(SLO)/controllerframe.obj \
+ $(SLO)/propertystorage.obj \
+ $(SLO)/dbaundomanager.obj \
+
# --- Targets ----------------------------------
.INCLUDE : target.mk
diff --git a/dbaccess/source/ui/misc/singledoccontroller.cxx b/dbaccess/source/ui/misc/singledoccontroller.cxx
index 590403c49fa9..4f6d7b909d55 100644..100755
--- a/dbaccess/source/ui/misc/singledoccontroller.cxx
+++ b/dbaccess/source/ui/misc/singledoccontroller.cxx
@@ -1,6 +1,5 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
- *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
@@ -26,719 +25,180 @@
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
+#include "dbaundomanager.hxx"
+#include "singledoccontroller.hxx"
#include "browserids.hxx"
-#include "commontypes.hxx"
-#include "dataview.hxx"
#include "dbu_misc.hrc"
#include "dbustrings.hrc"
#include "moduledbu.hxx"
-#include "singledoccontroller.hxx"
-#include <com/sun/star/frame/XUntitledNumbers.hpp>
/** === begin UNO includes === **/
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/container/XChild.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/sdb/XDocumentDataSource.hpp>
-#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
-#include <com/sun/star/sdbc/XDataSource.hpp>
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <com/sun/star/frame/XUntitledNumbers.hpp>
/** === end UNO includes === **/
-#include <comphelper/sequence.hxx>
-#include <comphelper/types.hxx>
-#include <connectivity/dbexception.hxx>
-#include <connectivity/dbtools.hxx>
-#include <cppuhelper/typeprovider.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <toolkit/unohlp.hxx>
-#include <tools/diagnose_ex.h>
+#include <svl/undo.hxx>
#include <osl/diagnose.h>
-#include <vcl/msgbox.hxx>
-//........................................................................
+#include <boost/scoped_ptr.hpp>
+
+//......................................................................................................................
namespace dbaui
{
-//........................................................................
+//......................................................................................................................
/** === begin UNO using === **/
- using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::Reference;
- using ::com::sun::star::beans::XPropertySet;
- using ::com::sun::star::util::XNumberFormatter;
- using ::com::sun::star::lang::XMultiServiceFactory;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Type;
- using ::com::sun::star::sdbc::XConnection;
- using ::com::sun::star::uno::UNO_QUERY;
- using ::com::sun::star::container::XChild;
- using ::com::sun::star::sdbc::XDataSource;
- using ::com::sun::star::util::XNumberFormatter;
- using ::com::sun::star::util::XNumberFormatsSupplier;
- using ::com::sun::star::frame::XFrame;
- using ::com::sun::star::uno::Exception;
- using ::com::sun::star::sdbc::SQLException;
- using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::document::XUndoManager;
+ using ::com::sun::star::lang::XMultiServiceFactory;
using ::com::sun::star::beans::PropertyValue;
- using ::com::sun::star::frame::XModel;
- using ::com::sun::star::sdb::XOfficeDatabaseDocument;
- using ::com::sun::star::awt::XWindow;
- using ::com::sun::star::sdbc::XDatabaseMetaData;
- using ::com::sun::star::sdb::XDocumentDataSource;
- using ::com::sun::star::document::XEmbeddedScripts;
- using ::com::sun::star::lang::IllegalArgumentException;
- using ::com::sun::star::uno::UNO_SET_THROW;
- using ::com::sun::star::uno::UNO_QUERY_THROW;
- using ::com::sun::star::frame::XUntitledNumbers;
- using ::com::sun::star::beans::PropertyVetoException;
+ using ::com::sun::star::lang::EventObject;
/** === end UNO using === **/
- class DataSourceHolder
+ //==================================================================================================================
+ //= OSingleDocumentController_Data
+ //==================================================================================================================
+ struct OSingleDocumentController_Data
{
- public:
- DataSourceHolder()
- {
- }
+ ::boost::scoped_ptr< UndoManager > m_pUndoManager;
- DataSourceHolder( const Reference< XDataSource >& _rxDataSource )
+ OSingleDocumentController_Data( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex )
+ :m_pUndoManager( new UndoManager( i_parent, i_mutex ) )
{
- m_xDataSource = _rxDataSource;
- Reference< XDocumentDataSource > xDocDS( m_xDataSource, UNO_QUERY );
- if ( xDocDS.is() )
- m_xDocument = xDocDS->getDatabaseDocument();
-
- m_xDataSourceProps.set( m_xDataSource, UNO_QUERY );
}
-
- const Reference< XDataSource >& getDataSource() const { return m_xDataSource; }
- const Reference< XPropertySet >& getDataSourceProps() const { return m_xDataSourceProps; }
- const Reference< XOfficeDatabaseDocument > getDatabaseDocument() const { return m_xDocument; }
-
- bool is() const { return m_xDataSource.is(); }
-
- void clear()
- {
- m_xDataSource.clear();
- m_xDocument.clear();
- }
-
- private:
- Reference< XDataSource > m_xDataSource;
- Reference< XPropertySet > m_xDataSourceProps;
- Reference< XOfficeDatabaseDocument > m_xDocument;
};
- struct OSingleDocumentControllerImpl
- {
- private:
- ::boost::optional< bool > m_aDocScriptSupport;
-
- public:
- OModuleClient m_aModuleClient;
- ::dbtools::SQLExceptionInfo m_aCurrentError; // contains the current error which can be set through IEnvironment
-
- ::cppu::OInterfaceContainerHelper
- m_aModifyListeners;
-
- // <properties>
- SharedConnection m_xConnection;
- ::dbtools::DatabaseMetaData m_aSdbMetaData;
- // </properties>
- ::rtl::OUString m_sDataSourceName; // the data source we're working for
- DataSourceHolder m_aDataSource;
- Reference< XModel > m_xDocument;
- Reference< XNumberFormatter > m_xFormatter; // a number formatter working with the connection's NumberFormatsSupplier
- sal_Int32 m_nDocStartNumber;
- sal_Bool m_bSuspended; // is true when the controller was already suspended
- sal_Bool m_bEditable; // is the control readonly or not
- sal_Bool m_bModified; // is the data modified
- bool m_bNotAttached;
-
- OSingleDocumentControllerImpl( ::osl::Mutex& i_rMutex )
- :m_aDocScriptSupport()
- ,m_aModifyListeners( i_rMutex )
- ,m_nDocStartNumber(0)
- ,m_bSuspended( sal_False )
- ,m_bEditable(sal_True)
- ,m_bModified(sal_False)
- ,m_bNotAttached(true)
- {
- }
-
- bool documentHasScriptSupport() const
- {
- OSL_PRECOND( !!m_aDocScriptSupport,
- "OSingleDocumentControllerImpl::documentHasScriptSupport: not completely initialized, yet - don't know!?" );
- return !!m_aDocScriptSupport && *m_aDocScriptSupport;
- }
-
- void setDocumentScriptSupport( const bool _bSupport )
- {
- OSL_PRECOND( !m_aDocScriptSupport,
- "OSingleDocumentControllerImpl::setDocumentScriptSupport: already initialized!" );
- m_aDocScriptSupport = ::boost::optional< bool >( _bSupport );
- }
- };
-
- //====================================================================
+ //==================================================================================================================
//= OSingleDocumentController
- //====================================================================
- //--------------------------------------------------------------------
- OSingleDocumentController::OSingleDocumentController(const Reference< XMultiServiceFactory >& _rxORB)
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ OSingleDocumentController::OSingleDocumentController( const Reference< XMultiServiceFactory >& _rxORB )
:OSingleDocumentController_Base( _rxORB )
- ,m_pImpl( new OSingleDocumentControllerImpl( getMutex() ) )
+ ,m_pData( new OSingleDocumentController_Data( *this, getMutex() ) )
{
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
OSingleDocumentController::~OSingleDocumentController()
{
}
- //--------------------------------------------------------------------
- void OSingleDocumentController::impl_initialize()
- {
- OGenericUnoController::impl_initialize();
-
- const ::comphelper::NamedValueCollection& rArguments( getInitParams() );
-
- Reference< XConnection > xConnection;
- xConnection = rArguments.getOrDefault( (::rtl::OUString)PROPERTY_ACTIVE_CONNECTION, xConnection );
-
- if ( !xConnection.is() )
- ::dbtools::isEmbeddedInDatabase( getModel(), xConnection );
-
- if ( xConnection.is() )
- initializeConnection( xConnection );
-
- bool bShowError = true;
- if ( !isConnected() )
- {
- reconnect( sal_False );
- bShowError = false;
- }
- if ( !isConnected() )
- {
- if ( bShowError )
- connectionLostMessage();
- throw IllegalArgumentException();
- }
- }
-
- //--------------------------------------------------------------------
- Any SAL_CALL OSingleDocumentController::queryInterface(const Type& _rType) throw (RuntimeException)
- {
- if ( _rType.equals( XScriptInvocationContext::static_type() ) )
- {
- if ( m_pImpl->documentHasScriptSupport() )
- return makeAny( Reference< XScriptInvocationContext >( this ) );
- return Any();
- }
-
- return OSingleDocumentController_Base::queryInterface( _rType );
- }
-
- //--------------------------------------------------------------------
- Sequence< Type > SAL_CALL OSingleDocumentController::getTypes( ) throw (RuntimeException)
- {
- Sequence< Type > aTypes( OSingleDocumentController_Base::getTypes() );
- if ( !m_pImpl->documentHasScriptSupport() )
- {
- Sequence< Type > aStrippedTypes( aTypes.getLength() - 1 );
- ::std::remove_copy_if(
- aTypes.getConstArray(),
- aTypes.getConstArray() + aTypes.getLength(),
- aStrippedTypes.getArray(),
- ::std::bind2nd( ::std::equal_to< Type >(), XScriptInvocationContext::static_type() )
- );
- aTypes = aStrippedTypes;
- }
- return aTypes;
- }
-
- //--------------------------------------------------------------------
- void OSingleDocumentController::initializeConnection( const Reference< XConnection >& _rxForeignConn )
- {
- OSL_ENSURE( !isConnected(), "OSingleDocumentController::initializeConnection: not to be called when already connected!" );
- // usually this gets called from within initialize of derived classes ...
- if ( isConnected() )
- disconnect();
-
- m_pImpl->m_xConnection.reset( _rxForeignConn, SharedConnection::NoTakeOwnership );
- m_pImpl->m_aSdbMetaData.reset( m_pImpl->m_xConnection );
- startConnectionListening( m_pImpl->m_xConnection );
-
- // get the data source the connection belongs to
- try
- {
- // determine our data source
- OSL_PRECOND( !m_pImpl->m_aDataSource.is(), "OSingleDocumentController::initializeConnection: already a data source in this phase?" );
- {
- Reference< XChild > xConnAsChild( m_pImpl->m_xConnection, UNO_QUERY );
- Reference< XDataSource > xDS;
- if ( xConnAsChild.is() )
- xDS = Reference< XDataSource >( xConnAsChild->getParent(), UNO_QUERY );
-
- // (take the indirection through XDataSource to ensure we have a correct object ....)
- m_pImpl->m_aDataSource = xDS;
- }
- OSL_POSTCOND( m_pImpl->m_aDataSource.is(), "OSingleDocumentController::initializeConnection: unable to obtain the data source object!" );
-
- if ( m_pImpl->m_bNotAttached )
- {
- Reference< XUntitledNumbers > xUntitledProvider( getDatabaseDocument(), UNO_QUERY );
- m_pImpl->m_nDocStartNumber = 1;
- if ( xUntitledProvider.is() )
- m_pImpl->m_nDocStartNumber = xUntitledProvider->leaseNumber( static_cast< XWeak* >( this ) );
- }
-
- // determine the availability of script support in our document. Our own XScriptInvocationContext
- // interface depends on this
- m_pImpl->setDocumentScriptSupport( Reference< XEmbeddedScripts >( getDatabaseDocument(), UNO_QUERY ).is() );
-
- // get a number formatter
- Reference< XPropertySet > xDataSourceProps( m_pImpl->m_aDataSource.getDataSourceProps(), UNO_SET_THROW );
- xDataSourceProps->getPropertyValue( PROPERTY_NAME ) >>= m_pImpl->m_sDataSourceName;
- OSL_ENSURE( m_pImpl->m_sDataSourceName.getLength(), "OSingleDocumentController::initializeConnection: invalid data source name!" );
- Reference< XNumberFormatsSupplier> xSupplier = ::dbtools::getNumberFormats(m_pImpl->m_xConnection);
- if(xSupplier.is())
- {
- m_pImpl->m_xFormatter = Reference< XNumberFormatter >(getORB()
- ->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatter"))), UNO_QUERY);
- m_pImpl->m_xFormatter->attachNumberFormatsSupplier(xSupplier);
- }
- OSL_ENSURE(m_pImpl->m_xFormatter.is(),"No NumberFormatter!");
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- }
-
- //--------------------------------------------------------------------
- void OSingleDocumentController::reconnect( sal_Bool _bUI )
- {
- OSL_ENSURE(!m_pImpl->m_bSuspended, "Cannot reconnect while suspended!");
-
- stopConnectionListening( m_pImpl->m_xConnection );
- m_pImpl->m_aSdbMetaData.reset( NULL );
- m_pImpl->m_xConnection.clear();
-
- // reconnect
- sal_Bool bReConnect = sal_True;
- if ( _bUI )
- {
- QueryBox aQuery( getView(), ModuleRes(QUERY_CONNECTION_LOST) );
- bReConnect = ( RET_YES == aQuery.Execute() );
- }
-
- // now really reconnect ...
- if ( bReConnect )
- {
- m_pImpl->m_xConnection.reset( connect( m_pImpl->m_aDataSource.getDataSource(), NULL ), SharedConnection::TakeOwnership );
- m_pImpl->m_aSdbMetaData.reset( m_pImpl->m_xConnection );
- }
-
- // invalidate all slots
- InvalidateAll();
- }
-
- //--------------------------------------------------------------------
- void OSingleDocumentController::disconnect()
- {
- stopConnectionListening(m_pImpl->m_xConnection);
- m_pImpl->m_aSdbMetaData.reset( NULL );
- m_pImpl->m_xConnection.clear();
-
- InvalidateAll();
- }
-
- //--------------------------------------------------------------------
- void OSingleDocumentController::losingConnection()
- {
- // our connection was disposed so we need a new one
- reconnect( sal_True );
- }
-
- //--------------------------------------------------------------------
+ // -----------------------------------------------------------------------------
void SAL_CALL OSingleDocumentController::disposing()
{
OSingleDocumentController_Base::disposing();
- m_aUndoManager.Clear();
-
- disconnect();
-
- attachFrame( Reference < XFrame >() );
-
- m_pImpl->m_aDataSource.clear();
- }
-
- //--------------------------------------------------------------------
- sal_Bool OSingleDocumentController::Construct(Window* _pParent)
- {
- OSL_ENSURE( getView(), "OSingleDocumentController::Construct: have no view!" );
- if ( getView() )
- getView()->enableSeparator( );
-
- return OSingleDocumentController_Base::Construct( _pParent );
- }
-
- //--------------------------------------------------------------------
- void SAL_CALL OSingleDocumentController::disposing(const EventObject& _rSource) throw( RuntimeException )
- {
- if ( _rSource.Source == getConnection() )
- {
- if ( !m_pImpl->m_bSuspended // when already suspended then we don't have to reconnect
- && !getBroadcastHelper().bInDispose
- && !getBroadcastHelper().bDisposed
- && isConnected()
- )
- {
- losingConnection();
- }
- else
- {
- m_pImpl->m_xConnection.reset( m_pImpl->m_xConnection, SharedConnection::NoTakeOwnership );
- // this prevents the "disposeComponent" call in disconnect
- disconnect();
- }
- }
- else
- OSingleDocumentController_Base::disposing( _rSource );
- }
-
- //--------------------------------------------------------------------
- void OSingleDocumentController::appendError( const ::rtl::OUString& _rErrorMessage, const ::dbtools::StandardSQLState _eSQLState,
- const sal_Int32 _nErrorCode )
- {
- m_pImpl->m_aCurrentError.append( ::dbtools::SQLExceptionInfo::SQL_EXCEPTION, _rErrorMessage, getStandardSQLStateAscii( _eSQLState ),
- _nErrorCode );
- }
- //--------------------------------------------------------------------
- void OSingleDocumentController::clearError()
- {
- m_pImpl->m_aCurrentError = ::dbtools::SQLExceptionInfo();
+ ClearUndoManager();
+ m_pData->m_pUndoManager->disposing();
}
- //--------------------------------------------------------------------
- sal_Bool OSingleDocumentController::hasError() const
+ // -----------------------------------------------------------------------------
+ void SAL_CALL OSingleDocumentController::disposing( const EventObject& i_event ) throw( RuntimeException )
{
- return m_pImpl->m_aCurrentError.isValid();
+ // simply disambiguate
+ OSingleDocumentController_Base::disposing( i_event );
}
- //--------------------------------------------------------------------
- const ::dbtools::SQLExceptionInfo& OSingleDocumentController::getError() const
+ // -----------------------------------------------------------------------------
+ void OSingleDocumentController::ClearUndoManager()
{
- return m_pImpl->m_aCurrentError;
+ GetUndoManager().Clear();
}
- //--------------------------------------------------------------------
- void OSingleDocumentController::displayError()
+ // -----------------------------------------------------------------------------
+ SfxUndoManager& OSingleDocumentController::GetUndoManager() const
{
- showError( m_pImpl->m_aCurrentError );
+ return m_pData->m_pUndoManager->GetSfxUndoManager();
}
- //--------------------------------------------------------------------
- sal_Bool SAL_CALL OSingleDocumentController::suspend(sal_Bool bSuspend) throw( RuntimeException )
+ // -----------------------------------------------------------------------------
+ void OSingleDocumentController::addUndoActionAndInvalidate(SfxUndoAction *_pAction)
{
- m_pImpl->m_bSuspended = bSuspend;
- if ( !bSuspend && !isConnected() )
- reconnect(sal_True);
+ // add undo action
+ GetUndoManager().AddUndoAction( _pAction );
+ // when we add an undo action the controller was modified
+ setModified( sal_True );
- return sal_True;
+ // now inform me that or states changed
+ InvalidateFeature( ID_BROWSER_UNDO );
+ InvalidateFeature( ID_BROWSER_REDO );
}
// -----------------------------------------------------------------------------
- sal_Bool SAL_CALL OSingleDocumentController::attachModel( const Reference< XModel > & _rxModel) throw( RuntimeException )
+ Reference< XUndoManager > SAL_CALL OSingleDocumentController::getUndoManager( ) throw (RuntimeException)
{
- if ( !_rxModel.is() )
- return sal_False;
- if ( !OSingleDocumentController_Base::attachModel( _rxModel ) )
- return sal_False;
-
- m_pImpl->m_bNotAttached = false;
- if ( m_pImpl->m_nDocStartNumber == 1 )
- releaseNumberForComponent();
-
- Reference< XUntitledNumbers > xUntitledProvider( _rxModel, UNO_QUERY );
- m_pImpl->m_nDocStartNumber = 1;
- if ( xUntitledProvider.is() )
- m_pImpl->m_nDocStartNumber = xUntitledProvider->leaseNumber( static_cast< XWeak* >( this ) );
-
- return sal_True;
+ return m_pData->m_pUndoManager.get();
}
// -----------------------------------------------------------------------------
FeatureState OSingleDocumentController::GetState(sal_uInt16 _nId) const
{
FeatureState aReturn;
- // (disabled automatically)
- aReturn.bEnabled = sal_True;
-
- switch (_nId)
+ switch ( _nId )
{
case ID_BROWSER_UNDO:
- aReturn.bEnabled = m_pImpl->m_bEditable && m_aUndoManager.GetUndoActionCount() != 0;
+ aReturn.bEnabled = isEditable() && GetUndoManager().GetUndoActionCount() != 0;
if ( aReturn.bEnabled )
{
String sUndo(ModuleRes(STR_UNDO_COLON));
sUndo += String(RTL_CONSTASCII_USTRINGPARAM(" "));
- sUndo += m_aUndoManager.GetUndoActionComment();
+ sUndo += GetUndoManager().GetUndoActionComment();
aReturn.sTitle = sUndo;
}
break;
+
case ID_BROWSER_REDO:
- aReturn.bEnabled = m_pImpl->m_bEditable && m_aUndoManager.GetRedoActionCount() != 0;
+ aReturn.bEnabled = isEditable() && GetUndoManager().GetRedoActionCount() != 0;
if ( aReturn.bEnabled )
{
String sRedo(ModuleRes(STR_REDO_COLON));
sRedo += String(RTL_CONSTASCII_USTRINGPARAM(" "));
- sRedo += m_aUndoManager.GetRedoActionComment();
+ sRedo += GetUndoManager().GetRedoActionComment();
aReturn.sTitle = sRedo;
}
break;
+
default:
aReturn = OSingleDocumentController_Base::GetState(_nId);
}
return aReturn;
}
// -----------------------------------------------------------------------------
- void OSingleDocumentController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& _rArgs)
+ void OSingleDocumentController::Execute( sal_uInt16 _nId, const Sequence< PropertyValue >& _rArgs )
{
- switch(_nId)
+ switch ( _nId )
{
- case ID_BROWSER_CLOSE:
- closeTask();
- return;
case ID_BROWSER_UNDO:
- m_aUndoManager.Undo();
- InvalidateFeature(ID_BROWSER_REDO);
+ GetUndoManager().Undo();
+ InvalidateFeature( ID_BROWSER_UNDO );
+ InvalidateFeature( ID_BROWSER_REDO );
break;
+
case ID_BROWSER_REDO:
- m_aUndoManager.Redo();
- InvalidateFeature(ID_BROWSER_UNDO);
+ GetUndoManager().Redo();
+ InvalidateFeature( ID_BROWSER_UNDO );
+ InvalidateFeature( ID_BROWSER_REDO );
break;
+
default:
OSingleDocumentController_Base::Execute( _nId, _rArgs );
break;
}
InvalidateFeature(_nId);
}
- // -----------------------------------------------------------------------------
- SfxUndoManager* OSingleDocumentController::getUndoMgr()
- {
- return &m_aUndoManager;
- }
- // -----------------------------------------------------------------------------
- void OSingleDocumentController::addUndoActionAndInvalidate(SfxUndoAction *_pAction)
- {
- // add undo action
- m_aUndoManager.AddUndoAction(_pAction);
- // when we add an undo action the controller was modified
- setModified(sal_True);
- // now inform me that or states changed
- InvalidateFeature(ID_BROWSER_UNDO);
- InvalidateFeature(ID_BROWSER_REDO);
- }
-
- // -----------------------------------------------------------------------------
- ::rtl::OUString OSingleDocumentController::getDataSourceName() const
- {
- ::rtl::OUString sName;
- Reference< XPropertySet > xDataSourceProps( m_pImpl->m_aDataSource.getDataSourceProps() );
- if ( xDataSourceProps.is() )
- xDataSourceProps->getPropertyValue(PROPERTY_NAME) >>= sName;
- return sName;
- }
- // -----------------------------------------------------------------------------
- void OSingleDocumentController::connectionLostMessage() const
- {
- String aMessage(ModuleRes(RID_STR_CONNECTION_LOST));
- Reference< XWindow > xWindow = getTopMostContainerWindow();
- Window* pWin = NULL;
- if ( xWindow.is() )
- pWin = VCLUnoHelper::GetWindow(xWindow);
- if ( !pWin )
- pWin = getView()->Window::GetParent();
-
- InfoBox(pWin, aMessage).Execute();
- }
- // -----------------------------------------------------------------------------
- const Reference< XConnection >& OSingleDocumentController::getConnection() const
- {
- return m_pImpl->m_xConnection;
- }
-
- // -----------------------------------------------------------------------------
- sal_Bool OSingleDocumentController::isReadOnly() const
- {
- return !m_pImpl->m_bEditable;
- }
-
- // -----------------------------------------------------------------------------
- sal_Bool OSingleDocumentController::isEditable() const
- {
- return m_pImpl->m_bEditable;
- }
-
- // -----------------------------------------------------------------------------
- void OSingleDocumentController::setEditable(sal_Bool _bEditable)
- {
- m_pImpl->m_bEditable = _bEditable;
- }
-
- // -----------------------------------------------------------------------------
- const ::dbtools::DatabaseMetaData& OSingleDocumentController::getSdbMetaData() const
- {
- return m_pImpl->m_aSdbMetaData;
- }
-
- // -----------------------------------------------------------------------------
- sal_Bool OSingleDocumentController::isConnected() const
- {
- return m_pImpl->m_xConnection.is();
- }
-
- // -----------------------------------------------------------------------------
- Reference< XDatabaseMetaData > OSingleDocumentController::getMetaData( ) const
- {
- Reference< XDatabaseMetaData > xMeta;
- try
- {
- if ( isConnected() )
- xMeta.set( m_pImpl->m_xConnection->getMetaData(), UNO_SET_THROW );
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- return xMeta;
- }
-
- // -----------------------------------------------------------------------------
- const Reference< XPropertySet >& OSingleDocumentController::getDataSource() const
- {
- return m_pImpl->m_aDataSource.getDataSourceProps();
- }
-
- // -----------------------------------------------------------------------------
- sal_Bool OSingleDocumentController::haveDataSource() const
- {
- return m_pImpl->m_aDataSource.is();
- }
-
- // -----------------------------------------------------------------------------
- Reference< XModel > OSingleDocumentController::getDatabaseDocument() const
- {
- return Reference< XModel >( m_pImpl->m_aDataSource.getDatabaseDocument(), UNO_QUERY );
- }
-
- // -----------------------------------------------------------------------------
- Reference< XNumberFormatter > OSingleDocumentController::getNumberFormatter() const
- {
- return m_pImpl->m_xFormatter;
- }
-
- // -----------------------------------------------------------------------------
- Reference< XModel > OSingleDocumentController::getPrivateModel() const
- {
- return getDatabaseDocument();
- }
- // -----------------------------------------------------------------------------
- // XTitle
- ::rtl::OUString SAL_CALL OSingleDocumentController::getTitle()
- throw (RuntimeException)
- {
- ::osl::MutexGuard aGuard( getMutex() );
- if ( m_bExternalTitle )
- return impl_getTitleHelper_throw()->getTitle ();
-
- ::rtl::OUStringBuffer sTitle;
- Reference< XTitle > xTitle(getPrivateModel(),UNO_QUERY);
- if ( xTitle.is() )
- {
- sTitle.append( xTitle->getTitle() );
- sTitle.appendAscii(" : ");
- }
- sTitle.append( getPrivateTitle() );
-
- return sTitle.makeStringAndClear();
- }
- // -----------------------------------------------------------------------------
- sal_Int32 OSingleDocumentController::getCurrentStartNumber() const
- {
- return m_pImpl->m_nDocStartNumber;
- }
-
- // -----------------------------------------------------------------------------
- Reference< XEmbeddedScripts > SAL_CALL OSingleDocumentController::getScriptContainer() throw (RuntimeException)
- {
- ::osl::MutexGuard aGuard( getMutex() );
- if ( !m_pImpl->documentHasScriptSupport() )
- return NULL;
-
- return Reference< XEmbeddedScripts >( getDatabaseDocument(), UNO_QUERY_THROW );
- }
-
- // -----------------------------------------------------------------------------
- void SAL_CALL OSingleDocumentController::addModifyListener( const Reference< XModifyListener >& i_Listener ) throw (RuntimeException)
- {
- ::osl::MutexGuard aGuard( getMutex() );
- m_pImpl->m_aModifyListeners.addInterface( i_Listener );
- }
-
- // -----------------------------------------------------------------------------
- void SAL_CALL OSingleDocumentController::removeModifyListener( const Reference< XModifyListener >& i_Listener ) throw (RuntimeException)
- {
- ::osl::MutexGuard aGuard( getMutex() );
- m_pImpl->m_aModifyListeners.removeInterface( i_Listener );
- }
-
- // -----------------------------------------------------------------------------
- ::sal_Bool SAL_CALL OSingleDocumentController::isModified( ) throw (RuntimeException)
- {
- ::osl::MutexGuard aGuard( getMutex() );
- return impl_isModified();
- }
-
- // -----------------------------------------------------------------------------
- void SAL_CALL OSingleDocumentController::setModified( ::sal_Bool i_bModified ) throw (PropertyVetoException, RuntimeException)
- {
- ::osl::ClearableMutexGuard aGuard( getMutex() );
-
- if ( m_pImpl->m_bModified == i_bModified )
- return;
-
- m_pImpl->m_bModified = i_bModified;
- impl_onModifyChanged();
-
- EventObject aEvent( *this );
- aGuard.clear();
- m_pImpl->m_aModifyListeners.notifyEach( &XModifyListener::modified, aEvent );
- }
-
- // -----------------------------------------------------------------------------
- sal_Bool OSingleDocumentController::impl_isModified() const
- {
- return m_pImpl->m_bModified;
- }
-
- // -----------------------------------------------------------------------------
- void OSingleDocumentController::impl_onModifyChanged()
- {
- InvalidateFeature( ID_BROWSER_SAVEDOC );
- if ( isFeatureSupported( ID_BROWSER_SAVEASDOC ) )
- InvalidateFeature( ID_BROWSER_SAVEASDOC );
- }
-//........................................................................
-} // namespace dbaui
-//........................................................................
+//......................................................................................................................
+} // namespace dbaui
+//......................................................................................................................
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/dbaccess/source/ui/misc/uiservices.cxx b/dbaccess/source/ui/misc/uiservices.cxx
index 8ea14059692c..0a2dafc25bd0 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/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
index 7e44ea1c256f..91d67b82108c 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
@@ -233,7 +233,7 @@ void calcPointX2(const OTableWindow* _pWin,Point& _rNewConPos,Point& _rNewDescrP
_rNewConPos.X() -= DESCRIPT_LINE_WIDTH;
}
//------------------------------------------------------------------------
-BOOL OConnectionLine::RecalcLine()
+sal_Bool OConnectionLine::RecalcLine()
{
//////////////////////////////////////////////////////////////////////
// Fenster und Entries muessen gesetzt sein
@@ -241,7 +241,7 @@ BOOL OConnectionLine::RecalcLine()
const OTableWindow* pDestWin = m_pTabConn->GetDestWin();
if( !pSourceWin || !pDestWin )
- return FALSE;
+ return sal_False;
SvLBoxEntry* pSourceEntry = pSourceWin->GetListBox()->GetEntryFromText( GetData()->GetSourceFieldName() );
SvLBoxEntry* pDestEntry = pDestWin->GetListBox()->GetEntryFromText( GetData()->GetDestFieldName() );
@@ -284,14 +284,14 @@ BOOL OConnectionLine::RecalcLine()
// aDestConnPosY bestimmen
calcPointsYValue(pDestWin,pDestEntry,m_aDestConnPos,m_aDestDescrLinePos);
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
//------------------------------------------------------------------------
void OConnectionLine::Draw( OutputDevice* pOutDev )
{
- const UINT16 nRectSize = 3;
+ const sal_uInt16 nRectSize = 3;
//////////////////////////////////////////////////////////////////////
// Neue Dimensionen berechnen
@@ -324,7 +324,7 @@ void OConnectionLine::Draw( OutputDevice* pOutDev )
pOutDev->DrawRect( calcRect( m_aDestDescrLinePos,aVector) );
}
// -----------------------------------------------------------------------------
-BOOL OConnectionLine::IsValid() const
+sal_Bool OConnectionLine::IsValid() const
{
return m_pData.is();
}
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index 1cfa991c5b7e..ac1c49fa2696 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -142,7 +142,7 @@ bool AddTableDialogContext::allowAddition() const
// -----------------------------------------------------------------------------
void AddTableDialogContext::addTableWindow( const String& _rQualifiedTableName, const String& _rAliasName )
{
- getTableView()->AddTabWin( _rQualifiedTableName, _rAliasName, TRUE );
+ getTableView()->AddTabWin( _rQualifiedTableName, _rAliasName, sal_True );
}
// -----------------------------------------------------------------------------
@@ -308,7 +308,7 @@ void OJoinController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
if ( m_pAddTableDialog->IsVisible() )
{
- m_pAddTableDialog->Show( FALSE );
+ m_pAddTableDialog->Show( sal_False );
getView()->GrabFocus();
}
else
@@ -317,7 +317,7 @@ void OJoinController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
WaitObject aWaitCursor( getView() );
m_pAddTableDialog->Update();
}
- m_pAddTableDialog->Show( TRUE );
+ m_pAddTableDialog->Show( sal_True );
::dbaui::notifySystemWindow(getView(),m_pAddTableDialog,::comphelper::mem_fun(&TaskPaneList::AddWindow));
}
break;
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index 7d67b18ea317..3ade5bd4aaf2 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -181,7 +181,7 @@ OJoinTableView::OJoinTableView( Window* pParent, OJoinDesignView* pView )
,m_pDragWin( NULL )
,m_pSizingWin( NULL )
,m_pSelectedConn( NULL )
- ,m_bTrackingInitiallyMoved(FALSE)
+ ,m_bTrackingInitiallyMoved(sal_False)
,m_pLastFocusTabWin(NULL)
,m_pView( pView )
,m_pAccessible(NULL)
@@ -212,7 +212,7 @@ IMPL_LINK( OJoinTableView, ScrollHdl, ScrollBar*, pScrollBar )
{
//////////////////////////////////////////////////////////////////////
// Alle Fenster verschieben
- ScrollPane( pScrollBar->GetDelta(), (pScrollBar == GetHScrollBar()), FALSE );
+ ScrollPane( pScrollBar->GetDelta(), (pScrollBar == GetHScrollBar()), sal_False );
return 0;
}
@@ -250,7 +250,7 @@ void OJoinTableView::Resize()
}
}
//------------------------------------------------------------------------------
-ULONG OJoinTableView::GetTabWinCount()
+sal_uLong OJoinTableView::GetTabWinCount()
{
DBG_CHKTHIS(OJoinTableView,NULL);
return m_aTableMap.size();
@@ -333,7 +333,7 @@ OTableWindowData* OJoinTableView::CreateImpl(const ::rtl::OUString& _rComposedNa
return new OTableWindowData( NULL,_rComposedName,_sTableName, _rWinName );
}
//------------------------------------------------------------------------------
-void OJoinTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, BOOL /*bNewTable*/)
+void OJoinTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, sal_Bool /*bNewTable*/)
{
DBG_CHKTHIS(OJoinTableView,NULL);
OSL_ENSURE(_rComposedName.getLength(),"There must be a table name supplied!");
@@ -430,7 +430,7 @@ void OJoinTableView::RemoveTabWin( OTableWindow* pTabWin )
namespace
{
// -----------------------------------------------------------------------------
- BOOL isScrollAllowed( OJoinTableView* _pView,long nDelta, BOOL bHoriz)
+ sal_Bool isScrollAllowed( OJoinTableView* _pView,long nDelta, sal_Bool bHoriz)
{
//////////////////////////////////////////////////////////////////////
// adjust ScrollBar-Positions
@@ -448,15 +448,15 @@ namespace
if ( bHoriz )
{
if( nNewThumbPos == _pView->GetScrollOffset().X() )
- return FALSE;
+ return sal_False;
}
else if ( nNewThumbPos == _pView->GetScrollOffset().Y() )
- return FALSE;
+ return sal_False;
return TRUE;
}
// -----------------------------------------------------------------------------
- BOOL getMovementImpl(OJoinTableView* _pView,const Point& _rPoint,const Size& _rSize,long& _nScrollX,long& _nScrollY)
+ sal_Bool getMovementImpl(OJoinTableView* _pView,const Point& _rPoint,const Size& _rSize,long& _nScrollX,long& _nScrollY)
{
_nScrollY = _nScrollX = 0;
// data about the tab win
@@ -468,9 +468,9 @@ namespace
// data about ourself
Size aSize = _pView->getRealOutputSize(); //GetOutputSizePixel();
- BOOL bVisbile = TRUE;
- BOOL bFitsHor = (aUpperLeft.X() >= 0) && (aLowerRight.X() <= aSize.Width());
- BOOL bFitsVert= (aUpperLeft.Y() >= 0) && (aLowerRight.Y() <= aSize.Height());
+ sal_Bool bVisbile = sal_True;
+ sal_Bool bFitsHor = (aUpperLeft.X() >= 0) && (aLowerRight.X() <= aSize.Width());
+ sal_Bool bFitsVert= (aUpperLeft.Y() >= 0) && (aLowerRight.Y() <= aSize.Height());
if (!bFitsHor || !bFitsVert)
{
if (!bFitsHor)
@@ -495,10 +495,10 @@ namespace
}
if ( _nScrollX ) // aSize.Width() > _rSize.Width() &&
- bVisbile = isScrollAllowed(_pView,_nScrollX, TRUE);
+ bVisbile = isScrollAllowed(_pView,_nScrollX, sal_True);
if ( _nScrollY ) // aSize.Height() > _rSize.Height() &&
- bVisbile = bVisbile && isScrollAllowed(_pView,_nScrollY, FALSE);
+ bVisbile = bVisbile && isScrollAllowed(_pView,_nScrollY, sal_False);
if ( bVisbile )
{
@@ -506,9 +506,9 @@ namespace
sal_Int32 nVRangeMax = _pView->GetVScrollBar()->GetRangeMax();
if ( aSize.Width() + _pView->GetHScrollBar()->GetThumbPos() + _nScrollX > nHRangeMax )
- bVisbile = FALSE;
+ bVisbile = sal_False;
if ( bVisbile && aSize.Height() + _pView->GetVScrollBar()->GetThumbPos() + _nScrollY > nVRangeMax )
- bVisbile = FALSE;
+ bVisbile = sal_False;
}
}
@@ -517,7 +517,7 @@ namespace
}
} // end of ano namespace
// -----------------------------------------------------------------------------
-BOOL OJoinTableView::isMovementAllowed(const Point& _rPoint,const Size& _rSize)
+sal_Bool OJoinTableView::isMovementAllowed(const Point& _rPoint,const Size& _rSize)
{
long nX,nY;
return getMovementImpl(this,_rPoint,_rSize,nX,nY);
@@ -537,12 +537,12 @@ void OJoinTableView::EnsureVisible(const Point& _rPoint,const Size& _rSize)
if ( getMovementImpl(this,_rPoint,_rSize,nScrollX,nScrollY) )
{
- BOOL bVisbile = TRUE;
+ sal_Bool bVisbile = sal_True;
if (nScrollX)
- bVisbile = ScrollPane(nScrollX, TRUE, TRUE);
+ bVisbile = ScrollPane(nScrollX, sal_True, sal_True);
if (nScrollY)
- bVisbile = bVisbile && ScrollPane(nScrollY, FALSE, TRUE);
+ bVisbile = bVisbile && ScrollPane(nScrollY, sal_False, sal_True);
}
}
@@ -557,8 +557,8 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin )
// Wenn kein Platz ist, wird die naechste Zeile ueberprueft.
Size aOutSize = GetSizePixel();
Point aNewPos( 0,0 );
- USHORT nRow = 0;
- BOOL bEnd = FALSE;
+ sal_uInt16 nRow = 0;
+ sal_Bool bEnd = sal_False;
while( !bEnd )
{
//////////////////////////////////////////////////////////////////
@@ -599,7 +599,7 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin )
if( (aNewPos.X()+TABWIN_WIDTH_STD)<aRowRect.Right() )
{
aNewPos.Y() = aRowRect.Top() + TABWIN_SPACING_Y;
- bEnd = TRUE;
+ bEnd = sal_True;
}
else
{
@@ -609,7 +609,7 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin )
sal_Int32 nCount = m_aTableMap.size() % (nRow+1);
++nCount;
aNewPos.Y() = nCount * TABWIN_SPACING_Y + (nCount-1)*CalcZoom(TABWIN_HEIGHT_STD);
- bEnd = TRUE;
+ bEnd = sal_True;
}
else
nRow++;
@@ -671,7 +671,7 @@ void OJoinTableView::BeginChildMove( OTableWindow* pTabWin, const Point& rMouseP
Point aMousePos = ScreenToOutputPixel( rMousePos );
m_aDragOffset = aMousePos - pTabWin->GetPosPixel();
m_pDragWin->SetZOrder(NULL, WINDOW_ZORDER_FIRST);
- m_bTrackingInitiallyMoved = FALSE;
+ m_bTrackingInitiallyMoved = sal_False;
StartTracking();
}
@@ -696,10 +696,10 @@ void OJoinTableView::BeginChildSizing( OTableWindow* pTabWin, const Pointer& rPo
}
//------------------------------------------------------------------------------
-BOOL OJoinTableView::ScrollPane( long nDelta, BOOL bHoriz, BOOL bPaintScrollBars )
+sal_Bool OJoinTableView::ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPaintScrollBars )
{
DBG_CHKTHIS(OJoinTableView,NULL);
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
//////////////////////////////////////////////////////////////////////
// ScrollBar-Positionen anpassen
@@ -712,12 +712,12 @@ BOOL OJoinTableView::ScrollPane( long nDelta, BOOL bHoriz, BOOL bPaintScrollBars
if( nNewThumbPos < 0 )
{
nNewThumbPos = 0;
- bRet = FALSE;
+ bRet = sal_False;
}
if( nNewThumbPos > GetHScrollBar()->GetRange().Max() )
{
nNewThumbPos = GetHScrollBar()->GetRange().Max();
- bRet = FALSE;
+ bRet = sal_False;
}
GetHScrollBar()->SetThumbPos( nNewThumbPos );
nDelta = GetHScrollBar()->GetThumbPos() - nOldThumbPos;
@@ -729,12 +729,12 @@ BOOL OJoinTableView::ScrollPane( long nDelta, BOOL bHoriz, BOOL bPaintScrollBars
if( nNewThumbPos < 0 )
{
nNewThumbPos = 0;
- bRet = FALSE;
+ bRet = sal_False;
}
if( nNewThumbPos > GetVScrollBar()->GetRange().Max() )
{
nNewThumbPos = GetVScrollBar()->GetRange().Max();
- bRet = FALSE;
+ bRet = sal_False;
}
GetVScrollBar()->SetThumbPos( nNewThumbPos );
nDelta = GetVScrollBar()->GetThumbPos() - nOldThumbPos;
@@ -745,7 +745,7 @@ BOOL OJoinTableView::ScrollPane( long nDelta, BOOL bHoriz, BOOL bPaintScrollBars
// Wenn ScrollOffset bereits an den Grenzen liegt, kein Neuzeichnen
if( (GetHScrollBar()->GetThumbPos()==m_aScrollOffset.X()) &&
(GetVScrollBar()->GetThumbPos()==m_aScrollOffset.Y()) )
- return FALSE;
+ return sal_False;
//////////////////////////////////////////////////////////////////////
// ScrollOffset neu setzen
@@ -922,9 +922,9 @@ void OJoinTableView::MouseButtonUp( const MouseEvent& rEvt )
void OJoinTableView::KeyInput( const KeyEvent& rEvt )
{
DBG_CHKTHIS(OJoinTableView,NULL);
- USHORT nCode = rEvt.GetKeyCode().GetCode();
- BOOL bShift = rEvt.GetKeyCode().IsShift();
- BOOL bCtrl = rEvt.GetKeyCode().IsMod1();
+ sal_uInt16 nCode = rEvt.GetKeyCode().GetCode();
+ sal_Bool bShift = rEvt.GetKeyCode().IsShift();
+ sal_Bool bCtrl = rEvt.GetKeyCode().IsMod1();
if( !bCtrl && !bShift && (nCode==KEY_DELETE) )
{
@@ -945,11 +945,11 @@ void OJoinTableView::DeselectConn(OTableConnection* pConn)
// die zugehoerigen Eitnraege in der ListBox des Tabellenfenster deselektieren
OTableWindow* pWin = pConn->GetSourceWin();
if (pWin && pWin->GetListBox())
- pWin->GetListBox()->SelectAll(FALSE);
+ pWin->GetListBox()->SelectAll(sal_False);
pWin = pConn->GetDestWin();
if (pWin && pWin->GetListBox())
- pWin->GetListBox()->SelectAll(FALSE);
+ pWin->GetListBox()->SelectAll(sal_False);
pConn->Deselect();
m_pSelectedConn = NULL;
@@ -974,8 +974,8 @@ void OJoinTableView::SelectConn(OTableConnection* pConn)
OTableWindowListBox* pDestBox = pConnDest->GetListBox();
if (pSourceBox && pDestBox)
{
- pSourceBox->SelectAll(FALSE);
- pDestBox->SelectAll(FALSE);
+ pSourceBox->SelectAll(sal_False);
+ pDestBox->SelectAll(sal_False);
SvLBoxEntry* pFirstSourceVisible = pSourceBox->GetFirstEntryInView();
SvLBoxEntry* pFirstDestVisible = pDestBox->GetFirstEntryInView();
@@ -989,14 +989,14 @@ void OJoinTableView::SelectConn(OTableConnection* pConn)
SvLBoxEntry* pSourceEntry = pSourceBox->GetEntryFromText((*aIter)->GetData()->GetSourceFieldName());
if (pSourceEntry)
{
- pSourceBox->Select(pSourceEntry, TRUE);
+ pSourceBox->Select(pSourceEntry, sal_True);
pSourceBox->MakeVisible(pSourceEntry);
}
SvLBoxEntry* pDestEntry = pDestBox->GetEntryFromText((*aIter)->GetData()->GetDestFieldName());
if (pDestEntry)
{
- pDestBox->Select(pDestEntry, TRUE);
+ pDestBox->Select(pDestEntry, sal_True);
pDestBox->MakeVisible(pDestEntry);
}
@@ -1055,7 +1055,7 @@ sal_Int32 OJoinTableView::getConnectionCount(const OTableWindow* _pFromWin) cons
::std::bind2nd(::std::mem_fun(&OTableConnection::isTableConnection),_pFromWin));
}
//------------------------------------------------------------------------------
-BOOL OJoinTableView::ExistsAConn(const OTableWindow* pFrom) const
+sal_Bool OJoinTableView::ExistsAConn(const OTableWindow* pFrom) const
{
DBG_CHKTHIS(OJoinTableView,NULL);
return getTableConnections(pFrom) != m_vTableConnection.end();
@@ -1064,7 +1064,7 @@ BOOL OJoinTableView::ExistsAConn(const OTableWindow* pFrom) const
void OJoinTableView::ClearAll()
{
DBG_CHKTHIS(OJoinTableView,NULL);
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
HideTabWins();
@@ -1079,13 +1079,13 @@ void OJoinTableView::ClearAll()
m_pSelectedConn = NULL;
// scroll to the upper left
- ScrollPane(-GetScrollOffset().X(), TRUE, TRUE);
- ScrollPane(-GetScrollOffset().Y(), FALSE, TRUE);
+ ScrollPane(-GetScrollOffset().X(), sal_True, sal_True);
+ ScrollPane(-GetScrollOffset().Y(), sal_False, sal_True);
Invalidate();
}
//------------------------------------------------------------------------
-BOOL OJoinTableView::ScrollWhileDragging()
+sal_Bool OJoinTableView::ScrollWhileDragging()
{
DBG_CHKTHIS(OJoinTableView,NULL);
OSL_ENSURE(m_pDragWin != NULL, "OJoinTableView::ScrollWhileDragging darf nur waehrend Dragging eines Fensters aufgerufen werden !");
@@ -1099,19 +1099,19 @@ BOOL OJoinTableView::ScrollWhileDragging()
Point aLowerRight(aDragWinPos.X() + aDragWinSize.Width(), aDragWinPos.Y() + aDragWinSize.Height());
if (!m_bTrackingInitiallyMoved && (aDragWinPos == m_pDragWin->GetPosPixel()))
- return TRUE;
+ return sal_True;
// Darstellungsfehler vermeiden (wenn bei aktivem TrackingRect gescrollt wird)
HideTracking();
- BOOL bScrolling = FALSE;
- BOOL bNeedScrollTimer = FALSE;
+ sal_Bool bScrolling = sal_False;
+ sal_Bool bNeedScrollTimer = sal_False;
// An Fenstergrenzen scrollen
// TODO : nur dann abfangen, wenn das Fenster komplett verschwinden wuerde (nicht, solange noch ein Pixel sichtbar ist)
if( aDragWinPos.X() < 5 )
{
- bScrolling = ScrollPane( -LINE_SIZE, TRUE, TRUE );
+ bScrolling = ScrollPane( -LINE_SIZE, sal_True, sal_True );
if( !bScrolling && (aDragWinPos.X()<0) )
aDragWinPos.X() = 0;
@@ -1121,7 +1121,7 @@ BOOL OJoinTableView::ScrollWhileDragging()
if( aLowerRight.X() > m_aOutputSize.Width() - 5 )
{
- bScrolling = ScrollPane( LINE_SIZE, TRUE, TRUE ) ;
+ bScrolling = ScrollPane( LINE_SIZE, sal_True, sal_True ) ;
if( !bScrolling && ( aLowerRight.X() > m_aOutputSize.Width() ) )
aDragWinPos.X() = m_aOutputSize.Width() - aDragWinSize.Width();
@@ -1131,7 +1131,7 @@ BOOL OJoinTableView::ScrollWhileDragging()
if( aDragWinPos.Y() < 5 )
{
- bScrolling = ScrollPane( -LINE_SIZE, FALSE, TRUE );
+ bScrolling = ScrollPane( -LINE_SIZE, sal_False, sal_True );
if( !bScrolling && (aDragWinPos.Y()<0) )
aDragWinPos.Y() = 0;
@@ -1140,7 +1140,7 @@ BOOL OJoinTableView::ScrollWhileDragging()
if( aLowerRight.Y() > m_aOutputSize.Height() - 5 )
{
- bScrolling = ScrollPane( LINE_SIZE, FALSE, TRUE );
+ bScrolling = ScrollPane( LINE_SIZE, sal_False, sal_True );
if( !bScrolling && ( (aDragWinPos.Y() + aDragWinSize.Height()) > m_aOutputSize.Height() ) )
aDragWinPos.Y() = m_aOutputSize.Height() - aDragWinSize.Height();
@@ -1195,32 +1195,32 @@ void OJoinTableView::TabWinSized(OTableWindow* ptWhich, const Point& ptOldPositi
}
//------------------------------------------------------------------------------
-BOOL OJoinTableView::IsAddAllowed()
+sal_Bool OJoinTableView::IsAddAllowed()
{
DBG_CHKTHIS(OJoinTableView,NULL);
// nicht wenn Db readonly
if (m_pView->getController().isReadOnly())
- return FALSE;
+ return sal_False;
try
{
Reference< XConnection> xConnection = m_pView->getController().getConnection();
if(!xConnection.is())
- return FALSE;
+ return sal_False;
// nicht wenn schon zuviele Tabellen
Reference < XDatabaseMetaData > xMetaData( xConnection->getMetaData() );
sal_Int32 nMax = xMetaData.is() ? xMetaData->getMaxTablesInSelect() : 0;
if (nMax && nMax <= (sal_Int32)m_aTableMap.size())
- return FALSE;
+ return sal_False;
}
catch(SQLException&)
{
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
void OJoinTableView::executePopup(const Point& _aPos,OTableConnection* _pSelConnection)
@@ -1241,7 +1241,7 @@ void OJoinTableView::Command(const CommandEvent& rEvt)
{
DBG_CHKTHIS(OJoinTableView,NULL);
- BOOL bHandled = FALSE;
+ sal_Bool bHandled = sal_False;
switch (rEvt.GetCommand())
{
@@ -1280,7 +1280,7 @@ void OJoinTableView::Command(const CommandEvent& rEvt)
}
}
}
- bHandled = TRUE;
+ bHandled = sal_True;
}
}
if (!bHandled)
@@ -1296,7 +1296,7 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab
if ((!pLhs || pLhs->ExistsAConn()) && (!pRhs || pRhs->ExistsAConn()))
{
- BOOL bFoundStart = _rpFirstAfter ? FALSE : TRUE;
+ sal_Bool bFoundStart = _rpFirstAfter ? sal_False : sal_True;
::std::vector<OTableConnection*>::const_iterator aIter = m_vTableConnection.begin();
::std::vector<OTableConnection*>::const_iterator aEnd = m_vTableConnection.end();
@@ -1333,7 +1333,7 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab
pConn = pData;
if (pData == _rpFirstAfter)
- bFoundStart = TRUE;
+ bFoundStart = sal_True;
}
}
}
@@ -1343,7 +1343,7 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab
//------------------------------------------------------------------------------
long OJoinTableView::PreNotify(NotifyEvent& rNEvt)
{
- BOOL bHandled = FALSE;
+ sal_Bool bHandled = sal_False;
switch (rNEvt.GetType())
{
case EVENT_COMMAND:
@@ -1355,10 +1355,10 @@ long OJoinTableView::PreNotify(NotifyEvent& rNEvt)
if (pData->GetMode() == COMMAND_WHEEL_SCROLL)
{
if (pData->GetDelta() > 0)
- ScrollPane(-10 * pData->GetScrollLines(), pData->IsHorz(), TRUE);
+ ScrollPane(-10 * pData->GetScrollLines(), pData->IsHorz(), sal_True);
else
- ScrollPane(10 * pData->GetScrollLines(), pData->IsHorz(), TRUE);
- bHandled = TRUE;
+ ScrollPane(10 * pData->GetScrollLines(), pData->IsHorz(), sal_True);
+ bHandled = sal_True;
}
}
}
@@ -1379,7 +1379,7 @@ long OJoinTableView::PreNotify(NotifyEvent& rNEvt)
if (!HasChildPathFocus())
break;
- BOOL bForward = !pKeyEvent->GetKeyCode().IsShift();
+ sal_Bool bForward = !pKeyEvent->GetKeyCode().IsShift();
// is there an active tab win ?
OTableWindowMapIterator aIter = m_aTableMap.begin();
OTableWindowMapIterator aEnd = m_aTableMap.end();
diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
index 991ef5733171..fc702cf94cfa 100644
--- a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
+++ b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
@@ -160,9 +160,9 @@ OTableConnectionData* OQueryTableConnectionData::NewInstance() const
return new OQueryTableConnectionData();
}
// -----------------------------------------------------------------------------
-BOOL OQueryTableConnectionData::Update()
+sal_Bool OQueryTableConnectionData::Update()
{
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.hxx b/dbaccess/source/ui/querydesign/QTableConnectionData.hxx
index f7d2173907b1..0b4c78d394a5 100644
--- a/dbaccess/source/ui/querydesign/QTableConnectionData.hxx
+++ b/dbaccess/source/ui/querydesign/QTableConnectionData.hxx
@@ -66,7 +66,7 @@ namespace dbaui
@return true if successful
*/
- virtual BOOL Update();
+ virtual sal_Bool Update();
::rtl::OUString GetAliasName(EConnectionSide nWhich) const;
diff --git a/dbaccess/source/ui/querydesign/QTableWindow.hxx b/dbaccess/source/ui/querydesign/QTableWindow.hxx
index deaad8621808..16b5097ca6d0 100644
--- a/dbaccess/source/ui/querydesign/QTableWindow.hxx
+++ b/dbaccess/source/ui/querydesign/QTableWindow.hxx
@@ -54,12 +54,12 @@ namespace dbaui
}
// spaeter Constructor, die Basisklasse ERZEUGT beim ersten Aufruf die Listbox
- virtual BOOL Init();
+ virtual sal_Bool Init();
inline sal_Int32 GetAliasNum() const { return m_nAliasNum; }
- BOOL ExistsField(const ::rtl::OUString& strFieldName, OTableFieldDescRef& rInfo);
- BOOL ExistsAVisitedConn() const;
+ sal_Bool ExistsField(const ::rtl::OUString& strFieldName, OTableFieldDescRef& rInfo);
+ sal_Bool ExistsAVisitedConn() const;
virtual ::rtl::OUString GetName() const { return GetWinName(); }
diff --git a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
index 6cccdbcf9c34..92a79f257efd 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
@@ -43,16 +43,16 @@ namespace dbaui
{
protected:
OSelectionBrowseBox* pOwner;
- USHORT m_nColumnPostion;
+ sal_uInt16 m_nColumnPostion;
virtual void Undo() = 0;
virtual void Redo() = 0;
public:
- OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, USHORT nCommentID);
+ OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, sal_uInt16 nCommentID);
virtual ~OQueryDesignFieldUndoAct();
- inline void SetColumnPosition(USHORT _nColumnPostion)
+ inline void SetColumnPosition(sal_uInt16 _nColumnPostion)
{
m_nColumnPostion = _nColumnPostion;
OSL_ENSURE(m_nColumnPostion != BROWSER_INVALIDID,"Column position was not set add the undo action!");
@@ -107,7 +107,7 @@ namespace dbaui
OTableFieldDescRef pDescr; // geloeschte Spaltenbeschreibung
public:
- OTabFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, USHORT nCommentID) : OQueryDesignFieldUndoAct(pSelBrwBox, nCommentID) { }
+ OTabFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, sal_uInt16 nCommentID) : OQueryDesignFieldUndoAct(pSelBrwBox, nCommentID) { }
void SetTabFieldDescr(OTableFieldDescRef pDescription) { pDescr = pDescription; }
};
diff --git a/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx
index 557a94c14204..f0f862cf3611 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx
@@ -42,7 +42,7 @@ namespace dbaui
OJoinTableView* m_pOwner; // in diesem Container spielt sich alles ab
public:
- OQueryDesignUndoAction(OJoinTableView* pOwner, USHORT nCommentID) : OCommentUndoAction(nCommentID), m_pOwner(pOwner) { }
+ OQueryDesignUndoAction(OJoinTableView* pOwner, sal_uInt16 nCommentID) : OCommentUndoAction(nCommentID), m_pOwner(pOwner) { }
};
}
#endif // DBAUI_QUERYDESIGNUNDOACTION_HXX
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index ccfda77a5b0e..8e6e9657a19d 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -728,7 +728,7 @@ namespace
}
Reference< XConnection> xConnection = static_cast<OQueryController&>(_pView->getController()).getConnection();
if(!xConnection.is())
- return FALSE;
+ return sal_False;
try
{
const Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData();
@@ -953,7 +953,7 @@ namespace
aWorkStr += ::dbtools::quoteName(aQuote, aColumnName);
}
aWorkStr += ::rtl::OUString(' ');
- aWorkStr += String::CreateFromAscii( ";ASC;DESC" ).GetToken( (USHORT)eOrder );
+ aWorkStr += String::CreateFromAscii( ";ASC;DESC" ).GetToken( (sal_uInt16)eOrder );
aWorkStr += ::rtl::OUString(',');
}
}
@@ -1878,7 +1878,7 @@ namespace
pJoinType = pNode->getChild(2);
}
- if (SQL_ISRULE(pJoinType,join_type) && SQL_ISTOKEN(pJoinType->getChild(0),INNER))
+ if (SQL_ISRULE(pJoinType,join_type) && (!pJoinType->count() || SQL_ISTOKEN(pJoinType->getChild(0),INNER)))
{
eJoinType = INNER_JOIN;
}
@@ -2098,7 +2098,7 @@ namespace
while ( false );
// Durch das Neuerzeugen wurden wieder Undo-Actions in den Manager gestellt
- rController.getUndoMgr()->Clear();
+ rController.ClearUndoManager();
_pSelectionBrw->Invalidate();
return eErrorCode;
}
@@ -2453,7 +2453,7 @@ namespace
//------------------------------------------------------------------------------
String getParseErrorMessage( SqlParseError _eErrorCode )
{
- USHORT nResId;
+ sal_uInt16 nResId;
switch(_eErrorCode)
{
case eIllegalJoin:
@@ -3149,7 +3149,7 @@ void OQueryDesignView::initByFieldDescriptions( const Sequence< PropertyValue >&
InsertField( pField, sal_True, sal_False );
}
- rController.getUndoMgr()->Clear();
+ rController.ClearUndoManager();
m_pSelectionBox->Invalidate();
}
diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
index 93775a1be43e..6f9a45d59228 100644
--- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
@@ -51,10 +51,10 @@ OQueryTabConnUndoAction::~OQueryTabConnUndoAction()
}
// ------------------------------------------------------------------------------------------------
-OQueryTabConnUndoAction::OQueryTabConnUndoAction(OQueryTableView* pOwner, USHORT nCommentID)
+OQueryTabConnUndoAction::OQueryTabConnUndoAction(OQueryTableView* pOwner, sal_uInt16 nCommentID)
:OQueryDesignUndoAction(pOwner, nCommentID)
,m_pConnection(NULL)
- ,m_bOwnerOfConn(FALSE)
+ ,m_bOwnerOfConn(sal_False)
{
DBG_CTOR(OQueryTabConnUndoAction,NULL);
}
@@ -67,13 +67,13 @@ OQueryAddTabConnUndoAction::OQueryAddTabConnUndoAction(OQueryTableView* pOwner)
void OQueryAddTabConnUndoAction::Undo()
{
static_cast<OQueryTableView*>(m_pOwner)->DropConnection(m_pConnection);
- SetOwnership(TRUE);
+ SetOwnership(sal_True);
}
// -----------------------------------------------------------------------------
void OQueryAddTabConnUndoAction::Redo()
{
static_cast<OQueryTableView*>(m_pOwner)->GetConnection(m_pConnection);
- SetOwnership(FALSE);
+ SetOwnership(sal_False);
}
// -----------------------------------------------------------------------------
OQueryDelTabConnUndoAction::OQueryDelTabConnUndoAction(OQueryTableView* pOwner)
@@ -84,13 +84,13 @@ OQueryDelTabConnUndoAction::OQueryDelTabConnUndoAction(OQueryTableView* pOwner)
void OQueryDelTabConnUndoAction::Undo()
{
static_cast<OQueryTableView*>(m_pOwner)->GetConnection(m_pConnection);
- SetOwnership(FALSE);
+ SetOwnership(sal_False);
}
// -----------------------------------------------------------------------------
void OQueryDelTabConnUndoAction::Redo()
{
static_cast<OQueryTableView*>(m_pOwner)->DropConnection(m_pConnection);
- SetOwnership(TRUE);
+ SetOwnership(sal_True);
}
// -----------------------------------------------------------------------------
OQueryTabWinShowUndoAct::OQueryTabWinShowUndoAct(OQueryTableView* pOwner)
@@ -105,13 +105,13 @@ OQueryTabWinShowUndoAct::~OQueryTabWinShowUndoAct()
void OQueryTabWinShowUndoAct::Undo()
{
static_cast<OQueryTableView*>(m_pOwner)->HideTabWin(m_pTabWin, this);
- SetOwnership(TRUE);
+ SetOwnership(sal_True);
}
// -----------------------------------------------------------------------------
void OQueryTabWinShowUndoAct::Redo()
{
static_cast<OQueryTableView*>(m_pOwner)->ShowTabWin(m_pTabWin, this,sal_True);
- SetOwnership(FALSE);
+ SetOwnership(sal_False);
}
// -----------------------------------------------------------------------------
OQueryTabWinDelUndoAct::OQueryTabWinDelUndoAct(OQueryTableView* pOwner)
@@ -126,13 +126,13 @@ OQueryTabWinDelUndoAct::~OQueryTabWinDelUndoAct()
void OQueryTabWinDelUndoAct::Undo()
{
static_cast<OQueryTableView*>(m_pOwner)->ShowTabWin( m_pTabWin, this,sal_True );
- SetOwnership(FALSE);
+ SetOwnership(sal_False);
}
// -----------------------------------------------------------------------------
void OQueryTabWinDelUndoAct::Redo()
{
static_cast<OQueryTableView*>(m_pOwner)->HideTabWin( m_pTabWin, this );
- SetOwnership(TRUE);
+ SetOwnership(sal_True);
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx
index 42a2e738bc53..186c522279d5 100644
--- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx
+++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx
@@ -38,11 +38,11 @@ namespace dbaui
{
protected:
OQueryTableConnection* m_pConnection;
- BOOL m_bOwnerOfConn;
+ sal_Bool m_bOwnerOfConn;
// bin ich alleiniger Eigentuemer der Connection ? (aendert sich mit jedem Redo oder Undo)
public:
- OQueryTabConnUndoAction(OQueryTableView* pOwner, USHORT nCommentID);
+ OQueryTabConnUndoAction(OQueryTableView* pOwner, sal_uInt16 nCommentID);
virtual ~OQueryTabConnUndoAction();
virtual void Undo() = 0;
@@ -50,7 +50,7 @@ namespace dbaui
void SetConnection(OQueryTableConnection* pConn) { m_pConnection = pConn; }
// anschliessend bitte SetOwnership
- void SetOwnership(BOOL bTakeIt) { m_bOwnerOfConn = bTakeIt; }
+ void SetOwnership(sal_Bool bTakeIt) { m_bOwnerOfConn = bTakeIt; }
};
}
#endif // DBAUI_QUERYTABCONNUNDOACTION_HXX
diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
index ff95ed986b25..599afe015379 100644
--- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
@@ -40,7 +40,7 @@
using namespace dbaui;
DBG_NAME(OQueryDesignFieldUndoAct)
-OQueryDesignFieldUndoAct::OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, USHORT nCommentID)
+OQueryDesignFieldUndoAct::OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, sal_uInt16 nCommentID)
: OCommentUndoAction(nCommentID)
, pOwner(pSelBrwBox)
, m_nColumnPostion(BROWSER_INVALIDID)
@@ -57,7 +57,7 @@ OQueryDesignFieldUndoAct::~OQueryDesignFieldUndoAct()
DBG_NAME(OQueryTabWinUndoAct )
// ------------------------------------------------------------------------------------------------
-OQueryTabWinUndoAct::OQueryTabWinUndoAct(OQueryTableView* pOwner, USHORT nCommentID)
+OQueryTabWinUndoAct::OQueryTabWinUndoAct(OQueryTableView* pOwner, sal_uInt16 nCommentID)
:OQueryDesignUndoAction(pOwner, nCommentID)
,m_pTabWin(NULL)
{
@@ -95,7 +95,7 @@ void OTabFieldCellModifiedUndoAct::Undo()
OSL_ENSURE(m_nColumnPostion < pOwner->GetColumnCount(),"Position outside the column count!");
if ( m_nColumnPostion != BROWSER_INVALIDID )
{
- USHORT nColumnId = pOwner->GetColumnId(m_nColumnPostion);
+ sal_uInt16 nColumnId = pOwner->GetColumnId(m_nColumnPostion);
String strNext = pOwner->GetCellContents(m_nCellIndex, nColumnId);
pOwner->SetCellContents(m_nCellIndex, nColumnId, m_strNextCellContents);
m_strNextCellContents = strNext;
@@ -110,7 +110,7 @@ void OTabFieldSizedUndoAct::Undo()
OSL_ENSURE(m_nColumnPostion != BROWSER_INVALIDID,"Column position was not set add the undo action!");
if ( m_nColumnPostion != BROWSER_INVALIDID )
{
- USHORT nColumnId = pOwner->GetColumnId(m_nColumnPostion);
+ sal_uInt16 nColumnId = pOwner->GetColumnId(m_nColumnPostion);
long nNextWidth = pOwner->GetColumnWidth(nColumnId);
pOwner->SetColWidth(nColumnId, m_nNextWidth);
m_nNextWidth = nNextWidth;
@@ -125,9 +125,9 @@ void OTabFieldMovedUndoAct::Undo()
if ( m_nColumnPostion != BROWSER_INVALIDID )
{
sal_uInt16 nId = pDescr->GetColumnId();
- USHORT nOldPos = pOwner->GetColumnPos(nId);
+ sal_uInt16 nOldPos = pOwner->GetColumnPos(nId);
pOwner->SetColumnPos(nId,m_nColumnPostion);
- pOwner->ColumnMoved(nId,FALSE);
+ pOwner->ColumnMoved(nId,sal_False);
m_nColumnPostion = nOldPos;
}
pOwner->LeaveUndoMode();
diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
index 1fa0df1f3a01..7afb6811e810 100644
--- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
@@ -49,14 +49,14 @@ namespace dbaui
protected:
::std::vector<OTableConnection*> m_vTableConnection;
OQueryTableWindow* m_pTabWin;
- BOOL m_bOwnerOfObjects;
+ sal_Bool m_bOwnerOfObjects;
// bin ich alleiniger Eigentuemer der verwalteten Objekte ? (aendert sich mit jedem Redo oder Undo)
public:
- OQueryTabWinUndoAct(OQueryTableView* pOwner, USHORT nCommentID);
+ OQueryTabWinUndoAct(OQueryTableView* pOwner, sal_uInt16 nCommentID);
virtual ~OQueryTabWinUndoAct();
- void SetOwnership(BOOL bTakeIt) { m_bOwnerOfObjects = bTakeIt; }
+ void SetOwnership(sal_Bool bTakeIt) { m_bOwnerOfObjects = bTakeIt; }
virtual void Undo() = 0;
@@ -67,7 +67,7 @@ namespace dbaui
// anschliessend sollte das SetOwnership aufgerufen werden
// Zugriff auf die verwalteten Connections
- USHORT ConnCount() { return (USHORT)m_vTableConnection.size(); }
+ sal_uInt16 ConnCount() { return (sal_uInt16)m_vTableConnection.size(); }
::std::vector<OTableConnection*>* GetTabConnList() { return &m_vTableConnection; }
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 0dc3caa9dbc5..768183e8e5ec 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -131,7 +131,7 @@ namespace
@return true when OK was pressed otherwise false
*/
- sal_Bool openJoinDialog(OQueryTableView* _pView,const TTableConnectionData::value_type& _pConnectionData,BOOL _bSelectableTables)
+ sal_Bool openJoinDialog(OQueryTableView* _pView,const TTableConnectionData::value_type& _pConnectionData,sal_Bool _bSelectableTables)
{
OQueryTableConnectionData* pData = static_cast< OQueryTableConnectionData*>(_pConnectionData.get());
@@ -690,7 +690,7 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ
void OQueryTableView::ConnDoubleClicked(OTableConnection* pConnection)
{
DBG_CHKTHIS(OQueryTableView,NULL);
- if( openJoinDialog(this,pConnection->GetData(),FALSE) )
+ if( openJoinDialog(this,pConnection->GetData(),sal_False) )
{
connectionModified(this,pConnection,sal_False);
SelectConn( pConnection );
@@ -700,7 +700,7 @@ void OQueryTableView::ConnDoubleClicked(OTableConnection* pConnection)
void OQueryTableView::createNewConnection()
{
TTableConnectionData::value_type pData(new OQueryTableConnectionData());
- if( openJoinDialog(this,pData,TRUE) )
+ if( openJoinDialog(this,pData,sal_True) )
{
OTableWindowMap* pMap = GetTabWinMap();
OQueryTableWindow* pSourceWin = static_cast< OQueryTableWindow*>((*pMap)[pData->getReferencingTable()->GetWinName()]);
@@ -785,8 +785,8 @@ void OQueryTableView::RemoveTabWin(OTableWindow* pTabWin)
// mein Parent brauche ich, da es vom Loeschen erfahren soll
OQueryDesignView* pParent = static_cast<OQueryDesignView*>(getDesignView());
- SfxUndoManager* pUndoMgr = m_pView->getController().getUndoMgr();
- pUndoMgr->EnterListAction( String( ModuleRes(STR_QUERY_UNDO_TABWINDELETE) ), String() );
+ SfxUndoManager& rUndoMgr = m_pView->getController().GetUndoManager();
+ rUndoMgr.EnterListAction( String( ModuleRes(STR_QUERY_UNDO_TABWINDELETE) ), String() );
// Undo-Action anlegen
OQueryTabWinDelUndoAct* pUndoAction = new OQueryTabWinDelUndoAct(this);
@@ -799,7 +799,7 @@ void OQueryTableView::RemoveTabWin(OTableWindow* pTabWin)
pParent->TableDeleted( static_cast< OQueryTableWindowData*>(pTabWin->GetData().get())->GetAliasName() );
m_pView->getController().addUndoActionAndInvalidate( pUndoAction );
- pUndoMgr->LeaveListAction();
+ rUndoMgr.LeaveListAction();
if (m_lnkTabWinsChangeHandler.IsSet())
{
diff --git a/dbaccess/source/ui/querydesign/QueryTextView.cxx b/dbaccess/source/ui/querydesign/QueryTextView.cxx
index 3e19ab75aa62..3f403a4c4892 100644
--- a/dbaccess/source/ui/querydesign/QueryTextView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTextView.cxx
@@ -57,7 +57,7 @@ OQueryTextView::OQueryTextView(OQueryContainerWindow* _pParent)
{
DBG_CTOR(OQueryTextView,NULL);
m_pEdit = new OSqlEdit(this);
- m_pEdit->SetRightToLeft(FALSE);
+ m_pEdit->SetRightToLeft(sal_False);
m_pEdit->ClearModifyFlag();
m_pEdit->SaveValue();
m_pEdit->SetPosPixel( Point( 0, 0 ) );
diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
index 792d283ee8a3..0ad058656489 100644
--- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
+++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
@@ -280,7 +280,7 @@ bool OQueryViewSwitch::impl_postViewSwitch( const bool i_bGraphicalDesign, const
if ( pContainer )
pContainer->Resize();
- m_pDesignView->getController().getUndoMgr()->Clear();
+ m_pDesignView->getController().ClearUndoManager();
m_pDesignView->getController().InvalidateAll();
return i_bSuccess;
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 726f4680c9a1..28bd707d6e0a 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();
@@ -303,15 +303,15 @@ BrowserHeader* OSelectionBrowseBox::imp_CreateHeaderBar(BrowseBox* /*pParent*/)
return new OSelectionBrwBoxHeader(this);
}
// -----------------------------------------------------------------------------
-void OSelectionBrowseBox::ColumnMoved( USHORT nColId,BOOL _bCreateUndo )
+void OSelectionBrowseBox::ColumnMoved( sal_uInt16 nColId,sal_Bool _bCreateUndo )
{
EditBrowseBox::ColumnMoved( nColId );
// swap the two columns
- USHORT nNewPos = GetColumnPos( nColId );
+ sal_uInt16 nNewPos = GetColumnPos( nColId );
OTableFields& rFields = getFields();
- if ( rFields.size() > USHORT(nNewPos-1) )
+ if ( rFields.size() > sal_uInt16(nNewPos-1) )
{
- USHORT nOldPos = 0;
+ sal_uInt16 nOldPos = 0;
OTableFields::iterator aEnd = rFields.end();
OTableFields::iterator aIter = rFields.begin();
for (; aIter != aEnd && ( (*aIter)->GetColumnId() != nColId ); ++aIter,++nOldPos)
@@ -484,7 +484,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
OSL_ENSURE(nColId != BROWSER_INVALIDID,"An Invalid Id was set!");
if ( nColId == BROWSER_INVALIDID )
return;
- USHORT nPos = GetColumnPos(nColId);
+ sal_uInt16 nPos = GetColumnPos(nColId);
if ( nPos == 0 || nPos == BROWSER_INVALIDID || nPos > getFields().size() )
return;
OTableFieldDescRef pEntry = getFields()[nPos-1];
@@ -556,7 +556,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
} break;
case BROW_ORDER_ROW:
m_pOrderCell->SelectEntryPos(
- sal::static_int_cast< USHORT >(pEntry->GetOrderDir()));
+ sal::static_int_cast< sal_uInt16 >(pEntry->GetOrderDir()));
enableControl(pEntry,m_pOrderCell);
break;
case BROW_COLUMNALIAS_ROW:
@@ -574,14 +574,14 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
Controller()->ClearModified();
}
// -----------------------------------------------------------------------------
-void OSelectionBrowseBox::notifyTableFieldChanged(const String& _sOldAlias,const String& _sAlias,sal_Bool& _bListAction,USHORT _nColumnId)
+void OSelectionBrowseBox::notifyTableFieldChanged(const String& _sOldAlias,const String& _sAlias,sal_Bool& _bListAction,sal_uInt16 _nColumnId)
{
appendUndoAction(_sOldAlias,_sAlias,BROW_TABLE_ROW,_bListAction);
if ( m_bVisibleRow[BROW_TABLE_ROW] )
RowModified(GetBrowseRow(BROW_TABLE_ROW), _nColumnId);
}
// -----------------------------------------------------------------------------
-void OSelectionBrowseBox::notifyFunctionFieldChanged(const String& _sOldFunctionName,const String& _sFunctionName,sal_Bool& _bListAction,USHORT _nColumnId)
+void OSelectionBrowseBox::notifyFunctionFieldChanged(const String& _sOldFunctionName,const String& _sFunctionName,sal_Bool& _bListAction,sal_uInt16 _nColumnId)
{
appendUndoAction(_sOldFunctionName,_sFunctionName,BROW_FUNCTION_ROW,_bListAction);
if ( !m_bVisibleRow[BROW_FUNCTION_ROW] )
@@ -589,7 +589,7 @@ void OSelectionBrowseBox::notifyFunctionFieldChanged(const String& _sOldFunction
RowModified(GetBrowseRow(BROW_FUNCTION_ROW), _nColumnId);
}
// -----------------------------------------------------------------------------
-void OSelectionBrowseBox::clearEntryFunctionField(const String& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction,USHORT _nColumnId)
+void OSelectionBrowseBox::clearEntryFunctionField(const String& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction,sal_uInt16 _nColumnId)
{
if ( isFieldNameAsterix( _sFieldName ) && (!_pEntry->isNoneFunction() || _pEntry->IsGroupBy()) )
{
@@ -754,14 +754,14 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
::comphelper::UStringMixEqual bCase(xMetaData->supportsMixedCaseQuotedIdentifiers());
OTableFieldDescRef aSelEntry = _pEntry;
- USHORT nColumnId = aSelEntry->GetColumnId();
+ sal_uInt16 nColumnId = aSelEntry->GetColumnId();
sal_uInt32 nCount = pSelection->count();
for (sal_uInt32 i = 0; i < nCount; ++i)
{
if ( i > 0 ) // may we have to append more than one field
{
- USHORT nColumnPostion;
+ sal_uInt16 nColumnPostion;
aSelEntry = FindFirstFreeCol(nColumnPostion);
if ( !aSelEntry.is() )
{
@@ -919,8 +919,8 @@ sal_Bool OSelectionBrowseBox::SaveModified()
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
OQueryController& rController = static_cast<OQueryController&>(getDesignView()->getController());
OTableFieldDescRef pEntry = NULL;
- USHORT nCurrentColumnPos = GetColumnPos(GetCurColumnId());
- if(getFields().size() > static_cast<USHORT>(nCurrentColumnPos - 1))
+ sal_uInt16 nCurrentColumnPos = GetColumnPos(GetCurColumnId());
+ if(getFields().size() > static_cast<sal_uInt16>(nCurrentColumnPos - 1))
pEntry = getEntry(nCurrentColumnPos - 1);
sal_Bool bWasEmpty = pEntry.is() ? pEntry->IsEmpty() : sal_False;
@@ -972,9 +972,9 @@ sal_Bool OSelectionBrowseBox::SaveModified()
strOldCellContents = pEntry->GetField();
bListAction = sal_True;
if ( !m_bInUndoMode )
- rController.getUndoMgr()->EnterListAction(String(),String());
+ rController.GetUndoManager().EnterListAction(String(),String());
- USHORT nPos = m_pFieldCell->GetEntryPos(aFieldName);
+ sal_uInt16 nPos = m_pFieldCell->GetEntryPos(aFieldName);
String aAliasName = pEntry->GetAlias();
if ( nPos != COMBOBOX_ENTRY_NOTFOUND && !aAliasName.Len() && aFieldName.GetTokenCount('.') > 1 )
{ // special case, we have a table field so we must cut the table name
@@ -1001,7 +1001,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
{
sNewValue = aFieldName;
if ( !m_bInUndoMode )
- static_cast<OQueryController&>(getDesignView()->getController()).getUndoMgr()->LeaveListAction();
+ static_cast<OQueryController&>(getDesignView()->getController()).GetUndoManager().LeaveListAction();
bListAction = sal_False;
}
else
@@ -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;
@@ -1205,7 +1205,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
if ( bAppendRow )
{
- RowInserted( GetRowCount()-1, 1, TRUE );
+ RowInserted( GetRowCount()-1, 1, sal_True );
m_bVisibleRow.push_back(sal_True);
++m_nVisibleCount;
}
@@ -1227,12 +1227,12 @@ sal_Bool OSelectionBrowseBox::SaveModified()
RowModified(BROW_VIS_ROW, GetCurColumnId());
// wenn noetig neue freie Spalten anlegen
- USHORT nDummy;
+ sal_uInt16 nDummy;
CheckFreeColumns(nDummy);
}
if ( bListAction && !m_bInUndoMode )
- static_cast<OQueryController&>(getDesignView()->getController()).getUndoMgr()->LeaveListAction();
+ static_cast<OQueryController&>(getDesignView()->getController()).GetUndoManager().LeaveListAction();
return pEntry != NULL && !bError;
}
@@ -1257,7 +1257,7 @@ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const Rectangle& rRect,
rDev.SetClipRegion( rRect );
OTableFieldDescRef pEntry = NULL;
- USHORT nPos = GetColumnPos(nColumnId);
+ sal_uInt16 nPos = GetColumnPos(nColumnId);
if(getFields().size() > sal_uInt16(nPos - 1))
pEntry = getFields()[nPos - 1];
@@ -1289,12 +1289,12 @@ void OSelectionBrowseBox::PaintStatusCell(OutputDevice& rDev, const Rectangle& r
}
//------------------------------------------------------------------------------
-void OSelectionBrowseBox::RemoveColumn(USHORT _nColumnId)
+void OSelectionBrowseBox::RemoveColumn(sal_uInt16 _nColumnId)
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
OQueryController& rController = static_cast<OQueryController&>(getDesignView()->getController());
- USHORT nPos = GetColumnPos(_nColumnId);
+ sal_uInt16 nPos = GetColumnPos(_nColumnId);
// das Control sollte immer genau eine Spalte mehr haben, naemlich die HandleColumn
OSL_ENSURE((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::RemoveColumn : invalid parameter nColId");
// ColId ist bei mir gleichbedeutend mit Position, und da sollte die Bedingung natuerlich zutreffen
@@ -1329,7 +1329,7 @@ void OSelectionBrowseBox::RemoveField(sal_uInt16 nColumnId )
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
OQueryController& rController = static_cast<OQueryController&>(getDesignView()->getController());
- USHORT nPos = GetColumnPos(nColumnId);
+ sal_uInt16 nPos = GetColumnPos(nColumnId);
OSL_ENSURE(getFields().size() > sal_uInt16(nPos-1),"ID is to great!");
OTableFieldDescRef pDesc = getEntry((sal_uInt32)(nPos - 1)) ;
@@ -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() )
@@ -1471,7 +1471,7 @@ OTableFieldDescRef OSelectionBrowseBox::AppendNewCol( sal_uInt16 nCnt)
{
OTableFieldDescRef pEmptyEntry = new OTableFieldDesc();
getFields().push_back(pEmptyEntry);
- USHORT nColumnId = sal::static_int_cast< USHORT >(getFields().size());
+ sal_uInt16 nColumnId = sal::static_int_cast< sal_uInt16 >(getFields().size());
pEmptyEntry->SetColumnId( nColumnId );
InsertDataColumn( nColumnId , String(), DEFAULT_SIZE, HIB_STDSTYLE, HEADERBAR_APPEND);
@@ -1495,7 +1495,7 @@ void OSelectionBrowseBox::DeleteFields(const String& rAliasName)
OTableFields::reverse_iterator aIter = getFields().rbegin();
OTableFieldDescRef pEntry = NULL;
- for(USHORT nPos=sal::static_int_cast< USHORT >(getFields().size());aIter != getFields().rend();++aIter,--nPos)
+ for(sal_uInt16 nPos=sal::static_int_cast< sal_uInt16 >(getFields().size());aIter != getFields().rend();++aIter,--nPos)
{
pEntry = *aIter;
if ( pEntry->GetAlias().equals( rAliasName ) )
@@ -1547,7 +1547,7 @@ Rectangle OSelectionBrowseBox::GetInvalidRect( sal_uInt16 nColId )
}
//------------------------------------------------------------------------------
-void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, USHORT& _nColumnPostion)
+void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _nColumnPostion)
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
// das Control sollte immer genau eine Spalte mehr haben, naemlich die HandleColumn
@@ -1560,14 +1560,14 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, USHORT& _nColu
DeactivateCell();
// remember the column id of the current positon
- USHORT nColumnId = GetColumnId(_nColumnPostion);
+ sal_uInt16 nColumnId = GetColumnId(_nColumnPostion);
// Wenn zu klein oder zu gross, auf Ende der Liste setzen
if ((_nColumnPostion == BROWSER_INVALIDID) || (_nColumnPostion >= getFields().size())) // Anhaengen des Feldes
{
if (FindFirstFreeCol(_nColumnPostion) == NULL) // keine freie Column mehr
{
AppendNewCol(1);
- _nColumnPostion = sal::static_int_cast< USHORT >(
+ _nColumnPostion = sal::static_int_cast< sal_uInt16 >(
getFields().size());
}
else
@@ -1580,14 +1580,14 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, USHORT& _nColu
// check if the column ids are identical, if not we have to move
if ( pEntry->GetColumnId() != nColumnId )
{
- USHORT nOldPosition = GetColumnPos(pEntry->GetColumnId());
+ sal_uInt16 nOldPosition = GetColumnPos(pEntry->GetColumnId());
OSL_ENSURE( nOldPosition != 0,"Old position was 0. Not possible!");
SetColumnPos(pEntry->GetColumnId(),_nColumnPostion);
// we have to delete an empty field for the fields list, because the columns must have equal length
if ( nOldPosition > 0 && nOldPosition <= getFields().size() )
getFields()[nOldPosition - 1] = pEntry;
- ColumnMoved(pEntry->GetColumnId(),FALSE);
+ ColumnMoved(pEntry->GetColumnId(),sal_False);
}
if ( pEntry->GetFunctionType() & (FKT_AGGREGATE) )
@@ -1611,7 +1611,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, USHORT& _nColu
}
//------------------------------------------------------------------------------
-OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxdSource, USHORT _nColumnPostion, sal_Bool bVis, sal_Bool bActivate)
+OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPostion, sal_Bool bVis, sal_Bool bActivate)
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
OQueryTableWindow* pSourceWin = static_cast<OQueryTableWindow*>(jxdSource.pListBox->GetTabWin());
@@ -1637,7 +1637,7 @@ OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxd
}
//------------------------------------------------------------------------------
-OTableFieldDescRef OSelectionBrowseBox::InsertField(const OTableFieldDescRef& _rInfo, USHORT _nColumnPostion, sal_Bool bVis, sal_Bool bActivate)
+OTableFieldDescRef OSelectionBrowseBox::InsertField(const OTableFieldDescRef& _rInfo, sal_uInt16 _nColumnPostion, sal_Bool bVis, sal_Bool bActivate)
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
@@ -1683,7 +1683,7 @@ sal_uInt16 OSelectionBrowseBox::FieldsCount()
}
//------------------------------------------------------------------------------
-OTableFieldDescRef OSelectionBrowseBox::FindFirstFreeCol(USHORT& _rColumnPosition )
+OTableFieldDescRef OSelectionBrowseBox::FindFirstFreeCol(sal_uInt16& _rColumnPosition )
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
OTableFields::iterator aIter = getFields().begin();
@@ -1704,7 +1704,7 @@ OTableFieldDescRef OSelectionBrowseBox::FindFirstFreeCol(USHORT& _rColumnPositio
}
//------------------------------------------------------------------------------
-void OSelectionBrowseBox::CheckFreeColumns(USHORT& _rColumnPosition)
+void OSelectionBrowseBox::CheckFreeColumns(sal_uInt16& _rColumnPosition)
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
if (FindFirstFreeCol(_rColumnPosition) == NULL)
@@ -1788,7 +1788,7 @@ void OSelectionBrowseBox::DuplicateConditionLevel( const sal_uInt16 nLevel)
pEntry->SetCriteria( nNewLevel, sValue);
if ( nNewLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1) )
{
- RowInserted( GetRowCount()-1, 1, TRUE );
+ RowInserted( GetRowCount()-1, 1, sal_True );
m_bVisibleRow.push_back(sal_True);
++m_nVisibleCount;
}
@@ -1836,7 +1836,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
pEntry->SetCriteria( nLevel, rValue);
if(nLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1))
{
- RowInserted( GetRowCount()-1, 1, TRUE );
+ RowInserted( GetRowCount()-1, 1, sal_True );
m_bVisibleRow.push_back(sal_True);
++m_nVisibleCount;
}
@@ -1864,7 +1864,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
pLastEntry->SetCriteria( nLevel, sCriteria);
if(nLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1))
{
- RowInserted( GetRowCount()-1, 1, TRUE );
+ RowInserted( GetRowCount()-1, 1, sal_True );
m_bVisibleRow.push_back(sal_True);
++m_nVisibleCount;
}
@@ -1881,7 +1881,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
pTmp->SetCriteria( nLevel, rValue);
if(nLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1))
{
- RowInserted( GetRowCount()-1, 1, TRUE );
+ RowInserted( GetRowCount()-1, 1, sal_True );
m_bVisibleRow.push_back(sal_True);
++m_nVisibleCount;
}
@@ -2022,7 +2022,7 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt)
if ( 1 == GetSelectColumnCount() )
{
sal_uInt16 nSelId = GetColumnId(
- sal::static_int_cast< USHORT >(
+ sal::static_int_cast< sal_uInt16 >(
FirstSelectedColumn() ) );
::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, sal_False ) );
@@ -2145,8 +2145,8 @@ void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, sal_Bool _bVis)
//------------------------------------------------------------------------------
long OSelectionBrowseBox::GetBrowseRow(long nRowId) const
{
- USHORT nCount(0);
- for(USHORT i = 0 ; i < nRowId ; ++i)
+ sal_uInt16 nCount(0);
+ for(sal_uInt16 i = 0 ; i < nRowId ; ++i)
{
if ( m_bVisibleRow[i] )
++nCount;
@@ -2211,7 +2211,7 @@ String OSelectionBrowseBox::GetCellText(long nRow, sal_uInt16 nColId) const
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- USHORT nPos = GetColumnPos(nColId);
+ sal_uInt16 nPos = GetColumnPos(nColId);
OTableFieldDescRef pEntry = getFields()[nPos-1];
OSL_ENSURE(pEntry != NULL, "OSelectionBrowseBox::GetCellText : invalid column id, prepare for GPF ... ");
@@ -2238,7 +2238,7 @@ String OSelectionBrowseBox::GetCellText(long nRow, sal_uInt16 nColId) const
} break;
case BROW_ORDER_ROW:
if (pEntry->GetOrderDir() != ORDER_NONE)
- aText = String(ModuleRes(STR_QUERY_SORTTEXT) ).GetToken(sal::static_int_cast< USHORT >(pEntry->GetOrderDir()));
+ aText = String(ModuleRes(STR_QUERY_SORTTEXT) ).GetToken(sal::static_int_cast< sal_uInt16 >(pEntry->GetOrderDir()));
break;
case BROW_VIS_ROW:
break;
@@ -2330,13 +2330,13 @@ sal_Bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId,Strin
return bErg;
}
//------------------------------------------------------------------------------
-String OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, USHORT nColId)
+String OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId)
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
if ( GetCurColumnId() == nColId && !m_bInUndoMode )
SaveModified();
- USHORT nPos = GetColumnPos(nColId);
+ sal_uInt16 nPos = GetColumnPos(nColId);
OTableFieldDescRef pEntry = getFields()[nPos - 1];
OSL_ENSURE(pEntry != NULL, "OSelectionBrowseBox::GetCellContents : invalid column id, prepare for GPF ... ");
@@ -2357,14 +2357,14 @@ String OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, USHORT nColId)
}
//------------------------------------------------------------------------------
-void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, USHORT nColId, const String& strNewText)
+void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, const String& strNewText)
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- sal_Bool bWasEditing = IsEditing() && (GetCurColumnId() == nColId) && IsRowVisible(static_cast<USHORT>(nRow)) && (GetCurRow() == static_cast<USHORT>(GetBrowseRow(nRow)));
+ sal_Bool bWasEditing = IsEditing() && (GetCurColumnId() == nColId) && IsRowVisible(static_cast<sal_uInt16>(nRow)) && (GetCurRow() == static_cast<sal_uInt16>(GetBrowseRow(nRow)));
if (bWasEditing)
DeactivateCell();
- USHORT nPos = GetColumnPos(nColId);
+ sal_uInt16 nPos = GetColumnPos(nColId);
OTableFieldDescRef pEntry = getEntry(nPos - 1);
OSL_ENSURE(pEntry != NULL, "OSelectionBrowseBox::SetCellContents : invalid column id, prepare for GPF ... ");
@@ -2414,7 +2414,7 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, USHORT nColId, const S
}
long nCellIndex = GetRealRow(nRow);
- if(IsRowVisible(static_cast<USHORT>(nRow)))
+ if(IsRowVisible(static_cast<sal_uInt16>(nRow)))
RowModified(nCellIndex, nColId);
// die entsprechende Feld-Beschreibung ist jetzt leer -> Visible auf sal_False (damit das konsistent mit normalen leeren Spalten ist)
@@ -2448,7 +2448,7 @@ void OSelectionBrowseBox::ColumnResized(sal_uInt16 nColId)
// but the changes aren't permanent ...
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- USHORT nPos = GetColumnPos(nColId);
+ sal_uInt16 nPos = GetColumnPos(nColId);
OSL_ENSURE(nPos <= getFields().size(),"ColumnResized:: nColId sollte nicht groesser als List::count sein!");
OTableFieldDescRef pEntry = getEntry(nPos-1);
OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::ColumnResized : keine FieldDescription !");
@@ -2473,7 +2473,7 @@ void OSelectionBrowseBox::ColumnResized(sal_uInt16 nColId)
sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRowId, sal_uInt16 nColId)
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- USHORT nPos = GetColumnPos(nColId);
+ sal_uInt16 nPos = GetColumnPos(nColId);
OSL_ENSURE((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::GetTotalCellWidth : invalid parameter nColId");
OTableFieldDescRef pEntry = getFields()[nPos-1];
@@ -2592,7 +2592,7 @@ void OSelectionBrowseBox::appendUndoAction(const String& _rOldValue,const String
if ( !_bListAction )
{
_bListAction = sal_True;
- static_cast<OQueryController&>(getDesignView()->getController()).getUndoMgr()->EnterListAction(String(),String());
+ static_cast<OQueryController&>(getDesignView()->getController()).GetUndoManager().EnterListAction(String(),String());
}
appendUndoAction(_rOldValue,_rNewValue,_nRow);
}
@@ -2643,12 +2643,12 @@ OTableFields& OSelectionBrowseBox::getFields() const
// -----------------------------------------------------------------------------
void OSelectionBrowseBox::enableControl(const OTableFieldDescRef& _rEntry,Window* _pControl)
{
- BOOL bEnable = !_rEntry->isCondition();
+ sal_Bool bEnable = !_rEntry->isCondition();
_pControl->Enable(bEnable);
_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()
@@ -2683,7 +2683,7 @@ OTableFieldDescRef OSelectionBrowseBox::getEntry(OTableFields::size_type _nPos)
{
pEntry = new OTableFieldDesc();
pEntry->SetColumnId(
- GetColumnId(sal::static_int_cast< USHORT >(_nPos+1)));
+ GetColumnId(sal::static_int_cast< sal_uInt16 >(_nPos+1)));
aFields[_nPos] = pEntry;
}
return pEntry;
@@ -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 8d25da432916..fc361d5fc16f 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
@@ -99,10 +99,10 @@ namespace dbaui
~OSelectionBrowseBox();
void initialize();
- OTableFieldDescRef InsertField( const OJoinExchangeData& jxdSource, USHORT _nColumnPostion = BROWSER_INVALIDID, sal_Bool bVis=sal_True, sal_Bool bActivate=sal_True );
- OTableFieldDescRef InsertField( const OTableFieldDescRef& rInfo, USHORT _nColumnPostion = BROWSER_INVALIDID, sal_Bool bVis=sal_True, sal_Bool bActivate=sal_True );
- void InsertColumn( OTableFieldDescRef pEntry, USHORT& _nColumnPostion );
- void RemoveColumn( USHORT _nColumnId );
+ OTableFieldDescRef InsertField( const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPostion = BROWSER_INVALIDID, sal_Bool bVis=sal_True, sal_Bool bActivate=sal_True );
+ OTableFieldDescRef InsertField( const OTableFieldDescRef& rInfo, sal_uInt16 _nColumnPostion = BROWSER_INVALIDID, sal_Bool bVis=sal_True, sal_Bool bActivate=sal_True );
+ void InsertColumn( OTableFieldDescRef pEntry, sal_uInt16& _nColumnPostion );
+ void RemoveColumn( sal_uInt16 _nColumnId );
void DeleteFields( const String& rAliasName );
bool HasFieldByAliasName(const ::rtl::OUString& rFieldName, OTableFieldDescRef& rInfo) const;
@@ -125,8 +125,8 @@ namespace dbaui
void SetColWidth(sal_uInt16 nColId, long lNewWidth);
// beachtet im Gegensatz zum SetColumnWidth der Basisklasse auch eine eventuell aktive Zelle in dieser Spalte
- String GetCellContents(sal_Int32 nCellIndex, USHORT nColId);
- void SetCellContents(sal_Int32 nCellIndex, USHORT nColId, const String& strNewText);
+ String GetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId);
+ void SetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId, const String& strNewText);
// Zelleninhalt (als String formatiert) setzen/liefern
sal_Int32 GetNoneVisibleRows() const;
void SetNoneVisbleRow(long nRows);
@@ -147,8 +147,8 @@ namespace dbaui
virtual void GetFocus();
virtual void DeactivateCell(sal_Bool bUpdate = sal_True);
- virtual void ColumnMoved( USHORT nColId ) { ColumnMoved(nColId,TRUE); }
- void ColumnMoved( USHORT nColId,BOOL _bCreateUndo);
+ virtual void ColumnMoved( sal_uInt16 nColId ) { ColumnMoved(nColId,sal_True); }
+ void ColumnMoved( sal_uInt16 nColId,sal_Bool _bCreateUndo);
void Fill();
void PreFill();
@@ -168,7 +168,7 @@ namespace dbaui
@return
the text out of the cell
*/
- virtual String GetCellText(long _nRow, USHORT _nColId) const;
+ virtual String GetCellText(long _nRow, sal_uInt16 _nColId) const;
/** returns the description of the row.
@param _nRow
@@ -229,10 +229,10 @@ namespace dbaui
void startTimer();
private:
- OTableFieldDescRef FindFirstFreeCol(USHORT& _rColumnPosition);
+ OTableFieldDescRef FindFirstFreeCol(sal_uInt16& _rColumnPosition);
// rCol enthaelt die Nummer (in pOTableFieldDescList) der ersten Spalte, die von sich sagt, dass sie leer ist
// wenn es keine solche gibt, ist rCol undefiniert und der Rueckgabewert NULL
- void CheckFreeColumns(USHORT& _rColumnPosition);
+ void CheckFreeColumns(sal_uInt16& _rColumnPosition);
// testet, ob es noch freie Spalten gibt, wenn nicht, wird ein neuer Packen angefuegt
// rCol enthaelt die Nummer der ersten freien Spalte (in pOTableFieldDescList)
@@ -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);
@@ -304,7 +304,7 @@ namespace dbaui
@param _bListAction
Will be set to <TRUE/> when we are in a list action otherwise <FALSE/>
*/
- void notifyTableFieldChanged(const String& _sOldAlias,const String& _sAlias,sal_Bool& _bListAction,USHORT _nColumnId);
+ void notifyTableFieldChanged(const String& _sOldAlias,const String& _sAlias,sal_Bool& _bListAction,sal_uInt16 _nColumnId);
/** append an undo action for the function field
@param _sOldFunctionName
@@ -314,7 +314,7 @@ namespace dbaui
@param _bListAction
Will be set to <TRUE/> when we are in a list action otherwise <FALSE/>
*/
- void notifyFunctionFieldChanged(const String& _sOldFunctionName,const String& _sFunctionName,sal_Bool& _bListAction,USHORT _nColumnId);
+ void notifyFunctionFieldChanged(const String& _sOldFunctionName,const String& _sFunctionName,sal_Bool& _bListAction,sal_uInt16 _nColumnId);
/** clears the function fields of the submitted entry if it doesn't match the SQL standard and append an undo action.
E.q. AGGREGATE functions are only valid when the field name isn't an asterix
@@ -325,7 +325,7 @@ namespace dbaui
@param _bListAction
When <TRUE/> an list action will be created.
*/
- void clearEntryFunctionField(const String& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction,USHORT _nColumnId);
+ void clearEntryFunctionField(const String& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction,sal_uInt16 _nColumnId);
/** remove or insert the necessary function types
@param _pEntry
diff --git a/dbaccess/source/ui/querydesign/TableConnection.cxx b/dbaccess/source/ui/querydesign/TableConnection.cxx
index 964b54d00f25..db6a8efd328c 100644
--- a/dbaccess/source/ui/querydesign/TableConnection.cxx
+++ b/dbaccess/source/ui/querydesign/TableConnection.cxx
@@ -53,7 +53,7 @@ namespace dbaui
:Window(_pContainer)
,m_pData( _pTabConnData )
,m_pParent( _pContainer )
- ,m_bSelected( FALSE )
+ ,m_bSelected( sal_False )
{
DBG_CTOR(OTableConnection,NULL);
Init();
@@ -168,19 +168,19 @@ namespace dbaui
//------------------------------------------------------------------------
void OTableConnection::Select()
{
- m_bSelected = TRUE;
+ m_bSelected = sal_True;
m_pParent->Invalidate( GetBoundingRect(), INVALIDATE_NOCHILDREN);
}
//------------------------------------------------------------------------
void OTableConnection::Deselect()
{
- m_bSelected = FALSE;
+ m_bSelected = sal_False;
InvalidateConnection();
}
//------------------------------------------------------------------------
- BOOL OTableConnection::CheckHit( const Point& rMousePos ) const
+ sal_Bool OTableConnection::CheckHit( const Point& rMousePos ) const
{
//////////////////////////////////////////////////////////////////////
// check if the point hit our line
diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx
index 4679f686bd51..d820c5efa280 100644
--- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx
+++ b/dbaccess/source/ui/querydesign/TableConnectionData.cxx
@@ -62,7 +62,7 @@ void OTableConnectionData::Init()
//////////////////////////////////////////////////////////////////////
// LineDataList mit Defaults initialisieren
OSL_ENSURE(m_vConnLineData.size() == 0, "OTableConnectionData::Init() : nur mit leere Linienliste aufzurufen !");
- ResetConnLines(TRUE);
+ ResetConnLines(sal_True);
// das legt Defaults an
}
//------------------------------------------------------------------------
@@ -97,7 +97,7 @@ OTableConnectionData& OTableConnectionData::operator=( const OTableConnectionDat
m_aConnName = rConnData.GetConnName();
// clear line list
- ResetConnLines(FALSE);
+ ResetConnLines(sal_False);
// und kopieren
OConnectionLineDataVec* pLineData = const_cast<OTableConnectionData*>(&rConnData)->GetConnLineDataList();
@@ -111,10 +111,10 @@ OTableConnectionData& OTableConnectionData::operator=( const OTableConnectionDat
}
//------------------------------------------------------------------------
-BOOL OTableConnectionData::SetConnLine( USHORT nIndex, const String& rSourceFieldName, const String& rDestFieldName )
+sal_Bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const String& rSourceFieldName, const String& rDestFieldName )
{
- if (USHORT(m_vConnLineData.size()) < nIndex)
- return FALSE;
+ if (sal_uInt16(m_vConnLineData.size()) < nIndex)
+ return sal_False;
// == ist noch erlaubt, das entspricht einem Append
if (m_vConnLineData.size() == nIndex)
@@ -126,11 +126,11 @@ BOOL OTableConnectionData::SetConnLine( USHORT nIndex, const String& rSourceFiel
pConnLineData->SetSourceFieldName( rSourceFieldName );
pConnLineData->SetDestFieldName( rDestFieldName );
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL OTableConnectionData::AppendConnLine( const ::rtl::OUString& rSourceFieldName, const ::rtl::OUString& rDestFieldName )
+sal_Bool OTableConnectionData::AppendConnLine( const ::rtl::OUString& rSourceFieldName, const ::rtl::OUString& rDestFieldName )
{
OConnectionLineDataVec::iterator aIter = m_vConnLineData.begin();
OConnectionLineDataVec::iterator aEnd = m_vConnLineData.end();
@@ -143,15 +143,15 @@ BOOL OTableConnectionData::AppendConnLine( const ::rtl::OUString& rSourceFieldNa
{
OConnectionLineDataRef pNew = new OConnectionLineData(rSourceFieldName, rDestFieldName);
if (!pNew.is())
- return FALSE;
+ return sal_False;
m_vConnLineData.push_back(pNew);
}
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-void OTableConnectionData::ResetConnLines( BOOL /*bUseDefaults*/ )
+void OTableConnectionData::ResetConnLines( sal_Bool /*bUseDefaults*/ )
{
OConnectionLineDataVec().swap(m_vConnLineData);
}
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index 3f3134254322..b8033f9ec25c 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -90,7 +90,7 @@ OTableWindow::OTableWindow( Window* pParent, const TTableWindowData::value_type&
,m_nMoveCount(0)
,m_nMoveIncrement(1)
,m_nSizingFlags( SIZING_NONE )
- ,m_bActive( FALSE )
+ ,m_bActive( sal_False )
{
DBG_CTOR(OTableWindow,NULL);
@@ -178,7 +178,7 @@ OTableWindowListBox* OTableWindow::CreateListBox()
}
//------------------------------------------------------------------------------
-BOOL OTableWindow::FillListBox()
+sal_Bool OTableWindow::FillListBox()
{
m_pListBox->Clear();
if ( !m_pContainerListener.is() )
@@ -237,7 +237,7 @@ BOOL OTableWindow::FillListBox()
OSL_ENSURE(0,"Exception occurred!");
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
void* OTableWindow::createUserData(const Reference< XPropertySet>& /*_xColumn*/,bool /*_bPrimaryKey*/)
@@ -287,7 +287,7 @@ void OTableWindow::impl_updateImage()
}
//------------------------------------------------------------------------------
-BOOL OTableWindow::Init()
+sal_Bool OTableWindow::Init()
{
// create list box if necessary
if ( !m_pListBox )
@@ -305,9 +305,9 @@ BOOL OTableWindow::Init()
// die Felder in die ListBox eintragen
clearListBox();
- BOOL bSuccess = FillListBox();
+ sal_Bool bSuccess = FillListBox();
if ( bSuccess )
- m_pListBox->SelectAll( FALSE );
+ m_pListBox->SelectAll( sal_False );
impl_updateImage();
@@ -359,7 +359,7 @@ void OTableWindow::Draw3DBorder(const Rectangle& rRect)
Rectangle OTableWindow::getSizingRect(const Point& _rPos,const Size& _rOutputSize) const
{
Rectangle aSizingRect = Rectangle( GetPosPixel(), GetSizePixel() );
- UINT16 nSizingFlags = GetSizingFlags();
+ sal_uInt16 nSizingFlags = GetSizingFlags();
if( nSizingFlags & SIZING_TOP )
{
@@ -509,7 +509,7 @@ void OTableWindow::Resize()
}
//------------------------------------------------------------------------------
-void OTableWindow::SetBoldTitle( BOOL bBold )
+void OTableWindow::SetBoldTitle( sal_Bool bBold )
{
Font aFont = m_aTitle.GetFont();
aFont.SetWeight( bBold?WEIGHT_BOLD:WEIGHT_NORMAL );
@@ -531,7 +531,7 @@ void OTableWindow::setActive(sal_Bool _bActive)
SetBoldTitle( _bActive );
m_bActive = _bActive;
if (!_bActive && m_pListBox && m_pListBox->GetSelectionCount() != 0)
- m_pListBox->SelectAll(FALSE);
+ m_pListBox->SelectAll(sal_False);
}
//------------------------------------------------------------------------------
@@ -544,25 +544,25 @@ void OTableWindow::Remove()
pTabWinCont->Invalidate();
}
//------------------------------------------------------------------------------
-BOOL OTableWindow::HandleKeyInput( const KeyEvent& rEvt )
+sal_Bool OTableWindow::HandleKeyInput( const KeyEvent& rEvt )
{
const KeyCode& rCode = rEvt.GetKeyCode();
- USHORT nCode = rCode.GetCode();
- BOOL bShift = rCode.IsShift();
- BOOL bCtrl = rCode.IsMod1();
+ sal_uInt16 nCode = rCode.GetCode();
+ sal_Bool bShift = rCode.IsShift();
+ sal_Bool bCtrl = rCode.IsMod1();
- BOOL bHandle = FALSE;
+ sal_Bool bHandle = sal_False;
if( !bCtrl && !bShift && (nCode==KEY_DELETE) )
{
Remove();
- bHandle = TRUE;
+ bHandle = sal_True;
}
return bHandle;
}
//------------------------------------------------------------------------------
-BOOL OTableWindow::ExistsAConn() const
+sal_Bool OTableWindow::ExistsAConn() const
{
return getTableView()->ExistsAConn(this);
}
@@ -648,7 +648,7 @@ void OTableWindow::Command(const CommandEvent& rEvt)
// -----------------------------------------------------------------------------
long OTableWindow::PreNotify(NotifyEvent& rNEvt)
{
- BOOL bHandled = FALSE;
+ sal_Bool bHandled = sal_False;
switch (rNEvt.GetType())
{
case EVENT_KEYINPUT:
@@ -670,19 +670,19 @@ long OTableWindow::PreNotify(NotifyEvent& rNEvt)
switch( rCode.GetCode() )
{
case KEY_DOWN:
- bHandled = TRUE;
+ bHandled = sal_True;
aStartPoint.Y() += m_nMoveIncrement;
break;
case KEY_UP:
- bHandled = TRUE;
+ bHandled = sal_True;
aStartPoint.Y() += -m_nMoveIncrement;
break;
case KEY_LEFT:
- bHandled = TRUE;
+ bHandled = sal_True;
aStartPoint.X() += -m_nMoveIncrement;
break;
case KEY_RIGHT:
- bHandled = TRUE;
+ bHandled = sal_True;
aStartPoint.X() += m_nMoveIncrement;
break;
}
@@ -765,7 +765,7 @@ long OTableWindow::PreNotify(NotifyEvent& rNEvt)
{
const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
const KeyCode& rCode = pKeyEvent->GetKeyCode();
- USHORT nKeyCode = rCode.GetCode();
+ sal_uInt16 nKeyCode = rCode.GetCode();
if ( rCode.IsMod2() && nKeyCode != KEY_UP && nKeyCode != KEY_DOWN && nKeyCode != KEY_LEFT && nKeyCode != KEY_RIGHT )
{
m_nMoveCount = 0; // reset our movement count
diff --git a/dbaccess/source/ui/querydesign/TableWindowData.cxx b/dbaccess/source/ui/querydesign/TableWindowData.cxx
index 6a9d63372a88..56cad8c62fff 100644
--- a/dbaccess/source/ui/querydesign/TableWindowData.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowData.cxx
@@ -61,7 +61,7 @@ OTableWindowData::OTableWindowData( const Reference< XPropertySet>& _xTable
,m_sComposedName(_rComposedName)
,m_aPosition( Point(-1,-1) )
,m_aSize( Size(-1,-1) )
- ,m_bShowAll( TRUE )
+ ,m_bShowAll( sal_True )
,m_bIsQuery(false)
,m_bIsValid(true)
{
@@ -82,13 +82,13 @@ OTableWindowData::~OTableWindowData()
}
//------------------------------------------------------------------------------
-BOOL OTableWindowData::HasPosition() const
+sal_Bool OTableWindowData::HasPosition() const
{
return ( (m_aPosition.X() != -1) && (m_aPosition.Y() != -1) );
}
//------------------------------------------------------------------------------
-BOOL OTableWindowData::HasSize() const
+sal_Bool OTableWindowData::HasSize() const
{
return ( (m_aSize.Width() != -1) && (m_aSize.Height() !=-1) );
}
diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
index a606ea669a29..9d0f29701421 100644
--- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
@@ -49,7 +49,7 @@ OJoinExchangeData::OJoinExchangeData(OTableWindowListBox* pBox)
, pEntry(pBox->FirstSelected())
{ }
-const ULONG SCROLLING_TIMESPAN = 500;
+const sal_uLong SCROLLING_TIMESPAN = 500;
const long LISTBOX_SCROLLING_AREA = 6;
//==================================================================
// class OTableWindowListBox
@@ -107,7 +107,7 @@ SvLBoxEntry* OTableWindowListBox::GetEntryFromText( const String& rEntryText )
OJoinDesignView* pView = m_pTabWin->getDesignView();
OJoinController& rController = pView->getController();
- BOOL bCase = FALSE;
+ sal_Bool bCase = sal_False;
try
{
Reference<XConnection> xConnection = rController.getConnection();
@@ -136,7 +136,7 @@ SvLBoxEntry* OTableWindowListBox::GetEntryFromText( const String& rEntryText )
//------------------------------------------------------------------------------
void OTableWindowListBox::NotifyScrolled()
{
- m_bReallyScrolled = TRUE;
+ m_bReallyScrolled = sal_True;
}
//------------------------------------------------------------------------------
@@ -147,13 +147,13 @@ void OTableWindowListBox::NotifyEndScroll()
m_pTabWin->getTableView()->Invalidate(INVALIDATE_NOCHILDREN);
// ohne das INVALIDATE_NOCHILDREN wuerden auch alle Tabellen neu gezeichnet werden,
// sprich : es flackert
- m_bReallyScrolled = FALSE;
+ m_bReallyScrolled = sal_False;
}
//------------------------------------------------------------------------------
long OTableWindowListBox::PreNotify(NotifyEvent& rNEvt)
{
- BOOL bHandled = FALSE;
+ sal_Bool bHandled = sal_False;
switch (rNEvt.GetType())
{
case EVENT_KEYINPUT:
@@ -194,7 +194,7 @@ IMPL_LINK( OTableWindowListBox, ScrollUpHdl, SvTreeListBox*, /*pBox*/ )
{
ScrollOutputArea( -1 );
pEntry = GetEntry( m_aMousePos );
- Select( pEntry, TRUE );
+ Select( pEntry, sal_True );
}
return 0;
@@ -211,7 +211,7 @@ IMPL_LINK( OTableWindowListBox, ScrollDownHdl, SvTreeListBox*, /*pBox*/ )
{
ScrollOutputArea( 1 );
pEntry = GetEntry( m_aMousePos );
- Select( pEntry, TRUE );
+ Select( pEntry, sal_True );
}
return 0;
@@ -246,7 +246,7 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt )
// remove the selection if the dragging operation is leaving the window
if (_rEvt.mbLeaving)
- SelectAll(FALSE);
+ SelectAll(sal_False);
else
{
// hit test
@@ -288,8 +288,8 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt )
// Beim Drag automatisch den richtigen Eintrag selektieren
if ((FirstSelected() != pEntry) || (FirstSelected() && NextSelected(FirstSelected())))
- SelectAll(FALSE);
- Select(pEntry, TRUE);
+ SelectAll(sal_False);
+ Select(pEntry, sal_True);
// Auf den ersten Eintrag (*) kann nicht gedroppt werden
if(!( m_pTabWin->GetData()->IsShowAll() && (pEntry==First()) ))
@@ -363,8 +363,8 @@ void OTableWindowListBox::GetFocus()
if ( GetSelectionCount() == 0 || GetCurEntry() != FirstSelected() )
{
if ( FirstSelected() )
- Select(FirstSelected(), FALSE);
- Select(GetCurEntry(), TRUE);
+ Select(FirstSelected(), sal_False);
+ Select(GetCurEntry(), sal_True);
}
else
ShowFocusRect(FirstSelected());
diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
index c4e9d279a03e..6c740fb6c52d 100644
--- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
@@ -64,7 +64,7 @@ OTableWindowTitle::OTableWindowTitle( OTableWindow* pParent ) :
SetTextColor(aSystemStyle.GetButtonTextColor());
Font aFont( GetFont() );
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
SetFont( aFont );
}
diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
index af5244bd281d..15fbc7611c75 100644
--- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
+++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
@@ -183,7 +183,7 @@ namespace dbaui
// -----------------------------------------------------------------------------
long OQueryContainerWindow::PreNotify( NotifyEvent& rNEvt )
{
- BOOL bHandled = FALSE;
+ sal_Bool bHandled = sal_False;
switch (rNEvt.GetType())
{
case EVENT_GETFOCUS:
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index ea2610498581..1034b55d94b2 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -245,13 +245,13 @@ namespace dbaui
namespace
{
// -----------------------------------------------------------------------------
- String lcl_getObjectResourceString( USHORT _nResId, sal_Int32 _nCommandType )
+ String lcl_getObjectResourceString( sal_uInt16 _nResId, sal_Int32 _nCommandType )
{
String sMessageText = String( ModuleRes( _nResId ) );
String sObjectType;
{
LocalResourceAccess aLocalRes( RSC_QUERY_OBJECT_TYPE, RSC_RESOURCE );
- sObjectType = String( ModuleRes( (USHORT)( _nCommandType + 1 ) ) );
+ sObjectType = String( ModuleRes( (sal_uInt16)( _nCommandType + 1 ) ) );
}
sMessageText.SearchAndReplace( String::CreateFromAscii( "$object$" ), sObjectType );
return sMessageText;
@@ -692,9 +692,9 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
break;
case SID_BROWSER_CLEAR_QUERY:
{
- getUndoMgr()->EnterListAction( String( ModuleRes(STR_QUERY_UNDO_TABWINDELETE) ), String() );
+ GetUndoManager().EnterListAction( String( ModuleRes(STR_QUERY_UNDO_TABWINDELETE) ), String() );
getContainer()->clear();
- getUndoMgr()->LeaveListAction();
+ GetUndoManager().LeaveListAction();
setStatement_fireEvent( ::rtl::OUString() );
if(m_bGraphicalDesign)
@@ -1037,7 +1037,7 @@ void OQueryController::impl_initialize()
}
}
- getUndoMgr()->Clear();
+ ClearUndoManager();
if ( ( m_bGraphicalDesign )
&& ( ( !m_sName.getLength() && !editingCommand() )
@@ -1788,7 +1788,7 @@ void OQueryController::reset()
{
impl_reset();
getContainer()->reset( NULL );
- getUndoMgr()->Clear();
+ ClearUndoManager();
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx
index d2fb74b53327..2b9e70e8d07b 100644
--- a/dbaccess/source/ui/querydesign/querydlg.cxx
+++ b/dbaccess/source/ui/querydesign/querydlg.cxx
@@ -75,7 +75,7 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent,
const TTableConnectionData::value_type& _pData,
OJoinTableView::OTableWindowMap* _pTableMap,
const Reference< XConnection >& _xConnection,
- BOOL _bAllowTableSelect)
+ sal_Bool _bAllowTableSelect)
:ModalDialog( pParent, ModuleRes(DLG_QRY_JOIN) )
,aML_HelpText( this, ModuleRes(ML_HELPTEXT) )
,aPB_OK( this, ModuleRes( PB_OK ) )
@@ -154,8 +154,8 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent,
}
else
{
- const USHORT nCount = m_pJoinControl->aLB_JoinType.GetEntryCount();
- for (USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = m_pJoinControl->aLB_JoinType.GetEntryCount();
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
const long nJoinTyp = reinterpret_cast<long>(m_pJoinControl->aLB_JoinType.GetEntryData(i));
if ( !bSupportFullJoin && nJoinTyp == ID_FULL_JOIN )
@@ -193,8 +193,8 @@ IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ )
String sFirstWinName = m_pConnData->getReferencingTable()->GetWinName();
String sSecondWinName = m_pConnData->getReferencedTable()->GetWinName();
const EJoinType eOldJoinType = eJoinType;
- USHORT nResId = 0;
- const USHORT nPos = m_pJoinControl->aLB_JoinType.GetSelectEntryPos();
+ sal_uInt16 nResId = 0;
+ const sal_uInt16 nPos = m_pJoinControl->aLB_JoinType.GetSelectEntryPos();
const long nJoinType = reinterpret_cast<long>(m_pJoinControl->aLB_JoinType.GetEntryData(nPos));
sal_Bool bAddHint = sal_True;
switch ( nJoinType )
@@ -229,11 +229,11 @@ IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ )
m_pConnData->ResetConnLines();
m_pTableControl->lateInit();
- m_pJoinControl->m_aCBNatural.Check(FALSE);
+ m_pJoinControl->m_aCBNatural.Check(sal_False);
m_pTableControl->enableRelation(false);
::rtl::OUString sEmpty;
m_pConnData->AppendConnLine(sEmpty,sEmpty);
- aPB_OK.Enable(TRUE);
+ aPB_OK.Enable(sal_True);
}
break;
}
@@ -284,7 +284,7 @@ IMPL_LINK( DlgQryJoin, OKClickHdl, Button*, /*pButton*/ )
IMPL_LINK( DlgQryJoin, NaturalToggleHdl, CheckBox*, /*pButton*/ )
{
DBG_CHKTHIS(DlgQryJoin,NULL);
- BOOL bChecked = m_pJoinControl->m_aCBNatural.IsChecked();
+ sal_Bool bChecked = m_pJoinControl->m_aCBNatural.IsChecked();
static_cast<OQueryTableConnectionData*>(m_pConnData.get())->setNatural(bChecked);
m_pTableControl->enableRelation(!bChecked);
if ( bChecked )
@@ -356,8 +356,8 @@ void DlgQryJoin::setJoinType(EJoinType _eNewJoinType)
break;
}
- const USHORT nCount = m_pJoinControl->aLB_JoinType.GetEntryCount();
- for (USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = m_pJoinControl->aLB_JoinType.GetEntryCount();
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
if ( nJoinType == reinterpret_cast<long>(m_pJoinControl->aLB_JoinType.GetEntryData(i)) )
{
diff --git a/dbaccess/source/ui/querydesign/querydlg.hxx b/dbaccess/source/ui/querydesign/querydlg.hxx
index 2e0b331fb13e..21f4aea129ef 100644
--- a/dbaccess/source/ui/querydesign/querydlg.hxx
+++ b/dbaccess/source/ui/querydesign/querydlg.hxx
@@ -79,7 +79,7 @@ namespace dbaui
const TTableConnectionData::value_type& pData,
OJoinTableView::OTableWindowMap* _pTableMap,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection,
- BOOL _bAllowTableSelect);
+ sal_Bool _bAllowTableSelect);
virtual ~DlgQryJoin();
EJoinType GetJoinType() const { return eJoinType; };
diff --git a/dbaccess/source/ui/querydesign/querydlg.src b/dbaccess/source/ui/querydesign/querydlg.src
index fe8f32da49a1..e0aec2c49d84 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/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
index b4dc806ea161..713f2677b255 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
@@ -97,7 +97,7 @@ ORelationTableConnectionData::~ORelationTableConnectionData()
}
//------------------------------------------------------------------------
-BOOL ORelationTableConnectionData::DropRelation()
+sal_Bool ORelationTableConnectionData::DropRelation()
{
DBG_CHKTHIS(ORelationTableConnectionData,NULL);
::osl::MutexGuard aGuard( m_aMutex );
@@ -126,7 +126,7 @@ BOOL ORelationTableConnectionData::DropRelation()
}
}
}
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -175,10 +175,10 @@ void ORelationTableConnectionData::SetCardinality()
}
// -----------------------------------------------------------------------------
-BOOL ORelationTableConnectionData::checkPrimaryKey(const Reference< XPropertySet>& i_xTable,EConnectionSide _eEConnectionSide) const
+sal_Bool ORelationTableConnectionData::checkPrimaryKey(const Reference< XPropertySet>& i_xTable,EConnectionSide _eEConnectionSide) const
{
// check if Table has the primary key column dependig on _eEConnectionSide
- USHORT nPrimKeysCount = 0,
+ sal_uInt16 nPrimKeysCount = 0,
nValidLinesCount = 0;
const Reference< XNameAccess> xKeyColumns = dbtools::getPrimaryKeyColumns_throw(i_xTable);
if ( xKeyColumns.is() )
@@ -202,15 +202,15 @@ BOOL ORelationTableConnectionData::checkPrimaryKey(const Reference< XPropertySet
}
}
if ( nPrimKeysCount != aKeyColumns.getLength() )
- return FALSE;
+ return sal_False;
}
if ( !nPrimKeysCount || nPrimKeysCount != nValidLinesCount )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ORelationTableConnectionData::IsConnectionPossible()
+sal_Bool ORelationTableConnectionData::IsConnectionPossible()
{
DBG_CHKTHIS(ORelationTableConnectionData,NULL);
::osl::MutexGuard aGuard( m_aMutex );
@@ -220,7 +220,7 @@ BOOL ORelationTableConnectionData::IsConnectionPossible()
if ( IsSourcePrimKey() && !IsDestPrimKey() )
ChangeOrientation();
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -283,7 +283,7 @@ bool operator==(const ORelationTableConnectionData& lhs, const ORelationTableCon
}
}
//------------------------------------------------------------------------
-BOOL ORelationTableConnectionData::Update()
+sal_Bool ORelationTableConnectionData::Update()
{
::osl::MutexGuard aGuard( m_aMutex );
////////////////////////////////////////////////////////////
@@ -291,7 +291,7 @@ BOOL ORelationTableConnectionData::Update()
{
DropRelation();
if( !IsConnectionPossible() )
- return FALSE;
+ return sal_False;
}
// reassign the keys because the orientaion could be changed
@@ -299,7 +299,7 @@ BOOL ORelationTableConnectionData::Update()
Reference< XIndexAccess> xKeys ( getReferencingTable()->getKeys());
if ( !xKeys.is() )
- return FALSE;
+ return sal_False;
////////////////////////////////////////////////////////////
// Neue Relation erzeugen
Reference<XDataDescriptorFactory> xKeyFactory(xKeys,UNO_QUERY);
@@ -459,7 +459,7 @@ xKey.clear();
// Kardinalitaet bestimmen
SetCardinality();
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index eae22012b8b7..9af062981e78 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -368,7 +368,7 @@ namespace
if ( aFind == m_aTableData.end() )
{
aFind = m_aTableData.insert(TTableDataHelper::value_type(sSourceName,::boost::shared_ptr<OTableWindowData>(new OTableWindowData(xTableProp,sSourceName, sSourceName)))).first;
- aFind->second->ShowAll(FALSE);
+ aFind->second->ShowAll(sal_False);
}
TTableWindowData::value_type pReferencingTable = aFind->second;
Reference<XIndexAccess> xKeys = pReferencingTable->getKeys();
@@ -401,7 +401,7 @@ namespace
{
Reference<XPropertySet> xReferencedTable(m_xTables->getByName(sReferencedTable),UNO_QUERY);
aRefFind = m_aTableData.insert(TTableDataHelper::value_type(sReferencedTable,::boost::shared_ptr<OTableWindowData>(new OTableWindowData(xReferencedTable,sReferencedTable, sReferencedTable)))).first;
- aRefFind->second->ShowAll(FALSE);
+ aRefFind->second->ShowAll(sal_False);
}
else
continue; // table name could not be found so we do not show this table releation
@@ -490,7 +490,7 @@ IMPL_LINK( ORelationController, OnThreadFinished, void*, /*NOTINTERESTEDIN*/ )
{
getView()->initialize(); // show the windows and fill with our informations
getView()->Invalidate(INVALIDATE_NOERASE);
- getUndoMgr()->Clear(); // clear all undo redo things
+ ClearUndoManager();
setModified(sal_False); // and we are not modified yet
if(m_vTableData.empty())
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index c05c1a3a2d18..3f4ca01f00e3 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -171,7 +171,7 @@ void ORelationTableView::ReSync()
GetTabWinMap()->begin()->second->GrabFocus();
}
//------------------------------------------------------------------------------
-BOOL ORelationTableView::IsAddAllowed()
+sal_Bool ORelationTableView::IsAddAllowed()
{
DBG_CHKTHIS(ORelationTableView,NULL);
@@ -274,9 +274,9 @@ void ORelationTableView::AddNewRelation()
DBG_CHKTHIS(ORelationTableView,NULL);
TTableConnectionData::value_type pNewConnData( new ORelationTableConnectionData() );
- ORelationDialog aRelDlg(this, pNewConnData, TRUE);
+ ORelationDialog aRelDlg(this, pNewConnData, sal_True);
- BOOL bSuccess = (aRelDlg.Execute() == RET_OK);
+ sal_Bool bSuccess = (aRelDlg.Execute() == RET_OK);
if (bSuccess)
{
// already updated by the dialog
@@ -307,7 +307,7 @@ bool ORelationTableView::RemoveConnection( OTableConnection* pConn ,sal_Bool /*_
}
//------------------------------------------------------------------------------
-void ORelationTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, BOOL /*bNewTable*/)
+void ORelationTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, sal_Bool /*bNewTable*/)
{
DBG_CHKTHIS(ORelationTableView,NULL);
OSL_ENSURE(_rComposedName.getLength(),"There must be a table name supplied!");
@@ -325,7 +325,7 @@ void ORelationTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const
//////////////////////////////////////////////////////////////////
// Neue Datenstruktur in DocShell eintragen
TTableWindowData::value_type pNewTabWinData(createTableWindowData( _rComposedName, rWinName,rWinName ));
- pNewTabWinData->ShowAll(FALSE);
+ pNewTabWinData->ShowAll(sal_False);
//////////////////////////////////////////////////////////////////
// Neues Fenster in Fensterliste eintragen
@@ -358,7 +358,7 @@ void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin )
OSQLWarningBox aDlg( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES );
if ( m_bInRemove || aDlg.Execute() == RET_YES )
{
- m_pView->getController().getUndoMgr()->Clear();
+ m_pView->getController().ClearUndoManager();
OJoinTableView::RemoveTabWin( pTabWin );
m_pView->getController().InvalidateFeature(SID_RELATION_ADD_RELATION);
@@ -366,7 +366,7 @@ void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin )
m_pView->getController().InvalidateFeature(ID_BROWSER_REDO);
}
}
-// -----------------------------------------------------------------------------
+
void ORelationTableView::lookForUiActivities()
{
if(m_pExistingConnection)
@@ -379,7 +379,7 @@ void ORelationTableView::lookForUiActivities()
aDlg.AddButton( ModuleRes(STR_QUERY_REL_EDIT), BUTTONID_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON);
aDlg.AddButton( ModuleRes(STR_QUERY_REL_CREATE), BUTTONID_YES, 0);
aDlg.AddButton(BUTTON_CANCEL,BUTTONID_CANCEL,0);
- UINT16 nRet = aDlg.Execute();
+ sal_uInt16 nRet = aDlg.Execute();
if( nRet == RET_CANCEL)
{
m_pCurrentlyTabConnData.reset();
@@ -428,7 +428,7 @@ void ORelationTableView::_elementRemoved( const container::ContainerEvent& _rEve
OTableWindow* pTableWindow = GetTabWindow(sName);
if ( pTableWindow )
{
- m_pView->getController().getUndoMgr()->Clear();
+ m_pView->getController().ClearUndoManager();
OJoinTableView::RemoveTabWin( pTableWindow );
m_pView->getController().InvalidateFeature(SID_RELATION_ADD_RELATION);
diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
index 87cbbe9fb928..d95ddefbebf6 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
@@ -56,9 +56,9 @@ namespace dbaui
void DisplayData( OFieldDescription* pFieldDescr );
void SaveData( OFieldDescription* pFieldDescr );
- void SetControlText( USHORT nControlId, const String& rText );
- String GetControlText( USHORT nControlId );
- void SetReadOnly( BOOL bReadOnly );
+ void SetControlText( sal_uInt16 nControlId, const String& rText );
+ String GetControlText( sal_uInt16 nControlId );
+ void SetReadOnly( sal_Bool bReadOnly );
#if OSL_DEBUG_LEVEL > 0
OTableEditorCtrl* GetEditorCtrl();
#endif
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index e3c41b1846f7..6c9753e6f21f 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -56,6 +56,8 @@
#include "TableFieldControl.hxx"
#include "dsntypes.hxx"
+#include "dbaccess_slotid.hrc"
+
using namespace ::dbaui;
using namespace ::comphelper;
using namespace ::svt;
@@ -104,7 +106,7 @@ DBG_NAME(OTableEditorCtrl)
//==================================================================
DBG_NAME(ClipboardInvalidator)
//------------------------------------------------------------------
-OTableEditorCtrl::ClipboardInvalidator::ClipboardInvalidator(ULONG nTimeout,OTableEditorCtrl* _pOwner)
+OTableEditorCtrl::ClipboardInvalidator::ClipboardInvalidator(sal_uLong nTimeout,OTableEditorCtrl* _pOwner)
: m_pOwner(_pOwner)
{
DBG_CTOR(ClipboardInvalidator,NULL);
@@ -210,13 +212,13 @@ OTableEditorCtrl::OTableEditorCtrl(Window* pWindow)
}
//------------------------------------------------------------------------------
-SfxUndoManager* OTableEditorCtrl::GetUndoManager() const
+SfxUndoManager& OTableEditorCtrl::GetUndoManager() const
{
- return GetView()->getController().getUndoMgr();
+ return GetView()->getController().GetUndoManager();
}
//------------------------------------------------------------------------------
-BOOL OTableEditorCtrl::IsReadOnly()
+sal_Bool OTableEditorCtrl::IsReadOnly()
{
DBG_CHKTHIS(OTableEditorCtrl,NULL);
return bReadOnly;
@@ -330,7 +332,7 @@ OTableEditorCtrl::~OTableEditorCtrl()
DBG_DTOR(OTableEditorCtrl,NULL);
//////////////////////////////////////////////////////////////////////
// Undo-Manager zuruecksetzen
- GetUndoManager()->Clear();
+ GetUndoManager().Clear();
//////////////////////////////////////////////////////////////////////
// Moegliche Events aus Queue entfernen
@@ -623,7 +625,7 @@ sal_Bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId)
// Wenn FieldDescr existiert, wurde Feld geloescht und alter Inhalt wird wiederhergestellt
if (pActFieldDescr)
{
- GetUndoManager()->AddUndoAction(new OTableEditorTypeSelUndoAct(this, nRow, FIELD_TYPE, pActFieldDescr->getTypeInfo()));
+ GetUndoManager().AddUndoAction(new OTableEditorTypeSelUndoAct(this, nRow, FIELD_TYPE, pActFieldDescr->getTypeInfo()));
SwitchType(TOTypeInfoSP());
pActFieldDescr = pActRow->GetActFieldDescr();
}
@@ -789,7 +791,7 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId )
default: sActionDescription = String( ModuleRes( STR_CHANGE_COLUMN_ATTRIBUTE ) ); break;
}
- GetUndoManager()->EnterListAction( sActionDescription, String() );
+ GetUndoManager().EnterListAction( sActionDescription, String() );
if (!pActFieldDescr)
{
const OTypeInfoMap* pTypeInfoMap = GetView()->getController().getTypeInfo();
@@ -806,20 +808,20 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId )
nInvalidateTypeEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, InvalidateFieldType) );
pActFieldDescr = pActRow->GetActFieldDescr();
pDescrWin->DisplayData( pActFieldDescr );
- GetUndoManager()->AddUndoAction( new OTableEditorTypeSelUndoAct(this, nRow, nColId+1, TOTypeInfoSP()) );
+ GetUndoManager().AddUndoAction( new OTableEditorTypeSelUndoAct(this, nRow, nColId+1, TOTypeInfoSP()) );
}
if( nColId != FIELD_TYPE )
- GetUndoManager()->AddUndoAction( new OTableDesignCellUndoAct(this, nRow, nColId) );
+ GetUndoManager().AddUndoAction( new OTableDesignCellUndoAct(this, nRow, nColId) );
else
{
- GetUndoManager()->AddUndoAction(new OTableEditorTypeSelUndoAct(this, GetCurRow(), nColId, GetFieldDescr(GetCurRow())->getTypeInfo()));
+ GetUndoManager().AddUndoAction(new OTableEditorTypeSelUndoAct(this, GetCurRow(), nColId, GetFieldDescr(GetCurRow())->getTypeInfo()));
resetType();
}
SaveData(nRow,nColId);
// SaveData could create a undo action as well
- GetUndoManager()->LeaveListAction();
+ GetUndoManager().LeaveListAction();
RowModified(nRow);
CellControllerRef xController(Controller());
if(xController.Is())
@@ -833,7 +835,7 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId )
// -----------------------------------------------------------------------------
void OTableEditorCtrl::resetType()
{
- USHORT nPos = pTypeCell->GetSelectEntryPos();
+ sal_uInt16 nPos = pTypeCell->GetSelectEntryPos();
if(nPos != LISTBOX_ENTRY_NOTFOUND)
SwitchType( GetView()->getController().getTypeInfo(nPos) );
else
@@ -982,7 +984,7 @@ void OTableEditorCtrl::InsertRows( long nRow )
//////////////////////////////////////////////////////////////////////
// Undo-Action erzeugen
- GetUndoManager()->AddUndoAction( new OTableEditorInsUndoAct(this, nRow,vInsertedUndoRedoRows) );
+ GetUndoManager().AddUndoAction( new OTableEditorInsUndoAct(this, nRow,vInsertedUndoRedoRows) );
GetView()->getController().setModified( sal_True );
InvalidateFeatures();
}
@@ -994,7 +996,7 @@ void OTableEditorCtrl::DeleteRows()
OSL_ENSURE(GetView()->getController().isDropAllowed(),"Call of DeleteRows not valid here. Please check isDropAllowed!");
//////////////////////////////////////////////////////////////////////
// Undo-Action erzeugen
- GetUndoManager()->AddUndoAction( new OTableEditorDelUndoAct(this) );
+ GetUndoManager().AddUndoAction( new OTableEditorDelUndoAct(this) );
//////////////////////////////////////////////////////////////////////
@@ -1042,7 +1044,7 @@ void OTableEditorCtrl::InsertNewRows( long nRow )
long nInsertRows = GetSelectRowCount();
if( !nInsertRows )
nInsertRows = 1;
- GetUndoManager()->AddUndoAction( new OTableEditorInsNewUndoAct(this, nRow, nInsertRows) );
+ GetUndoManager().AddUndoAction( new OTableEditorInsNewUndoAct(this, nRow, nInsertRows) );
//////////////////////////////////////////////////////////////////////
// Zahl der selektierten Zeilen werden neu eingefuegt
for( long i=nRow; i<(nRow+nInsertRows); i++ )
@@ -1578,7 +1580,7 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt)
if ( 1 == GetSelectColumnCount() )
{
sal_uInt16 nSelId = GetColumnId(
- sal::static_int_cast< USHORT >(
+ sal::static_int_cast< sal_uInt16 >(
FirstSelectedColumn() ) );
::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, sal_False ) );
@@ -1813,7 +1815,7 @@ void OTableEditorCtrl::SetPrimaryKey( sal_Bool bSet )
}
}
- GetUndoManager()->AddUndoAction( new OPrimKeyUndoAct(this, aDeletedPrimKeys, aInsertedPrimKeys) );
+ GetUndoManager().AddUndoAction( new OPrimKeyUndoAct(this, aDeletedPrimKeys, aInsertedPrimKeys) );
//////////////////////////////////////////////////////////////////////
// Handle-Spalte invalidieren
@@ -1875,7 +1877,7 @@ void OTableEditorCtrl::SwitchType( const TOTypeInfoSP& _pType )
|| ( GetView()->getController().getTypeInfo( nCurrentlySelected ) != _pType )
)
{
- USHORT nEntryPos = 0;
+ sal_uInt16 nEntryPos = 0;
const OTypeInfoMap* pTypeInfo = GetView()->getController().getTypeInfo();
OTypeInfoMap::const_iterator aIter = pTypeInfo->begin();
OTypeInfoMap::const_iterator aEnd = pTypeInfo->end();
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx
index 1d154ee5be0d..3128d979b681 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx
@@ -63,19 +63,19 @@ namespace dbaui
::boost::shared_ptr<OTableRow> pActRow;
- ULONG nIndexEvent;
- ULONG nCutEvent;
- ULONG nPasteEvent;
- ULONG nDeleteEvent;
- ULONG nInsNewRowsEvent;
- ULONG nInvalidateTypeEvent;
- ULONG nEntryNotFoundEvent;
+ sal_uLong nIndexEvent;
+ sal_uLong nCutEvent;
+ sal_uLong nPasteEvent;
+ sal_uLong nDeleteEvent;
+ sal_uLong nInsNewRowsEvent;
+ sal_uLong nInvalidateTypeEvent;
+ sal_uLong nEntryNotFoundEvent;
ChildFocusState m_eChildFocus;
long nOldDataPos;
- BOOL bSaveOnMove;
- BOOL bReadOnly;
+ sal_Bool bSaveOnMove;
+ sal_Bool bReadOnly;
//------------------------------------------------------------------
// Hilfsklasse
class ClipboardInvalidator
@@ -85,7 +85,7 @@ namespace dbaui
OTableEditorCtrl* m_pOwner;
public:
- ClipboardInvalidator(ULONG nTimeout,OTableEditorCtrl*);
+ ClipboardInvalidator(sal_uLong nTimeout,OTableEditorCtrl*);
~ClipboardInvalidator();
protected:
@@ -97,19 +97,19 @@ namespace dbaui
protected:
virtual void Command( const CommandEvent& rEvt );
- virtual BOOL SeekRow(long nRow);
+ virtual sal_Bool SeekRow(long nRow);
virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect,
- USHORT nColumnId ) const;
+ sal_uInt16 nColumnId ) const;
virtual void CursorMoved();
virtual RowStatus GetRowStatus(long nRow) const;
- virtual ::svt::CellController* GetController(long nRow, USHORT nCol);
- virtual void InitController(::svt::CellControllerRef& rController, long nRow, USHORT nCol);
+ virtual ::svt::CellController* GetController(long nRow, sal_uInt16 nCol);
+ virtual void InitController(::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol);
virtual void CellModified();
- virtual BOOL SaveModified(); // wird aufgerufen vor einem Zellenwechsel
- // return FALSE, verhindert Zellenwechsel
+ virtual sal_Bool SaveModified(); // wird aufgerufen vor einem Zellenwechsel
+ // return sal_False, verhindert Zellenwechsel
virtual void Undo();
virtual void Redo();
virtual String GetCellText(long nRow, sal_uInt16 nColId) const;
@@ -126,8 +126,8 @@ namespace dbaui
void ClearModified();
- void SetPrimaryKey( BOOL bSet );
- BOOL IsPrimaryKey();
+ void SetPrimaryKey( sal_Bool bSet );
+ sal_Bool IsPrimaryKey();
DECL_LINK(ControlPreNotifyHdl, NotifyEvent*);
@@ -135,15 +135,15 @@ namespace dbaui
// TYPEINFO();
OTableEditorCtrl(Window* pParentWin);
virtual ~OTableEditorCtrl();
- virtual BOOL CursorMoving(long nNewRow, USHORT nNewCol);
+ virtual sal_Bool CursorMoving(long nNewRow, sal_uInt16 nNewCol);
virtual void UpdateAll();
- SfxUndoManager* GetUndoManager() const;
+ SfxUndoManager& GetUndoManager() const;
void SetDescrWin( OTableFieldDescWin* pWin ){ pDescrWin = pWin; if (pDescrWin && pActRow) pDescrWin->DisplayData(pActRow->GetActFieldDescr()); }
- BOOL SaveCurRow();
+ sal_Bool SaveCurRow();
void SwitchType( const TOTypeInfoSP& _pType );
- void DisplayData( long nRow, BOOL bGrabFocus = TRUE );
+ void DisplayData( long nRow, sal_Bool bGrabFocus = sal_True );
// erzwingt das Anzeigen der genannten Zeile (selbst wenn es eigentlich schon die aktuelle ist)
virtual void SetCellData( long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo );
@@ -158,15 +158,15 @@ namespace dbaui
::boost::shared_ptr<OTableRow> GetActRow(){ return pActRow; }
void CellModified( long nRow, sal_uInt16 nColId );
- void SetReadOnly( BOOL bRead=TRUE );
+ void SetReadOnly( sal_Bool bRead=sal_True );
virtual void Init();
virtual void DeactivateCell(sal_Bool bUpdate = sal_True);
- BOOL IsCutAllowed( long nRow = -1 );
- BOOL IsCopyAllowed( long nRow = -1 );
- BOOL IsPasteAllowed( long nRow = -1 );
- BOOL IsReadOnly();
+ sal_Bool IsCutAllowed( long nRow = -1 );
+ sal_Bool IsCopyAllowed( long nRow = -1 );
+ sal_Bool IsPasteAllowed( long nRow = -1 );
+ sal_Bool IsReadOnly();
OFieldDescription* GetFieldDescr( long nRow );
// window overloads
@@ -191,11 +191,11 @@ namespace dbaui
DECL_LINK( EntryNotFound, void* );
void InitCellController();
- INT32 HasFieldName( const String& rFieldName );
+ sal_Int32 HasFieldName( const String& rFieldName );
String GenerateName( const String& rName );
- BOOL SetDataPtr( long nRow );
+ sal_Bool SetDataPtr( long nRow );
- BOOL SaveData(long nRow, USHORT nColumnId);
+ sal_Bool SaveData(long nRow, sal_uInt16 nColumnId);
/** AdjustFieldDescription set the needed values for the description
@param _pFieldDesc the field description where to set the values
@param _rMultiSel contains the postions which changed for undo/redo
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index d3571d08f188..28450226eb81 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -566,7 +566,7 @@ void OTableController::impl_initialize()
{
loadData(); // fill the column information form the table
getView()->initialize(); // show the windows and fill with our informations
- getUndoMgr()->Clear(); // clear all undo redo things
+ ClearUndoManager();
setModified(sal_False); // and we are not modified yet
}
catch( const Exception& )
@@ -659,11 +659,6 @@ void OTableController::describeSupportedFeatures()
implDescribeSupportedFeature( ".uno:EditDoc", ID_BROWSER_EDITDOC, CommandGroup::EDIT );
}
// -----------------------------------------------------------------------------
-SfxUndoManager* OTableController::getUndoMgr()
-{
- return &m_aUndoManager;
-}
-// -----------------------------------------------------------------------------
void OTableController::impl_onModifyChanged()
{
OSingleDocumentController::impl_onModifyChanged();
@@ -1511,7 +1506,7 @@ void OTableController::reSyncRows()
}
static_cast<OTableDesignView*>(getView())->reSync(); // show the windows and fill with our informations
- getUndoMgr()->Clear(); // clear all undo redo things
+ ClearUndoManager();
setModified(sal_False); // and we are not modified yet
}
// -----------------------------------------------------------------------------
@@ -1567,7 +1562,7 @@ void OTableController::reload()
{
loadData(); // fill the column information form the table
static_cast<OTableDesignView*>(getView())->reSync(); // show the windows and fill with our informations
- getUndoMgr()->Clear(); // clear all undo redo things
+ ClearUndoManager();
setModified(sal_False); // and we are not modified yet
static_cast<OTableDesignView*>(getView())->Invalidate();
}
diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
index 4c3ef7d87cd4..f33e55ff686f 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
@@ -55,9 +55,9 @@ OTableRowView::OTableRowView(Window* pParent)
,m_nDataPos(-1)
,m_nCurrentPos(-1)
,m_nCurUndoActId(0)
- ,m_bCurrentModified(FALSE)
- ,m_bUpdatable(FALSE)
- ,m_bClipboardFilled(FALSE)
+ ,m_bCurrentModified(sal_False)
+ ,m_bUpdatable(sal_False)
+ ,m_bClipboardFilled(sal_False)
{
DBG_CTOR(OTableRowView,NULL);
@@ -85,7 +85,7 @@ void OTableRowView::Init()
SetFont(aFont);
// HandleColumn, fuer maximal fuenf Ziffern einrichten
- InsertHandleColumn(static_cast<USHORT>(GetTextWidth('0') * 4)/*, TRUE */);
+ InsertHandleColumn(static_cast<sal_uInt16>(GetTextWidth('0') * 4)/*, sal_True */);
BrowserMode nMode = BROWSER_COLUMNSELECTION | BROWSER_MULTISELECTION | BROWSER_KEEPSELECTION |
BROWSER_HLINESFULL | BROWSER_VLINESFULL | BROWSER_AUTOSIZE_LASTCOL;
@@ -118,7 +118,7 @@ void OTableRowView::KeyInput( const KeyEvent& rEvt )
}
//------------------------------------------------------------------------
-void OTableRowView::SetUpdatable( BOOL bUpdate )
+void OTableRowView::SetUpdatable( sal_Bool bUpdate )
{
m_bUpdatable = bUpdate;
@@ -138,7 +138,7 @@ void OTableRowView::Command(const CommandEvent& rEvt)
return;
}
- USHORT nColId = GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X());
+ sal_uInt16 nColId = GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X());
long nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());
if ( nColId == HANDLE_ID )
diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
index 39ffb23df34d..4c5882c7ef9e 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
@@ -277,7 +277,7 @@ IMPL_LINK( OTableDesignView, SwitchHdl, Accelerator*, /*pAcc*/ )
//------------------------------------------------------------------------------
long OTableDesignView::PreNotify( NotifyEvent& rNEvt )
{
- BOOL bHandled = FALSE;
+ sal_Bool bHandled = sal_False;
switch(rNEvt.GetType())
{
case EVENT_GETFOCUS:
diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
index 4eb83be92c2b..97484d519948 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
@@ -104,7 +104,7 @@ void OTableFieldControl::DeactivateAggregate( EControlType eType )
}
}
// -----------------------------------------------------------------------------
-void OTableFieldControl::SetModified(BOOL bModified)
+void OTableFieldControl::SetModified(sal_Bool bModified)
{
GetCtrl()->GetView()->getController().setModified(bModified);
}
diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx
index a45d2928889c..22a77811b51c 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx
@@ -44,9 +44,9 @@ namespace dbaui
virtual void ActivateAggregate( EControlType eType );
virtual void DeactivateAggregate( EControlType eType );
// Sind von den abgeleiteten Klassen zu impl.
- virtual void CellModified(long nRow, USHORT nColId );
- virtual BOOL IsReadOnly();
- virtual void SetModified(BOOL bModified);
+ virtual void CellModified(long nRow, sal_uInt16 nColId );
+ virtual sal_Bool IsReadOnly();
+ virtual void SetModified(sal_Bool bModified);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const;
virtual ::com::sun::star::lang::Locale GetLocale() const;
diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
index 3e8548a32a50..ca2680fc09a8 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
@@ -303,7 +303,7 @@ void OTableFieldDescWin::LoseFocus()
// -----------------------------------------------------------------------------
long OTableFieldDescWin::PreNotify( NotifyEvent& rNEvt )
{
- BOOL bHandled = FALSE;
+ sal_Bool bHandled = sal_False;
switch(rNEvt.GetType())
{
case EVENT_GETFOCUS:
diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx
index f26a9b1471fc..5bfb03283cfc 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx
@@ -70,16 +70,16 @@ namespace dbaui
void DisplayData( OFieldDescription* pFieldDescr );
void SaveData( OFieldDescription* pFieldDescr );
- void SetReadOnly( BOOL bReadOnly );
+ void SetReadOnly( sal_Bool bReadOnly );
// window overloads
virtual long PreNotify( NotifyEvent& rNEvt );
virtual void GetFocus();
virtual void LoseFocus();
- void SetControlText( USHORT nControlId, const String& rText )
+ void SetControlText( sal_uInt16 nControlId, const String& rText )
{ m_pGenPage->SetControlText(nControlId,rText); }
- String GetControlText( USHORT nControlId )
+ String GetControlText( sal_uInt16 nControlId )
{ return m_pGenPage->GetControlText(nControlId); }
// short GetFormatCategory(OFieldDescription* pFieldDescr) { return m_pGenPage ? m_pGenPage->GetFormatCategory(pFieldDescr) : -1; }
diff --git a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
index ee2522df46c8..97a6f2d649f1 100644
--- a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
@@ -68,7 +68,7 @@ namespace dbaui
// -----------------------------------------------------------------------------
sal_Bool OTableRowExchange::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor )
{
- ULONG nFormat = SotExchange::GetFormat(rFlavor);
+ sal_uLong nFormat = SotExchange::GetFormat(rFlavor);
if(nFormat == SOT_FORMATSTR_ID_SBA_TABED)
return SetObject(&m_vTableRow,SOT_FORMATSTR_ID_SBA_TABED,rFlavor);
return sal_False;
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx
index 794aefe3963b..36262c5a0ac1 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.cxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx
@@ -55,7 +55,7 @@ TYPEINIT1( OPrimKeyUndoAct, OTableEditorUndoAct );
// class OTableDesignUndoAct
//==============================================================================
DBG_NAME(OTableDesignUndoAct);
-OTableDesignUndoAct::OTableDesignUndoAct( OTableRowView* pOwner,USHORT nCommentID ) : OCommentUndoAction(nCommentID)
+OTableDesignUndoAct::OTableDesignUndoAct( OTableRowView* pOwner,sal_uInt16 nCommentID ) : OCommentUndoAction(nCommentID)
,m_pTabDgnCtrl( pOwner )
{
DBG_CTOR(OTableDesignUndoAct,NULL);
@@ -99,7 +99,7 @@ void OTableDesignUndoAct::Redo()
// class OTableDesignCellUndoAct
//==============================================================================
DBG_NAME(OTableDesignCellUndoAct);
-OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, USHORT nColumn ) :
+OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, sal_uInt16 nColumn ) :
OTableDesignUndoAct( pOwner ,STR_TABED_UNDO_CELLMODIFIED)
,m_nCol( nColumn )
,m_nRow( nRowID )
@@ -153,7 +153,7 @@ void OTableDesignCellUndoAct::Redo()
// class OTableEditorUndoAct
//==============================================================================
DBG_NAME(OTableEditorUndoAct);
-OTableEditorUndoAct::OTableEditorUndoAct( OTableEditorCtrl* pOwner,USHORT _nCommentID ) :
+OTableEditorUndoAct::OTableEditorUndoAct( OTableEditorCtrl* pOwner,sal_uInt16 _nCommentID ) :
OTableDesignUndoAct( pOwner ,_nCommentID)
,pTabEdCtrl(pOwner)
{
@@ -170,7 +170,7 @@ OTableEditorUndoAct::~OTableEditorUndoAct()
// class OTableEditorTypeSelUndoAct
//==============================================================================
DBG_NAME(OTableEditorTypeSelUndoAct);
-OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, USHORT nColumn, const TOTypeInfoSP& _pOldType )
+OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType )
:OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_TYPE_CHANGED)
,m_nCol( nColumn )
,m_nRow( nRowID )
@@ -249,7 +249,7 @@ void OTableEditorDelUndoAct::Undo()
{
//////////////////////////////////////////////////////////////////////
// Geloeschte Zeilen wieder einfuegen
- ULONG nPos;
+ sal_uLong nPos;
::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_aDeletedRows.begin();
::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aEnd = m_aDeletedRows.end();
@@ -273,7 +273,7 @@ void OTableEditorDelUndoAct::Redo()
{
//////////////////////////////////////////////////////////////////////
// Zeilen wieder loeschen
- ULONG nPos;
+ sal_uLong nPos;
::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_aDeletedRows.begin();
::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aEnd = m_aDeletedRows.end();
::std::vector< ::boost::shared_ptr<OTableRow> >* pOriginalRows = pTabEdCtrl->GetRowList();
@@ -322,7 +322,7 @@ void OTableEditorInsUndoAct::Undo()
pOriginalRows->erase(pOriginalRows->begin()+i);
}
- pTabEdCtrl->RowRemoved( m_nInsPos, m_vInsertedRows.size(), TRUE );
+ pTabEdCtrl->RowRemoved( m_nInsPos, m_vInsertedRows.size(), sal_True );
pTabEdCtrl->InvalidateHandleColumn();
OTableEditorUndoAct::Undo();
@@ -345,7 +345,7 @@ void OTableEditorInsUndoAct::Redo()
nInsertRow++;
}
- pTabEdCtrl->RowInserted( m_nInsPos, m_vInsertedRows.size(), TRUE );
+ pTabEdCtrl->RowInserted( m_nInsPos, m_vInsertedRows.size(), sal_True );
pTabEdCtrl->InvalidateHandleColumn();
OTableEditorUndoAct::Redo();
@@ -381,7 +381,7 @@ void OTableEditorInsNewUndoAct::Undo()
pOriginalRows->erase(pOriginalRows->begin()+i);
}
- pTabEdCtrl->RowRemoved( m_nInsPos, m_nInsRows, TRUE );
+ pTabEdCtrl->RowRemoved( m_nInsPos, m_nInsRows, sal_True );
pTabEdCtrl->InvalidateHandleColumn();
OTableEditorUndoAct::Undo();
@@ -397,7 +397,7 @@ void OTableEditorInsNewUndoAct::Redo()
for( long i=m_nInsPos; i<(m_nInsPos+m_nInsRows); i++ )
pRowList->insert( pRowList->begin()+i,::boost::shared_ptr<OTableRow>(new OTableRow()) );
- pTabEdCtrl->RowInserted( m_nInsPos, m_nInsRows, TRUE );
+ pTabEdCtrl->RowInserted( m_nInsPos, m_nInsRows, sal_True );
pTabEdCtrl->InvalidateHandleColumn();
OTableEditorUndoAct::Redo();
@@ -437,7 +437,7 @@ void OPrimKeyUndoAct::Undo()
{
OSL_ENSURE(nIndex <= static_cast<long>(pRowList->size()),"Index for undo isn't valid!");
pRow = (*pRowList)[nIndex];
- pRow->SetPrimaryKey( FALSE );
+ pRow->SetPrimaryKey( sal_False );
}
//////////////////////////////////////////////////////////////////////
@@ -446,7 +446,7 @@ void OPrimKeyUndoAct::Undo()
{
OSL_ENSURE(nIndex <= static_cast<long>(pRowList->size()),"Index for undo isn't valid!");
pRow = (*pRowList)[nIndex];
- pRow->SetPrimaryKey( TRUE );
+ pRow->SetPrimaryKey( sal_True );
}
m_pEditorCtrl->InvalidateHandleColumn();
@@ -462,12 +462,12 @@ void OPrimKeyUndoAct::Redo()
//////////////////////////////////////////////////////////////////////
// Die geloeschten Keys loeschen
for( nIndex = m_aDelKeys.FirstSelected(); nIndex != (long)SFX_ENDOFSELECTION; nIndex=m_aDelKeys.NextSelected() )
- (*pRowList)[nIndex]->SetPrimaryKey( FALSE );
+ (*pRowList)[nIndex]->SetPrimaryKey( sal_False );
//////////////////////////////////////////////////////////////////////
// Die eingefuegten Keys herstellen
for( nIndex = m_aInsKeys.FirstSelected(); nIndex != (long)SFX_ENDOFSELECTION; nIndex=m_aInsKeys.NextSelected() )
- (*pRowList)[nIndex]->SetPrimaryKey( TRUE );
+ (*pRowList)[nIndex]->SetPrimaryKey( sal_True );
m_pEditorCtrl->InvalidateHandleColumn();
OTableEditorUndoAct::Redo();
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.hxx b/dbaccess/source/ui/tabledesign/TableUndo.hxx
index ff744b2f0d57..23ecf12b8e61 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.hxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.hxx
@@ -50,7 +50,7 @@ namespace dbaui
virtual void Redo();
public:
TYPEINFO();
- OTableDesignUndoAct( OTableRowView* pOwner ,USHORT nCommentID);
+ OTableDesignUndoAct( OTableRowView* pOwner ,sal_uInt16 nCommentID);
virtual ~OTableDesignUndoAct();
};
@@ -63,7 +63,7 @@ namespace dbaui
public:
TYPEINFO();
- OTableEditorUndoAct( OTableEditorCtrl* pOwner,USHORT nCommentID );
+ OTableEditorUndoAct( OTableEditorCtrl* pOwner,sal_uInt16 nCommentID );
virtual ~OTableEditorUndoAct();
};
@@ -72,7 +72,7 @@ namespace dbaui
class OTableDesignCellUndoAct : public OTableDesignUndoAct
{
protected:
- USHORT m_nCol;
+ sal_uInt16 m_nCol;
long m_nRow;
::com::sun::star::uno::Any m_sOldText;
::com::sun::star::uno::Any m_sNewText;
@@ -81,7 +81,7 @@ namespace dbaui
virtual void Redo();
public:
TYPEINFO();
- OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, USHORT nColumn );
+ OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, sal_uInt16 nColumn );
virtual ~OTableDesignCellUndoAct();
};
@@ -90,7 +90,7 @@ namespace dbaui
class OTableEditorTypeSelUndoAct : public OTableEditorUndoAct
{
protected:
- USHORT m_nCol;
+ sal_uInt16 m_nCol;
long m_nRow;
TOTypeInfoSP m_pOldType;
TOTypeInfoSP m_pNewType;
@@ -99,7 +99,7 @@ namespace dbaui
virtual void Redo();
public:
TYPEINFO();
- OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, USHORT nColumn, const TOTypeInfoSP& _pOldType );
+ OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType );
virtual ~OTableEditorTypeSelUndoAct();
};
@@ -155,7 +155,7 @@ namespace dbaui
protected:
MultiSelection m_aDelKeys,
m_aInsKeys;
- BOOL m_bActPrimKeySet;
+ sal_Bool m_bActPrimKeySet;
OTableEditorCtrl* m_pEditorCtrl;
virtual void Undo();
diff --git a/dbaccess/source/ui/tabledesign/table.src b/dbaccess/source/ui/tabledesign/table.src
index 0a9c5f4e46e5..8ae961bcbb80 100644
--- a/dbaccess/source/ui/tabledesign/table.src
+++ b/dbaccess/source/ui/tabledesign/table.src
@@ -190,7 +190,7 @@ Menu RID_TABLEDESIGNROWPOPUPMENU
MenuItem
{
Identifier = SID_TABLEDESIGN_INSERTROWS ;
- HelpID = SID_TABLEDESIGN_INSERTROWS ;
+ HelpID = HID_TABLEDESIGN_INSERTROWS ;
Text [ en-US ] = "Insert Rows" ;
};
MenuItem
@@ -200,7 +200,7 @@ Menu RID_TABLEDESIGNROWPOPUPMENU
MenuItem
{
Identifier = SID_TABLEDESIGN_TABED_PRIMARYKEY ;
- HelpID = SID_TABLEDESIGN_TABED_PRIMARYKEY ;
+ HelpID = HID_TABLEDESIGN_TABED_PRIMARYKEY ;
Checkable = TRUE ;
Text [ en-US ] = "Primary Key" ;
};
diff --git a/dbaccess/source/ui/uno/ColumnControl.cxx b/dbaccess/source/ui/uno/ColumnControl.cxx
index c98e3ffa6d21..beac49e1513f 100644
--- a/dbaccess/source/ui/uno/ColumnControl.cxx
+++ b/dbaccess/source/ui/uno/ColumnControl.cxx
@@ -50,7 +50,7 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::sdbc;
OColumnControl::OColumnControl(const Reference<XMultiServiceFactory>& _rxFactory)
-: m_xORB(_rxFactory)
+ :UnoControl( _rxFactory )
{
}
// -----------------------------------------------------------------------------
@@ -76,7 +76,7 @@ void SAL_CALL OColumnControl::createPeer(const Reference< XToolkit >& /*rToolkit
pParentWin = pParent->GetWindow();
}
- OColumnPeer* pPeer = new OColumnPeer(pParentWin,m_xORB);
+ OColumnPeer* pPeer = new OColumnPeer( pParentWin, maContext.getLegacyServiceFactory() );
OSL_ENSURE(pPeer != NULL, "FmXGridControl::createPeer : imp_CreatePeer didn't return a peer !");
setPeer( pPeer );
diff --git a/dbaccess/source/ui/uno/ColumnControl.hxx b/dbaccess/source/ui/uno/ColumnControl.hxx
index 08ef5e8f5fe5..7971357106d3 100644
--- a/dbaccess/source/ui/uno/ColumnControl.hxx
+++ b/dbaccess/source/ui/uno/ColumnControl.hxx
@@ -35,7 +35,6 @@ namespace dbaui
{
class OColumnControl : public UnoControl
{
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xORB;
public:
OColumnControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index d93f9d3bd6c9..57c11cdebb47 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -1179,8 +1179,15 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
aSourceColTypes.reserve( nCount + 1 );
aSourceColTypes.push_back( -1 ); // just to avoid a everytime i-1 call
+ ::std::vector< sal_Int32 > aSourcePrec;
+ aSourcePrec.reserve( nCount + 1 );
+ aSourcePrec.push_back( -1 ); // just to avoid a everytime i-1 call
+
for ( sal_Int32 k=1; k <= nCount; ++k )
+ {
aSourceColTypes.push_back( xMeta->getColumnType( k ) );
+ aSourcePrec.push_back( xMeta->getPrecision( k ) );
+ }
// now create, fill and execute the prepared statement
Reference< XPreparedStatement > xStatement( ODatabaseExport::createPreparedStatment( xDestMetaData, _rxDestTable, aColumnMapping ), UNO_SET_THROW );
@@ -1292,7 +1299,6 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
case DataType::LONGVARBINARY:
case DataType::BINARY:
case DataType::VARBINARY:
- case DataType::BIT:
aTransfer.transferComplexValue( &XRow::getBytes, &XParameters::setBytes );
break;
@@ -1308,6 +1314,13 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
aTransfer.transferComplexValue( &XRow::getTimestamp, &XParameters::setTimestamp );
break;
+ case DataType::BIT:
+ if ( aSourcePrec[nSourceColumn] > 1 )
+ {
+ aTransfer.transferComplexValue( &XRow::getBytes, &XParameters::setBytes );
+ break;
+ }
+ // run through
case DataType::BOOLEAN:
aTransfer.transferValue( &XRow::getBoolean, &XParameters::setBoolean );
break;
diff --git a/dbaccess/util/dba.component b/dbaccess/util/dba.component
new file mode 100644
index 000000000000..b25768dbfab6
--- /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 000000000000..ce0dc45cf0be
--- /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 bc49f49b87e6..094b4fbfecd0 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
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_T
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_C
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_
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_P
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 { He
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 ee38f81411fb..3202f0ba5fa0 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 000000000000..0038c0cad27f
--- /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/ModuleHelper.hxx b/reportdesign/inc/ModuleHelper.hxx
index cf3ccafded7d..b3ed01738b36 100644
--- a/reportdesign/inc/ModuleHelper.hxx
+++ b/reportdesign/inc/ModuleHelper.hxx
@@ -90,7 +90,7 @@ namespace rptui
class REPORTDESIGN_DLLPUBLIC ModuleRes : public ::ResId
{
public:
- inline ModuleRes(USHORT _nId) : ResId(_nId, *OModule::getResManager()) { }
+ inline ModuleRes(sal_uInt16 _nId) : ResId(_nId, *OModule::getResManager()) { }
};
//.........................................................................
} // namespace rptui
diff --git a/reportdesign/inc/ReportDefinition.hxx b/reportdesign/inc/ReportDefinition.hxx
index 79582a215b3f..70a771746b24 100644..100755
--- a/reportdesign/inc/ReportDefinition.hxx
+++ b/reportdesign/inc/ReportDefinition.hxx
@@ -30,25 +30,36 @@
#define REPORTDESIGN_API_REPORTDEFINITION_HXX
#include "dllapi.h"
-#include <com/sun/star/report/XReportDefinition.hpp>
-#include <cppuhelper/compbase12.hxx>
-#include <cppuhelper/basemutex.hxx>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
+
+#include "ReportHelperDefines.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/datatransfer/XTransferable.hpp>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/document/XUndoManagerSupplier.hpp>
+#include <com/sun/star/frame/XModule.hpp>
#include <com/sun/star/frame/XTitle.hpp>
#include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
#include <com/sun/star/frame/XUntitledNumbers.hpp>
-#include <com/sun/star/frame/XModule.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/report/XReportDefinition.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
-#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
-#include <com/sun/star/datatransfer/XTransferable.hpp>
-#include <cppuhelper/propertysetmixin.hxx>
-#include <comphelper/uno3.hxx>
+/** === end UNO includes === **/
+
#include <comphelper/embeddedobjectcontainer.hxx>
+#include <comphelper/uno3.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/propertysetmixin.hxx>
#include <svx/unomod.hxx>
-#include "ReportHelperDefines.hxx"
+#if !defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_13)
+#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_13
+#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 13
+#include <comphelper/implbase_var.hxx>
+#endif
+
#include <boost/shared_ptr.hpp>
@@ -63,32 +74,37 @@ namespace comphelper
namespace reportdesign
{
class OReportComponentProperties;
- typedef ::cppu::WeakComponentImplHelper12< com::sun::star::report::XReportDefinition
- ,com::sun::star::document::XEventBroadcaster
- ,com::sun::star::lang::XServiceInfo
- ,com::sun::star::frame::XModule
- ,com::sun::star::lang::XUnoTunnel
- ,com::sun::star::util::XNumberFormatsSupplier
- ,::com::sun::star::frame::XTitle
- ,::com::sun::star::frame::XTitleChangeBroadcaster
- ,::com::sun::star::frame::XUntitledNumbers
- ,::com::sun::star::document::XDocumentPropertiesSupplier
- ,::com::sun::star::datatransfer::XTransferable
- ,SvxUnoDrawMSFactory> ReportDefinitionBase;
- typedef ::cppu::PropertySetMixin<com::sun::star::report::XReportDefinition> ReportDefinitionPropertySet;
+ typedef ::comphelper::WeakComponentImplHelper13 < ::com::sun::star::report::XReportDefinition
+ , ::com::sun::star::document::XEventBroadcaster
+ , ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::frame::XModule
+ , ::com::sun::star::lang::XUnoTunnel
+ , ::com::sun::star::util::XNumberFormatsSupplier
+ , ::com::sun::star::frame::XTitle
+ , ::com::sun::star::frame::XTitleChangeBroadcaster
+ , ::com::sun::star::frame::XUntitledNumbers
+ , ::com::sun::star::document::XDocumentPropertiesSupplier
+ , ::com::sun::star::datatransfer::XTransferable
+ , ::com::sun::star::document::XUndoManagerSupplier
+ , SvxUnoDrawMSFactory
+ > ReportDefinitionBase;
+
+ typedef ::cppu::PropertySetMixin< ::com::sun::star::report::XReportDefinition > ReportDefinitionPropertySet;
struct OReportDefinitionImpl;
/** \class OReportDefinition Defines the implementation of a \interface com:::sun::star::report::XReportDefinition
* \ingroup reportdesign_api
*
*/
- class REPORTDESIGN_DLLPUBLIC OReportDefinition : public ::cppu::BaseMutex,
- public ReportDefinitionBase,
- public ReportDefinitionPropertySet,
- public ::comphelper::IEmbeddedHelper
+ class REPORTDESIGN_DLLPUBLIC OReportDefinition :public ::cppu::BaseMutex
+ ,public ReportDefinitionBase
+ ,public ReportDefinitionPropertySet
+ ,public ::comphelper::IEmbeddedHelper
{
+ private:
::boost::shared_ptr<OReportComponentProperties> m_aProps;
::boost::shared_ptr<OReportDefinitionImpl> m_pImpl;
+
private:
OReportDefinition(const OReportDefinition&);
OReportDefinition& operator=(const OReportDefinition&);
@@ -381,6 +397,9 @@ namespace reportdesign
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) throw (::com::sun::star::uno::RuntimeException);
+ // XUndoManagerSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManager > SAL_CALL getUndoManager( ) throw (::com::sun::star::uno::RuntimeException);
+
// comphelper::IEmbeddedHelper
virtual com::sun::star::uno::Reference < com::sun::star::embed::XStorage > getStorage() const;
virtual ::comphelper::EmbeddedObjectContainer& getEmbeddedObjectContainer() const;
diff --git a/reportdesign/inc/RptDef.hxx b/reportdesign/inc/RptDef.hxx
index 2e86a5d80e04..c3bbd9cd1edc 100644
--- a/reportdesign/inc/RptDef.hxx
+++ b/reportdesign/inc/RptDef.hxx
@@ -51,18 +51,18 @@ namespace rptui
#define RPT_LAYER_HIDDEN 2
-const UINT32 ReportInventor = UINT32('R')*0x00000001+
- UINT32('P')*0x00000100+
- UINT32('T')*0x00010000+
- UINT32('1')*0x01000000;
+const sal_uInt32 ReportInventor = sal_uInt32('R')*0x00000001+
+ sal_uInt32('P')*0x00000100+
+ sal_uInt32('T')*0x00010000+
+ sal_uInt32('1')*0x01000000;
-#define OBJ_DLG_FIXEDTEXT ((UINT16) OBJ_MAXI + 1)
+#define OBJ_DLG_FIXEDTEXT ((sal_uInt16) OBJ_MAXI + 1)
#define OBJ_DLG_IMAGECONTROL OBJ_FM_IMAGECONTROL
-#define OBJ_DLG_FORMATTEDFIELD ((UINT16) OBJ_MAXI + 3)
-#define OBJ_DLG_HFIXEDLINE ((UINT16) OBJ_MAXI + 4)
-#define OBJ_DLG_VFIXEDLINE ((UINT16) OBJ_MAXI + 5)
-#define OBJ_DLG_SUBREPORT ((UINT16) OBJ_MAXI + 6)
+#define OBJ_DLG_FORMATTEDFIELD ((sal_uInt16) OBJ_MAXI + 3)
+#define OBJ_DLG_HFIXEDLINE ((sal_uInt16) OBJ_MAXI + 4)
+#define OBJ_DLG_VFIXEDLINE ((sal_uInt16) OBJ_MAXI + 5)
+#define OBJ_DLG_SUBREPORT ((sal_uInt16) OBJ_MAXI + 6)
// allows the alignment and resizing of controls
namespace ControlModification
diff --git a/reportdesign/inc/RptModel.hxx b/reportdesign/inc/RptModel.hxx
index 544e1a6e251e..8ee243b8273d 100644
--- a/reportdesign/inc/RptModel.hxx
+++ b/reportdesign/inc/RptModel.hxx
@@ -36,7 +36,7 @@
class Window;
namespace dbaui
{
- class OSingleDocumentController;
+ class DBSubComponentController;
}
namespace reportdesign
{
@@ -57,7 +57,7 @@ class REPORTDESIGN_DLLPUBLIC OReportModel : public SdrModel
private:
OXUndoEnvironment* m_pUndoEnv;
- ::dbaui::OSingleDocumentController* m_pController;
+ ::dbaui::DBSubComponentController* m_pController;
::reportdesign::OReportDefinition* m_pReportDefinition;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoModel();
@@ -73,15 +73,15 @@ public:
virtual void SetChanged(sal_Bool bFlg = sal_True);
virtual SdrPage* AllocPage(bool bMasterPage);
virtual Window* GetCurDocViewWin();
- virtual SdrPage* RemovePage(USHORT nPgNum);
+ virtual SdrPage* RemovePage(sal_uInt16 nPgNum);
/** returns the numbering type that is used to format page fields in drawing shapes */
virtual SvxNumType GetPageNumType() const;
OXUndoEnvironment& GetUndoEnv();
void SetModified(sal_Bool _bModified);
- inline dbaui::OSingleDocumentController* getController() const { return m_pController; }
- inline void attachController( dbaui::OSingleDocumentController& _rController ) { m_pController = &_rController; }
+ inline dbaui::DBSubComponentController* getController() const { return m_pController; }
+ inline void attachController( dbaui::DBSubComponentController& _rController ) { m_pController = &_rController; }
void detachController();
OReportPage* createNewPage(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
diff --git a/reportdesign/inc/RptObject.hxx b/reportdesign/inc/RptObject.hxx
index 0b16890ef982..44fa0a49c169 100644
--- a/reportdesign/inc/RptObject.hxx
+++ b/reportdesign/inc/RptObject.hxx
@@ -176,8 +176,8 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> getAwtComponent();
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoShape();
- virtual UINT16 GetObjIdentifier() const;
- virtual UINT32 GetObjInventor() const;
+ virtual sal_uInt16 GetObjIdentifier() const;
+ virtual sal_uInt32 GetObjInventor() const;
};
//============================================================================
@@ -188,17 +188,17 @@ class REPORTDESIGN_DLLPUBLIC OOle2Obj: public SdrOle2Obj , public OObjectBase
friend class OReportPage;
friend class DlgEdFactory;
- UINT16 m_nType;
+ sal_uInt16 m_nType;
bool m_bOnlyOnce;
void impl_createDataProvider_nothrow( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>& _xModel);
public:
- static OOle2Obj* Create( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent>& _xComponent,UINT16 _nType )
+ static OOle2Obj* Create( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent>& _xComponent,sal_uInt16 _nType )
{
return new OOle2Obj( _xComponent,_nType );
}
protected:
- OOle2Obj(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent>& _xComponent,UINT16 _nType);
- OOle2Obj(const ::rtl::OUString& _sComponentName,UINT16 _nType);
+ OOle2Obj(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent>& _xComponent,sal_uInt16 _nType);
+ OOle2Obj(const ::rtl::OUString& _sComponentName,sal_uInt16 _nType);
virtual void NbcMove( const Size& rSize );
@@ -218,8 +218,8 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> getAwtComponent();
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoShape();
- virtual UINT16 GetObjIdentifier() const;
- virtual UINT32 GetObjInventor() const;
+ virtual sal_uInt16 GetObjIdentifier() const;
+ virtual sal_uInt32 GetObjInventor() const;
// Clone() soll eine komplette Kopie des Objektes erzeugen.
virtual SdrObject* Clone() const;
virtual void initializeOle();
@@ -271,8 +271,8 @@ public:
static ::rtl::OUString GetDefaultName(const OUnoObject* _pObj);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoShape();
- virtual UINT16 GetObjIdentifier() const;
- virtual UINT32 GetObjInventor() const;
+ virtual sal_uInt16 GetObjIdentifier() const;
+ virtual sal_uInt32 GetObjInventor() const;
virtual SdrObject* Clone() const;
private:
diff --git a/reportdesign/inc/RptPage.hxx b/reportdesign/inc/RptPage.hxx
index 6f0abc6de953..bd3a768ed0cc 100644
--- a/reportdesign/inc/RptPage.hxx
+++ b/reportdesign/inc/RptPage.hxx
@@ -69,13 +69,13 @@ public:
virtual SdrPage* Clone() const;
using SdrPage::Clone;
- virtual void NbcInsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason* pReason);
- virtual SdrObject* RemoveObject(ULONG nObjNum);
+ virtual void NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInsertReason* pReason);
+ virtual SdrObject* RemoveObject(sal_uLong nObjNum);
/** returns the index inside the object list which belongs to the report component.
@param _xObject the report component
*/
- ULONG getIndexOf(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >& _xObject);
+ sal_uLong getIndexOf(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >& _xObject);
/** removes the SdrObject which belongs to the report component.
@param _xObject the report component
diff --git a/reportdesign/inc/UndoActions.hxx b/reportdesign/inc/UndoActions.hxx
index 4b884424444b..c16cab9900f0 100644
--- a/reportdesign/inc/UndoActions.hxx
+++ b/reportdesign/inc/UndoActions.hxx
@@ -29,8 +29,9 @@
#define RPTUI_UNDOACTIONS_HXX
#include "dllapi.h"
-#include <svx/svdundo.hxx>
-#include <tools/string.hxx>
+
+#include "RptModel.hxx"
+
/** === begin UNO includes === **/
#include <com/sun/star/util/XModifyListener.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -44,13 +45,16 @@
#include <com/sun/star/report/XReportComponent.hpp>
#include <com/sun/star/report/XReportDefinition.hpp>
#include <com/sun/star/report/XGroup.hpp>
+#include <com/sun/star/document/XUndoManager.hpp>
/** === end UNO includes === **/
+
#include <cppuhelper/implbase3.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/sequence.hxx>
#include <svl/lstner.hxx>
#include <svx/svdouno.hxx>
-#include "RptModel.hxx"
+#include <svx/svdundo.hxx>
+#include <tools/string.hxx>
#include <functional>
#include <memory>
@@ -120,23 +124,51 @@ namespace rptui
static ::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection> , OReportHelper> getMemberFunction(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
};
- class REPORTDESIGN_DLLPUBLIC UndoManagerListAction
+ //==================================================================================================================
+ //= UndoContext
+ //==================================================================================================================
+ class UndoContext
{
+ public:
+ UndoContext( SfxUndoManager& i_undoManager, const ::rtl::OUString& i_undoTitle )
+ :m_rUndoManager( i_undoManager )
+ {
+ m_rUndoManager.EnterListAction( i_undoTitle, String() );
+ }
+
+ ~UndoContext()
+ {
+ m_rUndoManager.LeaveListAction();
+ }
+
private:
- SfxUndoManager& m_rManager;
+ SfxUndoManager& m_rUndoManager;
+ };
+ //==================================================================================================================
+ //= UndoSuppressor
+ //==================================================================================================================
+ class UndoSuppressor
+ {
public:
- UndoManagerListAction( SfxUndoManager& _rManager, const String& _rListActionComment )
- :m_rManager( _rManager )
+ UndoSuppressor( SfxUndoManager& i_undoManager )
+ :m_rUndoManager( i_undoManager )
{
- m_rManager.EnterListAction( _rListActionComment, String() );
+ m_rUndoManager.EnableUndo( false );
}
- ~UndoManagerListAction()
+
+ ~UndoSuppressor()
{
- m_rManager.LeaveListAction();
+ m_rUndoManager.EnableUndo( true );
}
+
+ private:
+ SfxUndoManager& m_rUndoManager;
};
+ //==================================================================================================================
+ //= OCommentUndoAction
+ //==================================================================================================================
class REPORTDESIGN_DLLPUBLIC OCommentUndoAction : public SdrUndoAction
{
protected:
@@ -146,7 +178,7 @@ namespace rptui
public:
TYPEINFO();
OCommentUndoAction( SdrModel& rMod
- ,USHORT nCommentID);
+ ,sal_uInt16 nCommentID);
virtual ~OCommentUndoAction();
virtual UniString GetComment() const { return m_strComment; }
@@ -176,7 +208,7 @@ namespace rptui
,Action _eAction
,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > _xContainer
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElem
- ,USHORT _nCommentId);
+ ,sal_uInt16 _nCommentId);
virtual ~OUndoContainerAction();
virtual void Undo();
@@ -202,7 +234,7 @@ namespace rptui
,OReportHelper> _pMemberFunction
,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >& _xReport
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElem
- ,USHORT _nCommentId);
+ ,sal_uInt16 _nCommentId);
protected:
virtual void implReInsert( ) SAL_THROW( ( ::com::sun::star::uno::Exception ) );
@@ -224,7 +256,7 @@ namespace rptui
,OGroupHelper> _pMemberFunction
,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup >& _xGroup
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElem
- ,USHORT _nCommentId);
+ ,sal_uInt16 _nCommentId);
protected:
virtual void implReInsert( ) SAL_THROW( ( ::com::sun::star::uno::Exception ) );
diff --git a/reportdesign/inc/helpids.hrc b/reportdesign/inc/helpids.hrc
index f73782a1d8d4..7b543169e032 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 781eb91eccb3..4a5667d2090a 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: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 b531c0eed8f0..d7cc5fad6396 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 000000000000..9d2cdb89bd0e
--- /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 f34414efac8d..6dfb6f719daf 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);
- }
- }
-
-
- private static XDesktop m_xDesktop = null;
- public static XDesktop getXDesktop()
+// 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 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
- {
-
- // -------------------- preconditions, try to find an office --------------------
+ // convwatch.GlobalLogWriter.set(log);
- String sAppExecutionCommand = (String) param.get("AppExecutionCommand");
+ // -------------------- preconditions, try to find an office --------------------
- String sUser = System.getProperty("user.name");
- log.println("user.name='" + sUser + "'");
+// String sAppExecutionCommand = (String) param.get("AppExecutionCommand");
- String sVCSID = System.getProperty("VCSID");
- log.println("VCSID='" + sVCSID + "'");
- m_sMailAddress = sVCSID + "@openoffice.org";
- log.println("Assumed mail address: " + m_sMailAddress);
+ String sUser = System.getProperty("user.name");
+ System.out.println("user.name='" + sUser + "'");
- 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);
+ String sVCSID = System.getProperty("VCSID");
+ System.out.println("VCSID='" + sVCSID + "'");
+ m_sMailAddress = sVCSID + "@openoffice.org";
+ System.out.println("Assumed mail address: " + m_sMailAddress);
- sAppExecutionCommand = sAppExecutionCommand.replaceAll( "\\$\\{USERNAME\\}", sUser);
- log.println("sAppExecutionCommand='" + sAppExecutionCommand + "'");
+ 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);
- checkIfOfficeExists(sAppExecutionCommand);
- param.put("AppExecutionCommand", new String(sAppExecutionCommand));
+// sAppExecutionCommand = sAppExecutionCommand.replaceAll( "\\$\\{USERNAME\\}", sUser);
+// System.out.println("sAppExecutionCommand='" + sAppExecutionCommand + "'");
+//
+// checkIfOfficeExists(sAppExecutionCommand);
+// param.put("AppExecutionCommand", new String(sAppExecutionCommand));
- // --------------------------- Start the given Office ---------------------------
+ // --------------------------- Start the given Office ---------------------------
- startOffice();
+// startOffice();
- // ------------------------------ Start a test run ------------------------------
+ // ------------------------------ Start a test run ------------------------------
- String sCurrentDirectory = System.getProperty("user.dir");
- log.println("Current Dir: " + sCurrentDirectory);
-
- String sWriterDocument = sCurrentDirectory + "/" + "RPTWriterTests.odb";
- startTestForFile(sWriterDocument, WRITER);
-
- String sCalcDocument = sCurrentDirectory + "/" + "RPTCalcTests.odb";
- startTestForFile(sCalcDocument, CALC);
- }
- catch (AssureException e)
- {
- stopOffice();
- throw new AssureException(e.getMessage());
- }
+// 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 000000000000..a6e294d4d3ec
--- /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 9d1b7667c125..4174eb02ce3a 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 6eefe2bb0639..6eefe2bb0639 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 d894366ce006..d894366ce006 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
index 0e91d633d4e7..0e91d633d4e7 100755
--- a/reportdesign/qa/complex/RPTCalcTests.odb
+++ b/reportdesign/qa/complex/reportdesign/test_documents/RPTCalcTests.odb
Binary files differ
diff --git a/reportdesign/qa/complex/RPTWriterTests.odb b/reportdesign/qa/complex/reportdesign/test_documents/RPTWriterTests.odb
index 86228f457f0b..7099b1abf2b5 100755
--- a/reportdesign/qa/complex/RPTWriterTests.odb
+++ b/reportdesign/qa/complex/reportdesign/test_documents/RPTWriterTests.odb
Binary files differ
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 7c0b013879bd..5a13e4e01405 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -25,18 +25,66 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+
#include "ReportDefinition.hxx"
+
+#include "FixedLine.hxx"
+#include "FixedText.hxx"
+#include "FormattedField.hxx"
+#include "Functions.hxx"
+#include "Groups.hxx"
+#include "ImageControl.hxx"
+#include "ReportComponent.hxx"
+#include "ReportHelperImpl.hxx"
+#include "RptDef.hxx"
+#include "RptModel.hxx"
+#include "Section.hxx"
+#include "Shape.hxx"
+#include "Tools.hxx"
+#include "UndoEnv.hxx"
+#include "core_resource.hrc"
+#include "core_resource.hxx"
+#include "corestrings.hrc"
+
+/** === begin UNO includes === **/
#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/beans/XMultiPropertyStates.hpp>
+#include <com/sun/star/chart2/data/DatabaseDataProvider.hpp>
+#include <com/sun/star/document/EventObject.hpp>
+#include <com/sun/star/document/XEventListener.hpp>
+#include <com/sun/star/document/XExporter.hpp>
+#include <com/sun/star/document/XFilter.hpp>
+#include <com/sun/star/document/XImporter.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
+#include <com/sun/star/embed/ElementModes.hpp>
+#include <com/sun/star/embed/EmbedMapUnits.hpp>
+#include <com/sun/star/embed/EntryInitModes.hpp>
+#include <com/sun/star/embed/XEmbedPersist.hpp>
+#include <com/sun/star/embed/XTransactedObject.hpp>
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#include <com/sun/star/io/XActiveDataSource.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/report/GroupKeepTogether.hpp>
#include <com/sun/star/report/ReportPrintOption.hpp>
#include <com/sun/star/report/XFunction.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
+#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
+#include <com/sun/star/style/GraphicLocation.hpp>
+#include <com/sun/star/style/NumberingType.hpp>
+#include <com/sun/star/style/PageStyleLayout.hpp>
+#include <com/sun/star/style/XStyle.hpp>
#include <com/sun/star/table/BorderLine.hpp>
#include <com/sun/star/table/ShadowFormat.hpp>
-#include <com/sun/star/style/PageStyleLayout.hpp>
-#include <com/sun/star/style/GraphicLocation.hpp>
+#include <com/sun/star/task/ErrorCodeIOException.hpp>
+#include <com/sun/star/task/XStatusIndicator.hpp>
+#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
+#include <com/sun/star/ui/XUIConfigurationStorage.hpp>
#include <com/sun/star/xml/AttributeData.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+/** === end UNO includes === **/
+
#include <comphelper/broadcasthelper.hxx>
#include <comphelper/documentconstants.hxx>
#include <comphelper/genericpropertyset.hxx>
@@ -45,83 +93,41 @@
#include <comphelper/namecontainer.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/numberedcollection.hxx>
-#include <comphelper/propertystatecontainer.hxx>
#include <comphelper/proparrhlp.hxx>
#include <comphelper/property.hxx>
#include <comphelper/propertysetinfo.hxx>
-#include <comphelper/sequence.hxx>
+#include <comphelper/propertystatecontainer.hxx>
#include <comphelper/seqstream.hxx>
+#include <comphelper/sequence.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/uno3.hxx>
-#include <com/sun/star/chart2/data/DatabaseDataProvider.hpp>
-#include <vcl/svapp.hxx>
-#include <vcl/virdev.hxx>
-#include <osl/mutex.hxx>
-#include <com/sun/star/beans/XMultiPropertyStates.hpp>
-#include <com/sun/star/document/EventObject.hpp>
-#include <com/sun/star/document/XEventListener.hpp>
-#include <com/sun/star/style/XStyle.hpp>
-#include <com/sun/star/embed/XTransactedObject.hpp>
-#include <com/sun/star/embed/ElementModes.hpp>
-#include <com/sun/star/embed/EmbedMapUnits.hpp>
-#include <com/sun/star/embed/EntryInitModes.hpp>
-#include <com/sun/star/embed/Aspects.hpp>
-#include <com/sun/star/io/XActiveDataSource.hpp>
-#include <com/sun/star/embed/ElementModes.hpp>
-#include <com/sun/star/io/XSeekable.hpp>
-#include <com/sun/star/embed/XEmbedPersist.hpp>
-#include <com/sun/star/task/XStatusIndicator.hpp>
-#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
-#include <com/sun/star/ui/XUIConfigurationStorage.hpp>
-#include <com/sun/star/document/XExporter.hpp>
-#include <com/sun/star/document/XImporter.hpp>
-#include <com/sun/star/document/XFilter.hpp>
-#include <com/sun/star/task/ErrorCodeIOException.hpp>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include <com/sun/star/frame/XComponentLoader.hpp>
-#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#include "corestrings.hrc"
-#include "Groups.hxx"
-#include "RptDef.hxx"
-#include "Section.hxx"
-#include "FixedLine.hxx"
-#include "core_resource.hrc"
-#include "core_resource.hxx"
-#include "Tools.hxx"
-#include <tools/debug.hxx>
-#include <tools/diagnose_ex.h>
-#include <unotools/streamwrap.hxx>
#include <connectivity/CommonTools.hxx>
#include <connectivity/dbconversion.hxx>
-#include <framework/titlehelper.hxx>
#include <connectivity/dbtools.hxx>
-#include <com/sun/star/task/XStatusIndicator.hpp>
-#include "Functions.hxx"
-#include <boost/mem_fn.hpp>
-#include <boost/bind.hpp>
-#include <boost/utility.hpp>
-#include <unotools/saveopt.hxx>
-#include "RptModel.hxx"
-#include "UndoEnv.hxx"
-#include "FormattedField.hxx"
-#include "FixedText.hxx"
-#include "ImageControl.hxx"
-#include "Shape.hxx"
-#include "ReportHelperImpl.hxx"
-#include <svl/itempool.hxx>
-#include <unotools/moduleoptions.hxx>
-#include <osl/thread.hxx>
-
+#include <cppuhelper/exc_hlp.hxx>
+#include <cppuhelper/interfacecontainer.h>
+#include <dbaccess/dbaundomanager.hxx>
#include <editeng/paperinf.hxx>
+#include <framework/titlehelper.hxx>
+#include <osl/thread.hxx>
+#include <svl/itempool.hxx>
+#include <svl/undo.hxx>
#include <svx/svdlayer.hxx>
+#include <svx/unofill.hxx>
#include <svx/xmleohlp.hxx>
#include <svx/xmlgrhlp.hxx>
-#include <svx/unofill.hxx>
-#include <cppuhelper/interfacecontainer.h>
-#include <cppuhelper/exc_hlp.hxx>
-#include "ReportComponent.hxx"
-#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
-#include <com/sun/star/style/NumberingType.hpp>
+#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
+#include <unotools/moduleoptions.hxx>
+#include <unotools/saveopt.hxx>
+#include <unotools/streamwrap.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/virdev.hxx>
+#include <vos/mutex.hxx>
+
+#include <boost/bind.hpp>
+#include <boost/mem_fn.hpp>
+#include <boost/utility.hpp>
#define MAP_LEN(x) x, sizeof(x) - 1
#define MAP_CHAR_LEN(x) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(x))
@@ -586,6 +592,7 @@ struct OReportDefinitionImpl
::boost::shared_ptr< ::comphelper::EmbeddedObjectContainer>
m_pObjectContainer;
::boost::shared_ptr<rptui::OReportModel> m_pReportModel;
+ ::rtl::Reference< ::dbaui::UndoManager > m_pUndoManager;
::rtl::OUString m_sCaption;
::rtl::OUString m_sCommand;
::rtl::OUString m_sFilter;
@@ -602,6 +609,7 @@ struct OReportDefinitionImpl
sal_Bool m_bModified;
sal_Bool m_bEscapeProcessing;
sal_Bool m_bSetModifiedEnabled;
+
OReportDefinitionImpl(::osl::Mutex& _aMutex)
:m_aStorageChangeListeners(_aMutex)
,m_aCloseListener(_aMutex)
@@ -753,6 +761,9 @@ void OReportDefinition::init()
rAdmin.NewLayer(UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "back" ) ), RPT_LAYER_BACK );
rAdmin.NewLayer( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "HiddenLayer" ) ), RPT_LAYER_HIDDEN );
+ m_pImpl->m_pUndoManager = new ::dbaui::UndoManager( *this, m_aMutex );
+ m_pImpl->m_pReportModel->SetSdrUndoManager( &m_pImpl->m_pUndoManager->GetSfxUndoManager() );
+
m_pImpl->m_xFunctions = new OFunctions(this,m_aProps->m_xContext);
if ( !m_pImpl->m_xStorage.is() )
m_pImpl->m_xStorage = ::comphelper::OStorageHelper::GetTemporaryStorage();
@@ -767,9 +778,9 @@ void OReportDefinition::init()
}
m_pImpl->m_pObjectContainer.reset( new comphelper::EmbeddedObjectContainer(m_pImpl->m_xStorage , static_cast<cppu::OWeakObject*>(this) ) );
}
- catch(uno::Exception)
+ catch ( const uno::Exception& )
{
- OSL_ENSURE(0,"Error!");
+ DBG_UNHANDLED_EXCEPTION();
}
}
// -----------------------------------------------------------------------------
@@ -1269,10 +1280,21 @@ void SAL_CALL OReportDefinition::close( ::sal_Bool _bDeliverOwnership ) throw (u
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
- ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
+ ::connectivity::checkDisposed( ReportDefinitionBase::rBHelper.bDisposed );
::comphelper::MediaDescriptor aDescriptor( _aArguments );
- fillArgs(aDescriptor);
- m_pImpl->m_pReportModel->SetModified(sal_False);
+
+ m_pImpl->m_pUndoManager->GetSfxUndoManager().EnableUndo( false );
+ try
+ {
+ fillArgs(aDescriptor);
+ m_pImpl->m_pReportModel->SetModified(sal_False);
+ }
+ catch ( ... )
+ {
+ m_pImpl->m_pUndoManager->GetSfxUndoManager().EnableUndo( true );
+ throw;
+ }
+ m_pImpl->m_pUndoManager->GetSfxUndoManager().EnableUndo( true );
return sal_True;
}
// -----------------------------------------------------------------------------
@@ -1811,7 +1833,6 @@ void SAL_CALL OReportDefinition::load( const uno::Sequence< beans::PropertyValue
else if ( sURL.getLength() )
aStorageSource <<= sURL;
else
- // TODO: error message
throw lang::IllegalArgumentException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No input source (URL or InputStream) found." ) ),
// TODO: resource
@@ -2890,8 +2911,15 @@ uno::Sequence< datatransfer::DataFlavor > SAL_CALL OReportDefinition::getTransfe
{
return aFlavor.MimeType.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("image/png")));
}
+
// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
+uno::Reference< document::XUndoManager > SAL_CALL OReportDefinition::getUndoManager( ) throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ return m_pImpl->m_pUndoManager.get();
+}
+
+
// =============================================================================
}// namespace reportdesign
// =============================================================================
diff --git a/reportdesign/source/core/api/services.cxx b/reportdesign/source/core/api/services.cxx
index 32fa29152634..5bbbbad5b1f4 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/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx
index 90c27177ca7f..3843b894673b 100644
--- a/reportdesign/source/core/sdr/ReportDrawPage.cxx
+++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx
@@ -119,7 +119,7 @@ uno::Reference< drawing::XShape > OReportDrawPage::_CreateShape( SdrObject *pOb
/**************************************************
* Das leere OLE-Objekt bekommt ein neues IPObj
**************************************************/
- pObj->SetEmptyPresObj(FALSE);
+ pObj->SetEmptyPresObj(sal_False);
pOle2Obj->SetOutlinerParaObject(NULL);
pOle2Obj->SetObjRef(xObj);
pOle2Obj->SetPersistName(sName);
diff --git a/reportdesign/source/core/sdr/ReportUndoFactory.cxx b/reportdesign/source/core/sdr/ReportUndoFactory.cxx
index a469248f7cb5..054b3dd311cc 100644
--- a/reportdesign/source/core/sdr/ReportUndoFactory.cxx
+++ b/reportdesign/source/core/sdr/ReportUndoFactory.cxx
@@ -34,7 +34,7 @@ namespace rptui
{
using namespace ::com::sun::star;
// -----------------------------------------------------------------------------
-SdrUndoAction* lcl_createUndo(SdrObject& rObject,Action _eAction,USHORT _nCommentId)
+SdrUndoAction* lcl_createUndo(SdrObject& rObject,Action _eAction,sal_uInt16 _nCommentId)
{
OObjectBase* pObj = dynamic_cast<OObjectBase*>(&rObject);
if ( !pObj )
@@ -80,12 +80,12 @@ SdrUndoAction* OReportUndoFactory::CreateUndoGeoObject( SdrObject& rObject )
SdrUndoAction* OReportUndoFactory::CreateUndoAttrObject( SdrObject& rObject, bool bStyleSheet1, bool bSaveText )
{
- return m_pUndoFactory->CreateUndoAttrObject( rObject, bStyleSheet1 ? TRUE : FALSE, bSaveText ? TRUE : FALSE );
+ return m_pUndoFactory->CreateUndoAttrObject( rObject, bStyleSheet1 ? sal_True : sal_False, bSaveText ? sal_True : sal_False );
}
SdrUndoAction* OReportUndoFactory::CreateUndoRemoveObject( SdrObject& rObject, bool bOrdNumDirect )
{
- return m_pUndoFactory->CreateUndoRemoveObject( rObject, bOrdNumDirect ? TRUE : FALSE );
+ return m_pUndoFactory->CreateUndoRemoveObject( rObject, bOrdNumDirect ? sal_True : sal_False );
}
SdrUndoAction* OReportUndoFactory::CreateUndoInsertObject( SdrObject& rObject, bool /*bOrdNumDirect*/ )
@@ -105,7 +105,7 @@ SdrUndoAction* OReportUndoFactory::CreateUndoNewObject( SdrObject& rObject, bool
SdrUndoAction* OReportUndoFactory::CreateUndoCopyObject( SdrObject& rObject, bool bOrdNumDirect )
{
- return m_pUndoFactory->CreateUndoCopyObject( rObject, bOrdNumDirect ? TRUE : FALSE );
+ return m_pUndoFactory->CreateUndoCopyObject( rObject, bOrdNumDirect ? sal_True : sal_False );
}
SdrUndoAction* OReportUndoFactory::CreateUndoObjectOrdNum( SdrObject& rObject, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1)
@@ -115,7 +115,7 @@ SdrUndoAction* OReportUndoFactory::CreateUndoObjectOrdNum( SdrObject& rObject, s
SdrUndoAction* OReportUndoFactory::CreateUndoReplaceObject( SdrObject& rOldObject, SdrObject& rNewObject, bool bOrdNumDirect )
{
- return m_pUndoFactory->CreateUndoReplaceObject( rOldObject, rNewObject, bOrdNumDirect ? TRUE : FALSE );
+ return m_pUndoFactory->CreateUndoReplaceObject( rOldObject, rNewObject, bOrdNumDirect ? sal_True : sal_False );
}
SdrUndoAction* OReportUndoFactory::CreateUndoObjectLayerChange( SdrObject& rObject, SdrLayerID aOldLayer, SdrLayerID aNewLayer )
diff --git a/reportdesign/source/core/sdr/RptModel.cxx b/reportdesign/source/core/sdr/RptModel.cxx
index 5fd634c61264..a548f6561a66 100644
--- a/reportdesign/source/core/sdr/RptModel.cxx
+++ b/reportdesign/source/core/sdr/RptModel.cxx
@@ -29,7 +29,7 @@
#include "RptModel.hxx"
#include "RptPage.hxx"
-#include <dbaccess/singledoccontroller.hxx>
+#include <dbaccess/dbsubcomponentcontroller.hxx>
#include <tools/debug.hxx>
#include <unotools/pathoptions.hxx>
@@ -124,7 +124,7 @@ void OReportModel::SetModified(sal_Bool _bModified)
m_pController->setModified(_bModified);
}
// -----------------------------------------------------------------------------
-SdrPage* OReportModel::RemovePage(USHORT nPgNum)
+SdrPage* OReportModel::RemovePage(sal_uInt16 nPgNum)
{
OReportPage* pPage = dynamic_cast<OReportPage*>(SdrModel::RemovePage(nPgNum));
return pPage;
@@ -141,8 +141,8 @@ OReportPage* OReportModel::createNewPage(const uno::Reference< report::XSection
OReportPage* OReportModel::getPage(const uno::Reference< report::XSection >& _xSection)
{
OReportPage* pPage = NULL;
- USHORT nCount = GetPageCount();
- for (USHORT i = 0; i < nCount && !pPage ; ++i)
+ sal_uInt16 nCount = GetPageCount();
+ for (sal_uInt16 i = 0; i < nCount && !pPage ; ++i)
{
OReportPage* pRptPage = PTR_CAST( OReportPage, GetPage(i) );
if ( pRptPage && pRptPage->getSection() == _xSection )
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 9410c75019e6..a25592dd4087 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -38,7 +38,7 @@
#include <toolkit/helper/convert.hxx>
#include "RptPage.hxx"
#include "corestrings.hrc"
-#include <dbaccess/singledoccontroller.hxx>
+#include <dbaccess/dbsubcomponentcontroller.hxx>
#include "ModuleHelper.hxx"
#include <RptResId.hrc>
@@ -508,12 +508,12 @@ OCustomShape::~OCustomShape()
DBG_DTOR( rpt_OCustomShape, NULL);
}
// -----------------------------------------------------------------------------
-UINT16 OCustomShape::GetObjIdentifier() const
+sal_uInt16 OCustomShape::GetObjIdentifier() const
{
- return UINT16(OBJ_CUSTOMSHAPE);
+ return sal_uInt16(OBJ_CUSTOMSHAPE);
}
//----------------------------------------------------------------------------
-UINT32 OCustomShape::GetObjInventor() const
+sal_uInt32 OCustomShape::GetObjInventor() const
{
return ReportInventor;
}
@@ -691,12 +691,12 @@ void OUnoObject::impl_setReportComponent_nothrow()
impl_initializeModel_nothrow();
}
// -----------------------------------------------------------------------------
-UINT16 OUnoObject::GetObjIdentifier() const
+sal_uInt16 OUnoObject::GetObjIdentifier() const
{
- return UINT16(m_nObjectType);
+ return sal_uInt16(m_nObjectType);
}
//----------------------------------------------------------------------------
-UINT32 OUnoObject::GetObjInventor() const
+sal_uInt32 OUnoObject::GetObjInventor() const
{
return ReportInventor;
}
@@ -959,7 +959,7 @@ SdrObject* OUnoObject::Clone() const
//----------------------------------------------------------------------------
TYPEINIT1(OOle2Obj, SdrOle2Obj);
DBG_NAME( rpt_OOle2Obj );
-OOle2Obj::OOle2Obj(const uno::Reference< report::XReportComponent>& _xComponent,UINT16 _nType)
+OOle2Obj::OOle2Obj(const uno::Reference< report::XReportComponent>& _xComponent,sal_uInt16 _nType)
:SdrOle2Obj()
,OObjectBase(_xComponent)
,m_nType(_nType)
@@ -971,7 +971,7 @@ OOle2Obj::OOle2Obj(const uno::Reference< report::XReportComponent>& _xComponent,
m_bIsListening = sal_True;
}
//----------------------------------------------------------------------------
-OOle2Obj::OOle2Obj(const ::rtl::OUString& _sComponentName,UINT16 _nType)
+OOle2Obj::OOle2Obj(const ::rtl::OUString& _sComponentName,sal_uInt16 _nType)
:SdrOle2Obj()
,OObjectBase(_sComponentName)
,m_nType(_nType)
@@ -986,12 +986,12 @@ OOle2Obj::~OOle2Obj()
DBG_DTOR( rpt_OOle2Obj, NULL);
}
// -----------------------------------------------------------------------------
-UINT16 OOle2Obj::GetObjIdentifier() const
+sal_uInt16 OOle2Obj::GetObjIdentifier() const
{
return m_nType;
}
//----------------------------------------------------------------------------
-UINT32 OOle2Obj::GetObjInventor() const
+sal_uInt32 OOle2Obj::GetObjInventor() const
{
return ReportInventor;
}
diff --git a/reportdesign/source/core/sdr/RptPage.cxx b/reportdesign/source/core/sdr/RptPage.cxx
index 676e9b240073..2ebbd53a2603 100644
--- a/reportdesign/source/core/sdr/RptPage.cxx
+++ b/reportdesign/source/core/sdr/RptPage.cxx
@@ -79,11 +79,11 @@ SdrPage* OReportPage::Clone() const
}
//----------------------------------------------------------------------------
-ULONG OReportPage::getIndexOf(const uno::Reference< report::XReportComponent >& _xObject)
+sal_uLong OReportPage::getIndexOf(const uno::Reference< report::XReportComponent >& _xObject)
{
DBG_CHKTHIS( rpt_OReportPage,NULL);
- ULONG nCount = GetObjCount();
- ULONG i = 0;
+ sal_uLong nCount = GetObjCount();
+ sal_uLong i = 0;
for (; i < nCount; ++i)
{
OObjectBase* pObj = dynamic_cast<OObjectBase*>(GetObj(i));
@@ -99,7 +99,7 @@ ULONG OReportPage::getIndexOf(const uno::Reference< report::XReportComponent >&
void OReportPage::removeSdrObject(const uno::Reference< report::XReportComponent >& _xObject)
{
DBG_CHKTHIS( rpt_OReportPage,NULL);
- ULONG nPos = getIndexOf(_xObject);
+ sal_uLong nPos = getIndexOf(_xObject);
if ( nPos < GetObjCount() )
{
OObjectBase* pBase = dynamic_cast<OObjectBase*>(GetObj(nPos));
@@ -110,7 +110,7 @@ void OReportPage::removeSdrObject(const uno::Reference< report::XReportComponent
}
}
// -----------------------------------------------------------------------------
-SdrObject* OReportPage::RemoveObject(ULONG nObjNum)
+SdrObject* OReportPage::RemoveObject(sal_uLong nObjNum)
{
SdrObject* pObj = SdrPage::RemoveObject(nObjNum);
if (getSpecialMode())
@@ -138,7 +138,7 @@ void OReportPage::insertObject(const uno::Reference< report::XReportComponent >&
OSL_ENSURE(_xObject.is(),"Object is not valid to create a SdrObject!");
if ( !_xObject.is() )
return;
- ULONG nPos = getIndexOf(_xObject);
+ sal_uLong nPos = getIndexOf(_xObject);
if ( nPos < GetObjCount() )
return; // Object already in list
@@ -163,7 +163,7 @@ void OReportPage::removeTempObject(SdrObject *_pToRemoveObj)
{
if (_pToRemoveObj)
{
- for (ULONG i=0;i<GetObjCount();i++)
+ for (sal_uLong i=0;i<GetObjCount();i++)
{
SdrObject *aObj = GetObj(i);
if (aObj && aObj == _pToRemoveObj)
@@ -192,7 +192,7 @@ void OReportPage::resetSpecialMode()
m_bSpecialInsertMode = false;
}
// -----------------------------------------------------------------------------
-void OReportPage::NbcInsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason* pReason)
+void OReportPage::NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInsertReason* pReason)
{
SdrPage::NbcInsertObject(pObj, nPos, pReason);
diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx
index 737e43af74be..547e2afc24fa 100644
--- a/reportdesign/source/core/sdr/UndoActions.cxx
+++ b/reportdesign/source/core/sdr/UndoActions.cxx
@@ -53,7 +53,7 @@
#include <tools/diagnose_ex.h>
#include <comphelper/stl_types.hxx>
#include <vcl/svapp.hxx>
-#include <dbaccess/singledoccontroller.hxx>
+#include <dbaccess/dbsubcomponentcontroller.hxx>
#include <svx/unoshape.hxx>
#include <osl/mutex.hxx>
@@ -97,7 +97,7 @@ namespace rptui
TYPEINIT1( OCommentUndoAction, SdrUndoAction );
DBG_NAME(rpt_OCommentUndoAction)
//----------------------------------------------------------------------------
-OCommentUndoAction::OCommentUndoAction(SdrModel& _rMod,USHORT nCommentID)
+OCommentUndoAction::OCommentUndoAction(SdrModel& _rMod,sal_uInt16 nCommentID)
:SdrUndoAction(_rMod)
{
DBG_CTOR(rpt_OCommentUndoAction,NULL);
@@ -123,7 +123,7 @@ OUndoContainerAction::OUndoContainerAction(SdrModel& _rMod
,Action _eAction
,const uno::Reference< container::XIndexContainer > _xContainer
,const Reference< XInterface > & xElem
- ,USHORT _nCommentId)
+ ,sal_uInt16 _nCommentId)
:OCommentUndoAction(_rMod,_nCommentId)
,m_xElement(xElem)
,m_xContainer(_xContainer)
@@ -269,7 +269,7 @@ OUndoGroupSectionAction::OUndoGroupSectionAction(SdrModel& _rMod
,OGroupHelper> _pMemberFunction
,const uno::Reference< report::XGroup >& _xGroup
,const Reference< XInterface > & xElem
- ,USHORT _nCommentId)
+ ,sal_uInt16 _nCommentId)
:OUndoContainerAction(_rMod,_eAction,NULL,xElem,_nCommentId)
,m_aGroupHelper(_xGroup)
,m_pMemberFunction(_pMemberFunction)
@@ -315,7 +315,7 @@ OUndoReportSectionAction::OUndoReportSectionAction(SdrModel& _rMod
,OReportHelper> _pMemberFunction
,const uno::Reference< report::XReportDefinition >& _xReport
,const Reference< XInterface > & xElem
- ,USHORT _nCommentId)
+ ,sal_uInt16 _nCommentId)
:OUndoContainerAction(_rMod,_eAction,NULL,xElem,_nCommentId)
,m_aReportHelper(_xReport)
,m_pMemberFunction(_pMemberFunction)
diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx
index 2a86ffb32c28..79728e30b46a 100644
--- a/reportdesign/source/core/sdr/UndoEnv.cxx
+++ b/reportdesign/source/core/sdr/UndoEnv.cxx
@@ -45,14 +45,17 @@
#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 <dbaccess/dbsubcomponentcontroller.hxx>
#include <svx/unoshape.hxx>
#include <osl/mutex.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
@@ -230,7 +262,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv
if (!xSet.is())
return;
- dbaui::OSingleDocumentController* pController = m_pImpl->m_rModel.getController();
+ dbaui::DBSubComponentController* pController = m_pImpl->m_rModel.getController();
if ( !pController )
return;
@@ -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;
- OSL_ENSURE(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 );
+ sal_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;
- OSL_ENSURE(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
@@ -304,7 +380,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv
if ( pUndo == NULL )
pUndo = new ORptUndoPropertyAction( m_pImpl->m_rModel, _rEvent );
- pController->addUndoActionAndInvalidate(pUndo);
+ m_pImpl->m_rModel.GetSdrUndoManager()->AddUndoAction( pUndo );
pController->InvalidateAll();
}
// -----------------------------------------------------------------------------
@@ -363,12 +439,9 @@ void SAL_CALL OXUndoEnvironment::elementInserted(const ContainerEvent& evt) thro
uno::Reference< report::XFunctions> xContainer(evt.Source,uno::UNO_QUERY);
if ( xContainer.is() )
{
- dbaui::OSingleDocumentController* pController = m_pImpl->m_rModel.getController();
- pController->addUndoActionAndInvalidate(new OUndoContainerAction(m_pImpl->m_rModel
- ,rptui::Inserted
- ,xContainer.get()
- ,xIface
- ,RID_STR_UNDO_ADDFUNCTION));
+ m_pImpl->m_rModel.GetSdrUndoManager()->AddUndoAction(
+ new OUndoContainerAction( m_pImpl->m_rModel, rptui::Inserted, xContainer.get(),
+ xIface, RID_STR_UNDO_ADDFUNCTION ) );
}
}
}
@@ -433,12 +506,8 @@ void SAL_CALL OXUndoEnvironment::elementRemoved(const ContainerEvent& evt) throw
uno::Reference< report::XFunctions> xFunctions(evt.Source,uno::UNO_QUERY);
if ( xFunctions.is() )
{
- dbaui::OSingleDocumentController* pController = m_pImpl->m_rModel.getController();
- pController->addUndoActionAndInvalidate(new OUndoContainerAction(m_pImpl->m_rModel
- ,rptui::Removed
- ,xFunctions.get()
- ,xIface
- ,RID_STR_UNDO_ADDFUNCTION));
+ m_pImpl->m_rModel.GetSdrUndoManager()->AddUndoAction( new OUndoContainerAction(
+ m_pImpl->m_rModel, rptui::Removed, xFunctions.get(), xIface, RID_STR_UNDO_ADDFUNCTION ) );
}
}
}
diff --git a/reportdesign/source/core/sdr/formatnormalizer.cxx b/reportdesign/source/core/sdr/formatnormalizer.cxx
index 089456ce488d..18735cfb0780 100644
--- a/reportdesign/source/core/sdr/formatnormalizer.cxx
+++ b/reportdesign/source/core/sdr/formatnormalizer.cxx
@@ -36,7 +36,7 @@
#include <com/sun/star/util/XNumberFormatTypes.hpp>
/** === end UNO includes === **/
-#include <dbaccess/singledoccontroller.hxx>
+#include <dbaccess/dbsubcomponentcontroller.hxx>
#include <unotools/syslocale.hxx>
#include <connectivity/statementcomposer.hxx>
#include <connectivity/dbtools.hxx>
@@ -187,7 +187,7 @@ namespace rptui
if ( !m_xReportDefinition.is() )
return false;
- ::dbaui::OSingleDocumentController* pController( m_rModel.getController() );
+ ::dbaui::DBSubComponentController* pController( m_rModel.getController() );
OSL_ENSURE( pController, "FormatNormalizer::impl_ensureUpToDateFieldList_nothrow: no controller? how can *this* happen?!" );
if ( !pController )
return false;
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index 5794e46a9886..bf767a29c9ec 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -1382,7 +1382,7 @@ void ORptExport::_ExportAutoStyles()
GetPageExport()->exportAutoStyles();
}
// -----------------------------------------------------------------------------
-void ORptExport::_ExportStyles(BOOL bUsed)
+void ORptExport::_ExportStyles(sal_Bool bUsed)
{
SvXMLExport::_ExportStyles(bUsed);
diff --git a/reportdesign/source/filter/xml/xmlExport.hxx b/reportdesign/source/filter/xml/xmlExport.hxx
index 3d71e8deac69..8e0e7299335b 100644
--- a/reportdesign/source/filter/xml/xmlExport.hxx
+++ b/reportdesign/source/filter/xml/xmlExport.hxx
@@ -182,7 +182,7 @@ private:
virtual void SetBodyAttributes();
protected:
- virtual void _ExportStyles( BOOL bUsed );
+ virtual void _ExportStyles( sal_Bool bUsed );
virtual void _ExportAutoStyles();
virtual void _ExportContent();
virtual void _ExportMasterStyles();
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index b92e7599cadc..b44fd3282ed3 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -509,7 +509,7 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
uno::Reference<XComponent> xCom(GetModel(),UNO_QUERY);
SfxMediumRef pMedium = new SfxMedium(
- sFileName, ( STREAM_READ | STREAM_NOCREATE ), FALSE, 0 );
+ sFileName, ( STREAM_READ | STREAM_NOCREATE ), sal_False, 0 );
if( pMedium )
{
diff --git a/reportdesign/source/filter/xml/xmlservices.cxx b/reportdesign/source/filter/xml/xmlservices.cxx
index 3e4a09d3993a..b479396371b8 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/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index 431e72e5bccc..1193e63d694a 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -189,7 +189,7 @@ OAddFieldWindow::OAddFieldWindow(Window* pParent
m_aActions.SetSelectHdl(LINK(this, OAddFieldWindow, OnSortAction));
setToolBox(&m_aActions);
m_aActions.CheckItem(SID_FM_SORTUP);
- m_aActions.EnableItem(SID_ADD_CONTROL_PAIR, FALSE);
+ m_aActions.EnableItem(SID_ADD_CONTROL_PAIR, sal_False);
m_pListBox->SetDoubleClickHdl(LINK( this, OAddFieldWindow, OnDoubleClickHdl ) );
m_pListBox->SetSelectHdl(LINK( this, OAddFieldWindow, OnSelectHdl ) );
@@ -230,8 +230,8 @@ OAddFieldWindow::~OAddFieldWindow()
if ( m_pListBox.get() )
{
SvLBoxTreeList* pModel = m_pListBox->GetModel();
- ULONG nCount = pModel->GetEntryCount();
- for(ULONG i = 0; i< nCount;++i)
+ sal_uLong nCount = pModel->GetEntryCount();
+ for(sal_uLong i = 0; i< nCount;++i)
{
delete static_cast<ColumnInfo*>(pModel->GetEntry(i)->GetUserData());
}
@@ -291,7 +291,7 @@ namespace
const ::rtl::OUString* pEntries = _rEntries.getConstArray();
sal_Int32 nEntries = _rEntries.getLength();
for ( sal_Int32 i = 0; i < nEntries; ++i, ++pEntries )
- _rListBox.InsertEntry( *pEntries,NULL,FALSE,LIST_APPEND,new ColumnInfo(*pEntries) );
+ _rListBox.InsertEntry( *pEntries,NULL,sal_False,LIST_APPEND,new ColumnInfo(*pEntries) );
}
void lcl_addToList( OAddFieldWindowListBox& _rListBox, const uno::Reference< container::XNameAccess>& i_xColumns )
{
@@ -305,9 +305,9 @@ namespace
if ( xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_LABEL) )
xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel;
if ( sLabel.getLength() )
- _rListBox.InsertEntry( sLabel,NULL,FALSE,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
+ _rListBox.InsertEntry( sLabel,NULL,sal_False,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
else
- _rListBox.InsertEntry( *pEntries,NULL,FALSE,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
+ _rListBox.InsertEntry( *pEntries,NULL,sal_False,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
}
}
}
@@ -324,10 +324,10 @@ void OAddFieldWindow::Update()
{
// ListBox loeschen
m_pListBox->Clear();
- const USHORT nItemCount = m_aActions.GetItemCount();
- for (USHORT j = 0; j< nItemCount; ++j)
+ const sal_uInt16 nItemCount = m_aActions.GetItemCount();
+ for (sal_uInt16 j = 0; j< nItemCount; ++j)
{
- m_aActions.EnableItem(m_aActions.GetItemId(j),FALSE);
+ m_aActions.EnableItem(m_aActions.GetItemId(j),sal_False);
}
String aTitle(ModuleRes(RID_STR_FIELDSELECTION));
@@ -372,7 +372,7 @@ void OAddFieldWindow::Update()
SetText( aTitle );
if ( m_aCommandName.getLength() )
{
- for (USHORT i = 0; i < nItemCount; ++i)
+ for (sal_uInt16 i = 0; i < nItemCount; ++i)
{
m_aActions.EnableItem(m_aActions.GetItemId(i));
}
@@ -472,9 +472,9 @@ void OAddFieldWindow::_elementInserted( const container::ContainerEvent& _rEvent
if ( xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_LABEL) )
xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel;
if ( sLabel.getLength() )
- m_pListBox->InsertEntry( sLabel,NULL,FALSE,LIST_APPEND,new ColumnInfo(sName,sLabel) );
+ m_pListBox->InsertEntry( sLabel,NULL,sal_False,LIST_APPEND,new ColumnInfo(sName,sLabel) );
else
- m_pListBox->InsertEntry( sName,NULL,FALSE,LIST_APPEND,new ColumnInfo(sName,sLabel) );
+ m_pListBox->InsertEntry( sName,NULL,sal_False,LIST_APPEND,new ColumnInfo(sName,sLabel) );
}
}
}
@@ -527,19 +527,19 @@ void OAddFieldWindow::resizeControls(const Size& _rDiff)
//------------------------------------------------------------------
IMPL_LINK( OAddFieldWindow, OnSortAction, ToolBox*, /*NOTINTERESTEDIN*/ )
{
- const USHORT nCurItem = m_aActions.GetCurItemId();
+ const sal_uInt16 nCurItem = m_aActions.GetCurItemId();
if ( SID_ADD_CONTROL_PAIR == nCurItem )
OnDoubleClickHdl(NULL);
else
{
if ( SID_FM_REMOVE_FILTER_SORT == nCurItem || !m_aActions.IsItemChecked(nCurItem) )
{
- const USHORT nItemCount = m_aActions.GetItemCount();
- for (USHORT j = 0; j< nItemCount; ++j)
+ const sal_uInt16 nItemCount = m_aActions.GetItemCount();
+ for (sal_uInt16 j = 0; j< nItemCount; ++j)
{
- const USHORT nItemId = m_aActions.GetItemId(j);
+ const sal_uInt16 nItemId = m_aActions.GetItemId(j);
if ( nCurItem != nItemId )
- m_aActions.CheckItem(nItemId,FALSE);
+ m_aActions.CheckItem(nItemId,sal_False);
}
SvSortMode eSortMode = SortNone;
if ( SID_FM_REMOVE_FILTER_SORT != nCurItem )
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index 898779094953..fe3943f7fd39 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -88,11 +88,11 @@ namespace rptui
UpdateLocker( Window& _rWindow )
:m_rWindow( _rWindow )
{
- _rWindow.SetUpdateMode( FALSE );
+ _rWindow.SetUpdateMode( sal_False );
}
~UpdateLocker()
{
- m_rWindow.SetUpdateMode( TRUE );
+ m_rWindow.SetUpdateMode( sal_True );
}
};
@@ -401,7 +401,7 @@ namespace rptui
}
// -----------------------------------------------------------------------------
- void ConditionalFormattingDialog::applyCommand( size_t _nCondIndex, USHORT _nCommandId, const ::Color _aColor )
+ void ConditionalFormattingDialog::applyCommand( size_t _nCondIndex, sal_uInt16 _nCommandId, const ::Color _aColor )
{
OSL_PRECOND( _nCommandId, "ConditionalFormattingDialog::applyCommand: illegal command id!" );
try
@@ -466,8 +466,8 @@ namespace rptui
short nRet = ModalDialog::Execute();
if ( nRet == RET_OK )
{
- String sUndoAction( ModuleRes( RID_STR_UNDO_CONDITIONAL_FORMATTING ) );
- UndoManagerListAction aListAction(*m_rController.getUndoMgr(),sUndoAction);
+ const String sUndoAction( ModuleRes( RID_STR_UNDO_CONDITIONAL_FORMATTING ) );
+ const UndoContext aUndoContext( m_rController.getUndoManager(), sUndoAction );
try
{
sal_Int32 j(0), i(0);;
diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx
index 2aba0c42a510..3b979d9649a0 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -72,7 +72,7 @@ ConditionField::ConditionField( Condition* _pParent, const ResId& _rResId ) : Ed
{
m_pSubEdit = new Edit(this,0);
SetSubEdit(m_pSubEdit);
- m_pSubEdit->EnableRTL( FALSE );
+ m_pSubEdit->EnableRTL( sal_False );
m_pSubEdit->SetPosPixel( Point() );
m_aFormula.SetText(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("...")));
@@ -130,7 +130,7 @@ class OColorPopup : public FloatingWindow
{
DECL_LINK( SelectHdl, void * );
Condition* m_pCondition;
- USHORT m_nSlotId;
+ sal_uInt16 m_nSlotId;
public:
OColorPopup(Window* _pParent,Condition* _pCondition);
ValueSet m_aColorSet;
@@ -139,7 +139,7 @@ public:
virtual void Resize();
void StartSelection();
- void SetSlotId(USHORT _nSlotId);
+ void SetSlotId(sal_uInt16 _nSlotId);
};
// -----------------------------------------------------------------------------
OColorPopup::OColorPopup(Window* _pParent,Condition* _pCondition)
@@ -205,7 +205,7 @@ void OColorPopup::StartSelection()
m_aColorSet.StartSelection();
}
// -----------------------------------------------------------------------------
-void OColorPopup::SetSlotId(USHORT _nSlotId)
+void OColorPopup::SetSlotId(sal_uInt16 _nSlotId)
{
m_nSlotId = _nSlotId;
if ( SID_ATTR_CHAR_COLOR_BACKGROUND == _nSlotId || SID_BACKGROUND_COLOR == _nSlotId )
@@ -217,7 +217,7 @@ void OColorPopup::SetSlotId(USHORT _nSlotId)
// -----------------------------------------------------------------------------
IMPL_LINK( OColorPopup, SelectHdl, void *, EMPTYARG )
{
- USHORT nItemId = m_aColorSet.GetSelectItemId();
+ sal_uInt16 nItemId = m_aColorSet.GetSelectItemId();
Color aColor( nItemId == 0 ? Color( COL_TRANSPARENT ) : m_aColorSet.GetItemColor( nItemId ) );
/* #i33380# Moved the following line above the Dispatch() calls.
@@ -328,11 +328,11 @@ Condition::~Condition()
// -----------------------------------------------------------------------------
IMPL_LINK( Condition, DropdownClick, ToolBox*, /*pToolBar*/ )
{
- USHORT nId( m_aActions.GetCurItemId() );
+ sal_uInt16 nId( m_aActions.GetCurItemId() );
if ( !m_pColorFloat )
m_pColorFloat = new OColorPopup(&m_aActions,this);
- USHORT nTextId = 0;
+ sal_uInt16 nTextId = 0;
switch(nId)
{
case SID_ATTR_CHAR_COLOR2:
@@ -376,7 +376,7 @@ IMPL_LINK( Condition, OnConditionAction, Button*, _pClickedButton )
}
//------------------------------------------------------------------------------
-void Condition::ApplyCommand( USHORT _nCommandId, const ::Color& _rColor)
+void Condition::ApplyCommand( sal_uInt16 _nCommandId, const ::Color& _rColor)
{
if ( _nCommandId == SID_ATTR_CHAR_COLOR2 )
m_pBtnUpdaterFontColor->Update( _rColor );
@@ -623,8 +623,8 @@ void Condition::impl_setCondition( const ::rtl::OUString& _rConditionFormula )
}
// update UI
- m_aConditionType.SelectEntryPos( (USHORT)eType );
- m_aOperationList.SelectEntryPos( (USHORT)eOperation );
+ m_aConditionType.SelectEntryPos( (sal_uInt16)eType );
+ m_aOperationList.SelectEntryPos( (sal_uInt16)eOperation );
m_aCondLHS.SetText( sLHS );
m_aCondRHS.SetText( sRHS );
@@ -659,10 +659,10 @@ void Condition::updateToolbar(const uno::Reference< report::XReportControlFormat
OSL_ENSURE(_xReportControlFormat.is(),"XReportControlFormat is NULL!");
if ( _xReportControlFormat.is() )
{
- USHORT nItemCount = m_aActions.GetItemCount();
- for (USHORT j = 0; j< nItemCount; ++j)
+ sal_uInt16 nItemCount = m_aActions.GetItemCount();
+ for (sal_uInt16 j = 0; j< nItemCount; ++j)
{
- USHORT nItemId = m_aActions.GetItemId(j);
+ sal_uInt16 nItemId = m_aActions.GetItemId(j);
m_aActions.CheckItem( nItemId, m_rController.isFormatCommandEnabled( nItemId, _xReportControlFormat ) );
}
diff --git a/reportdesign/source/ui/dlg/Condition.hxx b/reportdesign/source/ui/dlg/Condition.hxx
index e2c473177e7a..aa34d461fc46 100644
--- a/reportdesign/source/ui/dlg/Condition.hxx
+++ b/reportdesign/source/ui/dlg/Condition.hxx
@@ -147,7 +147,7 @@ namespace rptui
/** forward to the parent class
*/
- void ApplyCommand(USHORT _nCommandId, const ::Color& _aColor );
+ void ApplyCommand(sal_uInt16 _nCommandId, const ::Color& _aColor );
inline ::rptui::OReportController& getController() const { return m_rController; }
diff --git a/reportdesign/source/ui/dlg/DateTime.src b/reportdesign/source/ui/dlg/DateTime.src
index 4324db909568..e9378da1725c 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 a1199abf7849..f86c2cec1521 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);
@@ -116,7 +116,7 @@ bool FormulaDialog::calculateValue( const String& rStrExp, String& rStrResult )
rStrResult = rStrExp;
return false;
}
-void FormulaDialog::doClose(BOOL _bOk)
+void FormulaDialog::doClose(sal_Bool _bOk)
{
EndDialog(_bOk ? RET_OK : RET_CANCEL);
}
@@ -126,10 +126,10 @@ void FormulaDialog::insertEntryToLRUList(const IFunctionDescription* /*_pDesc
void FormulaDialog::showReference(const String& /*_sFormula*/)
{
}
-void FormulaDialog::dispatch(BOOL /*_bOK*/,BOOL /*_bMartixChecked*/)
+void FormulaDialog::dispatch(sal_Bool /*_bOK*/,sal_Bool /*_bMartixChecked*/)
{
}
-void FormulaDialog::setDispatcherLock( BOOL /*bLock*/ )
+void FormulaDialog::setDispatcherLock( sal_Bool /*bLock*/ )
{
}
void FormulaDialog::setReferenceInput(const FormEditData* /*_pData*/)
@@ -189,7 +189,7 @@ void FormulaDialog::ShowReference(const String& /*_sRef*/)
{
}
// -----------------------------------------------------------------------------
-void FormulaDialog::HideReference( BOOL /*bDoneRefMode*/)
+void FormulaDialog::HideReference( sal_Bool /*bDoneRefMode*/)
{
}
// -----------------------------------------------------------------------------
@@ -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 ) );
@@ -243,7 +243,7 @@ IMPL_LINK( FormulaDialog, OnClickHdl, OAddFieldWindow* ,_pAddFieldDlg)
}
m_pEdit = NULL;
_pAddFieldDlg->Hide();
- RefInputDoneAfter( TRUE );
+ RefInputDoneAfter( sal_True );
return 0L;
}
diff --git a/reportdesign/source/ui/dlg/GroupExchange.cxx b/reportdesign/source/ui/dlg/GroupExchange.cxx
index efa70b6b7e61..7f6720fd68ec 100644
--- a/reportdesign/source/ui/dlg/GroupExchange.cxx
+++ b/reportdesign/source/ui/dlg/GroupExchange.cxx
@@ -61,7 +61,7 @@ namespace rptui
// -----------------------------------------------------------------------------
sal_Bool OGroupExchange::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor )
{
- ULONG nFormat = SotExchange::GetFormat(rFlavor);
+ sal_uLong nFormat = SotExchange::GetFormat(rFlavor);
if(nFormat == OGroupExchange::getReportGroupId() )
{
return SetAny(uno::makeAny(m_aGroupRow),rFlavor);
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 09cf0e6eb14d..1859cc2cf829 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -103,13 +103,13 @@ class OFieldExpressionControl : public TContainerListenerBase
::svt::ComboBoxControl* m_pComboCell;
sal_Int32 m_nDataPos;
sal_Int32 m_nCurrentPos;
- ULONG m_nPasteEvent;
- ULONG m_nDeleteEvent;
+ sal_uLong m_nPasteEvent;
+ sal_uLong m_nDeleteEvent;
OGroupsSortingDialog* m_pParent;
bool m_bIgnoreEvent;
- void fillListBox(const uno::Reference< beans::XPropertySet>& _xDest,long nRow,USHORT nColumnId);
- BOOL SaveModified(bool _bAppend);
+ void fillListBox(const uno::Reference< beans::XPropertySet>& _xDest,long nRow,sal_uInt16 nColumnId);
+ sal_Bool SaveModified(bool _bAppend);
OFieldExpressionControl(const OFieldExpressionControl&); // NO COPY
void operator =(const OFieldExpressionControl&); // NO ASSIGN
@@ -144,17 +144,17 @@ public:
*/
void moveGroups(const uno::Sequence<uno::Any>& _aGroups,sal_Int32 _nRow,sal_Bool _bSelect = sal_True);
- virtual BOOL CursorMoving(long nNewRow, USHORT nNewCol);
+ virtual sal_Bool CursorMoving(long nNewRow, sal_uInt16 nNewCol);
using OFieldExpressionControl_Base::GetRowCount;
protected:
- virtual BOOL IsTabAllowed(BOOL bForward) const;
-
- virtual void InitController( ::svt::CellControllerRef& rController, long nRow, USHORT nCol );
- virtual ::svt::CellController* GetController( long nRow, USHORT nCol );
- virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColId ) const;
- virtual BOOL SeekRow( long nRow );
- virtual BOOL SaveModified();
- virtual String GetCellText( long nRow, USHORT nColId ) const;
+ virtual sal_Bool IsTabAllowed(sal_Bool bForward) const;
+
+ virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol );
+ virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol );
+ virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const;
+ virtual sal_Bool SeekRow( long nRow );
+ virtual sal_Bool SaveModified();
+ virtual String GetCellText( long nRow, sal_uInt16 nColId ) const;
virtual RowStatus GetRowStatus(long nRow) const;
virtual void KeyInput(const KeyEvent& rEvt);
@@ -274,7 +274,7 @@ sal_Int8 OFieldExpressionControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt
sal_Int8 nAction = DND_ACTION_NONE;
if ( IsEditing() )
{
- USHORT nPos = m_pComboCell->GetSelectEntryPos();
+ sal_uInt16 nPos = m_pComboCell->GetSelectEntryPos();
if ( COMBOBOX_ENTRY_NOTFOUND != nPos || m_pComboCell->GetText().Len() )
SaveModified();
DeactivateCell();
@@ -315,8 +315,8 @@ void OFieldExpressionControl::moveGroups(const uno::Sequence<uno::Any>& _aGroups
m_bIgnoreEvent = true;
{
sal_Int32 nRow = _nRow;
- String sUndoAction(ModuleRes(RID_STR_UNDO_MOVE_GROUP));
- UndoManagerListAction aListAction(*m_pParent->m_pController->getUndoMgr(),sUndoAction);
+ const String sUndoAction(ModuleRes(RID_STR_UNDO_MOVE_GROUP));
+ const UndoContext aUndoContext( m_pParent->m_pController->getUndoManager(), sUndoAction );
uno::Reference< report::XGroups> xGroups = m_pParent->getGroups();
const uno::Any* pIter = _aGroups.getConstArray();
@@ -375,7 +375,7 @@ void OFieldExpressionControl::lateInit()
aFont.SetWeight( WEIGHT_LIGHT );
SetFont(aFont);
- InsertHandleColumn(static_cast<USHORT>(GetTextWidth('0') * 4)/*, TRUE */);
+ InsertHandleColumn(static_cast<sal_uInt16>(GetTextWidth('0') * 4)/*, sal_True */);
InsertDataColumn( FIELD_EXPRESSION, String(ModuleRes(STR_RPT_EXPRESSION)), 100);
m_pComboCell = new ComboBoxControl( &GetDataWindow() );
@@ -402,7 +402,7 @@ void OFieldExpressionControl::lateInit()
// not the first call
RowRemoved(0, GetRowCount());
- RowInserted(0, m_aGroupPositions.size(), TRUE);
+ RowInserted(0, m_aGroupPositions.size(), sal_True);
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
@@ -428,19 +428,19 @@ IMPL_LINK(OFieldExpressionControl, AsynchDeactivate, void*, EMPTYARG)
}
//------------------------------------------------------------------------------
-BOOL OFieldExpressionControl::IsTabAllowed(BOOL /*bForward*/) const
+sal_Bool OFieldExpressionControl::IsTabAllowed(sal_Bool /*bForward*/) const
{
DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL);
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------------
-BOOL OFieldExpressionControl::SaveModified()
+sal_Bool OFieldExpressionControl::SaveModified()
{
return SaveModified(true);
}
//------------------------------------------------------------------------------
-BOOL OFieldExpressionControl::SaveModified(bool _bAppendRow)
+sal_Bool OFieldExpressionControl::SaveModified(bool _bAppendRow)
{
DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL);
sal_Int32 nRow = GetCurRow();
@@ -454,7 +454,7 @@ BOOL OFieldExpressionControl::SaveModified(bool _bAppendRow)
{
bAppend = sal_True;
String sUndoAction(ModuleRes(RID_STR_UNDO_APPEND_GROUP));
- m_pParent->m_pController->getUndoMgr()->EnterListAction( sUndoAction, String() );
+ m_pParent->m_pController->getUndoManager().EnterListAction( sUndoAction, String() );
xGroup = m_pParent->getGroups()->createGroup();
xGroup->setHeaderOn(sal_True);
@@ -485,7 +485,7 @@ BOOL OFieldExpressionControl::SaveModified(bool _bAppendRow)
xGroup = m_pParent->getGroup(m_aGroupPositions[nRow]);
if ( xGroup.is() )
{
- USHORT nPos = m_pComboCell->GetSelectEntryPos();
+ sal_uInt16 nPos = m_pComboCell->GetSelectEntryPos();
::rtl::OUString sExpression;
if ( COMBOBOX_ENTRY_NOTFOUND == nPos )
sExpression = m_pComboCell->GetText();
@@ -498,7 +498,7 @@ BOOL OFieldExpressionControl::SaveModified(bool _bAppendRow)
::rptui::adjustSectionName(xGroup,nPos);
if ( bAppend )
- m_pParent->m_pController->getUndoMgr()->LeaveListAction();
+ m_pParent->m_pController->getUndoManager().LeaveListAction();
}
if ( Controller() )
@@ -518,10 +518,10 @@ BOOL OFieldExpressionControl::SaveModified(bool _bAppendRow)
}
}
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------------
-String OFieldExpressionControl::GetCellText( long nRow, USHORT /*nColId*/ ) const
+String OFieldExpressionControl::GetCellText( long nRow, sal_uInt16 /*nColId*/ ) const
{
DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL);
String sText;
@@ -552,7 +552,7 @@ String OFieldExpressionControl::GetCellText( long nRow, USHORT /*nColId*/ ) cons
}
//------------------------------------------------------------------------------
-void OFieldExpressionControl::InitController( CellControllerRef& /*rController*/, long nRow, USHORT nColumnId )
+void OFieldExpressionControl::InitController( CellControllerRef& /*rController*/, long nRow, sal_uInt16 nColumnId )
{
DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL);
@@ -575,7 +575,7 @@ sal_Bool OFieldExpressionControl::CursorMoving(long nNewRow, sal_uInt16 nNewCol)
return sal_True;
}
//------------------------------------------------------------------------------
-CellController* OFieldExpressionControl::GetController( long /*nRow*/, USHORT /*nColumnId*/ )
+CellController* OFieldExpressionControl::GetController( long /*nRow*/, sal_uInt16 /*nColumnId*/ )
{
DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL);
ComboBoxCellController* pCellController = new ComboBoxCellController( m_pComboCell );
@@ -584,17 +584,17 @@ CellController* OFieldExpressionControl::GetController( long /*nRow*/, USHORT /*
}
//------------------------------------------------------------------------------
-BOOL OFieldExpressionControl::SeekRow( long _nRow )
+sal_Bool OFieldExpressionControl::SeekRow( long _nRow )
{
DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL);
// die Basisklasse braucht den Aufruf, da sie sich dort merkt, welche Zeile gepainted wird
EditBrowseBox::SeekRow(_nRow);
m_nCurrentPos = _nRow;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------------
-void OFieldExpressionControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColumnId ) const
+void OFieldExpressionControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL);
String aText =const_cast< OFieldExpressionControl*>(this)->GetCellText( m_nCurrentPos, nColumnId );
@@ -739,7 +739,7 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt)
return;
}
- USHORT nColId = GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X());
+ sal_uInt16 nColId = GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X());
if ( nColId == HANDLE_ID )
{
@@ -810,7 +810,7 @@ void OFieldExpressionControl::DeleteRows()
{
bFirstTime = false;
String sUndoAction(ModuleRes(RID_STR_UNDO_REMOVE_SELECTION));
- m_pParent->m_pController->getUndoMgr()->EnterListAction( sUndoAction, String() );
+ m_pParent->m_pController->getUndoManager().EnterListAction( sUndoAction, String() );
}
sal_Int32 nGroupPos = m_aGroupPositions[nIndex];
@@ -830,7 +830,7 @@ void OFieldExpressionControl::DeleteRows()
}
if ( !bFirstTime )
- m_pParent->m_pController->getUndoMgr()->LeaveListAction();
+ m_pParent->m_pController->getUndoManager().LeaveListAction();
m_nDataPos = GetCurRow();
InvalidateStatusCell( nOldDataPos );
@@ -916,8 +916,8 @@ void OFieldExpressionControl::InsertRows( long nRow )
{
m_bIgnoreEvent = false;
{
- String sUndoAction(ModuleRes(RID_STR_UNDO_APPEND_GROUP));
- UndoManagerListAction aListAction(*m_pParent->m_pController->getUndoMgr(),sUndoAction);
+ const String sUndoAction(ModuleRes(RID_STR_UNDO_APPEND_GROUP));
+ const UndoContext aUndoContext( m_pParent->m_pController->getUndoManager(), sUndoAction );
uno::Reference<report::XGroups> xGroups = m_pParent->getGroups();
sal_Int32 nGroupPos = 0;
@@ -999,7 +999,7 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent
{
pControlsLst[i]->SetGetFocusHdl(LINK(this, OGroupsSortingDialog, OnControlFocusGot));
pControlsLst[i]->SetLoseFocusHdl(LINK(this, OGroupsSortingDialog, OnControlFocusLost));
- pControlsLst[i]->Show(TRUE);
+ pControlsLst[i]->Show(sal_True);
}
for (size_t i = 0; i < (SAL_N_ELEMENTS(pControlsLst))-1; ++i)
@@ -1014,7 +1014,7 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent
for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i)
{
- pControls[i]->Show(TRUE);
+ pControls[i]->Show(sal_True);
String sText = pControls[i]->GetText();
if ( aMnemonicGenerator.CreateMnemonic(sText) )
pControls[i]->SetText(sText);
@@ -1184,7 +1184,7 @@ IMPL_LINK(OGroupsSortingDialog, OnControlFocusGot, Control*, pControl )
NumericField* pNumericField = dynamic_cast< NumericField* >( pControl );
if ( pNumericField )
pNumericField->SaveValue();
- showHelpText(static_cast<USHORT>(i+STR_RPT_HELP_FIELD));
+ showHelpText(static_cast<sal_uInt16>(i+STR_RPT_HELP_FIELD));
break;
}
}
@@ -1206,7 +1206,7 @@ IMPL_LINK( OGroupsSortingDialog, OnFormatAction, ToolBox*, /*NOTINTERESTEDIN*/ )
{
DBG_CHKTHIS( rpt_OGroupsSortingDialog,NULL);
- USHORT nCommand = m_aToolBox.GetCurItemId();
+ sal_uInt16 nCommand = m_aToolBox.GetCurItemId();
if ( m_pFieldExpression )
{
@@ -1281,7 +1281,7 @@ IMPL_LINK( OGroupsSortingDialog, LBChangeHdl, ListBox*, pListBox )
return 1L;
}
// -----------------------------------------------------------------------------
-void OGroupsSortingDialog::showHelpText(USHORT _nResId)
+void OGroupsSortingDialog::showHelpText(sal_uInt16 _nResId)
{
m_aHelpWindow.SetText(String(ModuleRes(_nResId)));
}
@@ -1325,8 +1325,8 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x
case sdbc::DataType::TIME:
case sdbc::DataType::TIMESTAMP:
{
- USHORT nIds[] = { STR_RPT_YEAR, STR_RPT_QUARTER,STR_RPT_MONTH,STR_RPT_WEEK,STR_RPT_DAY,STR_RPT_HOUR,STR_RPT_MINUTE };
- for (USHORT i = 0; i < SAL_N_ELEMENTS(nIds); ++i)
+ sal_uInt16 nIds[] = { STR_RPT_YEAR, STR_RPT_QUARTER,STR_RPT_MONTH,STR_RPT_WEEK,STR_RPT_DAY,STR_RPT_HOUR,STR_RPT_MINUTE };
+ for (sal_uInt16 i = 0; i < SAL_N_ELEMENTS(nIds); ++i)
{
m_aGroupOnLst.InsertEntry(String(ModuleRes(nIds[i])));
m_aGroupOnLst.SetEntryData(i+1,reinterpret_cast<void*>(i+2));
@@ -1338,8 +1338,7 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x
m_aGroupOnLst.SetEntryData(1,reinterpret_cast<void*>(report::GroupOn::INTERVAL));
break;
}
-
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
switch(_xGroup->getGroupOn())
{
case report::GroupOn::DEFAULT:
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.src b/reportdesign/source/ui/dlg/GroupsSorting.src
index 159a457011ce..3cb470933e26 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 c264a3e41bec..072a9430d7b0 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -32,7 +32,7 @@
#include "uistrings.hrc"
#include "ReportController.hxx"
#include "UITools.hxx"
-#include "Undo.hxx"
+#include "RptUndo.hxx"
#include "reportformula.hxx"
#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/report/XReportDefinition.hpp>
@@ -74,9 +74,9 @@ using namespace ::com::sun::star;
using namespace utl;
using namespace ::comphelper;
-USHORT lcl_getImageId(const uno::Reference< report::XReportComponent>& _xElement)
+sal_uInt16 lcl_getImageId(const uno::Reference< report::XReportComponent>& _xElement)
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
uno::Reference< report::XFixedLine> xFixedLine(_xElement,uno::UNO_QUERY);
if ( uno::Reference< report::XFixedText>(_xElement,uno::UNO_QUERY).is() )
nId = SID_FM_FIXEDTEXT;
@@ -163,8 +163,8 @@ class NavigatorTree : public ::cppu::BaseMutex
::rtl::Reference< comphelper::OSelectionChangeMultiplexer> m_pSelectionListener;
unsigned short m_nTimerCounter;
- SvLBoxEntry* insertEntry(const ::rtl::OUString& _sName,SvLBoxEntry* _pParent,USHORT _nImageId,ULONG _nPosition,UserData* _pData);
- void traverseSection(const uno::Reference< report::XSection>& _xSection,SvLBoxEntry* _pParent,USHORT _nImageId,ULONG _nPosition = LIST_APPEND);
+ SvLBoxEntry* insertEntry(const ::rtl::OUString& _sName,SvLBoxEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition,UserData* _pData);
+ void traverseSection(const uno::Reference< report::XSection>& _xSection,SvLBoxEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition = LIST_APPEND);
void traverseFunctions(const uno::Reference< report::XFunctions>& _xFunctions,SvLBoxEntry* _pParent);
NavigatorTree(const NavigatorTree&);
@@ -310,12 +310,12 @@ void NavigatorTree::Command( const CommandEvent& rEvt )
uno::Reference< report::XFunction>(pData->getContent(),uno::UNO_QUERY).is());
PopupMenu aContextMenu( ModuleRes( RID_MENU_NAVIGATOR ) );
- USHORT nCount = aContextMenu.GetItemCount();
- for (USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = aContextMenu.GetItemCount();
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
if ( MENUITEM_SEPARATOR != aContextMenu.GetItemType(i))
{
- USHORT nId = aContextMenu.GetItemId(i);
+ sal_uInt16 nId = aContextMenu.GetItemId(i);
aContextMenu.CheckItem(nId,m_rController.isCommandChecked(nId));
sal_Bool bEnabled = m_rController.isCommandEnabled(nId);
@@ -328,7 +328,7 @@ void NavigatorTree::Command( const CommandEvent& rEvt )
aContextMenu.EnableItem(nId,bEnabled);
}
}
- USHORT nId = aContextMenu.Execute(this, aWhere);
+ sal_uInt16 nId = aContextMenu.Execute(this, aWhere);
if ( nId )
{
uno::Sequence< beans::PropertyValue> aArgs;
@@ -493,7 +493,7 @@ void NavigatorTree::_selectionChanged( const lang::EventObject& aEvent ) throw (
SetCurEntry(pEntry);
}
else if ( !pEntry )
- SelectAll(FALSE,FALSE);
+ SelectAll(sal_False,sal_False);
}
else
{
@@ -512,20 +512,20 @@ void NavigatorTree::_selectionChanged( const lang::EventObject& aEvent ) throw (
m_pSelectionListener->unlock();
}
// -----------------------------------------------------------------------------
-SvLBoxEntry* NavigatorTree::insertEntry(const ::rtl::OUString& _sName,SvLBoxEntry* _pParent,USHORT _nImageId,ULONG _nPosition,UserData* _pData)
+SvLBoxEntry* NavigatorTree::insertEntry(const ::rtl::OUString& _sName,SvLBoxEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition,UserData* _pData)
{
SvLBoxEntry* pEntry = NULL;
if ( _nImageId )
{
const Image aImage( m_aNavigatorImages.GetImage( _nImageId ) );
- pEntry = InsertEntry(_sName,aImage,aImage,_pParent,FALSE,_nPosition,_pData);
+ pEntry = InsertEntry(_sName,aImage,aImage,_pParent,sal_False,_nPosition,_pData);
}
else
- pEntry = InsertEntry(_sName,_pParent,FALSE,_nPosition,_pData);
+ pEntry = InsertEntry(_sName,_pParent,sal_False,_nPosition,_pData);
return pEntry;
}
// -----------------------------------------------------------------------------
-void NavigatorTree::traverseSection(const uno::Reference< report::XSection>& _xSection,SvLBoxEntry* _pParent,USHORT _nImageId,ULONG _nPosition)
+void NavigatorTree::traverseSection(const uno::Reference< report::XSection>& _xSection,SvLBoxEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition)
{
SvLBoxEntry* pSection = insertEntry(_xSection->getName(),_pParent,_nImageId,_nPosition,new UserData(this,_xSection));
const sal_Int32 nCount = _xSection->getCount();
@@ -666,7 +666,7 @@ void NavigatorTree::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
SvLBoxEntry* pParent = find(xReport);
if ( _rEvent.PropertyName == PROPERTY_REPORTHEADERON )
{
- ULONG nPos = xReport->getReportHeaderOn() ? 2 : 1;
+ sal_uLong nPos = xReport->getReportHeaderOn() ? 2 : 1;
traverseSection(xReport->getReportHeader(),pParent,SID_REPORTHEADERFOOTER,nPos);
}
else if ( _rEvent.PropertyName == PROPERTY_PAGEHEADERON )
@@ -677,7 +677,7 @@ void NavigatorTree::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
traverseSection(xReport->getPageFooter(),pParent, SID_PAGEHEADERFOOTER);
else if ( _rEvent.PropertyName == PROPERTY_REPORTFOOTERON )
{
- ULONG nPos = xReport->getPageFooterOn() ? (GetLevelChildCount(pParent) - 1) : LIST_APPEND;
+ sal_uLong nPos = xReport->getPageFooterOn() ? (GetLevelChildCount(pParent) - 1) : LIST_APPEND;
traverseSection(xReport->getReportFooter(),pParent,SID_REPORTHEADERFOOTER,nPos);
}
}
@@ -708,7 +708,7 @@ void NavigatorTree::_elementInserted( const container::ContainerEvent& _rEvent )
uno::Reference< report::XReportComponent> xElement(xProp,uno::UNO_QUERY);
if ( xProp.is() )
sName = lcl_getName(xProp);
- insertEntry(sName,pEntry,(!xElement.is() ? USHORT(SID_RPT_NEW_FUNCTION) : lcl_getImageId(xElement)),LIST_APPEND,new UserData(this,xProp));
+ insertEntry(sName,pEntry,(!xElement.is() ? sal_uInt16(SID_RPT_NEW_FUNCTION) : lcl_getImageId(xElement)),LIST_APPEND,new UserData(this,xProp));
}
if ( !IsExpanded(pEntry) )
Expand(pEntry);
diff --git a/reportdesign/source/ui/dlg/Navigator.src b/reportdesign/source/ui/dlg/Navigator.src
index af6ec90b2e7f..150c98d88343 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 31c5bdb4026c..c5c760e1755d 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/dlg/dlgpage.cxx b/reportdesign/source/ui/dlg/dlgpage.cxx
index ba82ca8f104b..33b3d6d60981 100644
--- a/reportdesign/source/ui/dlg/dlgpage.cxx
+++ b/reportdesign/source/ui/dlg/dlgpage.cxx
@@ -48,7 +48,7 @@ namespace rptui
|*
\************************************************************************/
-ORptPageDialog::ORptPageDialog( Window* pParent, const SfxItemSet* pAttr,USHORT _nPageId) :
+ORptPageDialog::ORptPageDialog( Window* pParent, const SfxItemSet* pAttr,sal_uInt16 _nPageId) :
SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ),
rOutAttrs ( *pAttr )
{
diff --git a/reportdesign/source/ui/inc/CondFormat.hxx b/reportdesign/source/ui/inc/CondFormat.hxx
index 20156d51b01d..5ccd968c6a66 100644
--- a/reportdesign/source/ui/inc/CondFormat.hxx
+++ b/reportdesign/source/ui/inc/CondFormat.hxx
@@ -61,7 +61,7 @@ namespace rptui
public:
virtual void addCondition( size_t _nAddAfterIndex ) = 0;
virtual void deleteCondition( size_t _nCondIndex ) = 0;
- virtual void applyCommand( size_t _nCondIndex, USHORT _nCommandId, const ::Color _aColor ) = 0;
+ virtual void applyCommand( size_t _nCondIndex, sal_uInt16 _nCommandId, const ::Color _aColor ) = 0;
virtual void moveConditionUp( size_t _nCondIndex ) = 0;
virtual void moveConditionDown( size_t _nCondIndex ) = 0;
virtual ::rtl::OUString getDataField() const = 0;
@@ -110,7 +110,7 @@ namespace rptui
// IConditionalFormatAction overridables
virtual void addCondition( size_t _nAddAfterIndex );
virtual void deleteCondition( size_t _nCondIndex );
- virtual void applyCommand( size_t _nCondIndex, USHORT _nCommandId, const ::Color _aColor );
+ virtual void applyCommand( size_t _nCondIndex, sal_uInt16 _nCommandId, const ::Color _aColor );
virtual void moveConditionUp( size_t _nCondIndex );
virtual void moveConditionDown( size_t _nCondIndex );
virtual ::rtl::OUString getDataField() const;
diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx
index ffe4b5f37cb1..a85f500de4df 100644
--- a/reportdesign/source/ui/inc/DesignView.hxx
+++ b/reportdesign/source/ui/inc/DesignView.hxx
@@ -84,14 +84,14 @@ namespace rptui
Timer m_aMarkTimer;
Point m_aScrollOffset;
DlgEdMode m_eMode;
- USHORT m_nCurrentPosition;
- USHORT m_eActObj;
- BOOL m_bFirstDraw;
+ sal_uInt16 m_nCurrentPosition;
+ sal_uInt16 m_eActObj;
+ sal_Bool m_bFirstDraw;
Size m_aGridSizeCoarse;
Size m_aGridSizeFine;
- BOOL m_bGridVisible;
- BOOL m_bGridSnap;
- BOOL m_bDeleted;
+ sal_Bool m_bGridVisible;
+ sal_Bool m_bGridSnap;
+ sal_Bool m_bDeleted;
DECL_LINK( MarkTimeout, Timer * );
@@ -126,8 +126,8 @@ namespace rptui
inline OReportController& getController() const { return m_rReportController; }
void SetMode( DlgEdMode m_eMode );
- void SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString());
- USHORT GetInsertObj() const;
+ void SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString());
+ sal_uInt16 GetInsertObj() const;
rtl::OUString GetInsertObjString() const;
DlgEdMode GetMode() const { return m_eMode; }
@@ -143,7 +143,7 @@ namespace rptui
*
* \return <TRUE/> if paste is allowed
*/
- BOOL IsPasteAllowed() const;
+ sal_Bool IsPasteAllowed() const;
/** paste a new control in this section
*/
@@ -163,17 +163,17 @@ namespace rptui
void SelectAll(const sal_uInt16 _nObjectType);
/// checks if a selection exists
- BOOL HasSelection() const;
+ sal_Bool HasSelection() const;
void UpdatePropertyBrowserDelayed(OSectionView& _rView);
- USHORT getSectionCount() const;
+ sal_uInt16 getSectionCount() const;
/** removes the section at the given position.
*
* \param _nPosition Zero based.
*/
- void removeSection(USHORT _nPosition);
+ void removeSection(sal_uInt16 _nPosition);
/** adds a new section at position _nPosition.
If the section is <NULL/> nothing happens.
@@ -181,13 +181,13 @@ namespace rptui
*/
void addSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
,const ::rtl::OUString& _sColorEntry
- ,USHORT _nPosition = USHRT_MAX);
+ ,sal_uInt16 _nPosition = USHRT_MAX);
inline Size getGridSizeCoarse() const { return m_aGridSizeCoarse; }
inline Size getGridSizeFine() const { return m_aGridSizeFine; }
- inline BOOL isGridSnap() const { return m_bGridSnap; }
- void setGridSnap(BOOL bOn);
- void setDragStripes(BOOL bOn);
+ inline sal_Bool isGridSnap() const { return m_bGridSnap; }
+ void setGridSnap(sal_Bool bOn);
+ void setDragStripes(sal_Bool bOn);
/** turns the grid on or off
*
* \param _bGridVisible
@@ -196,10 +196,10 @@ namespace rptui
void togglePropertyBrowser(sal_Bool _bToogleOn);
- BOOL isAddFieldVisible() const;
+ sal_Bool isAddFieldVisible() const;
void toggleAddField();
- BOOL isReportExplorerVisible() const;
+ sal_Bool isReportExplorerVisible() const;
void toggleReportExplorer();
/** shows or hides the ruler.
diff --git a/reportdesign/source/ui/inc/Formula.hxx b/reportdesign/source/ui/inc/Formula.hxx
index da5471fbce52..c458ccf240e4 100644
--- a/reportdesign/source/ui/inc/Formula.hxx
+++ b/reportdesign/source/ui/inc/Formula.hxx
@@ -73,11 +73,11 @@ public:
virtual void notifyChange();
virtual void fill();
virtual bool calculateValue(const String& _sExpression,String& _rResult);
- virtual void doClose(BOOL _bOk);
+ virtual void doClose(sal_Bool _bOk);
virtual void insertEntryToLRUList(const formula::IFunctionDescription* pDesc);
virtual void showReference(const String& _sFormula);
- virtual void dispatch(BOOL _bOK,BOOL _bMartixChecked);
- virtual void setDispatcherLock( BOOL bLock );
+ virtual void dispatch(sal_Bool _bOK,sal_Bool _bMartixChecked);
+ virtual void setDispatcherLock( sal_Bool bLock );
virtual void setReferenceInput(const formula::FormEditData* _pData);
virtual void deleteFormData();
virtual void clear();
@@ -97,7 +97,7 @@ public:
// IControlReferenceHandler
virtual void ShowReference(const String& _sRef);
- virtual void HideReference( BOOL bDoneRefMode = TRUE );
+ virtual void HideReference( sal_Bool bDoneRefMode = sal_True );
virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
diff --git a/reportdesign/source/ui/inc/FunctionHelper.hxx b/reportdesign/source/ui/inc/FunctionHelper.hxx
index 743cd1a755b6..e59be1a5c8bf 100644
--- a/reportdesign/source/ui/inc/FunctionHelper.hxx
+++ b/reportdesign/source/ui/inc/FunctionHelper.hxx
@@ -79,10 +79,10 @@ public:
virtual ::rtl::OUString getDescription() const ;
virtual xub_StrLen getSuppressedArgumentCount() const ;
virtual ::rtl::OUString getFormula(const ::std::vector< ::rtl::OUString >& _aArguments) const ;
- virtual void fillVisibleArgumentMapping(::std::vector<USHORT>& _rArguments) const ;
+ virtual void fillVisibleArgumentMapping(::std::vector<sal_uInt16>& _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/GeometryHandler.hxx b/reportdesign/source/ui/inc/GeometryHandler.hxx
index e6d5d51a4485..91504e7f1cb9 100644
--- a/reportdesign/source/ui/inc/GeometryHandler.hxx
+++ b/reportdesign/source/ui/inc/GeometryHandler.hxx
@@ -196,7 +196,7 @@ namespace rptui
* \param _sQuotedFunction the quoted function name
* \param _Out_rDataField the data field which is used in the function
* \param _xFunctionsSupplier teh function supplier to search or empty if not used
- * \param _bSet If set to TRUE than the m_sDefaultFunction and m_sScope vars will be set if successful.
+ * \param _bSet If set to sal_True than the m_sDefaultFunction and m_sScope vars will be set if successful.
* \return sal_True with known otherwise sal_False
*/
sal_Bool isDefaultFunction(const ::rtl::OUString& _sQuotedFunction
diff --git a/reportdesign/source/ui/inc/GroupsSorting.hxx b/reportdesign/source/ui/inc/GroupsSorting.hxx
index 5bd349b1d52d..22f195bac07e 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>
@@ -138,7 +138,7 @@ private:
/** shows the text given by the id in the multiline edit
@param _nResId the string id
*/
- void showHelpText(USHORT _nResId);
+ void showHelpText(sal_uInt16 _nResId);
/** display the group props
@param _xGroup the group to display
*/
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index c55e32cb2dd5..007b42d225fb 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -28,48 +28,52 @@
#ifndef RPTUI_REPORTCONTROLLER_HXX
#define RPTUI_REPORTCONTROLLER_HXX
-#include <dbaccess/singledoccontroller.hxx>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/sdbc/XConnection.hpp>
-#include <com/sun/star/sdbc/XRowSet.hpp>
+#include "DesignView.hxx"
+#include "ModuleHelper.hxx"
+#include "ReportControllerObserver.hxx"
+#include "RptDef.hxx"
+
+/** === begin UNO includes === **/
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
-#include <com/sun/star/util/XNumberFormatter.hpp>
-#include <com/sun/star/io/XObjectOutputStream.hpp>
-#include <com/sun/star/io/XObjectInputStream.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/embed/XVisualObject.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/report/XReportDefinition.hpp>
+#include <com/sun/star/io/XObjectInputStream.hpp>
+#include <com/sun/star/io/XObjectOutputStream.hpp>
#include <com/sun/star/report/XReportControlModel.hpp>
+#include <com/sun/star/report/XReportDefinition.hpp>
#include <com/sun/star/report/XReportEngine.hpp>
#include <com/sun/star/report/XSection.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/sdbc/XRowSet.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/util/XModeSelector.hpp>
+#include <com/sun/star/util/XNumberFormatter.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <com/sun/star/embed/XVisualObject.hpp>
-#include <cppuhelper/implbase5.hxx>
-#include <svtools/transfer.hxx>
-#include <svl/lstner.hxx>
-#include <svx/svdedtv.hxx>
-#include <svx/zoomitem.hxx>
-#include "ModuleHelper.hxx"
+/** === end UNO includes === **/
-#include <comphelper/uno3.hxx>
#include <comphelper/implementationreference.hxx>
#include <comphelper/proparrhlp.hxx>
#include <comphelper/propertystatecontainer.hxx>
+#include <comphelper/uno3.hxx>
+#include <cppuhelper/implbase5.hxx>
+#include <dbaccess/dbsubcomponentcontroller.hxx>
+#include <svl/lstner.hxx>
+#include <svtools/transfer.hxx>
+#include <svx/svdedtv.hxx>
+#include <svx/zoomitem.hxx>
-#include "RptDef.hxx"
-#include "DesignView.hxx"
-#include <functional>
+#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
-#include <com/sun/star/util/XModeSelector.hpp>
-#include "ReportControllerObserver.hxx"
+#include <functional>
class TransferableHelper;
class TransferableClipboardListener;
class VclWindowEvent;
+class SfxUndoManager;
namespace rptui
{
class OGroupsSortingDialog;
@@ -79,7 +83,7 @@ namespace rptui
class OAddFieldWindow;
class OSectionWindow;
- typedef ::dbaui::OSingleDocumentController OReportController_BASE;
+ typedef ::dbaui::DBSubComponentController OReportController_BASE;
typedef ::cppu::ImplHelper5 < ::com::sun::star::container::XContainerListener
, ::com::sun::star::beans::XPropertyChangeListener
, ::com::sun::star::view::XSelectionSupplier
@@ -92,6 +96,7 @@ namespace rptui
,public SfxListener
,public ::comphelper::OPropertyStateContainer
,public ::comphelper::OPropertyArrayUsageHelper < OReportController_BASE >
+ ,public ::boost::noncopyable
{
private:
OModuleClient m_aModuleClient;
@@ -108,9 +113,9 @@ namespace rptui
ODesignView* getDesignView() const { return static_cast< ODesignView* >( getView() ); }
- ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition> m_xReportDefinition;
- ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportEngine> m_xReportEngine;
- ::com::sun::star::uno::Reference < ::com::sun::star::frame::XComponentLoader> m_xFrameLoader;
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition > m_xReportDefinition;
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportEngine > m_xReportEngine;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XComponentLoader > m_xFrameLoader;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xRowSet;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > m_xRowSetMediator;
@@ -214,18 +219,23 @@ namespace rptui
,sal_Int32 _nGroupPos
,bool _bShow);
- void executeMethodWithUndo(USHORT _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun);
- void alignControlsWithUndo(USHORT _nUndoStrId,sal_Int32 _nControlModification,bool _bAlignAtSection = false);
+ void executeMethodWithUndo(sal_uInt16 _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun);
+ void alignControlsWithUndo(sal_uInt16 _nUndoStrId,sal_Int32 _nControlModification,bool _bAlignAtSection = false);
+
+ // open the help agent of report designer at start time
+ void doOpenHelpAgent();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > getXFrame();
+
/** shrink a section
@param _nUndoStrId the string id of the string which is shown in undo menu
@param _nShrinkId ID of what you would like to shrink.
*/
- protected:
void shrinkSectionBottom(::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > _xSection);
void shrinkSectionTop(::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > _xSection);
- public:
- void shrinkSection(USHORT _nUndoStrId, ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > _xSection, sal_Int32 _nShrinkId);
+ public:
+ void shrinkSection(sal_uInt16 _nUndoStrId, ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > _xSection, sal_Int32 _nShrinkId);
/** opens the file open dialog to allow the user to select a image which will be
* bound to a newly created image button.
@@ -280,7 +290,7 @@ namespace rptui
/** collapse or expand the currently selected section.
*
- * \param _bCollapse collapse if TRUE otherwise expand
+ * \param _bCollapse collapse if sal_True otherwise expand
*/
void collapseSection(const bool _bCollapse);
@@ -293,14 +303,11 @@ namespace rptui
*/
void impl_zoom_nothrow();
- private:
- OReportController(OReportController const&);
- OReportController& operator =(OReportController const&);
- public:
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > getXFrame();
+ virtual void impl_onModifyChanged();
- // open the help agent of report designer at start time
- void doOpenHelpAgent();
+ virtual void onLoadedMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager );
+ virtual void impl_initialize( );
+ bool isUiVisible() const;
/** creates a new default control for the currently set type when the modifier KEY_MOD1 was pressed
* \param _aArgs must contain a properyvalue with name "KeyModifier" and value KEY_MOD1 when control should be created.
@@ -334,16 +341,15 @@ namespace rptui
// execute a feature
virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
- virtual void losingConnection( );
-
virtual void getPropertyDefaultByHandle( sal_Int32 _nHandle, ::com::sun::star::uno::Any& _rDefault ) const;
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const ::com::sun::star::uno::Any& rValue) throw (::com::sun::star::uno::Exception);
+ private:
virtual ~OReportController();
+
public:
OReportController(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & the_context);
- DECL_LINK( NotifyUndoActionHdl, SfxUndoAction* );
DECL_LINK( EventLstHdl, VclWindowEvent* );
DECL_LINK( OnCreateHdl, OAddFieldWindow*);
@@ -353,12 +359,6 @@ namespace rptui
// SfxListener
virtual void Notify(SfxBroadcaster & rBc, SfxHint const & rHint);
- virtual void impl_onModifyChanged();
-
- // const ::connectivity::OSQLParseNode* getParseTree() const { return m_aSqlIterator.getParseTree();}
- // need for undo's and redo's
- SfxUndoManager* getUndoMgr();
-
/** returns <TRUE/> when the command is enbaled
@param _nCommand the command id
@param _xControlFormat the report control format
@@ -456,7 +456,7 @@ namespace rptui
*
* \return
*/
- ::boost::shared_ptr<rptui::OReportModel> getSdrModel();
+ ::boost::shared_ptr<rptui::OReportModel> getSdrModel() const;
inline ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getContext() const { return m_xContext; }
inline sal_Int16 getZoomValue() const { return m_nZoomValue; }
@@ -478,10 +478,9 @@ namespace rptui
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > getColumns() const;
::rtl::OUString getColumnLabel_throw(const ::rtl::OUString& i_sColumnName) const;
- private:
- virtual void onLoadedMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager );
- virtual void impl_initialize( );
- bool isUiVisible() const;
+ SfxUndoManager& getUndoManager() const;
+ void clearUndoManager() const;
+ void addUndoAction( SfxUndoAction* i_pAction );
};
}
#endif // RPTUI_REPORTCONTROLLER_HXX
diff --git a/reportdesign/source/ui/inc/ReportRuler.hxx b/reportdesign/source/ui/inc/ReportRuler.hxx
index 97962a336ee5..092054b9faf5 100644
--- a/reportdesign/source/ui/inc/ReportRuler.hxx
+++ b/reportdesign/source/ui/inc/ReportRuler.hxx
@@ -56,7 +56,7 @@ namespace rptui
*
* \param _bVisible when <TRUE/> the grid is made visible
*/
- void SetGridVisible(BOOL _bVisible);
+ void SetGridVisible(sal_Bool _bVisible);
};
//==============================================================================
} // rptui
diff --git a/reportdesign/source/ui/inc/ReportSection.hxx b/reportdesign/source/ui/inc/ReportSection.hxx
index e8f64642afc6..cc64b29f9223 100644
--- a/reportdesign/source/ui/inc/ReportSection.hxx
+++ b/reportdesign/source/ui/inc/ReportSection.hxx
@@ -62,7 +62,7 @@ namespace rptui
::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > m_xSection;
DlgEdMode m_eMode;
- BOOL m_bDialogModelChanged;
+ sal_Bool m_bDialogModelChanged;
sal_Bool m_bInDrag;
/** fills the section with all control from the report section
@@ -118,15 +118,15 @@ namespace rptui
*
* \param _bVisible when <TRUE/> the grid is made visible
*/
- void SetGridVisible(BOOL _bVisible);
+ void SetGridVisible(sal_Bool _bVisible);
inline OSectionWindow* getSectionWindow() const { return m_pParent; }
inline OSectionView& getSectionView() const { return *m_pView; }
inline OReportPage* getPage() const { return m_pPage; }
inline ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > getSection() const { return m_xSection; }
- void SetDialogModelChanged( BOOL bChanged = TRUE ) { m_bDialogModelChanged = bChanged; }
- BOOL IsDialogModelChanged() const { return m_bDialogModelChanged; }
+ void SetDialogModelChanged( sal_Bool bChanged = sal_True ) { m_bDialogModelChanged = bChanged; }
+ sal_Bool IsDialogModelChanged() const { return m_bDialogModelChanged; }
DlgEdMode GetMode() const { return m_eMode; }
void SetMode( DlgEdMode m_eMode );
diff --git a/reportdesign/source/ui/inc/ReportWindow.hxx b/reportdesign/source/ui/inc/ReportWindow.hxx
index 11af785dc6a7..290076b6732c 100644
--- a/reportdesign/source/ui/inc/ReportWindow.hxx
+++ b/reportdesign/source/ui/inc/ReportWindow.hxx
@@ -87,10 +87,10 @@ namespace rptui
inline OScrollWindowHelper* getScrollWindow() const { return m_pParent; }
void SetMode( DlgEdMode m_eMode );
- void SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString());
+ void SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString());
rtl::OUString GetInsertObjString() const;
- void setGridSnap(BOOL bOn);
- void setDragStripes(BOOL bOn);
+ void setGridSnap(sal_Bool bOn);
+ void setDragStripes(sal_Bool bOn);
/** copies the current selection in this section
*/
@@ -100,7 +100,7 @@ namespace rptui
*
* \return <TRUE/> if paste is allowed
*/
- BOOL IsPasteAllowed() const;
+ sal_Bool IsPasteAllowed() const;
/** paste a new control in this section
*/
@@ -117,7 +117,7 @@ namespace rptui
/** returns <TRUE/> when a object is marked
*/
- BOOL HasSelection() const;
+ sal_Bool HasSelection() const;
Point getThumbPos() const;
@@ -125,7 +125,7 @@ namespace rptui
*
* \param _nPosition Zero based.
*/
- void removeSection(USHORT _nPosition);
+ void removeSection(sal_uInt16 _nPosition);
/** adds a new section at position _nPosition.
If the section is <NULL/> nothing happens.
@@ -133,9 +133,9 @@ namespace rptui
*/
void addSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
,const ::rtl::OUString& _sColorEntry
- ,USHORT _nPosition = USHRT_MAX);
+ ,sal_uInt16 _nPosition = USHRT_MAX);
- USHORT getSectionCount() const;
+ sal_uInt16 getSectionCount() const;
/** turns the grid on or off
*
diff --git a/reportdesign/source/ui/inc/Undo.hxx b/reportdesign/source/ui/inc/RptUndo.hxx
index 199ecd92c1f8..1ac8295fb7c2 100644
--- a/reportdesign/source/ui/inc/Undo.hxx
+++ b/reportdesign/source/ui/inc/RptUndo.hxx
@@ -68,7 +68,7 @@ namespace rptui
OSectionUndo( OReportModel& rMod
,sal_uInt16 _nSlot
,Action _eAction
- ,USHORT nCommentID);
+ ,sal_uInt16 nCommentID);
virtual ~OSectionUndo();
virtual void Undo();
@@ -96,7 +96,7 @@ namespace rptui
,OReportHelper> _pMemberFunction
,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >& _xReport
,Action _eAction
- ,USHORT nCommentID);
+ ,sal_uInt16 nCommentID);
virtual ~OReportSectionUndo();
};
@@ -123,7 +123,7 @@ namespace rptui
,OGroupHelper> _pMemberFunction
,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup >& _xGroup
,Action _eAction
- ,USHORT nCommentID);
+ ,sal_uInt16 nCommentID);
virtual String GetComment() const;
};
@@ -143,7 +143,7 @@ namespace rptui
public:
TYPEINFO();
OGroupUndo(OReportModel& rMod
- ,USHORT nCommentID
+ ,sal_uInt16 nCommentID
,Action _eAction
,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup>& _xGroup
,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >& _xReportDefinition);
diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx b/reportdesign/source/ui/inc/ScrollHelper.hxx
index ecb117488bd4..06d9daeb1a6b 100644
--- a/reportdesign/source/ui/inc/ScrollHelper.hxx
+++ b/reportdesign/source/ui/inc/ScrollHelper.hxx
@@ -100,10 +100,10 @@ namespace rptui
// forwards
void SetMode( DlgEdMode _eMode );
- void SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString());
+ void SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString());
rtl::OUString GetInsertObjString() const;
- void setGridSnap(BOOL bOn);
- void setDragStripes(BOOL bOn);
+ void setGridSnap(sal_Bool bOn);
+ void setDragStripes(sal_Bool bOn);
/** copies the current selection in this section
*/
void Copy();
@@ -112,7 +112,7 @@ namespace rptui
*
* \return <TRUE/> if paste is allowed
*/
- BOOL IsPasteAllowed() const;
+ sal_Bool IsPasteAllowed() const;
/** paste a new control in this section
*/
@@ -129,13 +129,13 @@ namespace rptui
/** returns <TRUE/> when a object is marked
*/
- BOOL HasSelection() const;
+ sal_Bool HasSelection() const;
/** removes the section at the given position.
*
* \param _nPosition Zero based.
*/
- void removeSection(USHORT _nPosition);
+ void removeSection(sal_uInt16 _nPosition);
/** adds a new section at position _nPosition.
If the section is <NULL/> nothing happens.
@@ -143,9 +143,9 @@ namespace rptui
*/
void addSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
,const ::rtl::OUString& _sColorEntry
- ,USHORT _nPosition = USHRT_MAX);
+ ,sal_uInt16 _nPosition = USHRT_MAX);
- USHORT getSectionCount() const;
+ sal_uInt16 getSectionCount() const;
/** turns the grid on or off
*
diff --git a/reportdesign/source/ui/inc/SectionWindow.hxx b/reportdesign/source/ui/inc/SectionWindow.hxx
index 637b245097fd..700550ee99d5 100644
--- a/reportdesign/source/ui/inc/SectionWindow.hxx
+++ b/reportdesign/source/ui/inc/SectionWindow.hxx
@@ -76,9 +76,9 @@ namespace rptui
* \param _nResId
* \param _pGetSection
* \param _pIsSectionOn
- * @return TRUE when title was set otherwise FALSE
+ * @return sal_True when title was set otherwise FALSE
*/
- bool setGroupSectionTitle(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup>& _xGroup,USHORT _nResId,::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection> , OGroupHelper> _pGetSection,::std::mem_fun_t<sal_Bool, OGroupHelper> _pIsSectionOn);
+ bool setGroupSectionTitle(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup>& _xGroup,sal_uInt16 _nResId,::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection> , OGroupHelper> _pGetSection,::std::mem_fun_t<sal_Bool, OGroupHelper> _pIsSectionOn);
/** set the title of the (report/page) header or footer
*
@@ -86,9 +86,9 @@ namespace rptui
* \param _nResId
* \param _pGetSection
* \param _pIsSectionOn
- * @return TRUE when title was set otherwise FALSE
+ * @return sal_True when title was set otherwise FALSE
*/
- bool setReportSectionTitle(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition>& _xReport,USHORT _nResId,::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection> , OReportHelper> _pGetSection,::std::mem_fun_t<sal_Bool, OReportHelper> _pIsSectionOn);
+ bool setReportSectionTitle(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition>& _xReport,sal_uInt16 _nResId,::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection> , OReportHelper> _pGetSection,::std::mem_fun_t<sal_Bool, OReportHelper> _pIsSectionOn);
void ImplInitSettings();
DECL_LINK(Collapsed,OColorListener*);
diff --git a/reportdesign/source/ui/inc/UITools.hxx b/reportdesign/source/ui/inc/UITools.hxx
index 6cf3ef141b86..569c0b138e7c 100644
--- a/reportdesign/source/ui/inc/UITools.hxx
+++ b/reportdesign/source/ui/inc/UITools.hxx
@@ -169,7 +169,7 @@ namespace rptui
*
* \param pControl the control which should place in the section without overlapping
* \param _pReportSection the section
- * \param _bInsert TRUE whe the control should be inserted, otherwise not.
+ * \param _bInsert sal_True whe the control should be inserted, otherwise not.
*/
void correctOverlapping(SdrObject* pControl,OReportSection& _aReportSection,bool _bInsert = true);
diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx
index 61b2b51e76e5..041da5de03ce 100644
--- a/reportdesign/source/ui/inc/ViewsWindow.hxx
+++ b/reportdesign/source/ui/inc/ViewsWindow.hxx
@@ -93,7 +93,7 @@ namespace rptui
public:
OWindowPositionCorrector(Window* _pWindow,long _nDeltaX, long _nDeltaY) :m_nDeltaX(_nDeltaX), m_nDeltaY(_nDeltaY)
{
- USHORT nCount = _pWindow->GetChildCount();
+ sal_uInt16 nCount = _pWindow->GetChildCount();
m_aChildren.reserve(nCount);
while( nCount )
{
@@ -147,7 +147,7 @@ namespace rptui
void ImplInitSettings();
/** returns the iterator at pos _nPos or the end()
*/
- TSectionsMap::iterator getIteratorAtPos(USHORT _nPos);
+ TSectionsMap::iterator getIteratorAtPos(sal_uInt16 _nPos);
void collectRectangles(TRectangleMap& _rMap,bool _bBoundRects);
void collectBoundResizeRect(const TRectangleMap& _rSortRectangles,sal_Int32 _nControlModification,bool _bAlignAtSection,bool _bBoundRects,Rectangle& _rBound,Rectangle& _rResize);
void impl_resizeSectionWindow(OSectionWindow& _rSectionWindow,Point& _rStartPoint,bool _bSet);
@@ -182,7 +182,7 @@ namespace rptui
*
* \param _nPosition Zero based.
*/
- void removeSection(USHORT _nPosition);
+ void removeSection(sal_uInt16 _nPosition);
/** adds a new section at position _nPosition.
If the section is <NULL/> nothing happens.
@@ -190,23 +190,23 @@ namespace rptui
*/
void addSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
,const ::rtl::OUString& _sColorEntry
- ,USHORT _nPosition = USHRT_MAX);
+ ,sal_uInt16 _nPosition = USHRT_MAX);
- USHORT getSectionCount() const;
+ sal_uInt16 getSectionCount() const;
/** return the section at the given position
*
* \param _nPos
* \return the section at this pos or an empty section
*/
- ::boost::shared_ptr<OSectionWindow> getSectionWindow(const USHORT _nPos) const;
+ ::boost::shared_ptr<OSectionWindow> getSectionWindow(const sal_uInt16 _nPos) const;
/** turns the grid on or off
*
* \param _bVisible
*/
void toggleGrid(sal_Bool _bVisible);
- void setGridSnap(BOOL bOn);
- void setDragStripes(BOOL bOn);
+ void setGridSnap(sal_Bool bOn);
+ void setDragStripes(sal_Bool bOn);
/** returns the total accumulated height of all sections until _pSection is reached
*/
@@ -214,7 +214,7 @@ namespace rptui
inline bool empty() const { return m_aSections.empty(); }
void SetMode( DlgEdMode m_eMode );
- void SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString());
+ void SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString());
rtl::OUString GetInsertObjString() const;
/** copies the current selection in this section
*/
@@ -224,7 +224,7 @@ namespace rptui
*
* \return <TRUE/> if paste is allowed
*/
- BOOL IsPasteAllowed() const;
+ sal_Bool IsPasteAllowed() const;
/** paste a new control in this section
*/
@@ -241,7 +241,7 @@ namespace rptui
/** returns <TRUE/> when a object is marked
*/
- BOOL HasSelection() const;
+ sal_Bool HasSelection() const;
/** unmark all objects on the views without the given one.
*
@@ -293,7 +293,7 @@ namespace rptui
/** returns the current position in the list
*/
- USHORT getPosition(const OSectionWindow* _pSectionWindow = NULL) const;
+ sal_uInt16 getPosition(const OSectionWindow* _pSectionWindow = NULL) const;
/** calls on every section BrkAction
*
@@ -309,12 +309,12 @@ namespace rptui
bool isObjectInMyTempList(SdrObject *);
public:
void BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionView* _pSection);
- void EndDragObj(BOOL _bDragIntoNewSection,const OSectionView* _pSection,const Point& _aPnt);
+ void EndDragObj(sal_Bool _bDragIntoNewSection,const OSectionView* _pSection,const Point& _aPnt);
void EndAction();
void ForceMarkedToAnotherPage();
- BOOL IsAction() const;
- BOOL IsDragObj() const;
+ sal_Bool IsAction() const;
+ sal_Bool IsDragObj() const;
void handleKey(const KeyCode& _rCode);
void stopScrollTimer();
diff --git a/reportdesign/source/ui/inc/dlgedfunc.hxx b/reportdesign/source/ui/inc/dlgedfunc.hxx
index 4300beaf4d16..2ac110a70396 100644
--- a/reportdesign/source/ui/inc/dlgedfunc.hxx
+++ b/reportdesign/source/ui/inc/dlgedfunc.hxx
@@ -94,9 +94,9 @@ public:
DlgEdFunc( OReportSection* pParent );
virtual ~DlgEdFunc();
- virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
- virtual BOOL MouseButtonUp( const MouseEvent& rMEvt );
- virtual BOOL MouseMove( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseMove( const MouseEvent& rMEvt );
/** checks if the keycode is known by the child windows
@param _rCode the keycode
@@ -135,9 +135,9 @@ public:
DlgEdFuncInsert( OReportSection* pParent );
~DlgEdFuncInsert();
- virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
- virtual BOOL MouseButtonUp( const MouseEvent& rMEvt );
- virtual BOOL MouseMove( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseMove( const MouseEvent& rMEvt );
};
//============================================================================
@@ -150,11 +150,11 @@ public:
DlgEdFuncSelect( OReportSection* pParent );
~DlgEdFuncSelect();
- virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
- virtual BOOL MouseButtonUp( const MouseEvent& rMEvt );
- virtual BOOL MouseMove( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseMove( const MouseEvent& rMEvt );
- void SetInEditMode(SdrTextObj* _pTextObj,const MouseEvent& rMEvt, BOOL bQuickDrag);
+ void SetInEditMode(SdrTextObj* _pTextObj,const MouseEvent& rMEvt, sal_Bool bQuickDrag);
};
}
diff --git a/reportdesign/source/ui/inc/dlgpage.hxx b/reportdesign/source/ui/inc/dlgpage.hxx
index fb1a01e42301..4f713dad90ef 100644
--- a/reportdesign/source/ui/inc/dlgpage.hxx
+++ b/reportdesign/source/ui/inc/dlgpage.hxx
@@ -46,7 +46,7 @@ private:
void operator =(const ORptPageDialog&);
public:
- ORptPageDialog( Window* pParent, const SfxItemSet* pAttr,USHORT _nPageId);
+ ORptPageDialog( Window* pParent, const SfxItemSet* pAttr,sal_uInt16 _nPageId);
virtual ~ORptPageDialog() {}
};
// =============================================================================
diff --git a/reportdesign/source/ui/inc/metadata.hxx b/reportdesign/source/ui/inc/metadata.hxx
index 727cd5bb1c62..2d0b49f74640 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 c14b1db3f278..8c991d7d408c 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 368aa7cac239..7701c91e83d4 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();
}
@@ -231,8 +234,8 @@ namespace rptui
const struct
{
const sal_Char* programmaticName;
- USHORT uiNameResId;
- sal_uInt32 helpId;
+ sal_uInt16 uiNameResId;
+ 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 f816433b17f4..2b94db8fad18 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"
@@ -779,12 +779,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;
@@ -799,7 +799,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;
}
@@ -826,12 +826,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 afd709b0e77a..87e1f006c177 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 5915362f753e..4d53bca64388 100644
--- a/reportdesign/source/ui/inspection/metadata.cxx
+++ b/reportdesign/source/ui/inspection/metadata.cxx
@@ -30,7 +30,7 @@
#include <svtools/localresaccess.hxx>
#include "com/sun/star/inspection/XPropertyHandler.hpp"
#include <tools/debug.hxx>
-#include <cppuhelper/extract.hxx>
+#include <comphelper/extract.hxx>
#include "helpids.hrc"
#include "RptResId.hrc"
#include "uistrings.hrc"
@@ -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 e6d9403786b2..0f8787a07dd1 100644
--- a/reportdesign/source/ui/misc/FunctionHelper.cxx
+++ b/reportdesign/source/ui/misc/FunctionHelper.cxx
@@ -199,10 +199,10 @@ xub_StrLen FunctionDescription::getSuppressedArgumentCount() const
return sFormula;
}
// -----------------------------------------------------------------------------
-void FunctionDescription::fillVisibleArgumentMapping(::std::vector<USHORT>& _rArguments) const
+void FunctionDescription::fillVisibleArgumentMapping(::std::vector<sal_uInt16>& _rArguments) const
{
const sal_Int32 nCount = m_aParameter.getLength();
- for(USHORT i = 0;i < nCount; ++i)
+ for(sal_uInt16 i = 0;i < nCount; ++i)
{
_rArguments.push_back(i);
}
@@ -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/Undo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx
index 249bac85b1b0..dbf35bcb409f 100644
--- a/reportdesign/source/ui/misc/Undo.cxx
+++ b/reportdesign/source/ui/misc/RptUndo.cxx
@@ -27,15 +27,16 @@
************************************************************************/
#include "precompiled_reportdesign.hxx"
-#include "Undo.hxx"
+#include "RptUndo.hxx"
#include "uistrings.hrc"
#include "rptui_slotid.hrc"
#include "UITools.hxx"
+#include "UndoEnv.hxx"
+
#include <dbaccess/IController.hxx>
#include <com/sun/star/report/XSection.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include "UndoEnv.hxx"
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/awt/Size.hpp>
#include <svx/unoshape.hxx>
@@ -124,7 +125,7 @@ DBG_NAME(rpt_OSectionUndo)
OSectionUndo::OSectionUndo(OReportModel& _rMod
,sal_uInt16 _nSlot
,Action _eAction
- ,USHORT nCommentID)
+ ,sal_uInt16 nCommentID)
: OCommentUndoAction(_rMod,nCommentID)
,m_eAction(_eAction)
,m_nSlot(_nSlot)
@@ -234,7 +235,7 @@ OReportSectionUndo::OReportSectionUndo(OReportModel& _rMod,sal_uInt16 _nSlot
,OReportHelper> _pMemberFunction
,const uno::Reference< report::XReportDefinition >& _xReport
,Action _eAction
- ,USHORT nCommentID)
+ ,sal_uInt16 nCommentID)
: OSectionUndo(_rMod,_nSlot,_eAction,nCommentID)
,m_aReportHelper(_xReport)
,m_pMemberFunction(_pMemberFunction)
@@ -273,7 +274,7 @@ OGroupSectionUndo::OGroupSectionUndo(OReportModel& _rMod,sal_uInt16 _nSlot
,OGroupHelper> _pMemberFunction
,const uno::Reference< report::XGroup >& _xGroup
,Action _eAction
- ,USHORT nCommentID)
+ ,sal_uInt16 nCommentID)
: OSectionUndo(_rMod,_nSlot,_eAction,nCommentID)
,m_aGroupHelper(_xGroup)
,m_pMemberFunction(_pMemberFunction)
@@ -339,7 +340,7 @@ void OGroupSectionUndo::implReRemove( )
TYPEINIT1( OGroupUndo, OCommentUndoAction );
//----------------------------------------------------------------------------
OGroupUndo::OGroupUndo(OReportModel& _rMod
- ,USHORT nCommentID
+ ,sal_uInt16 nCommentID
,Action _eAction
,const uno::Reference< report::XGroup>& _xGroup
,const uno::Reference< report::XReportDefinition >& _xReportDefinition)
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 1676aa21ae59..d3ef4c175980 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -207,7 +207,7 @@ void adjustSectionName(const uno::Reference< report::XGroup >& _xGroup,sal_Int32
namespace
{
// -------------------------------------------------------------------------
- Font lcl_getReportControlFont( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat, awt::FontDescriptor& _out_rControlFont ,USHORT _nWichFont)
+ Font lcl_getReportControlFont( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat, awt::FontDescriptor& _out_rControlFont ,sal_uInt16 _nWichFont)
{
if ( !_rxReportControlFormat.is() )
throw uno::RuntimeException();
@@ -231,14 +231,14 @@ namespace
}
// -------------------------------------------------------------------------
- Font lcl_getReportControlFont( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,USHORT _nWhich )
+ Font lcl_getReportControlFont( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,sal_uInt16 _nWhich )
{
awt::FontDescriptor aAwtFont;
return lcl_getReportControlFont( _rxReportControlFormat, aAwtFont, _nWhich );
}
// -------------------------------------------------------------------------
const Font lcl_setFont(const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,
- SfxItemSet& _rItemSet,USHORT _nWhich,USHORT _nFont, USHORT _nFontHeight,USHORT _nLanguage,USHORT _nPosture, USHORT _nWeight)
+ SfxItemSet& _rItemSet,sal_uInt16 _nWhich,sal_uInt16 _nFont, sal_uInt16 _nFontHeight,sal_uInt16 _nLanguage,sal_uInt16 _nPosture, sal_uInt16 _nWeight)
{
// fill it
awt::FontDescriptor aControlFont;
@@ -383,7 +383,7 @@ namespace
// -------------------------------------------------------------------------
void lcl_initAwtFont( const Font& _rOriginalFont, const SfxItemSet& _rItemSet, awt::FontDescriptor& _out_rAwtFont,
- USHORT _nFont, USHORT _nFontHeight,USHORT _nPosture, USHORT _nWeight)
+ sal_uInt16 _nFont, sal_uInt16 _nFontHeight,sal_uInt16 _nPosture, sal_uInt16 _nWeight)
{
Font aNewFont( _rOriginalFont );
const SfxPoolItem* pItem( NULL );
@@ -543,7 +543,7 @@ namespace
lcl_pushBack( _out_rProperties, PROPERTY_CHARCASEMAP, uno::makeAny( pFontItem->GetValue() ) );
}
struct Items {
- USHORT nWhich;
+ sal_uInt16 nWhich;
::rtl::OUString sPropertyName;
};
const Items pItems[] = { {ITEMID_LANGUAGE,PROPERTY_CHARLOCALE}
@@ -666,9 +666,9 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
new SvxPostureItem(ITALIC_NONE,ITEMID_POSTURE),
new SvxWeightItem(WEIGHT_NORMAL,ITEMID_WEIGHT),
- new SvxShadowedItem(FALSE,ITEMID_SHADOWED),
- new SvxWordLineModeItem(FALSE,ITEMID_WORDLINEMODE),
- new SvxContourItem(FALSE,ITEMID_CONTOUR),
+ new SvxShadowedItem(sal_False,ITEMID_SHADOWED),
+ new SvxWordLineModeItem(sal_False,ITEMID_WORDLINEMODE),
+ new SvxContourItem(sal_False,ITEMID_CONTOUR),
new SvxCrossedOutItem(STRIKEOUT_NONE,ITEMID_CROSSEDOUT),
new SvxUnderlineItem(UNDERLINE_NONE,ITEMID_UNDERLINE),
@@ -677,15 +677,15 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
new SvxCaseMapItem(SVX_CASEMAP_NOT_MAPPED,ITEMID_CASEMAP),
new SvxEscapementItem(ITEMID_ESCAPEMENT),
new SvxFontListItem(pFontList.get(),ITEMID_FONTLIST),
- new SvxAutoKernItem(FALSE,ITEMID_AUTOKERN),
+ new SvxAutoKernItem(sal_False,ITEMID_AUTOKERN),
new SvxColorTableItem(pColorTable.get(),ITEMID_COLOR_TABLE),
- new SvxBlinkItem(FALSE,ITEMID_BLINK),
+ new SvxBlinkItem(sal_False,ITEMID_BLINK),
new SvxEmphasisMarkItem(EMPHASISMARK_NONE,ITEMID_EMPHASISMARK),
- new SvxTwoLinesItem(TRUE,0,0,ITEMID_TWOLINES),
+ new SvxTwoLinesItem(sal_True,0,0,ITEMID_TWOLINES),
new SvxCharRotateItem(0,sal_False,ITEMID_CHARROTATE),
new SvxCharScaleWidthItem(100,ITEMID_CHARSCALE_W),
new SvxCharReliefItem(RELIEF_NONE,ITEMID_CHARRELIEF),
- new SvxCharHiddenItem(FALSE,ITEMID_CHARHIDDEN),
+ new SvxCharHiddenItem(sal_False,ITEMID_CHARHIDDEN),
new SvxBrushItem(ITEMID_BRUSH),
new SvxHorJustifyItem(ITEMID_HORJUSTIFY),
new SvxVerJustifyItem(ITEMID_VERJUSTIFY),
@@ -706,7 +706,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
OSL_ASSERT((SAL_N_ELEMENTS(pDefaults)) == (SAL_N_ELEMENTS(aItemInfos)));
- static USHORT pRanges[] =
+ static sal_uInt16 pRanges[] =
{
ITEMID_FONT,ITEMID_WEIGHT_COMPLEX,
0
diff --git a/reportdesign/source/ui/misc/makefile.mk b/reportdesign/source/ui/misc/makefile.mk
index b12bafdc7760..494b68023d62 100644
--- a/reportdesign/source/ui/misc/makefile.mk
+++ b/reportdesign/source/ui/misc/makefile.mk
@@ -44,7 +44,7 @@ VISIBILITY_HIDDEN=TRUE
# ... object files ............................
EXCEPTIONSFILES= \
- $(SLO)$/Undo.obj \
+ $(SLO)$/RptUndo.obj \
$(SLO)$/ColorListener.obj \
$(SLO)$/UITools.obj \
$(SLO)$/rptuiservices.obj \
diff --git a/reportdesign/source/ui/misc/rptuiservices.cxx b/reportdesign/source/ui/misc/rptuiservices.cxx
index ee0fc6512c32..61d1b20ab432 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/misc/statusbarcontroller.cxx b/reportdesign/source/ui/misc/statusbarcontroller.cxx
index ed8891c95d7d..2de27a2217c4 100644
--- a/reportdesign/source/ui/misc/statusbarcontroller.cxx
+++ b/reportdesign/source/ui/misc/statusbarcontroller.cxx
@@ -100,10 +100,10 @@ void SAL_CALL OStatusbarController::initialize( const Sequence< Any >& _rArgumen
StatusBar* pStatusBar = static_cast<StatusBar*>(VCLUnoHelper::GetWindow(m_xParentWindow));
if ( pStatusBar )
{
- const USHORT nCount = pStatusBar->GetItemCount();
- for (USHORT nPos = 0; nPos < nCount; ++nPos)
+ const sal_uInt16 nCount = pStatusBar->GetItemCount();
+ for (sal_uInt16 nPos = 0; nPos < nCount; ++nPos)
{
- const USHORT nItemId = pStatusBar->GetItemId(nPos);
+ const sal_uInt16 nItemId = pStatusBar->GetItemId(nPos);
if ( pStatusBar->GetItemCommand(nItemId) == String(m_aCommandURL) )
{
m_nId = nItemId;
diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx
index c510c40b8a02..016573d21c01 100644
--- a/reportdesign/source/ui/misc/toolboxcontroller.cxx
+++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx
@@ -149,10 +149,10 @@ void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments
ToolBox* pToolBox = static_cast<ToolBox*>(VCLUnoHelper::GetWindow(getParent()));
if ( pToolBox )
{
- const USHORT nCount = pToolBox->GetItemCount();
- for (USHORT nPos = 0; nPos < nCount; ++nPos)
+ const sal_uInt16 nCount = pToolBox->GetItemCount();
+ for (sal_uInt16 nPos = 0; nPos < nCount; ++nPos)
{
- const USHORT nItemId = pToolBox->GetItemId(nPos);
+ const sal_uInt16 nItemId = pToolBox->GetItemId(nPos);
if ( pToolBox->GetItemCommand(nItemId) == String(m_aCommandURL) )
{
m_nToolBoxId = nItemId;
@@ -231,9 +231,9 @@ void SAL_CALL OToolboxController::statusChanged( const FeatureStateEvent& Event
sal_Bool bCheckmark = sal_False;
//m_pToolbarController->GetToolBox().Enable(Event.IsEnabled);
ToolBox& rTb = m_pToolbarController->GetToolBox();
- for ( USHORT i = 0; i < rTb.GetItemCount(); i++ )
+ for ( sal_uInt16 i = 0; i < rTb.GetItemCount(); i++ )
{
- USHORT nId = rTb.GetItemId( i );
+ sal_uInt16 nId = rTb.GetItemId( i );
if ( nId == 0 )
continue;
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index e5745382053a..b8791bc294ff 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -114,20 +114,20 @@ public:
long nReportSize = GetItemSize( REPORT_ID );
long nTaskPaneSize = GetItemSize( TASKPANE_ID );
- BOOL bMod = FALSE;
+ sal_Bool bMod = sal_False;
if( nReportSize < nReportMinSplitSize )
{
nReportSize = nReportMinSplitSize;
nTaskPaneSize = 99 - nReportMinSplitSize;
- bMod = TRUE;
+ bMod = sal_True;
}
else if( nTaskPaneSize < nTaskPaneMinSplitSize )
{
nTaskPaneSize = nTaskPaneMinSplitSize;
nReportSize = 99 - nTaskPaneMinSplitSize;
- bMod = TRUE;
+ bMod = sal_True;
}
if( bMod )
@@ -156,12 +156,12 @@ ODesignView::ODesignView( Window* pParent,
,m_eMode( RPTUI_SELECT )
,m_nCurrentPosition(USHRT_MAX)
,m_eActObj( OBJ_NONE )
- ,m_bFirstDraw(FALSE)
+ ,m_bFirstDraw(sal_False)
,m_aGridSizeCoarse( 1000, 1000 ) // #i93595# 100TH_MM changed to grid using coarse 1 cm grid
,m_aGridSizeFine( 250, 250 ) // and a 0,25 cm subdivision for better visualisation
- ,m_bGridVisible(TRUE)
- ,m_bGridSnap(TRUE)
- ,m_bDeleted( FALSE )
+ ,m_bGridVisible(sal_True)
+ ,m_bGridSnap(sal_True)
+ ,m_bDeleted( sal_False )
{
DBG_CTOR( rpt_ODesignView,NULL);
SetHelpId(UID_RPT_RPT_APP_VIEW);
@@ -189,7 +189,7 @@ ODesignView::ODesignView( Window* pParent,
ODesignView::~ODesignView()
{
DBG_DTOR( rpt_ODesignView,NULL);
- m_bDeleted = TRUE;
+ m_bDeleted = sal_True;
Hide();
m_aScrollWindow.Hide();
m_aMarkTimer.Stop();
@@ -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);
@@ -246,6 +246,12 @@ long ODesignView::PreNotify( NotifyEvent& rNEvt )
switch(rNEvt.GetType())
{
case EVENT_KEYINPUT:
+ if ( (m_pPropWin && m_pPropWin->HasChildPathFocus()) )
+ return 0L;
+ if ( (m_pAddField && m_pAddField->HasChildPathFocus()) )
+ return 0L;
+ if ( (m_pReportExplorer && m_pReportExplorer->HasChildPathFocus()) )
+ return 0L;
{
const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
if ( handleKeyEvent(*pKeyEvent) )
@@ -355,7 +361,7 @@ void ODesignView::SetMode( DlgEdMode _eNewMode )
m_aScrollWindow.SetMode(_eNewMode);
}
//----------------------------------------------------------------------------
-void ODesignView::SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType )
+void ODesignView::SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType )
{
m_eActObj = eObj;
m_aScrollWindow.SetInsertObj( eObj,_sShapeType );
@@ -367,7 +373,7 @@ rtl::OUString ODesignView::GetInsertObjString() const
}
//----------------------------------------------------------------------------
-USHORT ODesignView::GetInsertObj() const
+sal_uInt16 ODesignView::GetInsertObj() const
{
return m_eActObj;
}
@@ -398,13 +404,13 @@ void ODesignView::Delete()
m_aScrollWindow.Delete();
}
//----------------------------------------------------------------------------
-BOOL ODesignView::HasSelection() const
+sal_Bool ODesignView::HasSelection() const
{
return m_aScrollWindow.HasSelection();
}
//----------------------------------------------------------------------------
-BOOL ODesignView::IsPasteAllowed() const
+sal_Bool ODesignView::IsPasteAllowed() const
{
return m_aScrollWindow.IsPasteAllowed();
}
@@ -432,7 +438,7 @@ void ODesignView::toggleGrid(sal_Bool _bGridVisible)
m_aScrollWindow.toggleGrid(_bGridVisible);
}
//----------------------------------------------------------------------------
-USHORT ODesignView::getSectionCount() const
+sal_uInt16 ODesignView::getSectionCount() const
{
return m_aScrollWindow.getSectionCount();
}
@@ -442,12 +448,12 @@ void ODesignView::showRuler(sal_Bool _bShow)
m_aScrollWindow.showRuler(_bShow);
}
//----------------------------------------------------------------------------
-void ODesignView::removeSection(USHORT _nPosition)
+void ODesignView::removeSection(sal_uInt16 _nPosition)
{
m_aScrollWindow.removeSection(_nPosition);
}
//----------------------------------------------------------------------------
-void ODesignView::addSection(const uno::Reference< report::XSection >& _xSection,const ::rtl::OUString& _sColorEntry,USHORT _nPosition)
+void ODesignView::addSection(const uno::Reference< report::XSection >& _xSection,const ::rtl::OUString& _sColorEntry,sal_uInt16 _nPosition)
{
m_aScrollWindow.addSection(_xSection,_sColorEntry,_nPosition);
}
@@ -543,7 +549,7 @@ void ODesignView::showProperties(const uno::Reference< uno::XInterface>& _xRepor
}
}
//-----------------------------------------------------------------------------
-BOOL ODesignView::isReportExplorerVisible() const
+sal_Bool ODesignView::isReportExplorerVisible() const
{
return m_pReportExplorer && m_pReportExplorer->IsVisible();
}
@@ -564,7 +570,7 @@ void ODesignView::toggleReportExplorer()
m_pReportExplorer->Show(!m_pReportExplorer->IsVisible());
}
//-----------------------------------------------------------------------------
-BOOL ODesignView::isAddFieldVisible() const
+sal_Bool ODesignView::isAddFieldVisible() const
{
return m_pAddField && m_pAddField->IsVisible();
}
@@ -591,7 +597,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();
@@ -729,13 +735,13 @@ void ODesignView::fillControlModelSelection(::std::vector< uno::Reference< uno::
m_aScrollWindow.fillControlModelSelection(_rSelection);
}
// -----------------------------------------------------------------------------
-void ODesignView::setGridSnap(BOOL bOn)
+void ODesignView::setGridSnap(sal_Bool bOn)
{
m_aScrollWindow.setGridSnap(bOn);
}
// -----------------------------------------------------------------------------
-void ODesignView::setDragStripes(BOOL bOn)
+void ODesignView::setDragStripes(sal_Bool bOn)
{
m_aScrollWindow.setDragStripes(bOn);
}
diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx
index 92b6b716860f..77fb99286993 100644
--- a/reportdesign/source/ui/report/EndMarker.cxx
+++ b/reportdesign/source/ui/report/EndMarker.cxx
@@ -47,7 +47,7 @@ OEndMarker::OEndMarker(Window* _pParent ,const ::rtl::OUString& _sColorEntry)
DBG_CTOR( rpt_OEndMarker,NULL);
SetUniqueId(HID_RPT_ENDMARKER);
ImplInitSettings();
- SetPaintTransparent(TRUE);
+ SetPaintTransparent(sal_True);
}
// -----------------------------------------------------------------------------
OEndMarker::~OEndMarker()
@@ -69,14 +69,14 @@ void OEndMarker::Paint( const Rectangle& /*rRect*/ )
Color aStartColor(m_nColor);
aStartColor.IncreaseLuminance(10);
- USHORT nHue = 0;
- USHORT nSat = 0;
- USHORT nBri = 0;
+ sal_uInt16 nHue = 0;
+ sal_uInt16 nSat = 0;
+ sal_uInt16 nBri = 0;
aStartColor.RGBtoHSB(nHue, nSat, nBri);
nSat += 40;
Color aEndColor(Color::HSBtoRGB(nHue, nSat, nBri));
Gradient aGradient(GRADIENT_LINEAR,aStartColor,aEndColor);
- aGradient.SetSteps(static_cast<USHORT>(aSize.Height()));
+ aGradient.SetSteps(static_cast<sal_uInt16>(aSize.Height()));
DrawGradient(PixelToLogic(aPoly) ,aGradient);
if ( m_bMarked )
diff --git a/reportdesign/source/ui/report/FixedTextColor.cxx b/reportdesign/source/ui/report/FixedTextColor.cxx
index d493d06c1ead..2d6555dff6bc 100644
--- a/reportdesign/source/ui/report/FixedTextColor.cxx
+++ b/reportdesign/source/ui/report/FixedTextColor.cxx
@@ -179,7 +179,7 @@ namespace rptui
if ( xSection.is() )
{
OReportPage *pPage = pModel->getPage(xSection);
- ULONG nIndex = pPage->getIndexOf(_xFixedText.get());
+ sal_uLong nIndex = pPage->getIndexOf(_xFixedText.get());
if (nIndex < pPage->GetObjCount() )
{
SdrObject *pObject = pPage->GetObj(nIndex);
diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
index b35c0adb0799..f7529c94bce8 100644
--- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
+++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
@@ -180,7 +180,7 @@ namespace rptui
if ( xSection.is() )
{
OReportPage *pPage = pModel->getPage(xSection);
- ULONG nIndex = pPage->getIndexOf(_xComponent);
+ sal_uLong nIndex = pPage->getIndexOf(_xComponent);
if (nIndex < pPage->GetObjCount() )
{
SdrObject *pObject = pPage->GetObj(nIndex);
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 6259f195f4eb..35ab7350f7cd 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -100,6 +100,7 @@
#include <com/sun/star/sdb/SQLContext.hpp>
#include <com/sun/star/sdbc/SQLWarning.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/document/XUndoManagerSupplier.hpp>
#include <vcl/svapp.hxx>
#include <vcl/msgbox.hxx>
@@ -127,7 +128,7 @@
#include "DesignView.hxx"
#include "ModuleHelper.hxx"
#include "RptObject.hxx"
-#include "Undo.hxx"
+#include "RptUndo.hxx"
#include "uistrings.hrc"
#include "RptDef.hxx"
#include "ReportSection.hxx"
@@ -153,10 +154,12 @@
#include <toolkit/helper/vclunohelper.hxx>
#include "UndoEnv.hxx"
#include "InsertFunctions.hxx"
+#include "ReportControllerObserver.hxx"
#include <boost/mem_fn.hpp>
#include <boost/bind.hpp>
#include <boost/utility.hpp>
+#include <boost/scoped_ptr.hpp>
#include <cppuhelper/exc_hlp.hxx>
#include <unotools/confignode.hxx>
@@ -164,7 +167,7 @@
#include <ReportControllerObserver.hxx>
-#define MAX_ROWS_FOR_PREVIEW 50
+#define MAX_ROWS_FOR_PREVIEW 20
using namespace ::com::sun::star;
using namespace uno;
@@ -247,12 +250,15 @@ void lcl_getReportControlFormat(const Sequence< PropertyValue >& aArgs,
xReportControlFormat = aMap.getUnpackedValueOrDefault(REPORTCONTROLFORMAT,uno::Reference< report::XReportControlFormat>());
_xWindow = aMap.getUnpackedValueOrDefault(CURRENT_WINDOW,uno::Reference< awt::XWindow>());
}
+
if ( !xReportControlFormat.is() )
{
_pView->fillControlModelSelection(_rControlsFormats);
}
else
+ {
_rControlsFormats.push_back(xReportControlFormat);
+ }
if ( !_xWindow.is() )
_xWindow = VCLUnoHelper::GetInterface(_pView);
@@ -372,14 +378,15 @@ void OReportController::disposing()
pSectionWindow = getDesignView()->getMarkedSection();
if ( pSectionWindow )
pSectionWindow->getReportSection().deactivateOle();
- getUndoMgr()->Clear(); // clear all undo redo things
+ clearUndoManager();
if ( m_aReportModel )
listen(false);
m_pReportControllerObserver->Clear();
m_pReportControllerObserver->release();
}
- catch(uno::Exception&)
+ catch ( const uno::Exception& )
{
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -456,8 +463,20 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
break;
case SID_REDO:
case SID_UNDO:
- aReturn = OReportController_BASE::GetState(_nId);
- aReturn.bEnabled = aReturn.bEnabled;
+ {
+ size_t ( SfxUndoManager::*retrieveCount )( bool const ) const =
+ ( _nId == SID_UNDO ) ? &SfxUndoManager::GetUndoActionCount : &SfxUndoManager::GetRedoActionCount;
+
+ SfxUndoManager& rUndoManager( getUndoManager() );
+ aReturn.bEnabled = ( rUndoManager.*retrieveCount )( ::svl::IUndoManager::TopLevel ) > 0;
+ if ( aReturn.bEnabled )
+ {
+ // TODO: add "Undo/Redo: prefix"
+ String ( SfxUndoManager::*retrieveComment )( size_t, bool const ) const =
+ ( _nId == SID_UNDO ) ? &SfxUndoManager::GetUndoActionComment : &SfxUndoManager::GetRedoActionComment;
+ aReturn.sTitle = (rUndoManager.*retrieveComment)( 0, ::svl::IUndoManager::TopLevel );
+ }
+ }
break;
case SID_OBJECT_RESIZING:
case SID_OBJECT_SMALLESTWIDTH:
@@ -562,7 +581,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
case SID_EXPAND_SECTION:
case SID_NEXT_MARK:
case SID_PREV_MARK:
- aReturn.bEnabled = isEditable();
+ aReturn.bEnabled = isEditable() && !getDesignView()->isHandleEvent(_nId);
break;
case SID_SELECT:
case SID_SELECT_REPORT:
@@ -981,37 +1000,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)
{
@@ -1051,9 +1040,12 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
case SID_REDO:
case SID_UNDO:
{
- // We would like to know if we are in undo mode
const OXUndoEnvironment::OUndoMode aLock( m_aReportModel->GetUndoEnv() );
- OReportController_BASE::Execute( _nId, aArgs );
+ sal_Bool ( SfxUndoManager::*doXDo )() =
+ ( _nId == SID_UNDO ) ? &SfxUndoManager::Undo : &SfxUndoManager::Redo;
+
+ SfxUndoManager& rUndoManager( getUndoManager() );
+ (rUndoManager.*doXDo)();
InvalidateAll();
updateFloater();
}
@@ -1191,7 +1183,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
uno::Reference< report::XFunctions> xFunctions(xFunction->getParent(),uno::UNO_QUERY_THROW);
sal_Int32 nIndex = getPositionInIndexAccess(xFunctions.get(),xFunction);
const String sUndoAction = String((ModuleRes(RID_STR_UNDO_REMOVE_FUNCTION)));
- UndoManagerListAction aListAction(m_aUndoManager,sUndoAction);
+ UndoContext aUndoContext( getUndoManager(), sUndoAction );
xFunctions->removeByIndex(nIndex);
select(uno::makeAny(xFunctions->getParent()));
InvalidateFeature( SID_SAVEDOC );
@@ -1469,19 +1461,16 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
case SID_ATTR_CHAR_POSTURE:
case SID_ATTR_CHAR_UNDERLINE:
{
- ::std::auto_ptr<UndoManagerListAction> pListAction;
uno::Reference< awt::XWindow> xWindow;
::std::vector< uno::Reference< uno::XInterface > > aControlsFormats;
lcl_getReportControlFormat( aArgs, getDesignView(), xWindow, aControlsFormats );
- bool bMulti = aControlsFormats.size() > 1;
+
+ const String sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEFONT));
+ UndoContext aUndoContext( getUndoManager(), sUndoAction );
+
::std::vector< uno::Reference< uno::XInterface > >::iterator aIter = aControlsFormats.begin();
for(; aIter != aControlsFormats.end();++aIter)
{
- if ( !pListAction.get() && bMulti)
- {
- const String sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEFONT));
- pListAction.reset(new UndoManagerListAction(m_aUndoManager,sUndoAction));
- }
uno::Reference< report::XReportControlFormat> xReportControlFormat(*aIter,uno::UNO_QUERY);
lcl_setFontWPU_nothrow(xReportControlFormat,_nId);
}
@@ -1545,28 +1534,35 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
break;
case SID_CHAR_DLG:
{
- ::std::auto_ptr<UndoManagerListAction> pListAction;
uno::Sequence< beans::NamedValue > aSettings;
uno::Reference< awt::XWindow> xWindow;
::std::vector< uno::Reference< uno::XInterface > > aControlsFormats;
lcl_getReportControlFormat( aArgs, getDesignView(), xWindow, aControlsFormats );
- ::std::vector< uno::Reference< uno::XInterface > >::iterator aIter = aControlsFormats.begin();
- for(; aIter != aControlsFormats.end();++aIter)
+
+ if ( !aControlsFormats.empty() )
{
- uno::Reference< report::XReportControlFormat > xFormat(*aIter,uno::UNO_QUERY);
- if ( xFormat.is() )
+ const String sUndoAction( ModuleRes( RID_STR_UNDO_CHANGEFONT ) );
+ UndoContext aUndoContext( getUndoManager(), sUndoAction );
+
+ ::std::vector< uno::Reference< uno::XInterface > >::iterator aIter = aControlsFormats.begin();
+ for(; aIter != aControlsFormats.end();++aIter)
{
- if ( !pListAction.get() )
+ uno::Reference< report::XReportControlFormat > xFormat( *aIter, uno::UNO_QUERY );
+ if ( !xFormat.is() )
+ continue;
+
+ if ( aSettings.getLength() == 0 )
{
- const String sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEFONT));
- pListAction.reset(new UndoManagerListAction(m_aUndoManager,sUndoAction));
- rptui::openCharDialog(xFormat,xWindow,aSettings);
+ ::rptui::openCharDialog( xFormat, xWindow, aSettings );
+ if ( aSettings.getLength() == 0 )
+ break;
}
+
applyCharacterSettings( xFormat, aSettings );
}
- }
- if ( !aControlsFormats.empty() )
+
InvalidateAll();
+ }
}
break;
case SID_INSERT_GRAPHIC:
@@ -1670,6 +1666,7 @@ short OReportController::saveModified()
{
return RET_NO;
}
+
// -----------------------------------------------------------------------------
void OReportController::impl_initialize( )
{
@@ -1686,10 +1683,14 @@ void OReportController::impl_initialize( )
if ( m_xReportDefinition.is() )
{
getView()->initialize(); // show the windows and fill with our informations
- getUndoMgr()->Clear(); // clear all undo redo things
- getSdrModel();
+
+ m_aReportModel = reportdesign::OReportDefinition::getSdrModel(m_xReportDefinition);
if ( !m_aReportModel )
- throw Exception();
+ throw RuntimeException();
+ m_aReportModel->attachController( *this );
+
+ clearUndoManager();
+ UndoSuppressor aSuppressUndo( getUndoManager() );
::comphelper::NamedValueCollection aArgs(getModel()->getArgs());
setMode(aArgs.getOrDefault("Mode", ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("normal"))));
@@ -1766,7 +1767,7 @@ void OReportController::impl_initialize( )
}
catch(const SQLException&)
{
- OSL_ENSURE(sal_False, "OReportController::initialize: caught an exception!");
+ DBG_UNHANDLED_EXCEPTION();
}
}
// -----------------------------------------------------------------------------
@@ -1837,7 +1838,7 @@ sal_Bool SAL_CALL OReportController::suspend(sal_Bool /*_bSuspend*/) throw( Runt
// -----------------------------------------------------------------------------
void OReportController::describeSupportedFeatures()
{
- OSingleDocumentController::describeSupportedFeatures();
+ DBSubComponentController::describeSupportedFeatures();
implDescribeSupportedFeature( ".uno:TextDocument", SID_RPT_TEXTDOCUMENT, CommandGroup::APPLICATION );
implDescribeSupportedFeature( ".uno:Spreadsheet", SID_RPT_SPREADSHEET, CommandGroup::APPLICATION );
@@ -2097,18 +2098,13 @@ void OReportController::describeSupportedFeatures()
implDescribeSupportedFeature( ".uno:ExpandSection", SID_EXPAND_SECTION);
}
// -----------------------------------------------------------------------------
-SfxUndoManager* OReportController::getUndoMgr()
-{
- return &m_aUndoManager;
-}
-// -----------------------------------------------------------------------------
void OReportController::impl_onModifyChanged()
{
try
{
if ( m_xReportDefinition.is() )
m_xReportDefinition->setModified( impl_isModified() );
- OSingleDocumentController::impl_onModifyChanged();
+ DBSubComponentController::impl_onModifyChanged();
}
catch(uno::Exception)
{
@@ -2116,14 +2112,6 @@ void OReportController::impl_onModifyChanged()
}
}
// -----------------------------------------------------------------------------
-void OReportController::losingConnection( )
-{
- // let the base class do it's reconnect
- OReportController_BASE::losingConnection( );
-
- InvalidateAll();
-}
-// -----------------------------------------------------------------------------
void OReportController::onLoadedMenu(const Reference< frame::XLayoutManager >& _xLayoutManager)
{
if ( _xLayoutManager.is() )
@@ -2224,7 +2212,7 @@ void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEven
{
if ( evt.PropertyName.equals( PROPERTY_REPORTHEADERON ) )
{
- const USHORT nPosition = m_xReportDefinition->getPageHeaderOn() ? 1 : 0;
+ const sal_uInt16 nPosition = m_xReportDefinition->getPageHeaderOn() ? 1 : 0;
if ( bShow )
{
getDesignView()->addSection(m_xReportDefinition->getReportHeader(),DBREPORTHEADER,nPosition);
@@ -2237,7 +2225,7 @@ void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEven
}
else if ( evt.PropertyName.equals( PROPERTY_REPORTFOOTERON ) )
{
- USHORT nPosition = getDesignView()->getSectionCount();
+ sal_uInt16 nPosition = getDesignView()->getSectionCount();
if ( m_xReportDefinition->getPageFooterOn() )
--nPosition;
if ( bShow )
@@ -2259,7 +2247,7 @@ void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEven
}
else
{
- getDesignView()->removeSection(USHORT(0));
+ getDesignView()->removeSection(sal_uInt16(0));
}
}
else if ( evt.PropertyName.equals( PROPERTY_PAGEFOOTERON ) )
@@ -2310,16 +2298,17 @@ void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEven
// -----------------------------------------------------------------------------
void SAL_CALL OReportController::disposing( const lang::EventObject& Source ) throw(uno::RuntimeException)
{
+ // simply disambiguate
OReportController_BASE::disposing(Source);
}
// -----------------------------------------------------------------------------
-USHORT lcl_getNonVisbleGroupsBefore( const uno::Reference< report::XGroups>& _xGroups
+sal_uInt16 lcl_getNonVisbleGroupsBefore( const uno::Reference< report::XGroups>& _xGroups
,sal_Int32 _nGroupPos
,::std::mem_fun_t<sal_Bool,OGroupHelper>&_pGroupMemberFunction)
{
uno::Reference< report::XGroup> xGroup;
- USHORT nNonVisibleGroups = 0;
+ sal_uInt16 nNonVisibleGroups = 0;
sal_Int32 nCount = _xGroups->getCount();
for( sal_Int32 i = 0; i < _nGroupPos && i < nCount; ++i)
{
@@ -2337,12 +2326,12 @@ void OReportController::groupChange( const uno::Reference< report::XGroup>& _xGr
::std::mem_fun_t<sal_Bool,OGroupHelper> pMemFun = ::std::mem_fun(&OGroupHelper::getHeaderOn);
::std::mem_fun_t<uno::Reference<report::XSection> , OGroupHelper> pMemFunSection = ::std::mem_fun(&OGroupHelper::getHeader);
::rtl::OUString sColor(DBGROUPHEADER);
- USHORT nPosition = 0;
+ sal_uInt16 nPosition = 0;
bool bHandle = false;
if ( _sPropName.equals( PROPERTY_HEADERON ) )
{
nPosition = m_xReportDefinition->getPageHeaderOn() ? (m_xReportDefinition->getReportHeaderOn() ? 2 : 1) : (m_xReportDefinition->getReportHeaderOn() ? 1 : 0);
- nPosition += (static_cast<USHORT>(_nGroupPos) - lcl_getNonVisbleGroupsBefore(m_xReportDefinition->getGroups(),_nGroupPos,pMemFun));
+ nPosition += (static_cast<sal_uInt16>(_nGroupPos) - lcl_getNonVisbleGroupsBefore(m_xReportDefinition->getGroups(),_nGroupPos,pMemFun));
bHandle = true;
}
else if ( _sPropName.equals( PROPERTY_FOOTERON ) )
@@ -2356,7 +2345,7 @@ void OReportController::groupChange( const uno::Reference< report::XGroup>& _xGr
if ( m_xReportDefinition->getReportFooterOn() )
--nPosition;
sColor = DBGROUPFOOTER;
- nPosition -= (static_cast<USHORT>(_nGroupPos) - lcl_getNonVisbleGroupsBefore(m_xReportDefinition->getGroups(),_nGroupPos,pMemFun));
+ nPosition -= (static_cast<sal_uInt16>(_nGroupPos) - lcl_getNonVisbleGroupsBefore(m_xReportDefinition->getGroups(),_nGroupPos,pMemFun));
if ( !_bShow )
--nPosition;
bHandle = true;
@@ -2380,13 +2369,6 @@ IMPL_LINK( OReportController, OnClipboardChanged, void*, EMPTYARG )
return OnInvalidateClipboard( NULL );
}
//------------------------------------------------------------------------------
-IMPL_LINK( OReportController, NotifyUndoActionHdl, SfxUndoAction*, _pUndoAction )
-{
- OSL_ENSURE(_pUndoAction,"UndoAction is NULL!");
- addUndoActionAndInvalidate(_pUndoAction);
- return 0L;
-}
-//------------------------------------------------------------------------------
IMPL_LINK(OReportController, OnInvalidateClipboard, void*, EMPTYARG)
{
InvalidateFeature(SID_CUT);
@@ -2427,10 +2409,10 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
new SfxAllEnumItem(RPTUI_ID_START,PAPER_A4),
new SfxAllEnumItem(RPTUI_ID_END,PAPER_E),
new SvxBrushItem(ITEMID_BRUSH),
- new SfxUInt16Item(RPTUI_ID_METRIC,static_cast<UINT16>(eUserMetric))
+ new SfxUInt16Item(RPTUI_ID_METRIC,static_cast<sal_uInt16>(eUserMetric))
};
- static USHORT pRanges[] =
+ static sal_uInt16 pRanges[] =
{
RPTUI_ID_LRSPACE,RPTUI_ID_BRUSH,
SID_ATTR_METRIC,SID_ATTR_METRIC,
@@ -2451,9 +2433,9 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
pDescriptor->Put(SvxSizeItem(RPTUI_ID_SIZE,VCLSize(getStyleProperty<awt::Size>(m_xReportDefinition,PROPERTY_PAPERSIZE))));
pDescriptor->Put(SvxLRSpaceItem(getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_LEFTMARGIN)
,getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_RIGHTMARGIN),0,0,RPTUI_ID_LRSPACE));
- pDescriptor->Put(SvxULSpaceItem(static_cast<USHORT>(getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_TOPMARGIN))
- ,static_cast<USHORT>(getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_BOTTOMMARGIN)),RPTUI_ID_ULSPACE));
- pDescriptor->Put(SfxUInt16Item(SID_ATTR_METRIC,static_cast<UINT16>(eUserMetric)));
+ pDescriptor->Put(SvxULSpaceItem(static_cast<sal_uInt16>(getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_TOPMARGIN))
+ ,static_cast<sal_uInt16>(getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_BOTTOMMARGIN)),RPTUI_ID_ULSPACE));
+ pDescriptor->Put(SfxUInt16Item(SID_ATTR_METRIC,static_cast<sal_uInt16>(eUserMetric)));
uno::Reference< style::XStyle> xPageStyle(getUsedStyle(m_xReportDefinition));
if ( xPageStyle.is() )
@@ -2487,7 +2469,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
{
uno::Reference< beans::XPropertySet> xProp(getUsedStyle(m_xReportDefinition),uno::UNO_QUERY_THROW);
const String sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEPAGE));
- UndoManagerListAction aListAction(m_aUndoManager,sUndoAction);
+ UndoContext aUndoContext( getUndoManager(), sUndoAction );
const SfxPoolItem* pItem = NULL;
if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_SIZE,sal_True,&pItem))
{
@@ -2537,13 +2519,24 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
delete pDefaults[i];
}
+
// -----------------------------------------------------------------------------
sal_Bool SAL_CALL OReportController::attachModel(const uno::Reference< frame::XModel > & xModel) throw( uno::RuntimeException )
{
::osl::MutexGuard aGuard( getMutex() );
- m_xReportDefinition.set(xModel,uno::UNO_QUERY);
- return m_xReportDefinition.is();
+
+ uno::Reference< report::XReportDefinition > xReportDefinition( xModel, UNO_QUERY );
+ if ( !xReportDefinition.is() )
+ return sal_False;
+
+ uno::Reference< document::XUndoManagerSupplier > xTestSuppUndo( xModel, UNO_QUERY );
+ if ( !xTestSuppUndo.is() )
+ return sal_False;
+
+ m_xReportDefinition = xReportDefinition;
+ return sal_True;
}
+
// -----------------------------------------------------------------------------
void OReportController::openSortingAndGroupingDialog()
{
@@ -2597,19 +2590,19 @@ void OReportController::Notify(SfxBroadcaster & /* _rBc */, SfxHint const & _rHi
}
}
// -----------------------------------------------------------------------------
-void OReportController::executeMethodWithUndo(USHORT _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun)
+void OReportController::executeMethodWithUndo(sal_uInt16 _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun)
{
const String sUndoAction = String((ModuleRes(_nUndoStrId)));
- UndoManagerListAction aListAction(m_aUndoManager,sUndoAction);
+ UndoContext aUndoContext( getUndoManager(), sUndoAction );
_pMemfun( getDesignView() );
InvalidateFeature( SID_SAVEDOC );
InvalidateFeature( SID_UNDO );
}
// -----------------------------------------------------------------------------
-void OReportController::alignControlsWithUndo(USHORT _nUndoStrId,sal_Int32 _nControlModification,bool _bAlignAtSection)
+void OReportController::alignControlsWithUndo(sal_uInt16 _nUndoStrId,sal_Int32 _nControlModification,bool _bAlignAtSection)
{
const String sUndoAction = String((ModuleRes(_nUndoStrId)));
- UndoManagerListAction aListAction(m_aUndoManager,sUndoAction);
+ UndoContext aUndoContext( getUndoManager(), sUndoAction );
getDesignView()->alignMarkedObjects(_nControlModification,_bAlignAtSection);
InvalidateFeature( SID_SAVEDOC );
InvalidateFeature( SID_UNDO );
@@ -2683,12 +2676,12 @@ void OReportController::shrinkSectionTop(uno::Reference<report::XSection> _xSect
_xSection->setHeight(nNewSectionHeight);
}
-void OReportController::shrinkSection(USHORT _nUndoStrId, uno::Reference<report::XSection> _xSection, sal_Int32 _nSid)
+void OReportController::shrinkSection(sal_uInt16 _nUndoStrId, uno::Reference<report::XSection> _xSection, sal_Int32 _nSid)
{
if ( _xSection.is() )
{
const String sUndoAction = String((ModuleRes(_nUndoStrId)));
- UndoManagerListAction aListAction(m_aUndoManager,sUndoAction);
+ UndoContext aUndoContext( getUndoManager(), sUndoAction );
if (_nSid == SID_SECTION_SHRINK)
{
@@ -2713,35 +2706,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 < SAL_N_ELEMENTS(nCommandIDs); ++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 +2754,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()
@@ -3030,17 +3041,8 @@ void OReportController::insertGraphic()
}
}
// -----------------------------------------------------------------------------
-::boost::shared_ptr<rptui::OReportModel> OReportController::getSdrModel()
+::boost::shared_ptr<rptui::OReportModel> OReportController::getSdrModel() const
{
- if ( !m_aReportModel )
- {
- m_aReportModel = reportdesign::OReportDefinition::getSdrModel(m_xReportDefinition);
- if ( m_aReportModel )
- {
- m_aReportModel->attachController( *this );
- m_aReportModel->SetNotifyUndoActionHdl(LINK( this, OReportController, NotifyUndoActionHdl ));
- }
- }
return m_aReportModel;
}
// -----------------------------------------------------------------------------
@@ -3243,7 +3245,7 @@ void OReportController::createDateTime(const Sequence< PropertyValue >& _aArgs)
getDesignView()->unmarkAllObjects(NULL);
const String sUndoAction(ModuleRes(RID_STR_UNDO_INSERT_CONTROL));
- UndoManagerListAction aListAction(m_aUndoManager,sUndoAction);
+ UndoContext aUndoContext( getUndoManager(), sUndoAction );
SequenceAsHashMap aMap(_aArgs);
aMap.createItemIfMissing(PROPERTY_FORMATKEY,aMap.getUnpackedValueOrDefault(PROPERTY_FORMATKEYDATE,sal_Int32(0)));
@@ -3271,7 +3273,7 @@ void OReportController::createPageNumber(const Sequence< PropertyValue >& _aArgs
getDesignView()->unmarkAllObjects(NULL);
const String sUndoAction(ModuleRes(RID_STR_UNDO_INSERT_CONTROL));
- UndoManagerListAction aListAction(m_aUndoManager,sUndoAction);
+ UndoContext aUndoContext( getUndoManager(), sUndoAction );
if ( !m_xReportDefinition->getPageHeaderOn() )
{
@@ -3315,7 +3317,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
}
uno::Reference<report::XSection> xCurrentSection = getDesignView()->getCurrentSection();
- UndoManagerListAction aUndo( *getUndoMgr(), String( ModuleRes( RID_STR_UNDO_INSERT_CONTROL ) ) );
+ UndoContext aUndoContext( getUndoManager(), String( ModuleRes( RID_STR_UNDO_INSERT_CONTROL ) ) );
try
{
@@ -3765,19 +3767,21 @@ void OReportController::switchReportSection(const sal_Int16 _nId)
{
const OXUndoEnvironment::OUndoEnvLock aLock( m_aReportModel->GetUndoEnv() );
const bool bSwitchOn = !m_xReportDefinition->getReportHeaderOn();
+
+ ::boost::scoped_ptr< UndoContext > pUndoContext;
if ( SID_REPORTHEADERFOOTER == _nId )
{
const String sUndoAction(ModuleRes(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER));
- getUndoMgr()->EnterListAction( sUndoAction, String() );
+ pUndoContext.reset( new UndoContext( getUndoManager(), sUndoAction ) );
- addUndoActionAndInvalidate(new OReportSectionUndo(*(m_aReportModel),SID_REPORTHEADER_WITHOUT_UNDO
+ addUndoAction(new OReportSectionUndo(*(m_aReportModel),SID_REPORTHEADER_WITHOUT_UNDO
,::std::mem_fun(&OReportHelper::getReportHeader)
,m_xReportDefinition
,bSwitchOn ? Inserted : Removed
,0
));
- addUndoActionAndInvalidate(new OReportSectionUndo(*(m_aReportModel),SID_REPORTFOOTER_WITHOUT_UNDO
+ addUndoAction(new OReportSectionUndo(*(m_aReportModel),SID_REPORTFOOTER_WITHOUT_UNDO
,::std::mem_fun(&OReportHelper::getReportFooter)
,m_xReportDefinition
,bSwitchOn ? Inserted : Removed
@@ -3800,7 +3804,7 @@ void OReportController::switchReportSection(const sal_Int16 _nId)
}
if ( SID_REPORTHEADERFOOTER == _nId )
- getUndoMgr()->LeaveListAction();
+ pUndoContext.reset();
getView()->Resize();
}
}
@@ -3813,12 +3817,13 @@ void OReportController::switchPageSection(const sal_Int16 _nId)
const OXUndoEnvironment::OUndoEnvLock aLock( m_aReportModel->GetUndoEnv() );
const bool bSwitchOn = !m_xReportDefinition->getPageHeaderOn();
+ ::boost::scoped_ptr< UndoContext > pUndoContext;
if ( SID_PAGEHEADERFOOTER == _nId )
{
const String sUndoAction(ModuleRes(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER));
- getUndoMgr()->EnterListAction( sUndoAction, String() );
+ pUndoContext.reset( new UndoContext( getUndoManager(), sUndoAction ) );
- addUndoActionAndInvalidate(new OReportSectionUndo(*m_aReportModel
+ addUndoAction(new OReportSectionUndo(*m_aReportModel
,SID_PAGEHEADER_WITHOUT_UNDO
,::std::mem_fun(&OReportHelper::getPageHeader)
,m_xReportDefinition
@@ -3826,7 +3831,7 @@ void OReportController::switchPageSection(const sal_Int16 _nId)
,0
));
- addUndoActionAndInvalidate(new OReportSectionUndo(*m_aReportModel
+ addUndoAction(new OReportSectionUndo(*m_aReportModel
,SID_PAGEFOOTER_WITHOUT_UNDO
,::std::mem_fun(&OReportHelper::getPageFooter)
,m_xReportDefinition
@@ -3848,7 +3853,7 @@ void OReportController::switchPageSection(const sal_Int16 _nId)
break;
}
if ( SID_PAGEHEADERFOOTER == _nId )
- getUndoMgr()->LeaveListAction();
+ pUndoContext.reset();
getView()->Resize();
}
}
@@ -3874,7 +3879,7 @@ void OReportController::modifyGroup(const bool _bAppend, const Sequence< Propert
rUndoEnv.AddElement( xGroup->getFunctions() );
}
- addUndoActionAndInvalidate( new OGroupUndo(
+ addUndoAction( new OGroupUndo(
*m_aReportModel,
_bAppend ? RID_STR_UNDO_APPEND_GROUP : RID_STR_UNDO_REMOVE_GROUP,
_bAppend ? Inserted : Removed,
@@ -3908,7 +3913,7 @@ void OReportController::createGroupSection(const bool _bUndo,const bool _bHeader
{
const OXUndoEnvironment::OUndoEnvLock aLock(m_aReportModel->GetUndoEnv());
if ( _bUndo )
- addUndoActionAndInvalidate(new OGroupSectionUndo(*m_aReportModel
+ addUndoAction(new OGroupSectionUndo(*m_aReportModel
,_bHeader ? SID_GROUPHEADER_WITHOUT_UNDO : SID_GROUPFOOTER_WITHOUT_UNDO
,_bHeader ? ::std::mem_fun(&OGroupHelper::getHeader) : ::std::mem_fun(&OGroupHelper::getFooter)
,xGroup
@@ -4161,23 +4166,21 @@ sal_Bool OReportController::isFormatCommandEnabled(sal_uInt16 _nCommand,const un
// -----------------------------------------------------------------------------
bool OReportController::impl_setPropertyAtControls_throw(const sal_uInt16 _nUndoResId,const ::rtl::OUString& _sProperty,const uno::Any& _aValue,const Sequence< PropertyValue >& _aArgs)
{
- ::std::auto_ptr<UndoManagerListAction> pListAction;
::std::vector< uno::Reference< uno::XInterface > > aSelection;
uno::Reference< awt::XWindow> xWindow;
lcl_getReportControlFormat( _aArgs, getDesignView(), xWindow, aSelection );
- const bool bMultiSet = aSelection.size() > 1;
::std::vector< uno::Reference< uno::XInterface > >::iterator aIter = aSelection.begin();
+
+ const String sUndoAction = String( ModuleRes( _nUndoResId ) );
+ UndoContext aUndoContext( getUndoManager(), sUndoAction );
+
for(; aIter != aSelection.end();++aIter)
{
- if ( !pListAction.get() && _nUndoResId && bMultiSet )
- {
- const String sUndoAction = String(ModuleRes(_nUndoResId));
- pListAction.reset(new UndoManagerListAction(m_aUndoManager,sUndoAction));
- }
const uno::Reference< beans::XPropertySet > xControlModel(*aIter,uno::UNO_QUERY);
if ( xControlModel.is() )
xControlModel->setPropertyValue(_sProperty,_aValue);
}
+
return !aSelection.empty();
}
// -----------------------------------------------------------------------------
@@ -4215,7 +4218,7 @@ void OReportController::openZoomDialog()
{
new SvxZoomItem()
};
- static USHORT pRanges[] =
+ static sal_uInt16 pRanges[] =
{
SID_ATTR_ZOOM,SID_ATTR_ZOOM,
0
@@ -4343,6 +4346,34 @@ uno::Reference< container::XNameAccess > OReportController::getColumns() const
}
return sLabel;
}
+
// -----------------------------------------------------------------------------
+SfxUndoManager& OReportController::getUndoManager() const
+{
+ DBG_TESTSOLARMUTEX();
+ // this is expected to be called during UI actions, so the SM is assumed to be locked
+
+ ::boost::shared_ptr< OReportModel > pReportModel( getSdrModel() );
+ ENSURE_OR_THROW( !!pReportModel, "no access to our model" );
+
+ SfxUndoManager* pUndoManager( pReportModel->GetSdrUndoManager() );
+ ENSURE_OR_THROW( pUndoManager != NULL, "no access to our model's UndoManager" );
+
+ return *pUndoManager;
+}
+
+// -----------------------------------------------------------------------------
+void OReportController::clearUndoManager() const
+{
+ getUndoManager().Clear();
+}
+// -----------------------------------------------------------------------------
+void OReportController::addUndoAction( SfxUndoAction* i_pAction )
+{
+ getUndoManager().AddUndoAction( i_pAction );
+
+ InvalidateFeature( SID_UNDO );
+ InvalidateFeature( SID_REDO );
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/ReportRuler.cxx b/reportdesign/source/ui/report/ReportRuler.cxx
index 2867f9fee662..7c63b73c9299 100644
--- a/reportdesign/source/ui/report/ReportRuler.cxx
+++ b/reportdesign/source/ui/report/ReportRuler.cxx
@@ -54,7 +54,7 @@ void OReportRuler::Resize()
m_pSection->SetPosSizePixel(Point(0,0),GetOutputSize());
}
//------------------------------------------------------------------------------
-void OReportRuler::SetGridVisible(BOOL _bVisible)
+void OReportRuler::SetGridVisible(sal_Bool _bVisible)
{
m_pSection->SetGridVisible( _bVisible );
}
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index bf34f824f175..4ddd455bd3c7 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -97,7 +97,7 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re
,m_pReportListener(NULL)
,m_xSection(_xSection)
,m_eMode(RPTUI_SELECT)
-,m_bDialogModelChanged(FALSE)
+,m_bDialogModelChanged(sal_False)
,m_bInDrag(sal_False)
{
DBG_CTOR( rpt_OReportSection,NULL);
@@ -210,7 +210,7 @@ void OReportSection::fill()
// without the following call, no grid is painted
m_pView->ShowSdrPage( m_pPage );
- m_pView->SetMoveSnapOnlyTopLeft( TRUE );
+ m_pView->SetMoveSnapOnlyTopLeft( sal_True );
ODesignView* pDesignView = m_pParent->getViewsWindow()->getView()->getReportView();
// #i93595# Adapted grid to a more coarse grid and subdivisions for better visualisation. This
@@ -226,8 +226,8 @@ void OReportSection::fill()
m_pView->SetSnapGridWidth(aX, aY);
m_pView->SetGridSnap( pDesignView->isGridSnap() );
- m_pView->SetGridFront( FALSE );
- m_pView->SetDragStripes( TRUE );
+ m_pView->SetGridFront( sal_False );
+ m_pView->SetDragStripes( sal_True );
m_pView->SetPageVisible();
sal_Int32 nColor = m_xSection->getBackColor();
if ( nColor == (sal_Int32)COL_TRANSPARENT )
@@ -242,7 +242,7 @@ void OReportSection::fill()
// LLA: TODO
// m_pPage->SetUppBorder(-10000);
- m_pView->SetDesignMode( TRUE );
+ m_pView->SetDesignMode( sal_True );
m_pView->StartListening( *m_pModel );
if ( m_xSection.is() && m_pPage && m_pView )
@@ -364,14 +364,14 @@ void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedOb
// insert control models of marked objects into clipboard dialog model
const SdrMarkList& rMarkedList = m_pView->GetMarkedObjectList();
- const ULONG nMark = rMarkedList.GetMarkCount();
+ const sal_uLong nMark = rMarkedList.GetMarkCount();
::std::vector< uno::Reference<report::XReportComponent> > aCopies;
aCopies.reserve(nMark);
SdrUndoFactory& rUndo = m_pView->GetModel()->GetSdrUndoFactory();
- for( ULONG i = nMark; i > 0; )
+ for( sal_uLong i = nMark; i > 0; )
{
--i;
SdrObject* pSdrObject = rMarkedList.GetMark(i)->GetMarkedSdrObj();
@@ -428,7 +428,7 @@ void OReportSection::MouseMove( const MouseEvent& rMEvt )
}
//----------------------------------------------------------------------------
-void OReportSection::SetGridVisible(BOOL _bVisible)
+void OReportSection::SetGridVisible(sal_Bool _bVisible)
{
m_pView->SetGridVisible( _bVisible );
}
@@ -458,12 +458,12 @@ void lcl_insertMenuItemImages(
const uno::Reference< report::XReportDefinition>& _xReportDefinition,uno::Reference<frame::XFrame>& _rFrame
)
{
- const USHORT nCount = rContextMenu.GetItemCount();
- for (USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = rContextMenu.GetItemCount();
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
if ( MENUITEM_SEPARATOR != rContextMenu.GetItemType(i))
{
- const USHORT nId = rContextMenu.GetItemId(i);
+ const sal_uInt16 nId = rContextMenu.GetItemId(i);
PopupMenu* pPopupMenu = rContextMenu.GetPopupMenu( nId );
if ( pPopupMenu )
{
@@ -472,7 +472,7 @@ void lcl_insertMenuItemImages(
else
{
const ::rtl::OUString sCommand = rContextMenu.GetItemCommand(nId);
- rContextMenu.SetItemImage(nId,framework::GetImageFromURL(_rFrame,sCommand,FALSE));
+ rContextMenu.SetItemImage(nId,framework::GetImageFromURL(_rFrame,sCommand,sal_False));
if ( nId == SID_PAGEHEADERFOOTER )
{
String sText = String(ModuleRes((_xReportDefinition.is() && _xReportDefinition->getPageHeaderOn()) ? RID_STR_PAGEHEADERFOOTER_DELETE : RID_STR_PAGEHEADERFOOTER_INSERT));
@@ -506,7 +506,7 @@ void OReportSection::Command( const CommandEvent& _rCEvt )
Point aPos = _rCEvt.GetMousePosPixel();
m_pView->EndAction();
- const USHORT nId = aContextMenu.Execute(this, aPos);
+ const sal_uInt16 nId = aContextMenu.Execute(this, aPos);
if ( nId )
{
uno::Sequence< beans::PropertyValue> aArgs;
@@ -745,7 +745,7 @@ sal_Int8 OReportSection::AcceptDrop( const AcceptDropEvent& _rEvt )
)
{
if (!m_pParent) return DND_ACTION_NONE;
- USHORT nCurrentPosition = 0;
+ sal_uInt16 nCurrentPosition = 0;
nCurrentPosition = m_pParent->getViewsWindow()->getPosition(m_pParent);
if (_rEvt.mnAction == DND_ACTION_COPY )
{
diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx
index d3b2dfeb2afb..2a7a32408db9 100644
--- a/reportdesign/source/ui/report/ReportWindow.cxx
+++ b/reportdesign/source/ui/report/ReportWindow.cxx
@@ -101,7 +101,7 @@ void OReportWindow::initialize()
m_aViewsWindow.initialize();
}
//----------------------------------------------------------------------------
-void OReportWindow::SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType )
+void OReportWindow::SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType )
{
m_aViewsWindow.SetInsertObj( eObj,_sShapeType);
}
@@ -117,14 +117,14 @@ void OReportWindow::SetMode( DlgEdMode eNewMode )
m_aViewsWindow.SetMode(eNewMode);
}
//----------------------------------------------------------------------------
-void OReportWindow::removeSection(USHORT _nPosition)
+void OReportWindow::removeSection(sal_uInt16 _nPosition)
{
m_aViewsWindow.removeSection(_nPosition);
m_pParent->setTotalSize(GetTotalWidth(),GetTotalHeight());
m_aViewsWindow.Invalidate(INVALIDATE_TRANSPARENT);
}
//----------------------------------------------------------------------------
-void OReportWindow::addSection(const uno::Reference< report::XSection >& _xSection,const ::rtl::OUString& _sColorEntry,USHORT _nPosition)
+void OReportWindow::addSection(const uno::Reference< report::XSection >& _xSection,const ::rtl::OUString& _sColorEntry,sal_uInt16 _nPosition)
{
if ( !_xSection.is() )
return;
@@ -250,7 +250,7 @@ void OReportWindow::ScrollChildren(const Point& _aThumbPos)
m_aViewsWindow.scrollChildren(_aThumbPos);
}
//----------------------------------------------------------------------------
-USHORT OReportWindow::getSectionCount() const
+sal_uInt16 OReportWindow::getSectionCount() const
{
return m_aViewsWindow.getSectionCount();
}
@@ -260,7 +260,7 @@ void OReportWindow::notifySizeChanged()
m_pParent->setTotalSize(GetTotalWidth(),GetTotalHeight());
}
//----------------------------------------------------------------------------
-BOOL OReportWindow::HasSelection() const
+sal_Bool OReportWindow::HasSelection() const
{
return m_aViewsWindow.HasSelection();
}
@@ -283,7 +283,7 @@ void OReportWindow::Paste()
m_aViewsWindow.Paste();
}
//----------------------------------------------------------------------------
-BOOL OReportWindow::IsPasteAllowed() const
+sal_Bool OReportWindow::IsPasteAllowed() const
{
return m_aViewsWindow.IsPasteAllowed();
}
@@ -363,13 +363,13 @@ void OReportWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAl
m_aViewsWindow.alignMarkedObjects(_nControlModification, _bAlignAtSection, bBoundRects);
}
// -----------------------------------------------------------------------------
-void OReportWindow::setGridSnap(BOOL bOn)
+void OReportWindow::setGridSnap(sal_Bool bOn)
{
m_aViewsWindow.setGridSnap(bOn);
}
// -----------------------------------------------------------------------------
-void OReportWindow::setDragStripes(BOOL bOn)
+void OReportWindow::setDragStripes(sal_Bool bOn)
{
m_aViewsWindow.setDragStripes(bOn);
}
@@ -421,14 +421,14 @@ sal_uInt16 OReportWindow::getZoomFactor(SvxZoomType _eType) const
break;
case SVX_ZOOM_WHOLEPAGE:
{
- nZoom = (USHORT)(long)Fraction(aSize.Width()*100,impl_getRealPixelWidth());
+ nZoom = (sal_uInt16)(long)Fraction(aSize.Width()*100,impl_getRealPixelWidth());
MapMode aMap( MAP_100TH_MM );
const Size aHeight = m_aViewsWindow.LogicToPixel(m_aViewsWindow.PixelToLogic(Size(0,GetTotalHeight() + m_aHRuler.GetSizePixel().Height())),aMap);
- nZoom = ::std::min(nZoom,(USHORT)(long)Fraction(aSize.Height()*100,aHeight.Height()));
+ nZoom = ::std::min(nZoom,(sal_uInt16)(long)Fraction(aSize.Height()*100,aHeight.Height()));
}
break;
case SVX_ZOOM_PAGEWIDTH:
- nZoom = (USHORT)(long)Fraction(aSize.Width()*100,impl_getRealPixelWidth());
+ nZoom = (sal_uInt16)(long)Fraction(aSize.Width()*100,impl_getRealPixelWidth());
break;
default:
break;
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx
index 98a48bf1c5eb..0abd5b75f666 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -203,12 +203,12 @@ IMPL_LINK( OScrollWindowHelper, ScrollHdl, ScrollBar*, /*pScroll*/ )
//------------------------------------------------------------------------------
void OScrollWindowHelper::addSection(const uno::Reference< report::XSection >& _xSection
,const ::rtl::OUString& _sColorEntry
- ,USHORT _nPosition)
+ ,sal_uInt16 _nPosition)
{
m_aReportWindow.addSection(_xSection,_sColorEntry,_nPosition);
}
//------------------------------------------------------------------------------
-void OScrollWindowHelper::removeSection(USHORT _nPosition)
+void OScrollWindowHelper::removeSection(sal_uInt16 _nPosition)
{
m_aReportWindow.removeSection(_nPosition);
}
@@ -218,12 +218,12 @@ void OScrollWindowHelper::toggleGrid(sal_Bool _bVisible)
m_aReportWindow.toggleGrid(_bVisible);
}
//------------------------------------------------------------------------------
-USHORT OScrollWindowHelper::getSectionCount() const
+sal_uInt16 OScrollWindowHelper::getSectionCount() const
{
return m_aReportWindow.getSectionCount();
}
//------------------------------------------------------------------------------
-void OScrollWindowHelper::SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType )
+void OScrollWindowHelper::SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType )
{
m_aReportWindow.SetInsertObj(eObj,_sShapeType);
}
@@ -238,7 +238,7 @@ void OScrollWindowHelper::SetMode( DlgEdMode _eNewMode )
m_aReportWindow.SetMode(_eNewMode);
}
//------------------------------------------------------------------------------
-BOOL OScrollWindowHelper::HasSelection() const
+sal_Bool OScrollWindowHelper::HasSelection() const
{
return m_aReportWindow.HasSelection();
}
@@ -258,7 +258,7 @@ void OScrollWindowHelper::Paste()
m_aReportWindow.Paste();
}
//----------------------------------------------------------------------------
-BOOL OScrollWindowHelper::IsPasteAllowed() const
+sal_Bool OScrollWindowHelper::IsPasteAllowed() const
{
return m_aReportWindow.IsPasteAllowed();
}
@@ -379,12 +379,12 @@ void OScrollWindowHelper::_propertyChanged(const beans::PropertyChangeEvent& /*_
m_aReportWindow.notifySizeChanged();
}
// -----------------------------------------------------------------------------
-void OScrollWindowHelper::setGridSnap(BOOL bOn)
+void OScrollWindowHelper::setGridSnap(sal_Bool bOn)
{
m_aReportWindow.setGridSnap(bOn);
}
// -----------------------------------------------------------------------------
-void OScrollWindowHelper::setDragStripes(BOOL bOn)
+void OScrollWindowHelper::setDragStripes(sal_Bool bOn)
{
m_aReportWindow.setDragStripes(bOn);
}
diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx
index 2e7b52d40e3e..a0355349e361 100644
--- a/reportdesign/source/ui/report/SectionView.cxx
+++ b/reportdesign/source/ui/report/SectionView.cxx
@@ -57,7 +57,7 @@ OSectionView::OSectionView( SdrModel* pModel, OReportSection* _pSectionWindow, O
SetBufferedOverlayAllowed(true);
SetPageBorderVisible(false);
SetBordVisible();
- SetQuickTextEditMode(FALSE);
+ SetQuickTextEditMode(sal_False);
}
//----------------------------------------------------------------------------
@@ -162,16 +162,16 @@ void OSectionView::ObjectRemovedInAliveMode( const SdrObject* _pObject )
{
DBG_CHKTHIS( rpt_OSectionView,NULL);
const SdrMarkList& rMarkedList = GetMarkedObjectList();
- const ULONG nMark = rMarkedList.GetMarkCount();
+ const sal_uLong nMark = rMarkedList.GetMarkCount();
- for( ULONG i = 0; i < nMark; i++ )
+ for( sal_uLong i = 0; i < nMark; i++ )
{
SdrObject* pSdrObj = rMarkedList.GetMark(i)->GetMarkedSdrObj();
if (_pObject == pSdrObj)
{
SdrPageView* pPgView = GetSdrPageView();
BrkAction();
- MarkObj( pSdrObj, pPgView, TRUE );
+ MarkObj( pSdrObj, pPgView, sal_True );
break;
}
}
@@ -187,8 +187,8 @@ void OSectionView::SetMarkedToLayer( SdrLayerID _nLayerNo )
BegUndo( );
const SdrMarkList& rMark = GetMarkedObjectList();
- ULONG nCount = rMark.GetMarkCount();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = rMark.GetMarkCount();
+ for (sal_uLong i=0; i<nCount; i++)
{
SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj();
if ( pObj->ISA(OCustomShape) )
@@ -218,10 +218,10 @@ void OSectionView::SetMarkedToLayer( SdrLayerID _nLayerNo )
bool OSectionView::OnlyShapesMarked() const
{
const SdrMarkList& rMark = GetMarkedObjectList();
- const ULONG nCount = rMark.GetMarkCount();
+ const sal_uLong nCount = rMark.GetMarkCount();
if ( !nCount )
return false;
- ULONG i=0;
+ sal_uLong i=0;
for (; i<nCount; i++)
{
SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj();
@@ -253,7 +253,7 @@ short OSectionView::GetLayerIdOfMarkedObjects() const
{
short nRet = SHRT_MAX;
const SdrMarkList &rMrkList = GetMarkedObjectList();
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
const SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if ( nRet == SHRT_MAX )
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx
index fd583814d859..c80f3af70db5 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -110,7 +110,7 @@ OSectionWindow::OSectionWindow( OViewsWindow* _pParent,const uno::Reference< rep
}
_propertyChanged(aEvent);
- SetPaintTransparent(TRUE);
+ SetPaintTransparent(sal_True);
}
// -----------------------------------------------------------------------------
OSectionWindow::~OSectionWindow()
@@ -136,11 +136,11 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
const uno::Reference< report::XSection> xCurrentSection = m_aReportSection.getSection();
if ( _rEvent.PropertyName.equals(PROPERTY_HEIGHT) )
{
- m_pParent->getView()->SetUpdateMode(FALSE);
+ m_pParent->getView()->SetUpdateMode(sal_False);
Resize();
m_pParent->getView()->notifySizeChanged();
m_pParent->resize(*this);
- m_pParent->getView()->SetUpdateMode(TRUE);
+ m_pParent->getView()->SetUpdateMode(sal_True);
m_aStartMarker.Invalidate(INVALIDATE_NOERASE);
m_aEndMarker.Invalidate(INVALIDATE_NOERASE);
m_aReportSection.Invalidate(/*INVALIDATE_NOERASE*/);
@@ -173,7 +173,7 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
}
}
// -----------------------------------------------------------------------------
-bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReportDefinition>& _xReport,USHORT _nResId,::std::mem_fun_t<uno::Reference<report::XSection> , OReportHelper> _pGetSection,::std::mem_fun_t<sal_Bool,OReportHelper> _pIsSectionOn)
+bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReportDefinition>& _xReport,sal_uInt16 _nResId,::std::mem_fun_t<uno::Reference<report::XSection> , OReportHelper> _pGetSection,::std::mem_fun_t<sal_Bool,OReportHelper> _pIsSectionOn)
{
OReportHelper aReportHelper(_xReport);
const bool bRet = _pIsSectionOn(&aReportHelper) && _pGetSection(&aReportHelper) == m_aReportSection.getSection();
@@ -186,7 +186,7 @@ bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReport
return bRet;
}
// -----------------------------------------------------------------------------
-bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>& _xGroup,USHORT _nResId,::std::mem_fun_t<uno::Reference<report::XSection> , OGroupHelper> _pGetSection,::std::mem_fun_t<sal_Bool,OGroupHelper> _pIsSectionOn)
+bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>& _xGroup,sal_uInt16 _nResId,::std::mem_fun_t<uno::Reference<report::XSection> , OGroupHelper> _pGetSection,::std::mem_fun_t<sal_Bool,OGroupHelper> _pIsSectionOn)
{
OGroupHelper aGroupHelper(_xGroup);
const bool bRet = _pIsSectionOn(&aGroupHelper) && _pGetSection(&aGroupHelper) == m_aReportSection.getSection() ;
@@ -323,14 +323,14 @@ void OSectionWindow::zoom(const Fraction& _aZoom)
//-----------------------------------------------------------------------------
IMPL_LINK( OSectionWindow, StartSplitHdl, Splitter*, )
{
- const String sEmpty(ModuleRes(RID_STR_UNDO_CHANGE_SIZE));
- getViewsWindow()->getView()->getReportView()->getController().getUndoMgr()->EnterListAction(sEmpty,String());
+ const String sUndoAction( ModuleRes( RID_STR_UNDO_CHANGE_SIZE ) );
+ getViewsWindow()->getView()->getReportView()->getController().getUndoManager().EnterListAction( sUndoAction, String() );
return 0L;
}
//------------------------------------------------------------------------------
IMPL_LINK( OSectionWindow, EndSplitHdl, Splitter*, )
{
- getViewsWindow()->getView()->getReportView()->getController().getUndoMgr()->LeaveListAction();
+ getViewsWindow()->getView()->getReportView()->getController().getUndoManager().LeaveListAction();
return 0L;
}
//-----------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index d3bee52d4970..b27fcdec1f13 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -82,7 +82,7 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sCol
m_aVRuler.SetMargin2();
const MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
m_aVRuler.SetUnit(MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH);
- SetPaintTransparent(TRUE);
+ SetPaintTransparent(sal_True);
}
// -----------------------------------------------------------------------------
OStartMarker::~OStartMarker()
@@ -128,14 +128,14 @@ void OStartMarker::Paint( const Rectangle& rRect )
Color aStartColor(m_nColor);
aStartColor.IncreaseLuminance(10);
- USHORT nHue = 0;
- USHORT nSat = 0;
- USHORT nBri = 0;
+ sal_uInt16 nHue = 0;
+ sal_uInt16 nSat = 0;
+ sal_uInt16 nBri = 0;
aStartColor.RGBtoHSB(nHue, nSat, nBri);
nSat += 40;
Color aEndColor(Color::HSBtoRGB(nHue, nSat, nBri));
Gradient aGradient(GRADIENT_LINEAR,aStartColor,aEndColor);
- aGradient.SetSteps(static_cast<USHORT>(aSize.Height()));
+ aGradient.SetSteps(static_cast<sal_uInt16>(aSize.Height()));
DrawGradient(PixelToLogic(aPoly) ,aGradient);
}
@@ -200,10 +200,10 @@ void OStartMarker::initDefaultNodeImages()
Image* pImage = m_bCollapsed ? s_pDefCollapsed : s_pDefExpanded;
m_aImage.SetImage(*pImage);
- m_aImage.SetMouseTransparent(TRUE);
+ m_aImage.SetMouseTransparent(sal_True);
m_aImage.SetBackground();
m_aText.SetBackground();
- m_aText.SetMouseTransparent(TRUE);
+ m_aText.SetMouseTransparent(sal_True);
}
// -----------------------------------------------------------------------
void OStartMarker::ImplInitSettings()
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 35562e4cefa8..7e66ceab829a 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -186,7 +186,7 @@ OViewsWindow::OViewsWindow( OReportWindow* _pReportWindow)
,m_bInUnmark(sal_False)
{
DBG_CTOR( rpt_OViewsWindow,NULL);
- SetPaintTransparent(TRUE);
+ SetPaintTransparent(sal_True);
SetUniqueId(UID_RPT_VIEWSWINDOW);
SetMapMode( MapMode( MAP_100TH_MM ) );
m_aColorConfig.AddListener(this);
@@ -313,7 +313,7 @@ void OViewsWindow::DataChanged( const DataChangedEvent& rDCEvt )
}
}
//----------------------------------------------------------------------------
-void OViewsWindow::addSection(const uno::Reference< report::XSection >& _xSection,const ::rtl::OUString& _sColorEntry,USHORT _nPosition)
+void OViewsWindow::addSection(const uno::Reference< report::XSection >& _xSection,const ::rtl::OUString& _sColorEntry,sal_uInt16 _nPosition)
{
::boost::shared_ptr<OSectionWindow> pSectionWindow( new OSectionWindow(this,_xSection,_sColorEntry) );
m_aSections.insert(getIteratorAtPos(_nPosition) , TSectionsMap::value_type(pSectionWindow));
@@ -322,7 +322,7 @@ void OViewsWindow::addSection(const uno::Reference< report::XSection >& _xSectio
Resize();
}
//----------------------------------------------------------------------------
-void OViewsWindow::removeSection(USHORT _nPosition)
+void OViewsWindow::removeSection(sal_uInt16 _nPosition)
{
if ( _nPosition < m_aSections.size() )
{
@@ -336,7 +336,7 @@ void OViewsWindow::removeSection(USHORT _nPosition)
}
}
//------------------------------------------------------------------------------
-void OViewsWindow::toggleGrid(BOOL _bVisible)
+void OViewsWindow::toggleGrid(sal_Bool _bVisible)
{
::std::for_each(m_aSections.begin(),m_aSections.end(),
::o3tl::compose1(::boost::bind(&OReportSection::SetGridVisible,_1,_bVisible),TReportPairHelper()));
@@ -356,12 +356,12 @@ sal_Int32 OViewsWindow::getTotalHeight() const
return nHeight;
}
//----------------------------------------------------------------------------
-USHORT OViewsWindow::getSectionCount() const
+sal_uInt16 OViewsWindow::getSectionCount() const
{
- return static_cast<USHORT>(m_aSections.size());
+ return static_cast<sal_uInt16>(m_aSections.size());
}
//----------------------------------------------------------------------------
-void OViewsWindow::SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType )
+void OViewsWindow::SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType )
{
TSectionsMap::iterator aIter = m_aSections.begin();
TSectionsMap::iterator aEnd = m_aSections.end();
@@ -383,7 +383,7 @@ void OViewsWindow::SetMode( DlgEdMode eNewMode )
::o3tl::compose1(::boost::bind(&OReportSection::SetMode,_1,eNewMode),TReportPairHelper()));
}
//----------------------------------------------------------------------------
-BOOL OViewsWindow::HasSelection() const
+sal_Bool OViewsWindow::HasSelection() const
{
TSectionsMap::const_iterator aIter = m_aSections.begin();
TSectionsMap::const_iterator aEnd = m_aSections.end();
@@ -509,7 +509,7 @@ void OViewsWindow::markSection(const sal_uInt16 _nPos)
m_pParent->setMarked(m_aSections[_nPos]->getReportSection().getSection(),sal_True);
}
//----------------------------------------------------------------------------
-BOOL OViewsWindow::IsPasteAllowed() const
+sal_Bool OViewsWindow::IsPasteAllowed() const
{
TransferableDataHelper aTransferData( TransferableDataHelper::CreateFromSystemClipboard( const_cast< OViewsWindow* >( this ) ) );
return aTransferData.HasFormat(OReportExchange::getDescriptorFormatId());
@@ -564,7 +564,7 @@ void OViewsWindow::showRuler(sal_Bool _bShow)
::std::for_each(m_aSections.begin(),m_aSections.end(),
::o3tl::compose1(::boost::bind(&OStartMarker::showRuler,_1,_bShow),TStartMarkerHelper()));
::std::for_each(m_aSections.begin(),m_aSections.end(),
- ::o3tl::compose1(::boost::bind(&OStartMarker::Window::Invalidate,_1,USHORT(INVALIDATE_NOERASE)),TStartMarkerHelper()));
+ ::o3tl::compose1(::boost::bind(&OStartMarker::Window::Invalidate, _1, sal_uInt16(INVALIDATE_NOERASE)), TStartMarkerHelper()));
}
//----------------------------------------------------------------------------
void OViewsWindow::MouseButtonUp( const MouseEvent& rMEvt )
@@ -605,7 +605,7 @@ sal_Bool OViewsWindow::handleKeyEvent(const KeyEvent& _rEvent)
return bRet;
}
//----------------------------------------------------------------------------
-OViewsWindow::TSectionsMap::iterator OViewsWindow::getIteratorAtPos(USHORT _nPos)
+OViewsWindow::TSectionsMap::iterator OViewsWindow::getIteratorAtPos(sal_uInt16 _nPos)
{
TSectionsMap::iterator aRet = m_aSections.end();
if ( _nPos < m_aSections.size() )
@@ -720,7 +720,7 @@ void OViewsWindow::collectBoundResizeRect(const TRectangleMap& _rSortRectangles,
SdrObjTransformInfoRec aInfo;
const SdrObject* pObj = aRectIter->second.first;
pObj->TakeObjInfo(aInfo);
- BOOL bHasFixed = !aInfo.bMoveAllowed || pObj->IsMoveProtect();
+ sal_Bool bHasFixed = !aInfo.bMoveAllowed || pObj->IsMoveProtect();
if ( bHasFixed )
_rBound.Union(aObjRect);
else
@@ -914,7 +914,7 @@ void OViewsWindow::createDefault()
pMarkedSection->getReportSection().createDefault(m_sShapeType);
}
// -----------------------------------------------------------------------------
-void OViewsWindow::setGridSnap(BOOL bOn)
+void OViewsWindow::setGridSnap(sal_Bool bOn)
{
TSectionsMap::iterator aIter = m_aSections.begin();
TSectionsMap::iterator aEnd = m_aSections.end();
@@ -925,7 +925,7 @@ void OViewsWindow::setGridSnap(BOOL bOn)
}
}
// -----------------------------------------------------------------------------
-void OViewsWindow::setDragStripes(BOOL bOn)
+void OViewsWindow::setDragStripes(sal_Bool bOn)
{
TSectionsMap::iterator aIter = m_aSections.begin();
TSectionsMap::iterator aEnd = m_aSections.end();
@@ -933,11 +933,11 @@ void OViewsWindow::setDragStripes(BOOL bOn)
(*aIter)->getReportSection().getSectionView().SetDragStripes(bOn);
}
// -----------------------------------------------------------------------------
-USHORT OViewsWindow::getPosition(const OSectionWindow* _pSectionWindow) const
+sal_uInt16 OViewsWindow::getPosition(const OSectionWindow* _pSectionWindow) const
{
TSectionsMap::const_iterator aIter = m_aSections.begin();
TSectionsMap::const_iterator aEnd = m_aSections.end();
- USHORT nPosition = 0;
+ sal_uInt16 nPosition = 0;
for (; aIter != aEnd ; ++aIter)
{
if ( _pSectionWindow == (*aIter).get() )
@@ -949,7 +949,7 @@ USHORT OViewsWindow::getPosition(const OSectionWindow* _pSectionWindow) const
return nPosition;
}
// -----------------------------------------------------------------------------
-::boost::shared_ptr<OSectionWindow> OViewsWindow::getSectionWindow(const USHORT _nPos) const
+::boost::shared_ptr<OSectionWindow> OViewsWindow::getSectionWindow(const sal_uInt16 _nPos) const
{
::boost::shared_ptr<OSectionWindow> aReturn;
@@ -1040,7 +1040,7 @@ void OViewsWindow::BegDragObj_createInvisibleObjectAtPosition(const Rectangle& _
pNewObj->SetLogicRect(_aRect);
pNewObj->Move(Size(0, aNewPos.Y()));
- BOOL bChanged = rView.GetModel()->IsChanged();
+ sal_Bool bChanged = rView.GetModel()->IsChanged();
rReportSection.getPage()->InsertObject(pNewObj);
rView.GetModel()->SetChanged(bChanged);
m_aBegDragTempList.push_back(pNewObj);
@@ -1253,10 +1253,10 @@ void OViewsWindow::EndDragObj_removeInvisibleObjects()
}
}
// -----------------------------------------------------------------------------
-void OViewsWindow::EndDragObj(BOOL _bControlKeyPressed, const OSectionView* _pSection,const Point& _aPnt)
+void OViewsWindow::EndDragObj(sal_Bool _bControlKeyPressed, const OSectionView* _pSection,const Point& _aPnt)
{
const String sUndoAction = String((ModuleRes(RID_STR_UNDO_CHANGEPOSITION)));
- UndoManagerListAction aListAction(*getView()->getReportView()->getController().getUndoMgr(),sUndoAction);
+ const UndoContext aUndoContext( getView()->getReportView()->getController().getUndoManager(), sUndoAction );
Point aNewPos = _aPnt;
OSectionView* pInSection = getSectionRelativeToPosition(_pSection, aNewPos);
@@ -1281,7 +1281,7 @@ void OViewsWindow::EndDragObj(BOOL _bControlKeyPressed, const OSectionView* _pSe
rReportSection.Copy(aAllreadyCopiedObjects,true);
}
else
- pInSection->EndDragObj(FALSE);
+ pInSection->EndDragObj(sal_False);
}
if ( aAllreadyCopiedObjects.getLength() )
@@ -1352,7 +1352,7 @@ void OViewsWindow::EndDragObj(BOOL _bControlKeyPressed, const OSectionView* _pSe
}
else
{
- ::std::for_each( m_aSections.begin(), m_aSections.end(), ApplySectionViewAction( FALSE ) );
+ ::std::for_each( m_aSections.begin(), m_aSections.end(), ApplySectionViewAction( sal_False ) );
EndDragObj_removeInvisibleObjects();
}
m_aDragDelta = Point(SAL_MAX_INT32, SAL_MAX_INT32);
@@ -1431,9 +1431,9 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bo
}
}
// -----------------------------------------------------------------------------
-BOOL OViewsWindow::IsAction() const
+sal_Bool OViewsWindow::IsAction() const
{
- BOOL bAction = FALSE;
+ sal_Bool bAction = sal_False;
TSectionsMap::const_iterator aIter = m_aSections.begin();
TSectionsMap::const_iterator aEnd = m_aSections.end();
for (; !bAction && aIter != aEnd; ++aIter)
@@ -1441,9 +1441,9 @@ BOOL OViewsWindow::IsAction() const
return bAction;
}
// -----------------------------------------------------------------------------
-BOOL OViewsWindow::IsDragObj() const
+sal_Bool OViewsWindow::IsDragObj() const
{
- BOOL bAction = FALSE;
+ sal_Bool bAction = sal_False;
TSectionsMap::const_iterator aIter = m_aSections.begin();
TSectionsMap::const_iterator aEnd = m_aSections.end();
for (; !bAction && aIter != aEnd; ++aIter)
@@ -1463,7 +1463,7 @@ sal_uInt32 OViewsWindow::getMarkedObjectCount() const
// -----------------------------------------------------------------------------
void OViewsWindow::handleKey(const KeyCode& _rCode)
{
- const USHORT nCode = _rCode.GetCode();
+ const sal_uInt16 nCode = _rCode.GetCode();
if ( _rCode.IsMod1() )
{
// scroll page
@@ -1573,13 +1573,13 @@ void OViewsWindow::handleKey(const KeyCode& _rCode)
if ( rView.IsDragObj() )
{
const bool bWasNoSnap = rDragStat.IsNoSnap();
- const BOOL bWasSnapEnabled = rView.IsSnapEnabled();
+ const sal_Bool bWasSnapEnabled = rView.IsSnapEnabled();
// switch snapping off
if ( !bWasNoSnap )
- ((SdrDragStat&)rDragStat).SetNoSnap( TRUE );
+ ((SdrDragStat&)rDragStat).SetNoSnap( sal_True );
if ( bWasSnapEnabled )
- rView.SetSnapEnabled( FALSE );
+ rView.SetSnapEnabled( sal_False );
Rectangle aNewRect;
bool bCheck = false;
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx
index ca5cdc3eb844..70f130c2afe4 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -174,11 +174,11 @@ DlgEdFunc::~DlgEdFunc()
//----------------------------------------------------------------------------
-BOOL DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt )
+sal_Bool DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt )
{
m_aMDPos = m_pParent->PixelToLogic( rMEvt.GetPosPixel() );
m_pParent->GrabFocus();
- BOOL bHandled = FALSE;
+ sal_Bool bHandled = sal_False;
if ( rMEvt.IsLeft() )
{
if ( rMEvt.GetClicks() > 1 )
@@ -195,8 +195,8 @@ BOOL DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt )
// SdrViewEvent aVEvt;
// m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
// if ( aVEvt.pRootObj && aVEvt.pRootObj->ISA(SdrTextObj) )
- // SetInEditMode(static_cast<SdrTextObj *>(aVEvt.pRootObj),rMEvt, FALSE);
- bHandled = TRUE;
+ // SetInEditMode(static_cast<SdrTextObj *>(aVEvt.pRootObj),rMEvt, sal_False);
+ bHandled = sal_True;
}
}
else
@@ -206,7 +206,7 @@ BOOL DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt )
// if selected object was hit, drag object
if ( pHdl!=NULL || m_rView.IsMarkedHit(m_aMDPos) )
{
- bHandled = TRUE;
+ bHandled = sal_True;
m_pParent->CaptureMouse();
m_pParent->getSectionWindow()->getViewsWindow()->BegDragObj(m_aMDPos, pHdl,&m_rView);
}
@@ -223,10 +223,10 @@ BOOL DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt )
else
m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(NULL);
- bHandled = TRUE;
+ bHandled = sal_True;
}
else if( !rMEvt.IsLeft() )
- bHandled = TRUE;
+ bHandled = sal_True;
if ( !bHandled )
m_pParent->CaptureMouse();
return bHandled;
@@ -234,9 +234,9 @@ BOOL DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt )
//----------------------------------------------------------------------------
-BOOL DlgEdFunc::MouseButtonUp( const MouseEvent& /*rMEvt*/ )
+sal_Bool DlgEdFunc::MouseButtonUp( const MouseEvent& /*rMEvt*/ )
{
- BOOL bHandled = FALSE;
+ sal_Bool bHandled = sal_False;
m_pParent->getSectionWindow()->getViewsWindow()->stopScrollTimer();
return bHandled;
}
@@ -245,7 +245,7 @@ void DlgEdFunc::checkTwoCklicks(const MouseEvent& rMEvt)
{
deactivateOle();
- const USHORT nClicks = rMEvt.GetClicks();
+ const sal_uInt16 nClicks = rMEvt.GetClicks();
if ( nClicks == 2 && rMEvt.IsLeft() )
{
if ( m_rView.AreObjectsMarked() )
@@ -270,19 +270,19 @@ void DlgEdFunc::stopScrollTimer()
}
//----------------------------------------------------------------------------
-BOOL DlgEdFunc::MouseMove( const MouseEvent& /*rMEvt*/ )
+sal_Bool DlgEdFunc::MouseMove( const MouseEvent& /*rMEvt*/ )
{
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------------
sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if ( !m_bUiActive )
{
const KeyCode& rCode = _rEvent.GetKeyCode();
- USHORT nCode = rCode.GetCode();
+ sal_uInt16 nCode = rCode.GetCode();
switch ( nCode )
{
@@ -291,12 +291,12 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent)
if ( m_pParent->getSectionWindow()->getViewsWindow()->IsAction() )
{
m_pParent->getSectionWindow()->getViewsWindow()->BrkAction();
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if ( m_rView.IsTextEdit() )
{
m_rView.SdrEndTextEdit();
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if ( m_rView.AreObjectsMarked() )
{
@@ -308,7 +308,7 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent)
m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(NULL);
deactivateOle(true);
- bReturn = FALSE;
+ bReturn = sal_False;
}
else
{
@@ -331,7 +331,7 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent)
if ( m_rView.AreObjectsMarked() )
m_rView.MakeVisible( m_rView.GetAllMarkedRect(), *m_pParent);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if ( rCode.IsMod1() && rCode.IsMod2())
{
@@ -348,7 +348,7 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent)
m_rView.MakeVisible( aVisRect, *m_pParent);
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -358,7 +358,7 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent)
case KEY_RIGHT:
{
m_pParent->getSectionWindow()->getViewsWindow()->handleKey(rCode);
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
case KEY_RETURN:
@@ -375,7 +375,7 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent)
case KEY_DELETE:
if ( !rCode.IsMod1() && !rCode.IsMod2() )
{
- bReturn = TRUE;
+ bReturn = sal_True;
break;
}
// run through
@@ -397,7 +397,7 @@ void DlgEdFunc::activateOle(SdrObject* _pObj)
{
if ( _pObj )
{
- const UINT16 nSdrObjKind = _pObj->GetObjIdentifier();
+ const sal_uInt16 nSdrObjKind = _pObj->GetObjIdentifier();
//
// OLE: activate
//
@@ -438,8 +438,8 @@ void DlgEdFunc::activateOle(SdrObject* _pObj)
void DlgEdFunc::deactivateOle(bool _bSelect)
{
OLEObjCache& rObjCache = GetSdrGlobalData().GetOLEObjCache();
- const ULONG nCount = rObjCache.Count();
- for(ULONG i = 0 ; i< nCount;++i)
+ const sal_uLong nCount = rObjCache.Count();
+ for(sal_uLong i = 0 ; i< nCount;++i)
{
SdrOle2Obj* pObj = reinterpret_cast<SdrOle2Obj*>(rObjCache.GetObject(i));
if ( m_pParent->getPage() == pObj->GetPage() )
@@ -658,22 +658,22 @@ bool DlgEdFunc::setMovementPointer(const MouseEvent& rMEvt)
DlgEdFuncInsert::DlgEdFuncInsert( OReportSection* _pParent ) :
DlgEdFunc( _pParent )
{
- m_rView.SetCreateMode( TRUE );
+ m_rView.SetCreateMode( sal_True );
}
//----------------------------------------------------------------------------
DlgEdFuncInsert::~DlgEdFuncInsert()
{
- m_rView.SetEditMode( TRUE );
+ m_rView.SetEditMode( sal_True );
}
//----------------------------------------------------------------------------
-BOOL DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
+sal_Bool DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( DlgEdFunc::MouseButtonDown(rMEvt) )
- return TRUE;
+ return sal_True;
SdrViewEvent aVEvt;
sal_Int16 nId = m_rView.GetCurrentObjIdentifier();
@@ -685,7 +685,7 @@ BOOL DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
{
// there is an object under the mouse cursor, but not a customshape
m_pParent->getSectionWindow()->getViewsWindow()->BrkAction();
- return FALSE;
+ return sal_False;
}
if( eHit != SDRHIT_UNMARKEDOBJECT || nId == OBJ_CUSTOMSHAPE)
@@ -710,19 +710,19 @@ BOOL DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
m_pParent->getSectionWindow()->getViewsWindow()->BegMarkObj( m_aMDPos,&m_rView );
}
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
-BOOL DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
+sal_Bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
{
if ( DlgEdFunc::MouseButtonUp( rMEvt ) )
- return TRUE;
+ return sal_True;
const Point aPos( m_pParent->PixelToLogic( rMEvt.GetPosPixel() ) );
- const USHORT nHitLog = USHORT ( m_pParent->PixelToLogic(Size(3,0)).Width() );
+ const sal_uInt16 nHitLog = sal_uInt16 ( m_pParent->PixelToLogic(Size(3,0)).Width() );
- BOOL bReturn = TRUE;
+ sal_Bool bReturn = sal_True;
// object creation active?
if ( m_rView.IsCreateObj() )
{
@@ -730,8 +730,8 @@ BOOL DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
{
m_pParent->getSectionWindow()->getViewsWindow()->BrkAction();
// BrkAction disables the create mode
- m_rView.SetCreateMode( TRUE );
- return TRUE;
+ m_rView.SetCreateMode( sal_True );
+ return sal_True;
}
m_rView.EndCreateObj(SDRCREATE_FORCEEND);
@@ -777,10 +777,10 @@ BOOL DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
//----------------------------------------------------------------------------
-BOOL DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
+sal_Bool DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
{
if ( DlgEdFunc::MouseMove(rMEvt ) )
- return TRUE;
+ return sal_True;
Point aPos( m_pParent->PixelToLogic( rMEvt.GetPosPixel() ) );
if ( m_rView.IsCreateObj() )
@@ -808,7 +808,7 @@ BOOL DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
if ( !bIsSetPoint )
m_pParent->SetPointer( m_rView.GetPreferedPointer( aPos, m_pParent) );
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
@@ -826,11 +826,11 @@ DlgEdFuncSelect::~DlgEdFuncSelect()
//----------------------------------------------------------------------------
-BOOL DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
+sal_Bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
{
m_bSelectionMode = false;
if ( DlgEdFunc::MouseButtonDown(rMEvt) )
- return TRUE;
+ return sal_True;
SdrViewEvent aVEvt;
const SdrHitKind eHit = m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
@@ -867,15 +867,15 @@ BOOL DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
}
}
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
-BOOL DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
+sal_Bool DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
{
if ( DlgEdFunc::MouseButtonUp( rMEvt ) )
- return TRUE;
+ return sal_True;
// get view from parent
const Point aPnt( m_pParent->PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -891,15 +891,15 @@ BOOL DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
if ( !m_bUiActive )
m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->UpdatePropertyBrowserDelayed(m_rView);
m_bSelectionMode = false;
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
-BOOL DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
+sal_Bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
{
if ( DlgEdFunc::MouseMove(rMEvt ) )
- return TRUE;
+ return sal_True;
Point aPnt( m_pParent->PixelToLogic( rMEvt.GetPosPixel() ) );
bool bIsSetPoint = false;
@@ -937,7 +937,7 @@ BOOL DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
unColorizeOverlappedObj();
}
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index fd4ecfbd5f65..a54c4ef3664f 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -299,7 +299,7 @@ sal_Bool PropBrw::Close()
m_pDesignView->getController().executeUnChecked(SID_PROPERTYBROWSER_LAST_PAGE,uno::Sequence< beans::PropertyValue>());
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
@@ -531,8 +531,8 @@ void PropBrw::Update( OSectionView* pNewView )
uno::Sequence< Reference<uno::XInterface> > aMarkedObjects;
OViewsWindow* pViews = m_pView->getReportSection()->getSectionWindow()->getViewsWindow();
- const USHORT nSectionCount = pViews->getSectionCount();
- for (USHORT i = 0; i < nSectionCount; ++i)
+ const sal_uInt16 nSectionCount = pViews->getSectionCount();
+ for (sal_uInt16 i = 0; i < nSectionCount; ++i)
{
::boost::shared_ptr<OSectionWindow> pSectionWindow = pViews->getSectionWindow(i);
if ( pSectionWindow )
diff --git a/reportdesign/source/ui/report/report.src b/reportdesign/source/ui/report/report.src
index 52f5fe402c79..c4c64b83d1c6 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 f7e08f34442e..3c52ed77c852 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_R
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_CONDI
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_R
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 fd6a31699268..dc58db3f61a0 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 000000000000..ef5b2cc4c78d
--- /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 000000000000..593f06d0b582
--- /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 000000000000..8a0021ecdf9a
--- /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>