summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-20 09:52:21 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-20 09:52:21 +0200
commitc5a87fa8d45112b9e7c9df773104aeaa13392b14 (patch)
tree748f3a5ba89332388cdeb8560d21c52c1cdfc30e
parenta05678c31241122f2a9d69fcf5aea5ae9c4f3de1 (diff)
parent10037f7f21d0b30111d7de478dee7356a37882f8 (diff)
Merge branch 'master' into feature/gnumake4
Conflicts: dbaccess/AllLangResTarget_adabasui.mk dbaccess/AllLangResTarget_dba.mk dbaccess/AllLangResTarget_dbmm.mk dbaccess/AllLangResTarget_sdbt.mk dbaccess/Executable_odbcconfig.mk dbaccess/JunitTest_dbaccess_unoapi.mk dbaccess/Library_adabasui.mk dbaccess/Library_dba.mk dbaccess/Library_dbaxml.mk dbaccess/Library_dbmm.mk dbaccess/Library_sdbt.mk dbaccess/Makefile dbaccess/Module_dbaccess.mk dbaccess/Package_inc.mk dbaccess/Package_uiconfig.mk dbaccess/prj/build.lst dbaccess/qa/unoapi/Test.java dbaccess/source/core/api/CacheSet.hxx dbaccess/source/core/dataaccess/SharedConnection.hxx dbaccess/source/core/dataaccess/connection.cxx dbaccess/source/filter/xml/xmlAutoStyle.cxx dbaccess/source/filter/xml/xmlColumn.cxx dbaccess/source/filter/xml/xmlComponent.cxx dbaccess/source/filter/xml/xmlConnectionData.cxx dbaccess/source/filter/xml/xmlConnectionResource.cxx dbaccess/source/filter/xml/xmlDataSource.cxx dbaccess/source/filter/xml/xmlDataSourceInfo.cxx dbaccess/source/filter/xml/xmlDataSourceSetting.cxx dbaccess/source/filter/xml/xmlDataSourceSettings.cxx dbaccess/source/filter/xml/xmlDatabaseDescription.cxx dbaccess/source/filter/xml/xmlDocuments.cxx dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx dbaccess/source/filter/xml/xmlHelper.cxx dbaccess/source/filter/xml/xmlHierarchyCollection.cxx dbaccess/source/filter/xml/xmlLogin.cxx dbaccess/source/filter/xml/xmlQuery.cxx dbaccess/source/filter/xml/xmlServerDatabase.cxx dbaccess/source/filter/xml/xmlTable.cxx dbaccess/source/filter/xml/xmlTableFilterList.cxx dbaccess/source/filter/xml/xmlTableFilterPattern.cxx dbaccess/source/ui/app/AppDetailPageHelper.cxx dbaccess/source/ui/app/AppDetailView.cxx dbaccess/source/ui/app/AppIconControl.cxx dbaccess/source/ui/app/AppSwapWindow.cxx dbaccess/source/ui/app/AppTitleWindow.cxx dbaccess/source/ui/app/AppView.cxx dbaccess/source/ui/browser/AsyncronousLink.cxx dbaccess/source/ui/browser/genericcontroller.cxx dbaccess/source/ui/control/ColumnControlWindow.cxx dbaccess/source/ui/control/RelationControl.cxx dbaccess/source/ui/control/SqlNameEdit.cxx dbaccess/source/ui/control/TableGrantCtrl.cxx dbaccess/source/ui/control/VertSplitView.cxx dbaccess/source/ui/control/toolboxcontroller.cxx dbaccess/source/ui/dlg/CollectionView.cxx dbaccess/source/ui/dlg/ConnectionHelper.cxx dbaccess/source/ui/dlg/ConnectionPageSetup.cxx dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx dbaccess/source/ui/dlg/RelationDlg.cxx dbaccess/source/ui/dlg/TextConnectionHelper.cxx dbaccess/source/ui/dlg/detailpages.cxx dbaccess/source/ui/dlg/dlgsize.cxx dbaccess/source/ui/dlg/queryorder.cxx dbaccess/source/ui/dlg/tablespage.cxx dbaccess/source/ui/misc/TableCopyHelper.cxx dbaccess/source/ui/misc/ToolBoxHelper.cxx dbaccess/source/ui/misc/WExtendPages.cxx dbaccess/source/ui/misc/WNameMatch.cxx dbaccess/source/ui/misc/WTypeSelect.cxx dbaccess/source/ui/querydesign/ConnectionLine.cxx dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx dbaccess/source/ui/querydesign/ConnectionLineData.cxx dbaccess/source/ui/querydesign/JAccess.cxx dbaccess/source/ui/querydesign/JoinController.cxx dbaccess/source/ui/querydesign/JoinDesignView.cxx dbaccess/source/ui/querydesign/JoinExchange.cxx dbaccess/source/ui/querydesign/JoinTableView.cxx dbaccess/source/ui/querydesign/QTableConnection.cxx dbaccess/source/ui/querydesign/QTableConnectionData.cxx dbaccess/source/ui/querydesign/QTableWindow.cxx dbaccess/source/ui/querydesign/QTableWindowData.cxx dbaccess/source/ui/querydesign/QueryDesignView.cxx dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx dbaccess/source/ui/querydesign/QueryTextView.cxx dbaccess/source/ui/querydesign/QueryViewSwitch.cxx dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx dbaccess/source/ui/querydesign/TableConnection.cxx dbaccess/source/ui/querydesign/TableConnectionData.cxx dbaccess/source/ui/querydesign/TableWindow.cxx dbaccess/source/ui/querydesign/TableWindowAccess.cxx dbaccess/source/ui/querydesign/TableWindowData.cxx dbaccess/source/ui/querydesign/TableWindowListBox.cxx dbaccess/source/ui/querydesign/TableWindowTitle.cxx dbaccess/source/ui/querydesign/querydlg.cxx dbaccess/source/ui/querydesign/queryview.cxx dbaccess/source/ui/relationdesign/RTableConnection.cxx dbaccess/source/ui/relationdesign/RelationDesignView.cxx dbaccess/source/ui/relationdesign/RelationTableView.cxx dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx dbaccess/source/ui/tabledesign/FieldDescriptions.cxx dbaccess/source/ui/tabledesign/TEditControl.cxx dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx dbaccess/source/ui/tabledesign/TableDesignView.cxx dbaccess/source/ui/tabledesign/TableFieldControl.cxx dbaccess/source/ui/tabledesign/TableRow.cxx dbaccess/source/ui/tabledesign/TableRowExchange.cxx dbaccess/source/ui/tabledesign/TableUndo.cxx dbaccess/source/ui/uno/ColumnControl.cxx dbaccess/source/ui/uno/ColumnPeer.cxx reportdesign/AllLangResTarget_rpt.mk reportdesign/AllLangResTarget_rptui.mk reportdesign/Library_rpt.mk reportdesign/Library_rptui.mk reportdesign/Library_rptxml.mk reportdesign/Module_reportdesign.mk reportdesign/Package_uiconfig.mk reportdesign/Package_xml.mk reportdesign/prj/build.lst reportdesign/prj/makefile.mk
-rw-r--r--.gitignore18
-rw-r--r--dbaccess/AllLangResTarget_dba.mk55
-rw-r--r--dbaccess/AllLangResTarget_dbmm.mk54
-rw-r--r--dbaccess/AllLangResTarget_dbu.mk95
-rw-r--r--dbaccess/AllLangResTarget_sdbt.mk57
-rw-r--r--dbaccess/Executable_odbcconfig.mk71
-rw-r--r--dbaccess/JunitTest_dbaccess_unoapi.mk63
-rw-r--r--dbaccess/Library_adabasui.mk71
-rw-r--r--dbaccess/Library_dba.mk260
-rw-r--r--dbaccess/Library_dbaxml.mk144
-rw-r--r--dbaccess/Library_dbmm.mk111
-rw-r--r--dbaccess/Library_dbu.mk321
-rw-r--r--dbaccess/Library_sdbt.mk95
-rw-r--r--dbaccess/Module_dbaccess.mk76
-rw-r--r--dbaccess/Package_inc.mk62
-rw-r--r--dbaccess/Package_uiconfig.mk54
-rw-r--r--dbaccess/inc/AsyncronousLink.hxx2
-rw-r--r--dbaccess/inc/IController.hxx9
-rw-r--r--dbaccess/inc/IReference.hxx2
-rw-r--r--dbaccess/inc/ToolBoxHelper.hxx20
-rw-r--r--dbaccess/inc/controllerframe.hxx3
-rw-r--r--dbaccess/inc/dataview.hxx3
-rw-r--r--dbaccess/inc/dbaccessdllapi.h2
-rw-r--r--[-rwxr-xr-x]dbaccess/inc/dbaundomanager.hxx0
-rw-r--r--dbaccess/inc/dbsubcomponentcontroller.hxx6
-rw-r--r--dbaccess/inc/genericcontroller.hxx2
-rw-r--r--dbaccess/inc/makefile.mk47
-rw-r--r--dbaccess/inc/pch/precompiled_dbaccess.cxx2
-rw-r--r--dbaccess/inc/pch/precompiled_dbaccess.hxx9
-rw-r--r--dbaccess/prj/build.lst5
-rwxr-xr-x[-rw-r--r--]dbaccess/prj/makefile.mk2
-rw-r--r--dbaccess/qa/complex/dbaccess/DatabaseDocument.java2
-rw-r--r--dbaccess/qa/complex/dbaccess/RowSet.java5
-rwxr-xr-xdbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java14
-rw-r--r--dbaccess/qa/unoapi/makefile.mk48
-rw-r--r--dbaccess/source/core/api/BookmarkSet.cxx40
-rw-r--r--dbaccess/source/core/api/BookmarkSet.hxx8
-rw-r--r--dbaccess/source/core/api/CIndexColumn.hxx7
-rw-r--r--dbaccess/source/core/api/CIndexes.cxx33
-rw-r--r--dbaccess/source/core/api/CIndexes.hxx7
-rw-r--r--dbaccess/source/core/api/CRowSetColumn.cxx24
-rw-r--r--dbaccess/source/core/api/CRowSetColumn.hxx15
-rw-r--r--dbaccess/source/core/api/CRowSetDataColumn.cxx71
-rw-r--r--dbaccess/source/core/api/CRowSetDataColumn.hxx15
-rw-r--r--dbaccess/source/core/api/CacheSet.cxx232
-rw-r--r--dbaccess/source/core/api/CacheSet.hxx8
-rw-r--r--dbaccess/source/core/api/FilteredContainer.cxx43
-rw-r--r--dbaccess/source/core/api/HelperCollections.cxx27
-rw-r--r--dbaccess/source/core/api/HelperCollections.hxx25
-rw-r--r--dbaccess/source/core/api/KeySet.cxx277
-rw-r--r--dbaccess/source/core/api/KeySet.hxx36
-rw-r--r--dbaccess/source/core/api/OptimisticSet.cxx92
-rw-r--r--dbaccess/source/core/api/OptimisticSet.hxx21
-rw-r--r--dbaccess/source/core/api/PrivateRow.cxx4
-rw-r--r--dbaccess/source/core/api/PrivateRow.hxx8
-rw-r--r--dbaccess/source/core/api/RowSet.cxx444
-rw-r--r--dbaccess/source/core/api/RowSet.hxx12
-rw-r--r--dbaccess/source/core/api/RowSetBase.cxx327
-rw-r--r--dbaccess/source/core/api/RowSetBase.hxx57
-rw-r--r--dbaccess/source/core/api/RowSetCache.cxx225
-rw-r--r--dbaccess/source/core/api/RowSetCache.hxx53
-rw-r--r--dbaccess/source/core/api/RowSetCacheIterator.cxx41
-rw-r--r--dbaccess/source/core/api/RowSetCacheIterator.hxx15
-rw-r--r--dbaccess/source/core/api/RowSetRow.hxx24
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx179
-rw-r--r--dbaccess/source/core/api/StaticSet.cxx97
-rw-r--r--dbaccess/source/core/api/StaticSet.hxx6
-rw-r--r--dbaccess/source/core/api/TableDeco.cxx243
-rw-r--r--dbaccess/source/core/api/View.cxx26
-rw-r--r--dbaccess/source/core/api/WrappedResultSet.cxx42
-rw-r--r--dbaccess/source/core/api/WrappedResultSet.hxx9
-rw-r--r--dbaccess/source/core/api/callablestatement.cxx48
-rw-r--r--dbaccess/source/core/api/column.cxx55
-rw-r--r--dbaccess/source/core/api/columnsettings.cxx17
-rw-r--r--dbaccess/source/core/api/datacolumn.cxx79
-rw-r--r--dbaccess/source/core/api/datacolumn.hxx16
-rw-r--r--dbaccess/source/core/api/datasettings.cxx41
-rw-r--r--dbaccess/source/core/api/definitioncolumn.cxx80
-rw-r--r--dbaccess/source/core/api/makefile.mk82
-rw-r--r--dbaccess/source/core/api/preparedstatement.cxx47
-rw-r--r--dbaccess/source/core/api/query.cxx99
-rw-r--r--dbaccess/source/core/api/query.hxx20
-rw-r--r--dbaccess/source/core/api/querycomposer.cxx107
-rw-r--r--dbaccess/source/core/api/querycontainer.cxx101
-rw-r--r--dbaccess/source/core/api/querydescriptor.cxx78
-rw-r--r--dbaccess/source/core/api/querydescriptor.hxx28
-rw-r--r--dbaccess/source/core/api/resultcolumn.cxx52
-rw-r--r--dbaccess/source/core/api/resultcolumn.hxx8
-rw-r--r--dbaccess/source/core/api/resultset.cxx174
-rw-r--r--dbaccess/source/core/api/resultset.hxx44
-rw-r--r--dbaccess/source/core/api/statement.cxx80
-rw-r--r--dbaccess/source/core/api/table.cxx79
-rw-r--r--dbaccess/source/core/api/tablecontainer.cxx76
-rw-r--r--dbaccess/source/core/api/viewcontainer.cxx40
-rw-r--r--dbaccess/source/core/dataaccess/ComponentDefinition.cxx82
-rw-r--r--dbaccess/source/core/dataaccess/ComponentDefinition.hxx37
-rw-r--r--dbaccess/source/core/dataaccess/ContentHelper.cxx203
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx118
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.hxx17
-rw-r--r--dbaccess/source/core/dataaccess/SharedConnection.cxx65
-rw-r--r--dbaccess/source/core/dataaccess/SharedConnection.hxx53
-rw-r--r--dbaccess/source/core/dataaccess/bookmarkcontainer.cxx69
-rw-r--r--dbaccess/source/core/dataaccess/bookmarkcontainer.hxx37
-rw-r--r--dbaccess/source/core/dataaccess/commandcontainer.cxx30
-rw-r--r--dbaccess/source/core/dataaccess/commandcontainer.hxx16
-rw-r--r--dbaccess/source/core/dataaccess/commanddefinition.cxx30
-rw-r--r--dbaccess/source/core/dataaccess/commanddefinition.hxx29
-rw-r--r--dbaccess/source/core/dataaccess/connection.cxx100
-rw-r--r--dbaccess/source/core/dataaccess/connection.hxx6
-rw-r--r--dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx28
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx86
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.hxx5
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx193
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.hxx16
-rw-r--r--dbaccess/source/core/dataaccess/databaseregistrations.cxx44
-rw-r--r--dbaccess/source/core/dataaccess/databaseregistrations.hxx9
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx154
-rw-r--r--dbaccess/source/core/dataaccess/datasource.hxx74
-rw-r--r--dbaccess/source/core/dataaccess/definitioncontainer.cxx111
-rw-r--r--dbaccess/source/core/dataaccess/documentcontainer.cxx130
-rw-r--r--dbaccess/source/core/dataaccess/documentcontainer.hxx28
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx354
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.hxx32
-rw-r--r--dbaccess/source/core/dataaccess/documenteventexecutor.cxx31
-rw-r--r--dbaccess/source/core/dataaccess/documenteventexecutor.hxx9
-rw-r--r--dbaccess/source/core/dataaccess/documenteventnotifier.cxx25
-rw-r--r--dbaccess/source/core/dataaccess/documenteventnotifier.hxx9
-rw-r--r--dbaccess/source/core/dataaccess/documentevents.cxx34
-rw-r--r--dbaccess/source/core/dataaccess/documentevents.hxx9
-rw-r--r--dbaccess/source/core/dataaccess/intercept.cxx25
-rw-r--r--dbaccess/source/core/dataaccess/intercept.hxx103
-rw-r--r--dbaccess/source/core/dataaccess/makefile.mk69
-rw-r--r--dbaccess/source/core/dataaccess/myucp_datasupplier.cxx53
-rw-r--r--dbaccess/source/core/dataaccess/myucp_datasupplier.hxx11
-rw-r--r--dbaccess/source/core/dataaccess/myucp_resultset.cxx13
-rw-r--r--dbaccess/source/core/dataaccess/myucp_resultset.hxx11
-rw-r--r--dbaccess/source/core/inc/ContainerListener.hxx20
-rw-r--r--dbaccess/source/core/inc/ContainerMediator.hxx30
-rw-r--r--dbaccess/source/core/inc/ContentHelper.hxx56
-rw-r--r--dbaccess/source/core/inc/DatabaseDataProvider.hxx7
-rw-r--r--dbaccess/source/core/inc/FilteredContainer.hxx7
-rw-r--r--dbaccess/source/core/inc/PropertyForward.hxx21
-rw-r--r--dbaccess/source/core/inc/RefreshListener.hxx11
-rw-r--r--dbaccess/source/core/inc/SingleSelectQueryComposer.hxx7
-rw-r--r--dbaccess/source/core/inc/TableDeco.hxx46
-rw-r--r--dbaccess/source/core/inc/View.hxx12
-rw-r--r--dbaccess/source/core/inc/callablestatement.hxx10
-rw-r--r--dbaccess/source/core/inc/column.hxx13
-rw-r--r--dbaccess/source/core/inc/columnsettings.hxx25
-rw-r--r--dbaccess/source/core/inc/commandbase.hxx15
-rw-r--r--dbaccess/source/core/inc/composertools.hxx10
-rw-r--r--dbaccess/source/core/inc/containerapprove.hxx10
-rw-r--r--dbaccess/source/core/inc/core_resource.hrc5
-rw-r--r--dbaccess/source/core/inc/core_resource.hxx17
-rw-r--r--dbaccess/source/core/inc/datasettings.hxx20
-rw-r--r--dbaccess/source/core/inc/dbamiscres.hrc10
-rw-r--r--dbaccess/source/core/inc/definitioncolumn.hxx4
-rw-r--r--dbaccess/source/core/inc/definitioncontainer.hxx47
-rw-r--r--dbaccess/source/core/inc/module_dba.hxx8
-rw-r--r--dbaccess/source/core/inc/object.hxx4
-rw-r--r--dbaccess/source/core/inc/objectnameapproval.hxx15
-rw-r--r--dbaccess/source/core/inc/preparedstatement.hxx20
-rw-r--r--dbaccess/source/core/inc/querycomposer.hxx31
-rw-r--r--dbaccess/source/core/inc/querycontainer.hxx58
-rw-r--r--dbaccess/source/core/inc/recovery/dbdocrecovery.hxx9
-rw-r--r--dbaccess/source/core/inc/sdbcoretools.hxx12
-rw-r--r--dbaccess/source/core/inc/statement.hxx34
-rw-r--r--dbaccess/source/core/inc/table.hxx5
-rw-r--r--dbaccess/source/core/inc/tablecontainer.hxx40
-rw-r--r--dbaccess/source/core/inc/userinformation.hxx8
-rw-r--r--dbaccess/source/core/inc/veto.hxx12
-rw-r--r--dbaccess/source/core/inc/viewcontainer.hxx32
-rw-r--r--dbaccess/source/core/misc/ContainerListener.cxx5
-rw-r--r--dbaccess/source/core/misc/ContainerMediator.cxx27
-rw-r--r--dbaccess/source/core/misc/DatabaseDataProvider.cxx25
-rw-r--r--dbaccess/source/core/misc/PropertyForward.cxx2
-rw-r--r--dbaccess/source/core/misc/apitools.cxx12
-rw-r--r--dbaccess/source/core/misc/dbastrings.cxx5
-rw-r--r--dbaccess/source/core/misc/dsntypes.cxx44
-rw-r--r--dbaccess/source/core/misc/makefile.mk60
-rw-r--r--dbaccess/source/core/misc/module_dba.cxx2
-rw-r--r--dbaccess/source/core/misc/objectnameapproval.cxx16
-rw-r--r--dbaccess/source/core/misc/sdbcoretools.cxx2
-rw-r--r--dbaccess/source/core/misc/services.cxx31
-rw-r--r--dbaccess/source/core/misc/userinformation.cxx12
-rw-r--r--dbaccess/source/core/misc/veto.cxx4
-rw-r--r--dbaccess/source/core/recovery/dbdocrecovery.cxx18
-rw-r--r--dbaccess/source/core/recovery/makefile.mk58
-rw-r--r--dbaccess/source/core/recovery/settingsimport.cxx25
-rw-r--r--dbaccess/source/core/recovery/settingsimport.hxx3
-rw-r--r--dbaccess/source/core/recovery/storagestream.cxx3
-rw-r--r--dbaccess/source/core/recovery/storagestream.hxx3
-rw-r--r--dbaccess/source/core/recovery/storagetextstream.cxx3
-rw-r--r--dbaccess/source/core/recovery/storagetextstream.hxx3
-rw-r--r--dbaccess/source/core/recovery/storagexmlstream.cxx3
-rw-r--r--dbaccess/source/core/recovery/storagexmlstream.hxx3
-rw-r--r--dbaccess/source/core/recovery/subcomponentloader.cxx3
-rw-r--r--dbaccess/source/core/recovery/subcomponentloader.hxx3
-rw-r--r--dbaccess/source/core/recovery/subcomponentrecovery.cxx29
-rw-r--r--dbaccess/source/core/recovery/subcomponentrecovery.hxx3
-rw-r--r--dbaccess/source/core/recovery/subcomponents.hxx7
-rw-r--r--dbaccess/source/core/resource/core_resource.cxx6
-rw-r--r--dbaccess/source/core/resource/makefile.mk48
-rw-r--r--dbaccess/source/core/resource/strings.src53
-rw-r--r--dbaccess/source/ext/adabas/ANewDb.cxx18
-rw-r--r--dbaccess/source/ext/adabas/ANewDb.hxx9
-rw-r--r--dbaccess/source/ext/adabas/ASQLNameEdit.hxx6
-rw-r--r--dbaccess/source/ext/adabas/ASqlNameEdit.cxx4
-rw-r--r--dbaccess/source/ext/adabas/Acomponentmodule.cxx22
-rw-r--r--dbaccess/source/ext/adabas/Acomponentmodule.hxx18
-rw-r--r--dbaccess/source/ext/adabas/AdabasNewDb.cxx64
-rw-r--r--dbaccess/source/ext/adabas/AdabasNewDb.hxx18
-rw-r--r--dbaccess/source/ext/adabas/AdabasNewDb.src84
-rw-r--r--dbaccess/source/ext/adabas/Aservices.cxx12
-rw-r--r--dbaccess/source/ext/adabas/Astringconstants.cxx2
-rw-r--r--dbaccess/source/ext/adabas/adabasuistrings.cxx4
-rw-r--r--dbaccess/source/ext/adabas/makefile.mk100
-rw-r--r--dbaccess/source/ext/macromigration/dbmm_module.cxx2
-rw-r--r--dbaccess/source/ext/macromigration/dbmm_module.hxx2
-rw-r--r--dbaccess/source/ext/macromigration/dbmm_services.cxx14
-rw-r--r--dbaccess/source/ext/macromigration/dbmm_types.cxx3
-rw-r--r--dbaccess/source/ext/macromigration/dbmm_types.hxx4
-rw-r--r--dbaccess/source/ext/macromigration/docinteraction.cxx3
-rw-r--r--dbaccess/source/ext/macromigration/docinteraction.hxx3
-rw-r--r--dbaccess/source/ext/macromigration/macromigration.src9
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationdialog.cxx9
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationdialog.hxx3
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationpages.cxx3
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationpages.hxx3
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationwizard.cxx3
-rw-r--r--dbaccess/source/ext/macromigration/makefile.mk109
-rw-r--r--dbaccess/source/ext/macromigration/migrationengine.cxx35
-rw-r--r--dbaccess/source/ext/macromigration/migrationengine.hxx3
-rw-r--r--dbaccess/source/ext/macromigration/migrationerror.hxx2
-rw-r--r--dbaccess/source/ext/macromigration/migrationlog.cxx9
-rw-r--r--dbaccess/source/ext/macromigration/migrationlog.hxx3
-rw-r--r--dbaccess/source/ext/macromigration/migrationprogress.hxx3
-rw-r--r--dbaccess/source/ext/macromigration/progresscapture.cxx17
-rw-r--r--dbaccess/source/ext/macromigration/progresscapture.hxx3
-rw-r--r--dbaccess/source/ext/macromigration/progressmixer.cxx3
-rw-r--r--dbaccess/source/ext/macromigration/progressmixer.hxx3
-rw-r--r--dbaccess/source/ext/macromigration/rangeprogressbar.hxx3
-rw-r--r--dbaccess/source/filter/xml/dbloader2.cxx30
-rw-r--r--dbaccess/source/filter/xml/makefile.mk122
-rw-r--r--dbaccess/source/filter/xml/xmlAutoStyle.cxx13
-rw-r--r--dbaccess/source/filter/xml/xmlAutoStyle.hxx10
-rw-r--r--dbaccess/source/filter/xml/xmlColumn.cxx40
-rw-r--r--dbaccess/source/filter/xml/xmlColumn.hxx3
-rw-r--r--dbaccess/source/filter/xml/xmlComponent.cxx25
-rw-r--r--dbaccess/source/filter/xml/xmlComponent.hxx7
-rw-r--r--dbaccess/source/filter/xml/xmlConnectionData.cxx23
-rw-r--r--dbaccess/source/filter/xml/xmlConnectionData.hxx7
-rw-r--r--dbaccess/source/filter/xml/xmlConnectionResource.cxx23
-rw-r--r--dbaccess/source/filter/xml/xmlConnectionResource.hxx6
-rw-r--r--dbaccess/source/filter/xml/xmlDataSource.cxx45
-rw-r--r--dbaccess/source/filter/xml/xmlDataSource.hxx7
-rw-r--r--dbaccess/source/filter/xml/xmlDataSourceInfo.cxx25
-rw-r--r--dbaccess/source/filter/xml/xmlDataSourceInfo.hxx5
-rw-r--r--dbaccess/source/filter/xml/xmlDataSourceSetting.cxx31
-rw-r--r--dbaccess/source/filter/xml/xmlDataSourceSetting.hxx9
-rw-r--r--dbaccess/source/filter/xml/xmlDataSourceSettings.cxx23
-rw-r--r--dbaccess/source/filter/xml/xmlDataSourceSettings.hxx5
-rw-r--r--dbaccess/source/filter/xml/xmlDatabase.cxx3
-rw-r--r--dbaccess/source/filter/xml/xmlDatabase.hxx5
-rw-r--r--dbaccess/source/filter/xml/xmlDatabaseDescription.cxx19
-rw-r--r--dbaccess/source/filter/xml/xmlDatabaseDescription.hxx7
-rw-r--r--dbaccess/source/filter/xml/xmlDocuments.cxx26
-rw-r--r--dbaccess/source/filter/xml/xmlDocuments.hxx9
-rw-r--r--dbaccess/source/filter/xml/xmlEnums.hxx3
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx77
-rw-r--r--dbaccess/source/filter/xml/xmlExport.hxx45
-rw-r--r--dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx23
-rw-r--r--dbaccess/source/filter/xml/xmlFileBasedDatabase.hxx7
-rw-r--r--dbaccess/source/filter/xml/xmlHelper.cxx52
-rw-r--r--dbaccess/source/filter/xml/xmlHelper.hxx8
-rw-r--r--dbaccess/source/filter/xml/xmlHierarchyCollection.cxx35
-rw-r--r--dbaccess/source/filter/xml/xmlHierarchyCollection.hxx3
-rw-r--r--dbaccess/source/filter/xml/xmlLogin.cxx29
-rw-r--r--dbaccess/source/filter/xml/xmlLogin.hxx5
-rw-r--r--dbaccess/source/filter/xml/xmlQuery.cxx29
-rw-r--r--dbaccess/source/filter/xml/xmlQuery.hxx7
-rw-r--r--dbaccess/source/filter/xml/xmlServerDatabase.cxx23
-rw-r--r--dbaccess/source/filter/xml/xmlServerDatabase.hxx6
-rw-r--r--dbaccess/source/filter/xml/xmlStyleImport.cxx45
-rw-r--r--dbaccess/source/filter/xml/xmlStyleImport.hxx24
-rw-r--r--dbaccess/source/filter/xml/xmlTable.cxx39
-rw-r--r--dbaccess/source/filter/xml/xmlTable.hxx9
-rw-r--r--dbaccess/source/filter/xml/xmlTableFilterList.cxx27
-rw-r--r--dbaccess/source/filter/xml/xmlTableFilterList.hxx5
-rw-r--r--dbaccess/source/filter/xml/xmlTableFilterPattern.cxx9
-rw-r--r--dbaccess/source/filter/xml/xmlTableFilterPattern.hxx5
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx124
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.hxx41
-rw-r--r--dbaccess/source/filter/xml/xmlservices.cxx8
-rw-r--r--[-rwxr-xr-x]dbaccess/source/inc/OAuthenticationContinuation.hxx2
-rw-r--r--dbaccess/source/inc/apitools.hxx16
-rw-r--r--dbaccess/source/inc/constasciistring.hxx3
-rw-r--r--dbaccess/source/inc/dbadllapi.hxx3
-rw-r--r--dbaccess/source/inc/dbu_reghelper.hxx14
-rw-r--r--dbaccess/source/inc/dsntypes.hxx4
-rw-r--r--dbaccess/source/inc/flt_reghelper.hxx14
-rw-r--r--dbaccess/source/inc/registrationhelper.hxx2
-rw-r--r--dbaccess/source/inc/stringconstants.hrc2
-rw-r--r--dbaccess/source/inc/stringconstants.inc1
-rw-r--r--dbaccess/source/sdbtools/connection/connectiondependent.hxx2
-rw-r--r--dbaccess/source/sdbtools/connection/connectiontools.cxx12
-rw-r--r--dbaccess/source/sdbtools/connection/connectiontools.hxx18
-rw-r--r--dbaccess/source/sdbtools/connection/datasourcemetadata.cxx8
-rw-r--r--dbaccess/source/sdbtools/connection/datasourcemetadata.hxx9
-rw-r--r--dbaccess/source/sdbtools/connection/makefile.mk49
-rw-r--r--dbaccess/source/sdbtools/connection/objectnames.cxx10
-rw-r--r--dbaccess/source/sdbtools/connection/objectnames.hxx2
-rw-r--r--dbaccess/source/sdbtools/connection/tablename.cxx7
-rw-r--r--dbaccess/source/sdbtools/connection/tablename.hxx8
-rw-r--r--dbaccess/source/sdbtools/inc/module_sdbt.hxx4
-rw-r--r--dbaccess/source/sdbtools/misc/makefile.mk47
-rw-r--r--dbaccess/source/sdbtools/misc/module_sdbt.cxx4
-rw-r--r--dbaccess/source/sdbtools/misc/sdbt_services.cxx4
-rw-r--r--dbaccess/source/sdbtools/resource/makefile.mk45
-rw-r--r--dbaccess/source/sdbtools/resource/sdbt_strings.src2
-rw-r--r--dbaccess/source/shared/dbu_reghelper.cxx6
-rw-r--r--dbaccess/source/shared/dbustrings.cxx3
-rw-r--r--dbaccess/source/shared/flt_reghelper.cxx9
-rw-r--r--dbaccess/source/shared/makefile.mk69
-rw-r--r--dbaccess/source/shared/registrationhelper.cxx6
-rw-r--r--dbaccess/source/shared/sdbtstrings.cxx3
-rw-r--r--dbaccess/source/shared/xmlstrings.cxx2
-rw-r--r--dbaccess/source/ui/app/AppController.cxx65
-rw-r--r--dbaccess/source/ui/app/AppController.hxx2
-rw-r--r--dbaccess/source/ui/app/AppControllerDnD.cxx160
-rw-r--r--dbaccess/source/ui/app/AppControllerGen.cxx40
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx201
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.hxx39
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx160
-rw-r--r--dbaccess/source/ui/app/AppDetailView.hxx29
-rw-r--r--dbaccess/source/ui/app/AppIconControl.cxx43
-rw-r--r--dbaccess/source/ui/app/AppIconControl.hxx6
-rw-r--r--dbaccess/source/ui/app/AppSwapWindow.cxx25
-rw-r--r--dbaccess/source/ui/app/AppSwapWindow.hxx10
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.cxx18
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.hxx4
-rw-r--r--dbaccess/source/ui/app/AppView.cxx72
-rw-r--r--dbaccess/source/ui/app/AppView.hxx20
-rw-r--r--dbaccess/source/ui/app/IApplicationController.hxx3
-rw-r--r--dbaccess/source/ui/app/app.src27
-rw-r--r--dbaccess/source/ui/app/closeveto.cxx2
-rw-r--r--dbaccess/source/ui/app/makefile.mk70
-rw-r--r--dbaccess/source/ui/app/subcomponentmanager.cxx10
-rw-r--r--dbaccess/source/ui/app/subcomponentmanager.hxx3
-rw-r--r--dbaccess/source/ui/browser/AsyncronousLink.cxx9
-rw-r--r--dbaccess/source/ui/browser/bcommon.src3
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx189
-rw-r--r--dbaccess/source/ui/browser/brwview.cxx37
-rw-r--r--dbaccess/source/ui/browser/dataview.cxx21
-rw-r--r--dbaccess/source/ui/browser/dbexchange.cxx2
-rw-r--r--dbaccess/source/ui/browser/dbloader.cxx27
-rw-r--r--dbaccess/source/ui/browser/dbtreemodel.cxx9
-rw-r--r--dbaccess/source/ui/browser/dbtreemodel.hxx13
-rw-r--r--dbaccess/source/ui/browser/dbtreeview.cxx10
-rw-r--r--dbaccess/source/ui/browser/dbtreeview.hxx6
-rw-r--r--dbaccess/source/ui/browser/dsEntriesNoExp.cxx54
-rw-r--r--dbaccess/source/ui/browser/dsbrowserDnD.cxx12
-rw-r--r--dbaccess/source/ui/browser/exsrcbrw.cxx76
-rw-r--r--dbaccess/source/ui/browser/formadapter.cxx55
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx150
-rw-r--r--dbaccess/source/ui/browser/makefile.mk71
-rw-r--r--dbaccess/source/ui/browser/sbabrw.src19
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx248
-rw-r--r--dbaccess/source/ui/browser/sbagrid.src7
-rw-r--r--dbaccess/source/ui/browser/sbamultiplex.cxx4
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx413
-rw-r--r--dbaccess/source/ui/control/ColumnControlWindow.cxx17
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx40
-rw-r--r--dbaccess/source/ui/control/RelationControl.cxx48
-rw-r--r--dbaccess/source/ui/control/ScrollHelper.cxx6
-rw-r--r--dbaccess/source/ui/control/SqlNameEdit.cxx4
-rw-r--r--dbaccess/source/ui/control/TableGrantCtrl.cxx20
-rw-r--r--dbaccess/source/ui/control/TableGrantCtrl.src30
-rw-r--r--dbaccess/source/ui/control/VertSplitView.cxx7
-rw-r--r--dbaccess/source/ui/control/charsetlistbox.cxx10
-rw-r--r--dbaccess/source/ui/control/curledit.cxx9
-rw-r--r--dbaccess/source/ui/control/dbtreelistbox.cxx85
-rw-r--r--dbaccess/source/ui/control/listviewitems.cxx4
-rw-r--r--dbaccess/source/ui/control/makefile.mk78
-rw-r--r--dbaccess/source/ui/control/marktree.cxx17
-rw-r--r--dbaccess/source/ui/control/opendoccontrols.cxx48
-rw-r--r--dbaccess/source/ui/control/sqledit.cxx3
-rw-r--r--dbaccess/source/ui/control/statusbarontroller.cxx5
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx107
-rw-r--r--dbaccess/source/ui/control/tabletree.src9
-rw-r--r--dbaccess/source/ui/control/toolboxcontroller.cxx58
-rw-r--r--dbaccess/source/ui/control/undosqledit.cxx6
-rw-r--r--dbaccess/source/ui/control/undosqledit.src33
-rw-r--r--dbaccess/source/ui/dlg/AdabasStat.cxx62
-rw-r--r--dbaccess/source/ui/dlg/AdabasStat.hxx16
-rw-r--r--dbaccess/source/ui/dlg/AdabasStat.src32
-rw-r--r--dbaccess/source/ui/dlg/AutoControls.src11
-rw-r--r--dbaccess/source/ui/dlg/CollectionView.cxx63
-rw-r--r--dbaccess/source/ui/dlg/CollectionView.src38
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx51
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.hxx12
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.cxx96
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.hxx11
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.src10
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.cxx7
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.hxx21
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx67
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx6
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx89
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.hxx26
-rw-r--r--dbaccess/source/ui/dlg/DriverSettings.cxx3
-rw-r--r--dbaccess/source/ui/dlg/DriverSettings.hxx4
-rw-r--r--dbaccess/source/ui/dlg/RelationDlg.cxx37
-rw-r--r--dbaccess/source/ui/dlg/RelationDlg.src9
-rw-r--r--dbaccess/source/ui/dlg/TablesSingleDlg.cxx14
-rw-r--r--dbaccess/source/ui/dlg/TextConnectionHelper.cxx77
-rw-r--r--dbaccess/source/ui/dlg/TextConnectionHelper.hxx20
-rw-r--r--dbaccess/source/ui/dlg/UserAdmin.cxx45
-rw-r--r--dbaccess/source/ui/dlg/UserAdmin.hxx21
-rw-r--r--dbaccess/source/ui/dlg/UserAdmin.src35
-rw-r--r--dbaccess/source/ui/dlg/UserAdminDlg.cxx13
-rw-r--r--dbaccess/source/ui/dlg/UserAdminDlg.src9
-rw-r--r--[-rwxr-xr-x]dbaccess/source/ui/dlg/admincontrols.cxx5
-rw-r--r--[-rwxr-xr-x]dbaccess/source/ui/dlg/admincontrols.hxx3
-rw-r--r--[-rwxr-xr-x]dbaccess/source/ui/dlg/admincontrols.src0
-rw-r--r--dbaccess/source/ui/dlg/adminpages.cxx4
-rw-r--r--dbaccess/source/ui/dlg/adminpages.hxx16
-rw-r--r--dbaccess/source/ui/dlg/adodatalinks.cxx5
-rw-r--r--dbaccess/source/ui/dlg/adodatalinks.hxx6
-rw-r--r--dbaccess/source/ui/dlg/adtabdlg.cxx27
-rw-r--r--dbaccess/source/ui/dlg/adtabdlg.src5
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.cxx5
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.hxx3
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.cxx8
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.src7
-rw-r--r--dbaccess/source/ui/dlg/dbadmin2.src12
-rw-r--r--dbaccess/source/ui/dlg/dbadminsetup.hrc1
-rw-r--r--dbaccess/source/ui/dlg/dbadminsetup.src39
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.cxx45
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.hxx14
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.src67
-rw-r--r--dbaccess/source/ui/dlg/dbwiz.cxx45
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx94
-rw-r--r--dbaccess/source/ui/dlg/detailpages.cxx39
-rw-r--r--dbaccess/source/ui/dlg/detailpages.hxx21
-rw-r--r--dbaccess/source/ui/dlg/directsql.cxx26
-rw-r--r--dbaccess/source/ui/dlg/directsql.src3
-rw-r--r--dbaccess/source/ui/dlg/dlgattr.cxx52
-rw-r--r--dbaccess/source/ui/dlg/dlgattr.src35
-rw-r--r--dbaccess/source/ui/dlg/dlgsave.cxx44
-rw-r--r--dbaccess/source/ui/dlg/dlgsave.src3
-rw-r--r--dbaccess/source/ui/dlg/dlgsize.cxx10
-rw-r--r--dbaccess/source/ui/dlg/dlgsize.src33
-rw-r--r--dbaccess/source/ui/dlg/dsnItem.hxx2
-rw-r--r--dbaccess/source/ui/dlg/dsselect.cxx49
-rw-r--r--dbaccess/source/ui/dlg/dsselect.hxx2
-rw-r--r--dbaccess/source/ui/dlg/dsselect.src6
-rw-r--r--dbaccess/source/ui/dlg/finteraction.cxx11
-rw-r--r--dbaccess/source/ui/dlg/finteraction.hxx6
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx16
-rw-r--r--dbaccess/source/ui/dlg/generalpage.hxx13
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.cxx83
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.src14
-rw-r--r--dbaccess/source/ui/dlg/indexfieldscontrol.cxx19
-rw-r--r--dbaccess/source/ui/dlg/makefile.mk154
-rw-r--r--dbaccess/source/ui/dlg/odbcconfig.cxx41
-rw-r--r--dbaccess/source/ui/dlg/odbcconfig.hxx6
-rw-r--r--dbaccess/source/ui/dlg/optionalboolitem.cxx3
-rw-r--r--dbaccess/source/ui/dlg/optionalboolitem.hxx3
-rw-r--r--dbaccess/source/ui/dlg/paramdialog.cxx49
-rw-r--r--dbaccess/source/ui/dlg/paramdialog.src4
-rw-r--r--dbaccess/source/ui/dlg/queryfilter.cxx70
-rw-r--r--dbaccess/source/ui/dlg/queryfilter.src23
-rw-r--r--dbaccess/source/ui/dlg/queryorder.cxx36
-rw-r--r--dbaccess/source/ui/dlg/queryorder.src39
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx79
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.src25
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx79
-rw-r--r--dbaccess/source/ui/dlg/tablespage.hxx16
-rw-r--r--dbaccess/source/ui/dlg/textconnectionsettings.cxx3
-rw-r--r--dbaccess/source/ui/dlg/textconnectionsettings.src2
-rw-r--r--dbaccess/source/ui/imagelists/dbimagelists.src107
-rw-r--r--dbaccess/source/ui/imagelists/makefile.mk49
-rw-r--r--dbaccess/source/ui/inc/AccessibleBaseIFace.hxx5
-rw-r--r--dbaccess/source/ui/inc/AppElementType.hxx2
-rw-r--r--dbaccess/source/ui/inc/CollectionView.hxx14
-rw-r--r--dbaccess/source/ui/inc/ColumnControlWindow.hxx11
-rw-r--r--dbaccess/source/ui/inc/ConnectionLine.hxx11
-rw-r--r--dbaccess/source/ui/inc/ConnectionLineAccess.hxx9
-rw-r--r--dbaccess/source/ui/inc/ConnectionLineData.hxx21
-rw-r--r--dbaccess/source/ui/inc/DExport.hxx9
-rw-r--r--dbaccess/source/ui/inc/FieldControls.hxx12
-rw-r--r--dbaccess/source/ui/inc/FieldDescControl.hxx12
-rw-r--r--dbaccess/source/ui/inc/FieldDescriptions.hxx14
-rw-r--r--dbaccess/source/ui/inc/GeneralUndo.hxx6
-rw-r--r--dbaccess/source/ui/inc/HtmlReader.hxx14
-rw-r--r--dbaccess/source/ui/inc/IClipBoardTest.hxx5
-rw-r--r--dbaccess/source/ui/inc/IItemSetHelper.hxx8
-rw-r--r--dbaccess/source/ui/inc/IUpdateHelper.hxx2
-rw-r--r--dbaccess/source/ui/inc/JAccess.hxx7
-rw-r--r--dbaccess/source/ui/inc/JoinController.hxx6
-rw-r--r--dbaccess/source/ui/inc/JoinDesignView.hxx8
-rw-r--r--dbaccess/source/ui/inc/JoinExchange.hxx12
-rw-r--r--dbaccess/source/ui/inc/JoinTableView.hxx17
-rw-r--r--dbaccess/source/ui/inc/QEnumTypes.hxx2
-rw-r--r--dbaccess/source/ui/inc/QueryDesignView.hxx16
-rw-r--r--dbaccess/source/ui/inc/QueryTableView.hxx8
-rw-r--r--dbaccess/source/ui/inc/QueryTextView.hxx6
-rw-r--r--dbaccess/source/ui/inc/QueryViewSwitch.hxx2
-rw-r--r--dbaccess/source/ui/inc/RTableConnectionData.hxx10
-rw-r--r--dbaccess/source/ui/inc/RefFunctor.hxx16
-rw-r--r--dbaccess/source/ui/inc/RelControliFace.hxx5
-rw-r--r--dbaccess/source/ui/inc/RelationControl.hxx9
-rw-r--r--dbaccess/source/ui/inc/RelationController.hxx6
-rw-r--r--dbaccess/source/ui/inc/RelationDesignView.hxx10
-rw-r--r--dbaccess/source/ui/inc/RelationDlg.hxx19
-rw-r--r--dbaccess/source/ui/inc/RelationTableView.hxx2
-rw-r--r--dbaccess/source/ui/inc/RtfReader.hxx8
-rw-r--r--dbaccess/source/ui/inc/ScrollHelper.hxx8
-rw-r--r--dbaccess/source/ui/inc/SqlNameEdit.hxx6
-rw-r--r--dbaccess/source/ui/inc/TableConnection.hxx16
-rw-r--r--dbaccess/source/ui/inc/TableConnectionData.hxx15
-rw-r--r--dbaccess/source/ui/inc/TableController.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableCopyHelper.hxx20
-rw-r--r--dbaccess/source/ui/inc/TableDesignControl.hxx10
-rw-r--r--dbaccess/source/ui/inc/TableDesignHelpBar.hxx12
-rw-r--r--dbaccess/source/ui/inc/TableDesignView.hxx12
-rw-r--r--dbaccess/source/ui/inc/TableFieldDescription.hxx18
-rw-r--r--dbaccess/source/ui/inc/TableGrantCtrl.hxx15
-rw-r--r--dbaccess/source/ui/inc/TableRow.hxx15
-rw-r--r--dbaccess/source/ui/inc/TableRowExchange.hxx8
-rw-r--r--dbaccess/source/ui/inc/TableWindow.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableWindowAccess.hxx9
-rw-r--r--dbaccess/source/ui/inc/TableWindowData.hxx4
-rw-r--r--dbaccess/source/ui/inc/TableWindowListBox.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableWindowTitle.hxx4
-rw-r--r--dbaccess/source/ui/inc/TablesSingleDlg.hxx10
-rw-r--r--dbaccess/source/ui/inc/TokenWriter.hxx16
-rw-r--r--dbaccess/source/ui/inc/TypeInfo.hxx10
-rw-r--r--dbaccess/source/ui/inc/UITools.hxx22
-rw-r--r--dbaccess/source/ui/inc/UserAdminDlg.hxx13
-rw-r--r--dbaccess/source/ui/inc/VertSplitView.hxx4
-rw-r--r--dbaccess/source/ui/inc/WCPage.hxx16
-rw-r--r--dbaccess/source/ui/inc/WColumnSelect.hxx8
-rw-r--r--dbaccess/source/ui/inc/WCopyTable.hxx3
-rw-r--r--dbaccess/source/ui/inc/WExtendPages.hxx4
-rw-r--r--dbaccess/source/ui/inc/WNameMatch.hxx14
-rw-r--r--dbaccess/source/ui/inc/WTabPage.hxx6
-rw-r--r--dbaccess/source/ui/inc/WTypeSelect.hxx2
-rw-r--r--dbaccess/source/ui/inc/adtabdlg.hxx19
-rw-r--r--dbaccess/source/ui/inc/advancedsettingsdlg.hxx3
-rw-r--r--dbaccess/source/ui/inc/asyncmodaldialog.hxx4
-rw-r--r--dbaccess/source/ui/inc/browserids.hxx7
-rw-r--r--dbaccess/source/ui/inc/brwctrlr.hxx4
-rw-r--r--dbaccess/source/ui/inc/brwview.hxx12
-rw-r--r--dbaccess/source/ui/inc/callbacks.hxx8
-rw-r--r--dbaccess/source/ui/inc/charsetlistbox.hxx3
-rw-r--r--dbaccess/source/ui/inc/charsets.hxx10
-rw-r--r--dbaccess/source/ui/inc/commontypes.hxx6
-rw-r--r--dbaccess/source/ui/inc/curledit.hxx8
-rw-r--r--dbaccess/source/ui/inc/databaseobjectview.hxx26
-rw-r--r--dbaccess/source/ui/inc/datasourceconnector.hxx10
-rw-r--r--dbaccess/source/ui/inc/datasourcemap.hxx14
-rw-r--r--dbaccess/source/ui/inc/dbadmin.hxx13
-rw-r--r--dbaccess/source/ui/inc/dbexchange.hxx18
-rw-r--r--dbaccess/source/ui/inc/dbtreelistbox.hxx3
-rw-r--r--dbaccess/source/ui/inc/dbu_resource.hrc63
-rw-r--r--dbaccess/source/ui/inc/dbwiz.hxx16
-rw-r--r--dbaccess/source/ui/inc/dbwizsetup.hxx20
-rw-r--r--dbaccess/source/ui/inc/defaultobjectnamecheck.hxx10
-rw-r--r--dbaccess/source/ui/inc/directsql.hxx24
-rw-r--r--dbaccess/source/ui/inc/dlgattr.hxx8
-rw-r--r--dbaccess/source/ui/inc/dlgsave.hxx10
-rw-r--r--dbaccess/source/ui/inc/dlgsize.hxx10
-rw-r--r--dbaccess/source/ui/inc/dsitems.hxx2
-rw-r--r--dbaccess/source/ui/inc/dsmeta.hxx3
-rw-r--r--dbaccess/source/ui/inc/exsrcbrw.hxx3
-rw-r--r--dbaccess/source/ui/inc/formadapter.hxx78
-rw-r--r--dbaccess/source/ui/inc/imageprovider.hxx48
-rw-r--r--dbaccess/source/ui/inc/indexcollection.hxx10
-rw-r--r--dbaccess/source/ui/inc/indexdialog.hxx30
-rw-r--r--dbaccess/source/ui/inc/indexes.hxx6
-rw-r--r--dbaccess/source/ui/inc/indexfieldscontrol.hxx10
-rw-r--r--dbaccess/source/ui/inc/linkeddocuments.hxx22
-rw-r--r--dbaccess/source/ui/inc/listviewitems.hxx4
-rw-r--r--dbaccess/source/ui/inc/localresaccess.hxx6
-rw-r--r--dbaccess/source/ui/inc/makefile.mk43
-rw-r--r--dbaccess/source/ui/inc/marktree.hxx4
-rw-r--r--dbaccess/source/ui/inc/moduledbu.hxx7
-rw-r--r--dbaccess/source/ui/inc/objectnamecheck.hxx3
-rw-r--r--dbaccess/source/ui/inc/opendoccontrols.hxx8
-rw-r--r--dbaccess/source/ui/inc/paramdialog.hxx30
-rw-r--r--dbaccess/source/ui/inc/propertysetitem.hxx6
-rw-r--r--dbaccess/source/ui/inc/propertystorage.hxx3
-rw-r--r--dbaccess/source/ui/inc/querycontainerwindow.hxx14
-rw-r--r--dbaccess/source/ui/inc/querycontroller.hxx2
-rw-r--r--dbaccess/source/ui/inc/queryfilter.hxx18
-rw-r--r--dbaccess/source/ui/inc/queryorder.hxx12
-rw-r--r--dbaccess/source/ui/inc/queryview.hxx5
-rw-r--r--dbaccess/source/ui/inc/sbagrid.hrc18
-rw-r--r--dbaccess/source/ui/inc/sbagrid.hxx24
-rw-r--r--dbaccess/source/ui/inc/sbamultiplex.hxx54
-rw-r--r--[-rwxr-xr-x]dbaccess/source/ui/inc/singledoccontroller.hxx0
-rw-r--r--dbaccess/source/ui/inc/sqledit.hxx2
-rw-r--r--dbaccess/source/ui/inc/sqlmessage.hxx10
-rw-r--r--dbaccess/source/ui/inc/statusbarontroller.hxx12
-rw-r--r--dbaccess/source/ui/inc/stringlistitem.hxx8
-rw-r--r--dbaccess/source/ui/inc/tabletree.hxx16
-rw-r--r--dbaccess/source/ui/inc/textconnectionsettings.hxx3
-rw-r--r--dbaccess/source/ui/inc/toolboxcontroller.hxx14
-rw-r--r--dbaccess/source/ui/inc/undosqledit.hxx6
-rw-r--r--dbaccess/source/ui/inc/unoadmin.hxx10
-rw-r--r--dbaccess/source/ui/inc/unodatbr.hxx51
-rw-r--r--dbaccess/source/ui/inc/unosqlmessage.hxx6
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx20
-rw-r--r--dbaccess/source/ui/misc/HtmlReader.cxx21
-rw-r--r--dbaccess/source/ui/misc/ModuleHelper.cxx4
-rw-r--r--dbaccess/source/ui/misc/RowSetDrop.cxx18
-rw-r--r--dbaccess/source/ui/misc/RtfReader.cxx12
-rw-r--r--dbaccess/source/ui/misc/TableCopyHelper.cxx87
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx128
-rw-r--r--dbaccess/source/ui/misc/ToolBoxHelper.cxx35
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx299
-rw-r--r--dbaccess/source/ui/misc/UpdateHelperImpl.hxx2
-rw-r--r--dbaccess/source/ui/misc/WCPage.cxx43
-rw-r--r--dbaccess/source/ui/misc/WColumnSelect.cxx46
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx43
-rw-r--r--dbaccess/source/ui/misc/WExtendPages.cxx10
-rw-r--r--dbaccess/source/ui/misc/WNameMatch.cxx64
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx39
-rw-r--r--dbaccess/source/ui/misc/WizardPages.src94
-rw-r--r--dbaccess/source/ui/misc/asyncmodaldialog.cxx10
-rw-r--r--dbaccess/source/ui/misc/charsets.cxx26
-rw-r--r--dbaccess/source/ui/misc/controllerframe.cxx10
-rw-r--r--dbaccess/source/ui/misc/databaseobjectview.cxx8
-rw-r--r--dbaccess/source/ui/misc/datasourceconnector.cxx46
-rw-r--r--[-rwxr-xr-x]dbaccess/source/ui/misc/dbaundomanager.cxx5
-rw-r--r--dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx2
-rw-r--r--dbaccess/source/ui/misc/dbumiscres.src8
-rw-r--r--dbaccess/source/ui/misc/defaultobjectnamecheck.cxx30
-rw-r--r--dbaccess/source/ui/misc/dsmeta.cxx7
-rw-r--r--dbaccess/source/ui/misc/imageprovider.cxx62
-rw-r--r--dbaccess/source/ui/misc/indexcollection.cxx52
-rw-r--r--dbaccess/source/ui/misc/linkeddocuments.cxx113
-rw-r--r--dbaccess/source/ui/misc/makefile.mk88
-rw-r--r--dbaccess/source/ui/misc/moduledbu.cxx10
-rw-r--r--dbaccess/source/ui/misc/propertysetitem.cxx4
-rw-r--r--dbaccess/source/ui/misc/propertystorage.cxx7
-rw-r--r--[-rwxr-xr-x]dbaccess/source/ui/misc/singledoccontroller.cxx4
-rw-r--r--dbaccess/source/ui/misc/stringlistitem.cxx4
-rw-r--r--dbaccess/source/ui/misc/uiservices.cxx15
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionData.hxx63
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLine.cxx22
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx27
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLineData.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/JAccess.cxx20
-rw-r--r--dbaccess/source/ui/querydesign/JoinController.cxx88
-rw-r--r--dbaccess/source/ui/querydesign/JoinDesignView.cxx46
-rw-r--r--dbaccess/source/ui/querydesign/JoinExchange.cxx13
-rw-r--r--dbaccess/source/ui/querydesign/JoinTableView.cxx78
-rw-r--r--dbaccess/source/ui/querydesign/QTableConnection.cxx20
-rw-r--r--dbaccess/source/ui/querydesign/QTableConnection.hxx9
-rw-r--r--dbaccess/source/ui/querydesign/QTableConnectionData.cxx13
-rw-r--r--dbaccess/source/ui/querydesign/QTableConnectionData.hxx14
-rw-r--r--dbaccess/source/ui/querydesign/QTableWindow.cxx63
-rw-r--r--dbaccess/source/ui/querydesign/QTableWindow.hxx10
-rw-r--r--dbaccess/source/ui/querydesign/QTableWindowData.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/QTableWindowData.hxx8
-rw-r--r--dbaccess/source/ui/querydesign/QueryAddTabConnUndoAction.hxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx8
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx193
-rw-r--r--dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx8
-rw-r--r--dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx6
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx17
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx22
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryTableView.cxx97
-rw-r--r--dbaccess/source/ui/querydesign/QueryTextView.cxx32
-rw-r--r--dbaccess/source/ui/querydesign/QueryViewSwitch.cxx23
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx181
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx23
-rw-r--r--dbaccess/source/ui/querydesign/TableConnection.cxx14
-rw-r--r--dbaccess/source/ui/querydesign/TableConnectionData.cxx16
-rw-r--r--dbaccess/source/ui/querydesign/TableFieldDescription.cxx12
-rw-r--r--dbaccess/source/ui/querydesign/TableFieldInfo.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/TableFieldInfo.hxx6
-rw-r--r--dbaccess/source/ui/querydesign/TableWindow.cxx51
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowAccess.cxx35
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowData.cxx7
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowListBox.cxx37
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowTitle.cxx42
-rw-r--r--dbaccess/source/ui/querydesign/makefile.mk89
-rw-r--r--dbaccess/source/ui/querydesign/query.src41
-rw-r--r--dbaccess/source/ui/querydesign/querycontainerwindow.cxx39
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx140
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.cxx34
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.hxx16
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.src6
-rw-r--r--dbaccess/source/ui/querydesign/queryview.cxx8
-rw-r--r--dbaccess/source/ui/relationdesign/RTableConnection.cxx13
-rw-r--r--dbaccess/source/ui/relationdesign/RTableConnection.hxx6
-rw-r--r--dbaccess/source/ui/relationdesign/RTableConnectionData.cxx10
-rw-r--r--dbaccess/source/ui/relationdesign/RTableWindow.hxx4
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx27
-rw-r--r--dbaccess/source/ui/relationdesign/RelationDesignView.cxx42
-rw-r--r--dbaccess/source/ui/relationdesign/RelationTableView.cxx29
-rw-r--r--dbaccess/source/ui/relationdesign/makefile.mk58
-rw-r--r--dbaccess/source/ui/relationdesign/relation.src59
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx29
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx6
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescriptions.cxx27
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx107
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.hxx14
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx48
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignControl.cxx25
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx11
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignView.cxx29
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldControl.cxx29
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldControl.hxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx25
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx10
-rw-r--r--dbaccess/source/ui/tabledesign/TableRow.cxx12
-rw-r--r--dbaccess/source/ui/tabledesign/TableRowExchange.cxx17
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.cxx23
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.hxx10
-rw-r--r--dbaccess/source/ui/tabledesign/makefile.mk65
-rw-r--r--dbaccess/source/ui/tabledesign/table.src117
-rw-r--r--dbaccess/source/ui/uno/AdabasSettingsDlg.cxx8
-rw-r--r--dbaccess/source/ui/uno/AdabasSettingsDlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx3
-rw-r--r--dbaccess/source/ui/uno/ColumnControl.cxx15
-rw-r--r--dbaccess/source/ui/uno/ColumnControl.hxx7
-rw-r--r--dbaccess/source/ui/uno/ColumnModel.cxx24
-rw-r--r--dbaccess/source/ui/uno/ColumnModel.hxx25
-rw-r--r--dbaccess/source/ui/uno/ColumnPeer.cxx23
-rw-r--r--dbaccess/source/ui/uno/ColumnPeer.hxx10
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlg.cxx8
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx18
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx2
-rw-r--r--dbaccess/source/ui/uno/TableFilterDlg.cxx8
-rw-r--r--dbaccess/source/ui/uno/TableFilterDlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/UserSettingsDlg.cxx8
-rw-r--r--dbaccess/source/ui/uno/UserSettingsDlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/admindlg.cxx8
-rw-r--r--dbaccess/source/ui/uno/admindlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/composerdialogs.cxx26
-rw-r--r--dbaccess/source/ui/uno/composerdialogs.hxx18
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx19
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.src5
-rw-r--r--[-rwxr-xr-x]dbaccess/source/ui/uno/dbinteraction.cxx76
-rw-r--r--dbaccess/source/ui/uno/dbinteraction.hxx6
-rw-r--r--dbaccess/source/ui/uno/dbinteraction.src2
-rw-r--r--dbaccess/source/ui/uno/makefile.mk76
-rw-r--r--dbaccess/source/ui/uno/textconnectionsettings_uno.cxx2
-rw-r--r--dbaccess/source/ui/uno/unoDirectSql.cxx22
-rw-r--r--dbaccess/source/ui/uno/unoDirectSql.hxx16
-rw-r--r--dbaccess/source/ui/uno/unoadmin.cxx26
-rw-r--r--dbaccess/source/ui/uno/unosqlmessage.cxx20
-rw-r--r--dbaccess/uiconfig/dbapp/menubar/menubar.xml4
-rw-r--r--dbaccess/uiconfig/dbquery/menubar/menubar.xml4
-rw-r--r--dbaccess/uiconfig/dbrelation/menubar/menubar.xml4
-rw-r--r--dbaccess/uiconfig/dbtable/menubar/menubar.xml4
-rw-r--r--dbaccess/uiconfig/dbtdata/menubar/menubar.xml4
-rw-r--r--dbaccess/util/hidother.src2
-rw-r--r--dbaccess/util/makefile.mk261
-rw-r--r--dbaccess/win32/source/odbcconfig/makefile.mk54
-rw-r--r--dbaccess/win32/source/odbcconfig/odbcconfig.cxx2
-rw-r--r--reportdesign/AllLangResTarget_rpt.mk95
-rw-r--r--reportdesign/Library_rpt.mk220
-rw-r--r--reportdesign/Library_rptui.mk229
-rw-r--r--reportdesign/Library_rptxml.mk193
-rw-r--r--reportdesign/Makefile4
-rw-r--r--reportdesign/Module_reportdesign.mk92
-rw-r--r--reportdesign/Package_uiconfig.mk92
-rw-r--r--reportdesign/inc/ModuleHelper.hxx2
-rw-r--r--reportdesign/inc/PropertyForward.hxx2
-rw-r--r--[-rwxr-xr-x]reportdesign/inc/ReportDefinition.hxx4
-rw-r--r--reportdesign/inc/ReportHelperDefines.hxx2
-rw-r--r--reportdesign/inc/ReportVisitor.hxx2
-rw-r--r--reportdesign/inc/RptDef.hxx3
-rw-r--r--reportdesign/inc/RptModel.hxx4
-rw-r--r--reportdesign/inc/RptObject.hxx12
-rw-r--r--reportdesign/inc/RptPage.hxx6
-rw-r--r--reportdesign/inc/RptResId.hrc16
-rw-r--r--reportdesign/inc/UndoActions.hxx2
-rw-r--r--reportdesign/inc/UndoEnv.hxx2
-rw-r--r--reportdesign/inc/conditionalexpression.hxx3
-rw-r--r--reportdesign/inc/dllapi.h2
-rw-r--r--reportdesign/inc/pch/precompiled_reportdesign.cxx2
-rw-r--r--reportdesign/inc/pch/precompiled_reportdesign.hxx4
-rw-r--r--reportdesign/inc/reportformula.hxx5
-rw-r--r--reportdesign/prj/build.lst3
-rw-r--r--reportdesign/prj/makefile.mk40
-rw-r--r--[-rwxr-xr-x]reportdesign/qa/complex/reportdesign/ReportDesignerTest.java68
-rw-r--r--[-rwxr-xr-x]reportdesign/qa/complex/reportdesign/test_documents/RPTCalcTests.odbbin6715 -> 6715 bytes
-rw-r--r--[-rwxr-xr-x]reportdesign/qa/complex/reportdesign/test_documents/RPTWriterTests.odbbin5762 -> 5762 bytes
-rw-r--r--reportdesign/source/core/api/FixedLine.cxx11
-rw-r--r--reportdesign/source/core/api/FixedText.cxx12
-rw-r--r--reportdesign/source/core/api/FormatCondition.cxx3
-rw-r--r--reportdesign/source/core/api/FormattedField.cxx10
-rw-r--r--reportdesign/source/core/api/Function.cxx5
-rw-r--r--reportdesign/source/core/api/Functions.cxx7
-rw-r--r--reportdesign/source/core/api/Group.cxx17
-rw-r--r--reportdesign/source/core/api/Groups.cxx9
-rw-r--r--reportdesign/source/core/api/ImageControl.cxx5
-rw-r--r--reportdesign/source/core/api/ReportComponent.cxx5
-rw-r--r--reportdesign/source/core/api/ReportControlModel.cxx3
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx117
-rw-r--r--reportdesign/source/core/api/ReportEngineJFree.cxx7
-rw-r--r--reportdesign/source/core/api/ReportVisitor.cxx3
-rw-r--r--reportdesign/source/core/api/Section.cxx41
-rw-r--r--reportdesign/source/core/api/Shape.cxx14
-rw-r--r--reportdesign/source/core/api/Tools.cxx3
-rw-r--r--reportdesign/source/core/api/services.cxx3
-rw-r--r--reportdesign/source/core/inc/FixedLine.hxx2
-rw-r--r--reportdesign/source/core/inc/FixedText.hxx2
-rw-r--r--reportdesign/source/core/inc/FormatCondition.hxx2
-rw-r--r--reportdesign/source/core/inc/FormattedField.hxx2
-rw-r--r--reportdesign/source/core/inc/Function.hxx4
-rw-r--r--reportdesign/source/core/inc/Functions.hxx2
-rw-r--r--reportdesign/source/core/inc/Group.hxx3
-rw-r--r--reportdesign/source/core/inc/Groups.hxx2
-rw-r--r--reportdesign/source/core/inc/ImageControl.hxx2
-rw-r--r--reportdesign/source/core/inc/ReportComponent.hxx2
-rw-r--r--reportdesign/source/core/inc/ReportControlModel.hxx2
-rw-r--r--reportdesign/source/core/inc/ReportDrawPage.hxx2
-rw-r--r--reportdesign/source/core/inc/ReportEngineJFree.hxx3
-rw-r--r--reportdesign/source/core/inc/ReportHelperImpl.hxx2
-rw-r--r--reportdesign/source/core/inc/ReportUndoFactory.hxx2
-rw-r--r--reportdesign/source/core/inc/RptObjectListener.hxx3
-rw-r--r--reportdesign/source/core/inc/Section.hxx3
-rw-r--r--reportdesign/source/core/inc/Shape.hxx2
-rw-r--r--reportdesign/source/core/inc/Tools.hxx9
-rw-r--r--reportdesign/source/core/inc/conditionupdater.hxx3
-rw-r--r--reportdesign/source/core/inc/core_resource.hxx2
-rw-r--r--reportdesign/source/core/misc/conditionalexpression.cxx15
-rw-r--r--reportdesign/source/core/misc/conditionupdater.cxx5
-rw-r--r--reportdesign/source/core/misc/reportformula.cxx4
-rw-r--r--reportdesign/source/core/resource/core_resource.cxx7
-rw-r--r--reportdesign/source/core/resource/strings.src15
-rw-r--r--reportdesign/source/core/sdr/ModuleHelper.cxx8
-rw-r--r--reportdesign/source/core/sdr/PropertyForward.cxx11
-rw-r--r--reportdesign/source/core/sdr/ReportDrawPage.cxx4
-rw-r--r--reportdesign/source/core/sdr/ReportUndoFactory.cxx3
-rw-r--r--reportdesign/source/core/sdr/RptModel.cxx18
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx54
-rw-r--r--reportdesign/source/core/sdr/RptObjectListener.cxx10
-rw-r--r--reportdesign/source/core/sdr/RptPage.cxx37
-rw-r--r--reportdesign/source/core/sdr/UndoActions.cxx14
-rw-r--r--reportdesign/source/core/sdr/UndoEnv.cxx21
-rw-r--r--reportdesign/source/core/sdr/formatnormalizer.cxx13
-rw-r--r--reportdesign/source/core/sdr/formatnormalizer.hxx3
-rw-r--r--reportdesign/source/filter/xml/dbloader2.cxx8
-rw-r--r--reportdesign/source/filter/xml/dbloader2.hxx5
-rw-r--r--reportdesign/source/filter/xml/xmlAutoStyle.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlAutoStyle.hxx2
-rw-r--r--reportdesign/source/filter/xml/xmlCell.cxx8
-rw-r--r--reportdesign/source/filter/xml/xmlCell.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlColumn.cxx9
-rw-r--r--reportdesign/source/filter/xml/xmlColumn.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlComponent.cxx9
-rw-r--r--reportdesign/source/filter/xml/xmlComponent.hxx5
-rw-r--r--reportdesign/source/filter/xml/xmlCondPrtExpr.cxx7
-rw-r--r--reportdesign/source/filter/xml/xmlCondPrtExpr.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlControlProperty.cxx15
-rw-r--r--reportdesign/source/filter/xml/xmlControlProperty.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlEnums.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlExport.cxx115
-rw-r--r--reportdesign/source/filter/xml/xmlExport.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx44
-rw-r--r--reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlFixedContent.cxx7
-rw-r--r--reportdesign/source/filter/xml/xmlFixedContent.hxx6
-rw-r--r--reportdesign/source/filter/xml/xmlFormatCondition.cxx9
-rw-r--r--reportdesign/source/filter/xml/xmlFormatCondition.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlFormattedField.cxx5
-rw-r--r--reportdesign/source/filter/xml/xmlFormattedField.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlFunction.cxx7
-rw-r--r--reportdesign/source/filter/xml/xmlFunction.hxx5
-rw-r--r--reportdesign/source/filter/xml/xmlGroup.cxx7
-rw-r--r--reportdesign/source/filter/xml/xmlGroup.hxx5
-rw-r--r--reportdesign/source/filter/xml/xmlHelper.cxx27
-rw-r--r--reportdesign/source/filter/xml/xmlHelper.hxx2
-rw-r--r--reportdesign/source/filter/xml/xmlImage.cxx5
-rw-r--r--reportdesign/source/filter/xml/xmlImage.hxx5
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx48
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlMasterFields.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlMasterFields.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlPropertyHandler.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlPropertyHandler.hxx2
-rw-r--r--reportdesign/source/filter/xml/xmlReport.cxx5
-rw-r--r--reportdesign/source/filter/xml/xmlReport.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlReportElement.cxx5
-rw-r--r--reportdesign/source/filter/xml/xmlReportElement.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlReportElementBase.cxx5
-rw-r--r--reportdesign/source/filter/xml/xmlReportElementBase.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlRow.cxx9
-rw-r--r--reportdesign/source/filter/xml/xmlRow.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlSection.cxx13
-rw-r--r--reportdesign/source/filter/xml/xmlSection.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlStyleImport.cxx16
-rw-r--r--reportdesign/source/filter/xml/xmlStyleImport.hxx7
-rw-r--r--reportdesign/source/filter/xml/xmlSubDocument.cxx10
-rw-r--r--reportdesign/source/filter/xml/xmlSubDocument.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlTable.cxx17
-rw-r--r--reportdesign/source/filter/xml/xmlTable.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.cxx99
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlservices.cxx4
-rw-r--r--reportdesign/source/inc/GroupProperties.hxx3
-rw-r--r--reportdesign/source/inc/constasciistring.hxx3
-rw-r--r--reportdesign/source/shared/corestrings.cxx2
-rw-r--r--reportdesign/source/shared/stringconstants.cxx3
-rw-r--r--reportdesign/source/shared/uistrings.cxx3
-rw-r--r--reportdesign/source/shared/xmlstrings.cxx2
-rw-r--r--reportdesign/source/ui/dlg/AddField.cxx18
-rw-r--r--reportdesign/source/ui/dlg/CondFormat.cxx7
-rw-r--r--reportdesign/source/ui/dlg/CondFormat.hrc4
-rw-r--r--reportdesign/source/ui/dlg/CondFormat.src100
-rw-r--r--reportdesign/source/ui/dlg/Condition.cxx25
-rw-r--r--reportdesign/source/ui/dlg/Condition.hxx6
-rw-r--r--reportdesign/source/ui/dlg/DateTime.cxx25
-rw-r--r--reportdesign/source/ui/dlg/DateTime.src14
-rw-r--r--reportdesign/source/ui/dlg/Formula.cxx7
-rw-r--r--reportdesign/source/ui/dlg/GroupExchange.cxx3
-rw-r--r--reportdesign/source/ui/dlg/GroupExchange.hxx2
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx192
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.hrc10
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.src182
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx69
-rw-r--r--reportdesign/source/ui/dlg/Navigator.src13
-rw-r--r--reportdesign/source/ui/dlg/PageNumber.cxx21
-rw-r--r--reportdesign/source/ui/dlg/PageNumber.src2
-rw-r--r--reportdesign/source/ui/dlg/dlgpage.cxx13
-rw-r--r--reportdesign/source/ui/dlg/dlgpage.src4
-rw-r--r--reportdesign/source/ui/inc/AddField.hxx6
-rw-r--r--reportdesign/source/ui/inc/ColorChanger.hxx2
-rw-r--r--reportdesign/source/ui/inc/ColorListener.hxx2
-rw-r--r--reportdesign/source/ui/inc/ColumnInfo.hxx6
-rw-r--r--reportdesign/source/ui/inc/CondFormat.hxx3
-rw-r--r--reportdesign/source/ui/inc/DataProviderHandler.hxx3
-rw-r--r--reportdesign/source/ui/inc/DateTime.hxx10
-rw-r--r--reportdesign/source/ui/inc/DefaultInspection.hxx2
-rw-r--r--reportdesign/source/ui/inc/DesignView.hxx8
-rw-r--r--reportdesign/source/ui/inc/EndMarker.hxx2
-rw-r--r--reportdesign/source/ui/inc/FixedTextColor.hxx7
-rw-r--r--reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx4
-rw-r--r--reportdesign/source/ui/inc/Formula.hxx2
-rw-r--r--reportdesign/source/ui/inc/FunctionHelper.hxx3
-rw-r--r--reportdesign/source/ui/inc/GeometryHandler.hxx3
-rw-r--r--reportdesign/source/ui/inc/GroupsSorting.hxx33
-rw-r--r--reportdesign/source/ui/inc/IReportControllerObserver.hxx2
-rw-r--r--reportdesign/source/ui/inc/InsertFunctions.hxx4
-rw-r--r--reportdesign/source/ui/inc/MarkedSection.hxx3
-rw-r--r--reportdesign/source/ui/inc/Navigator.hxx3
-rw-r--r--reportdesign/source/ui/inc/PageNumber.hxx9
-rw-r--r--reportdesign/source/ui/inc/ReportComponentHandler.hxx3
-rw-r--r--reportdesign/source/ui/inc/ReportController.hxx2
-rw-r--r--reportdesign/source/ui/inc/ReportControllerObserver.hxx11
-rw-r--r--reportdesign/source/ui/inc/ReportDefines.hxx3
-rw-r--r--reportdesign/source/ui/inc/ReportRuler.hxx3
-rw-r--r--reportdesign/source/ui/inc/ReportSection.hxx2
-rw-r--r--reportdesign/source/ui/inc/ReportWindow.hxx2
-rw-r--r--reportdesign/source/ui/inc/RptUndo.hxx3
-rw-r--r--reportdesign/source/ui/inc/ScrollHelper.hxx3
-rw-r--r--reportdesign/source/ui/inc/SectionView.hxx3
-rw-r--r--reportdesign/source/ui/inc/SectionWindow.hxx2
-rw-r--r--reportdesign/source/ui/inc/StartMarker.hxx4
-rw-r--r--reportdesign/source/ui/inc/UITools.hxx4
-rw-r--r--reportdesign/source/ui/inc/ViewsWindow.hxx4
-rw-r--r--reportdesign/source/ui/inc/dlgedclip.hxx3
-rw-r--r--reportdesign/source/ui/inc/dlgedfac.hxx2
-rw-r--r--reportdesign/source/ui/inc/dlgedfunc.hxx3
-rw-r--r--reportdesign/source/ui/inc/dlgpage.hxx3
-rw-r--r--reportdesign/source/ui/inc/metadata.hxx4
-rw-r--r--reportdesign/source/ui/inc/propbrw.hxx3
-rw-r--r--reportdesign/source/ui/inc/statusbarcontroller.hxx2
-rw-r--r--reportdesign/source/ui/inc/toolboxcontroller.hxx2
-rw-r--r--reportdesign/source/ui/inspection/DataProviderHandler.cxx24
-rw-r--r--reportdesign/source/ui/inspection/DefaultInspection.cxx10
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx49
-rw-r--r--reportdesign/source/ui/inspection/ReportComponentHandler.cxx5
-rw-r--r--reportdesign/source/ui/inspection/metadata.cxx17
-rw-r--r--reportdesign/source/ui/misc/ColorListener.cxx9
-rw-r--r--reportdesign/source/ui/misc/FunctionHelper.cxx16
-rw-r--r--reportdesign/source/ui/misc/RptUndo.cxx18
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx55
-rw-r--r--reportdesign/source/ui/misc/rptuiservices.cxx4
-rw-r--r--reportdesign/source/ui/misc/statusbarcontroller.cxx21
-rw-r--r--reportdesign/source/ui/misc/toolboxcontroller.cxx30
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx32
-rw-r--r--reportdesign/source/ui/report/EndMarker.cxx3
-rw-r--r--reportdesign/source/ui/report/FixedTextColor.cxx73
-rw-r--r--reportdesign/source/ui/report/FormattedFieldBeautifier.cxx6
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx214
-rw-r--r--reportdesign/source/ui/report/ReportControllerObserver.cxx47
-rw-r--r--reportdesign/source/ui/report/ReportRuler.cxx3
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx95
-rw-r--r--reportdesign/source/ui/report/ReportWindow.cxx9
-rw-r--r--reportdesign/source/ui/report/ScrollHelper.cxx5
-rw-r--r--reportdesign/source/ui/report/SectionView.cxx8
-rw-r--r--reportdesign/source/ui/report/SectionWindow.cxx22
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx36
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx197
-rw-r--r--reportdesign/source/ui/report/dlgedclip.cxx3
-rw-r--r--reportdesign/source/ui/report/dlgedfac.cxx7
-rw-r--r--reportdesign/source/ui/report/dlgedfunc.cxx197
-rw-r--r--reportdesign/source/ui/report/propbrw.cxx46
-rw-r--r--reportdesign/source/ui/report/report.src48
-rw-r--r--reportdesign/uiconfig/dbreport/menubar/menubar.xml4
-rw-r--r--reportdesign/util/dll.pmk31
1017 files changed, 8620 insertions, 20130 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..9ea0cd6eb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,18 @@
+# backup and temporary files
+*~
+.*.sw[op]
+.gitattributes
+
+# the build directories
+/*/unxlng??
+/*/unxlng??.pro
+/*/wntmsc???
+/*/wntmsc???.pro
+/*/wntgcc?
+/*/wntgcc?.pro
+/*/unxmac??
+/*/unxmac??.pro
+/*/unxios?
+/*/unxios?.pro
+/*/unxand?
+/*/unxand?.pro
diff --git a/dbaccess/AllLangResTarget_dba.mk b/dbaccess/AllLangResTarget_dba.mk
index 116bb459d..7c2d73081 100644
--- a/dbaccess/AllLangResTarget_dba.mk
+++ b/dbaccess/AllLangResTarget_dba.mk
@@ -1,47 +1,48 @@
-#*************************************************************************
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
#
-# OpenOffice.org - a multi-platdbam office productivity suite
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
#
-# This file is part of OpenOffice.org.
+# Major Contributor(s):
#
-# 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.
+# For minor contributions see the git repository.
#
-# 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 dba A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 dba 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>
-# dba a copy of the LGPLv3 License.
-#
-#*************************************************************************
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
$(eval $(call gb_AllLangResTarget_AllLangResTarget,dba))
$(eval $(call gb_AllLangResTarget_set_reslocation,dba,dbaccess))
-$(eval $(call gb_AllLangResTarget_add_srs,dba,dbaccess/dba))
+$(eval $(call gb_AllLangResTarget_add_srs,dba,\
+ dbaccess/dba \
+))
$(eval $(call gb_SrsTarget_SrsTarget,dbaccess/dba))
$(eval $(call gb_SrsTarget_set_include,dbaccess/dba,\
- $$(INCLUDE) \
- -I$(OUTDIR)/inc \
- -I$(SRCDIR)/dbaccess/source/core/inc \
- -I$(SRCDIR)/dbaccess/inc \
+ $$(INCLUDE) \
+ -I$(realpath $(SRCDIR)/dbaccess/source/core/inc) \
+ -I$(OUTDIR)/inc \
))
$(eval $(call gb_SrsTarget_add_files,dbaccess/dba,\
- dbaccess/source/core/resource/strings.src \
+ dbaccess/source/core/resource/strings.src \
))
-# vim: set noet sw=4 ts=4:
+# vim: set noet ts=4 sw=4:
diff --git a/dbaccess/AllLangResTarget_dbmm.mk b/dbaccess/AllLangResTarget_dbmm.mk
index 0b4ae9712..6c233d015 100644
--- a/dbaccess/AllLangResTarget_dbmm.mk
+++ b/dbaccess/AllLangResTarget_dbmm.mk
@@ -1,47 +1,47 @@
-#*************************************************************************
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
#
-# OpenOffice.org - a multi-platform office productivity suite
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
#
-# This file is part of OpenOffice.org.
+# Major Contributor(s):
#
-# 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.
+# For minor contributions see the git repository.
#
-# 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.
-#
-#*************************************************************************
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
$(eval $(call gb_AllLangResTarget_AllLangResTarget,dbmm))
$(eval $(call gb_AllLangResTarget_set_reslocation,dbmm,dbaccess))
-$(eval $(call gb_AllLangResTarget_add_srs,dbmm,dbaccess/dbmm))
+$(eval $(call gb_AllLangResTarget_add_srs,dbmm,\
+ dbaccess/dbmm \
+))
$(eval $(call gb_SrsTarget_SrsTarget,dbaccess/dbmm))
$(eval $(call gb_SrsTarget_set_include,dbaccess/dbmm,\
- $$(INCLUDE) \
- -I$(OUTDIR)/inc \
- -I$(SRCDIR)/dbaccess/source/ext/macromigration \
- -I$(SRCDIR)/dbaccess/inc \
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc \
))
$(eval $(call gb_SrsTarget_add_files,dbaccess/dbmm,\
- dbaccess/source/ext/macromigration/macromigration.src \
+ dbaccess/source/ext/macromigration/macromigration.src \
))
-# vim: set noet sw=4 ts=4:
+# vim: set noet ts=4 sw=4:
diff --git a/dbaccess/AllLangResTarget_dbu.mk b/dbaccess/AllLangResTarget_dbu.mk
new file mode 100644
index 000000000..fc7fbe1b8
--- /dev/null
+++ b/dbaccess/AllLangResTarget_dbu.mk
@@ -0,0 +1,95 @@
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_AllLangResTarget_AllLangResTarget,dbu))
+
+$(eval $(call gb_AllLangResTarget_set_reslocation,dbu,dbaccess))
+
+$(eval $(call gb_AllLangResTarget_add_srs,dbu,\
+ dbaccess/dbu \
+))
+
+$(eval $(call gb_SrsTarget_SrsTarget,dbaccess/dbu))
+
+$(eval $(call gb_SrsTarget_set_include,dbaccess/dbu,\
+ $$(INCLUDE) \
+ -I$(WORKDIR)/inc/dbaccess \
+ -I$(realpath $(SRCDIR)/dbaccess/inc) \
+ -I$(realpath $(SRCDIR)/dbaccess/source/ui/inc) \
+))
+
+$(eval $(call gb_SrsTarget_add_files,dbaccess/dbu,\
+ dbaccess/source/ui/app/app.src \
+ dbaccess/source/ui/browser/sbabrw.src \
+ dbaccess/source/ui/browser/sbagrid.src \
+ dbaccess/source/ui/control/TableGrantCtrl.src \
+ dbaccess/source/ui/control/tabletree.src \
+ dbaccess/source/ui/control/undosqledit.src \
+ dbaccess/source/ui/dlg/AdabasStat.src \
+ dbaccess/source/ui/dlg/admincontrols.src \
+ dbaccess/source/ui/dlg/adtabdlg.src \
+ dbaccess/source/ui/dlg/advancedsettings.src \
+ dbaccess/source/ui/dlg/AutoControls.src \
+ dbaccess/source/ui/dlg/CollectionView.src \
+ dbaccess/source/ui/dlg/ConnectionPage.src \
+ dbaccess/source/ui/dlg/dbadmin2.src \
+ dbaccess/source/ui/dlg/dbadminsetup.src \
+ dbaccess/source/ui/dlg/dbadmin.src \
+ dbaccess/source/ui/dlg/dbfindex.src \
+ dbaccess/source/ui/dlg/directsql.src \
+ dbaccess/source/ui/dlg/dlgattr.src \
+ dbaccess/source/ui/dlg/dlgsave.src \
+ dbaccess/source/ui/dlg/dlgsize.src \
+ dbaccess/source/ui/dlg/dsselect.src \
+ dbaccess/source/ui/dlg/indexdialog.src \
+ dbaccess/source/ui/dlg/paramdialog.src \
+ dbaccess/source/ui/dlg/queryfilter.src \
+ dbaccess/source/ui/dlg/queryorder.src \
+ dbaccess/source/ui/dlg/RelationDlg.src \
+ dbaccess/source/ui/dlg/sqlmessage.src \
+ dbaccess/source/ui/dlg/textconnectionsettings.src \
+ dbaccess/source/ui/dlg/UserAdminDlg.src \
+ dbaccess/source/ui/dlg/UserAdmin.src \
+ dbaccess/source/ui/imagelists/dbimagelists.src \
+ dbaccess/source/ui/misc/dbumiscres.src \
+ dbaccess/source/ui/misc/WizardPages.src \
+ dbaccess/source/ui/querydesign/querydlg.src \
+ dbaccess/source/ui/querydesign/query.src \
+ dbaccess/source/ui/relationdesign/relation.src \
+ dbaccess/source/ui/tabledesign/table.src \
+ dbaccess/source/ui/uno/copytablewizard.src \
+ dbaccess/source/ui/uno/dbinteraction.src \
+))
+
+$(eval $(call gb_SrsTarget_add_templates,dbaccess/dbu,\
+ dbaccess/source/ui/dlg/AutoControls_tmpl.hrc \
+ dbaccess/source/ui/inc/toolbox_tmpl.hrc \
+))
+
+$(call gb_SrsTarget_get_target,dbaccess/dbu) :| $(OUTDIR)/inc/svx/globlmn.hrc
+
+# vim: set noet ts=4 sw=4:
diff --git a/dbaccess/AllLangResTarget_sdbt.mk b/dbaccess/AllLangResTarget_sdbt.mk
index 633c87f08..20ba240f1 100644
--- a/dbaccess/AllLangResTarget_sdbt.mk
+++ b/dbaccess/AllLangResTarget_sdbt.mk
@@ -1,47 +1,50 @@
-#*************************************************************************
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
#
-# OpenOffice.org - a multi-platform office productivity suite
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
#
-# This file is part of OpenOffice.org.
+# Major Contributor(s):
#
-# 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.
+# For minor contributions see the git repository.
#
-# 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.
-#
-#*************************************************************************
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
$(eval $(call gb_AllLangResTarget_AllLangResTarget,sdbt))
$(eval $(call gb_AllLangResTarget_set_reslocation,sdbt,dbaccess))
-$(eval $(call gb_AllLangResTarget_add_srs,sdbt,dbaccess/sdbt))
+$(eval $(call gb_AllLangResTarget_add_srs,sdbt,\
+ dbaccess/sdbt \
+))
$(eval $(call gb_SrsTarget_SrsTarget,dbaccess/sdbt))
$(eval $(call gb_SrsTarget_set_include,dbaccess/sdbt,\
- $$(INCLUDE) \
- -I$(OUTDIR)/inc \
- -I$(SRCDIR)/dbaccess/source/sdbtools/inc \
- -I$(SRCDIR)/dbaccess/inc \
+ $$(INCLUDE) \
+ -I$(WORKDIR)/inc/dbaccess \
+ -I$(realpath $(SRCDIR)/dbaccess/inc) \
+ -I$(realpath $(SRCDIR)/dbaccess/source/sdbtools/inc) \
+ -I$(OUTDIR)/inc \
))
$(eval $(call gb_SrsTarget_add_files,dbaccess/sdbt,\
- dbaccess/source/sdbtools/resource/sdbt_strings.src \
+ dbaccess/source/sdbtools/resource/sdbt_strings.src \
))
-# vim: set noet sw=4 ts=4:
+# vim: set noet ts=4 sw=4:
diff --git a/dbaccess/Executable_odbcconfig.mk b/dbaccess/Executable_odbcconfig.mk
index c84c2c4c0..9afc9ac40 100644
--- a/dbaccess/Executable_odbcconfig.mk
+++ b/dbaccess/Executable_odbcconfig.mk
@@ -1,55 +1,54 @@
-#*************************************************************************
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
#
-# OpenOffice.org - a multi-platform office productivity suite
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
#
-# This file is part of OpenOffice.org.
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
#
-# 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.
+# Major Contributor(s):
#
-# 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).
+# For minor contributions see the git repository.
#
-# 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.
-#
-#*************************************************************************
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
$(eval $(call gb_Executable_Executable,odbcconfig))
-$(eval $(call gb_Executable_set_targettype_gui,odbcconfig,YES))
+$(eval $(call gb_Executable_add_precompiled_header,odbcconfig,$(SRCDIR)/dbaccess/inc/pch/precompiled_dbaccess))
$(eval $(call gb_Executable_set_include,odbcconfig,\
- $$(INCLUDE) \
- -I$(WORKDIR)/inc/ \
- -I$(OUTDIR)/inc/ \
- -I$(SRCDIR)/dbaccess/inc \
- -I$(SRCDIR)/dbaccess/inc/dbaccess \
- -I$(SRCDIR)/dbaccess/inc/pch \
- -I$(OUTDIR)/inc/offuh \
+ $$(INCLUDE) \
+ -I$(realpath $(SRCDIR)/dbaccess/inc) \
+ -I$(realpath $(SRCDIR)/dbaccess/inc/pch) \
+ -I$(OUTDIR)/inc \
+ -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_Executable_add_linked_libs,odbcconfig,\
+ $(gb_STDLIBS) \
))
+ifeq ($(OS),WNT)
$(eval $(call gb_Executable_add_linked_libs,odbcconfig,\
- sal \
- stl \
- tl \
- vcl \
- vos3 \
- $(gb_Library_PLAINLIBS_NONE) \
+ user32 \
))
+endif
$(eval $(call gb_Executable_add_exception_objects,odbcconfig,\
- dbaccess/win32/source/odbcconfig/odbcconfig \
+ dbaccess/win32/source/odbcconfig/odbcconfig \
))
-# vim: set noet sw=4 ts=4:
+# vim: set noet ts=4 sw=4:
diff --git a/dbaccess/JunitTest_dbaccess_unoapi.mk b/dbaccess/JunitTest_dbaccess_unoapi.mk
index 24bbc88c2..f51d38208 100644
--- a/dbaccess/JunitTest_dbaccess_unoapi.mk
+++ b/dbaccess/JunitTest_dbaccess_unoapi.mk
@@ -1,46 +1,45 @@
-#*************************************************************************
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
#
-# OpenOffice.org - a multi-platform office productivity suite
+# The Initial Developer of the Original Code is
+# Bjoern Michaelsen, Canonical Ltd. <bjoern.michaelsen@canonical.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
#
-# This file is part of OpenOffice.org.
+# Major Contributor(s):
#
-# 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.
+# For minor contributions see the git repository.
#
-# 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.
-#
-#*************************************************************************
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
-$(eval $(call gb_JunitTest_JunitTest,dbaccess_unoapi,SRCDIR))
+$(eval $(call gb_JunitTest_JunitTest,dbaccess_unoapi))
$(eval $(call gb_JunitTest_set_defs,dbaccess_unoapi,\
- $$(DEFS) \
- -Dorg.openoffice.test.arg.sce=$(SRCDIR)/dbaccess/qa/unoapi/dbaccess.sce \
- -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/dbaccess/qa/unoapi/knownissues.xcl \
- -Dorg.openoffice.test.arg.ini=$(SRCDIR)/dbaccess/qa/unoapi/dbaccess.props \
- -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/dbaccess/qa/unoapi/testdocuments \
+ $$(DEFS) \
+ -Dorg.openoffice.test.arg.sce=$(SRCDIR)/dbaccess/qa/unoapi/dbaccess.sce \
+ -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/dbaccess/qa/unoapi/knownissues.xcl \
+ -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/dbaccess/qa/unoapi/testdocuments \
))
$(eval $(call gb_JunitTest_add_jars,dbaccess_unoapi,\
- $(OUTDIR)/bin/OOoRunner.jar \
- $(OUTDIR)/bin/ridl.jar \
- $(OUTDIR)/bin/test.jar \
- $(OUTDIR)/bin/unoil.jar \
- $(OUTDIR)/bin/jurt.jar \
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
))
$(eval $(call gb_JunitTest_add_sourcefiles,dbaccess_unoapi,\
@@ -48,7 +47,7 @@ $(eval $(call gb_JunitTest_add_sourcefiles,dbaccess_unoapi,\
))
$(eval $(call gb_JunitTest_add_classes,dbaccess_unoapi,\
- org.openoffice.dbaccess.qa.unoapi.Test \
+ org.openoffice.test.UnoApiTest \
))
# vim: set noet sw=4 ts=4:
diff --git a/dbaccess/Library_adabasui.mk b/dbaccess/Library_adabasui.mk
deleted file mode 100644
index 16cefaafa..000000000
--- a/dbaccess/Library_adabasui.mk
+++ /dev/null
@@ -1,71 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2011 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.
-#
-#*************************************************************************
-
-$(eval $(call gb_Library_Library,adabasui))
-$(eval $(call gb_Library_add_package_headers,adabasui,dbaccess_inc))
-
-$(eval $(call gb_Library_set_componentfile,adabasui,dbaccess/source/ext/adabas/adabasui))
-
-$(eval $(call gb_Library_set_include,adabasui,\
- -I$(SRCDIR)/dbaccess/inc \
- -I$(SRCDIR)/dbaccess/source/ext/adabas \
- $$(SOLARINC) \
- -I$(OUTDIR)/inc/offuh \
-))
-
-$(eval $(call gb_Library_add_defs,adabasui,\
- -DCOMPMOD_NAMESPACE=adabasui \
-))
-
-$(eval $(call gb_Library_add_linked_libs,adabasui,\
- tl \
- svt \
- svl \
- cppuhelper \
- cppu \
- comphelper \
- utl \
- ucbhelper \
- vcl \
- sal \
- stl \
- sfx \
- tk \
- dbtools \
- $(gb_STDLIBS) \
-))
-
-$(eval $(call gb_Library_add_exception_objects,adabasui,\
- dbaccess/source/ext/adabas/ASqlNameEdit \
- dbaccess/source/ext/adabas/AdabasNewDb \
- dbaccess/source/ext/adabas/ANewDb \
- dbaccess/source/ext/adabas/Aservices \
- dbaccess/source/ext/adabas/adabasuistrings \
- dbaccess/source/ext/adabas/Acomponentmodule \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/dbaccess/Library_dba.mk b/dbaccess/Library_dba.mk
index dd6d101f8..368eaa192 100644
--- a/dbaccess/Library_dba.mk
+++ b/dbaccess/Library_dba.mk
@@ -1,151 +1,155 @@
-#*************************************************************************
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
#
-# OpenOffice.org - a multi-platform office productivity suite
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
#
-# This file is part of OpenOffice.org.
+# Major Contributor(s):
#
-# 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.
+# For minor contributions see the git repository.
#
-# 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.
-#
-#*************************************************************************
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
$(eval $(call gb_Library_Library,dba))
-$(eval $(call gb_Library_add_package_headers,dba,dbaccess_inc))
-$(eval $(call gb_Library_add_precompiled_header,dba,$(SRCDIR)/dbaccess/inc/pch/precompiled_dbaccess))
-$(eval $(call gb_Library_set_componentfile,dba,dbaccess/util/dba))
+$(eval $(call gb_Library_add_package_headers,dba,\
+ dbaccess_inc \
+))
+
+$(eval $(call gb_Library_add_precompiled_header,dba,$(SRCDIR)/dbaccess/inc/pch/precompiled_dbaccess))
$(eval $(call gb_Library_set_include,dba,\
- -I$(SRCDIR)/dbaccess/inc \
- -I$(SRCDIR)/dbaccess/source/core/inc \
- -I$(SRCDIR)/dbaccess/source/inc \
- -I$(SRCDIR)/dbaccess/inc/pch \
- $$(SOLARINC) \
- -I$(OUTDIR)/inc/offuh \
+ $$(INCLUDE) \
+ -I$(realpath $(SRCDIR)/dbaccess/inc) \
+ -I$(realpath $(SRCDIR)/dbaccess/inc/pch) \
+ -I$(realpath $(SRCDIR)/dbaccess/source/inc) \
+ -I$(realpath $(SRCDIR)/dbaccess/source/core/inc) \
+ -I$(OUTDIR)/inc \
+ -I$(OUTDIR)/inc/offuh \
))
$(eval $(call gb_Library_add_defs,dba,\
- -DOOO_DLLIMPLEMENTATION_DBA \
+ -DOOO_DLLIMPLEMENTATION_DBA \
))
$(eval $(call gb_Library_add_linked_libs,dba,\
- sb \
- tl \
- svt \
- svl \
- cppuhelper \
- cppu \
- comphelper \
- dbtools \
- utl \
- vcl \
- sal \
- stl \
- i18nisolang1 \
- ucbhelper \
- sfx \
- salhelper \
- xo \
- fwe \
+ comphelper \
+ cppu \
+ cppuhelper \
+ dbtools \
+ fwe \
+ i18nisolang1 \
+ sal \
+ salhelper \
+ sb \
+ sfx \
+ svl \
+ svt \
+ tl \
+ ucbhelper \
+ utl \
+ vcl \
+ xo \
$(gb_STDLIBS) \
))
+$(eval $(call gb_Library_set_componentfile,dba,dbaccess/util/dba))
+
$(eval $(call gb_Library_add_exception_objects,dba,\
- dbaccess/source/core/api/querydescriptor \
- dbaccess/source/core/api/FilteredContainer \
- dbaccess/source/core/api/TableDeco \
- dbaccess/source/core/api/RowSetCacheIterator \
- dbaccess/source/core/api/RowSet \
- dbaccess/source/core/api/column \
- dbaccess/source/core/api/RowSetBase \
- dbaccess/source/core/api/CRowSetDataColumn \
- dbaccess/source/core/api/CRowSetColumn \
- dbaccess/source/core/api/querycomposer \
- dbaccess/source/core/api/CIndexes \
- dbaccess/source/core/api/BookmarkSet \
- dbaccess/source/core/api/KeySet \
- dbaccess/source/core/api/StaticSet \
- dbaccess/source/core/api/CacheSet \
- dbaccess/source/core/api/RowSetCache \
- dbaccess/source/core/api/definitioncolumn \
- dbaccess/source/core/api/resultcolumn \
- dbaccess/source/core/api/datacolumn \
- dbaccess/source/core/api/resultset \
- dbaccess/source/core/api/statement \
- dbaccess/source/core/api/preparedstatement \
- dbaccess/source/core/api/callablestatement \
- dbaccess/source/core/api/query \
- dbaccess/source/core/api/querycontainer \
- dbaccess/source/core/api/table \
- dbaccess/source/core/api/viewcontainer \
- dbaccess/source/core/api/tablecontainer \
- dbaccess/source/core/api/SingleSelectQueryComposer \
- dbaccess/source/core/api/HelperCollections \
- dbaccess/source/core/api/datasettings \
- dbaccess/source/core/api/View \
- dbaccess/source/core/api/WrappedResultSet \
- dbaccess/source/core/api/OptimisticSet \
- dbaccess/source/core/api/PrivateRow \
- dbaccess/source/core/api/columnsettings \
- dbaccess/source/core/dataaccess/SharedConnection \
- dbaccess/source/core/dataaccess/ContentHelper \
- dbaccess/source/core/dataaccess/bookmarkcontainer \
- dbaccess/source/core/dataaccess/definitioncontainer \
- dbaccess/source/core/dataaccess/commanddefinition \
- dbaccess/source/core/dataaccess/documentcontainer \
- dbaccess/source/core/dataaccess/commandcontainer \
- dbaccess/source/core/dataaccess/documentdefinition \
- dbaccess/source/core/dataaccess/ComponentDefinition \
- dbaccess/source/core/dataaccess/databasecontext \
- dbaccess/source/core/dataaccess/connection \
- dbaccess/source/core/dataaccess/datasource \
- dbaccess/source/core/dataaccess/databaseregistrations \
- dbaccess/source/core/dataaccess/intercept \
- dbaccess/source/core/dataaccess/myucp_datasupplier \
- dbaccess/source/core/dataaccess/myucp_resultset \
- dbaccess/source/core/dataaccess/databasedocument \
- dbaccess/source/core/dataaccess/dataaccessdescriptor \
- dbaccess/source/core/dataaccess/ModelImpl \
- dbaccess/source/core/dataaccess/documentevents \
- dbaccess/source/core/dataaccess/documenteventexecutor \
- dbaccess/source/core/dataaccess/documenteventnotifier \
- dbaccess/source/core/misc/sdbcoretools \
- dbaccess/source/core/misc/services \
- dbaccess/source/core/misc/PropertyForward \
- dbaccess/source/core/misc/ContainerMediator \
- dbaccess/source/core/misc/userinformation \
- dbaccess/source/core/misc/ContainerListener \
- dbaccess/source/core/misc/objectnameapproval \
- dbaccess/source/core/misc/DatabaseDataProvider \
- dbaccess/source/core/misc/module_dba \
- dbaccess/source/core/misc/dsntypes \
- dbaccess/source/core/misc/veto \
- dbaccess/source/core/misc/apitools \
- dbaccess/source/core/misc/dbastrings \
- dbaccess/source/core/recovery/dbdocrecovery \
- dbaccess/source/core/recovery/subcomponentloader \
- dbaccess/source/core/recovery/storagestream \
- dbaccess/source/core/recovery/storagexmlstream \
- dbaccess/source/core/recovery/storagetextstream \
- dbaccess/source/core/recovery/subcomponentrecovery \
- dbaccess/source/core/recovery/settingsimport \
- dbaccess/source/core/resource/core_resource \
+ dbaccess/source/core/api/BookmarkSet \
+ dbaccess/source/core/api/CacheSet \
+ dbaccess/source/core/api/callablestatement \
+ dbaccess/source/core/api/CIndexes \
+ dbaccess/source/core/api/column \
+ dbaccess/source/core/api/columnsettings \
+ dbaccess/source/core/api/CRowSetColumn \
+ dbaccess/source/core/api/CRowSetDataColumn \
+ dbaccess/source/core/api/datacolumn \
+ dbaccess/source/core/api/datasettings \
+ dbaccess/source/core/api/definitioncolumn \
+ dbaccess/source/core/api/FilteredContainer \
+ dbaccess/source/core/api/HelperCollections \
+ dbaccess/source/core/api/KeySet \
+ dbaccess/source/core/api/OptimisticSet \
+ dbaccess/source/core/api/preparedstatement \
+ dbaccess/source/core/api/PrivateRow \
+ dbaccess/source/core/api/query \
+ dbaccess/source/core/api/querycomposer \
+ dbaccess/source/core/api/querycontainer \
+ dbaccess/source/core/api/querydescriptor \
+ dbaccess/source/core/api/resultcolumn \
+ dbaccess/source/core/api/resultset \
+ dbaccess/source/core/api/RowSet \
+ dbaccess/source/core/api/RowSetBase \
+ dbaccess/source/core/api/RowSetCache \
+ dbaccess/source/core/api/RowSetCacheIterator \
+ dbaccess/source/core/api/SingleSelectQueryComposer \
+ dbaccess/source/core/api/statement \
+ dbaccess/source/core/api/StaticSet \
+ dbaccess/source/core/api/table \
+ dbaccess/source/core/api/tablecontainer \
+ dbaccess/source/core/api/TableDeco \
+ dbaccess/source/core/api/View \
+ dbaccess/source/core/api/viewcontainer \
+ dbaccess/source/core/api/WrappedResultSet \
+ dbaccess/source/core/dataaccess/bookmarkcontainer \
+ dbaccess/source/core/dataaccess/commandcontainer \
+ dbaccess/source/core/dataaccess/commanddefinition \
+ dbaccess/source/core/dataaccess/ComponentDefinition \
+ dbaccess/source/core/dataaccess/connection \
+ dbaccess/source/core/dataaccess/ContentHelper \
+ dbaccess/source/core/dataaccess/dataaccessdescriptor \
+ dbaccess/source/core/dataaccess/databasecontext \
+ dbaccess/source/core/dataaccess/databasedocument \
+ dbaccess/source/core/dataaccess/databaseregistrations \
+ dbaccess/source/core/dataaccess/datasource \
+ dbaccess/source/core/dataaccess/definitioncontainer \
+ dbaccess/source/core/dataaccess/documentcontainer \
+ dbaccess/source/core/dataaccess/documentdefinition \
+ dbaccess/source/core/dataaccess/documenteventexecutor \
+ dbaccess/source/core/dataaccess/documenteventnotifier \
+ dbaccess/source/core/dataaccess/documentevents \
+ dbaccess/source/core/dataaccess/intercept \
+ dbaccess/source/core/dataaccess/ModelImpl \
+ dbaccess/source/core/dataaccess/myucp_datasupplier \
+ dbaccess/source/core/dataaccess/myucp_resultset \
+ dbaccess/source/core/dataaccess/SharedConnection \
+ dbaccess/source/core/misc/apitools \
+ dbaccess/source/core/misc/ContainerListener \
+ dbaccess/source/core/misc/ContainerMediator \
+ dbaccess/source/core/misc/DatabaseDataProvider \
+ dbaccess/source/core/misc/dbastrings \
+ dbaccess/source/core/misc/dsntypes \
+ dbaccess/source/core/misc/module_dba \
+ dbaccess/source/core/misc/objectnameapproval \
+ dbaccess/source/core/misc/PropertyForward \
+ dbaccess/source/core/misc/sdbcoretools \
+ dbaccess/source/core/misc/services \
+ dbaccess/source/core/misc/userinformation \
+ dbaccess/source/core/misc/veto \
+ dbaccess/source/core/recovery/dbdocrecovery \
+ dbaccess/source/core/recovery/settingsimport \
+ dbaccess/source/core/recovery/storagestream \
+ dbaccess/source/core/recovery/storagetextstream \
+ dbaccess/source/core/recovery/storagexmlstream \
+ dbaccess/source/core/recovery/subcomponentloader \
+ dbaccess/source/core/recovery/subcomponentrecovery \
+ dbaccess/source/core/resource/core_resource \
))
-# vim: set noet sw=4 ts=4:
+# vim: set noet ts=4 sw=4:
diff --git a/dbaccess/Library_dbaxml.mk b/dbaccess/Library_dbaxml.mk
index 2f16d684d..e0a190898 100644
--- a/dbaccess/Library_dbaxml.mk
+++ b/dbaccess/Library_dbaxml.mk
@@ -1,95 +1,93 @@
-#*************************************************************************
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
#
-# OpenOffice.org - a multi-platform office productivity suite
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
#
-# This file is part of OpenOffice.org.
+# Major Contributor(s):
#
-# 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.
+# For minor contributions see the git repository.
#
-# 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.
-#
-#*************************************************************************
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
$(eval $(call gb_Library_Library,dbaxml))
-$(eval $(call gb_Library_add_precompiled_header,dbaxml,$(SRCDIR)/dbaccess/inc/pch/precompiled_dbaxml))
-$(eval $(call gb_Library_set_componentfile,dbaxml,dbaccess/source/filter/xml/dbaxml))
+$(eval $(call gb_Library_add_precompiled_header,dbaxml,$(SRCDIR)/dbaccess/inc/pch/precompiled_dbaccess))
$(eval $(call gb_Library_set_include,dbaxml,\
- -I$(SRCDIR)/dbaccess/inc \
- -I$(SRCDIR)/dbaccess/source/filter/xml \
- -I$(SRCDIR)/dbaccess/source/inc \
- -I$(SRCDIR)/dbaccess/inc/pch \
- $$(SOLARINC) \
- -I$(OUTDIR)/inc/offuh \
+ $$(INCLUDE) \
+ -I$(realpath $(SRCDIR)/dbaccess/inc/pch) \
+ -I$(realpath $(SRCDIR)/dbaccess/source/inc) \
+ -I$(OUTDIR)/inc \
+ -I$(OUTDIR)/inc/offuh \
))
$(eval $(call gb_Library_add_linked_libs,dbaxml,\
- tl \
- svl \
- cppuhelper \
- cppu \
- comphelper \
- utl \
- vcl \
- sal \
- sfx \
- dbtools \
- xo \
- sot \
- tk \
- dba \
- stl \
+ comphelper \
+ cppu \
+ cppuhelper \
+ dba \
+ dbtools \
+ sal \
+ sfx \
+ svl \
+ tk \
+ tl \
+ utl \
+ vcl \
+ xo \
$(gb_STDLIBS) \
))
+$(eval $(call gb_Library_set_componentfile,dbaxml,dbaccess/source/filter/xml/dbaxml))
+
$(eval $(call gb_Library_add_exception_objects,dbaxml,\
- dbaccess/source/filter/xml/xmlfilter \
- dbaccess/source/filter/xml/dbloader2 \
- dbaccess/source/filter/xml/xmlDatabase \
- dbaccess/source/filter/xml/xmlDataSource \
- dbaccess/source/filter/xml/xmlTableFilterPattern \
- dbaccess/source/filter/xml/xmlTableFilterList \
- dbaccess/source/filter/xml/xmlDataSourceInfo \
- dbaccess/source/filter/xml/xmlDataSourceSetting \
- dbaccess/source/filter/xml/xmlDataSourceSettings \
- dbaccess/source/filter/xml/xmlDocuments \
- dbaccess/source/filter/xml/xmlComponent \
- dbaccess/source/filter/xml/xmlHierarchyCollection \
- dbaccess/source/filter/xml/xmlLogin \
- dbaccess/source/filter/xml/xmlExport \
- dbaccess/source/filter/xml/xmlQuery \
- dbaccess/source/filter/xml/xmlTable \
- dbaccess/source/filter/xml/xmlColumn \
- dbaccess/source/filter/xml/xmlStyleImport \
- dbaccess/source/filter/xml/xmlHelper \
- dbaccess/source/filter/xml/xmlAutoStyle \
- dbaccess/source/filter/xml/xmlConnectionData \
- dbaccess/source/filter/xml/xmlDatabaseDescription \
- dbaccess/source/filter/xml/xmlFileBasedDatabase \
- dbaccess/source/filter/xml/xmlServerDatabase \
- dbaccess/source/filter/xml/xmlConnectionResource \
- dbaccess/source/filter/xml/xmlservices \
+ dbaccess/source/filter/xml/dbloader2 \
+ dbaccess/source/filter/xml/xmlAutoStyle \
+ dbaccess/source/filter/xml/xmlColumn \
+ dbaccess/source/filter/xml/xmlComponent \
+ dbaccess/source/filter/xml/xmlConnectionData \
+ dbaccess/source/filter/xml/xmlConnectionResource \
+ dbaccess/source/filter/xml/xmlDatabase \
+ dbaccess/source/filter/xml/xmlDatabaseDescription \
+ dbaccess/source/filter/xml/xmlDataSource \
+ dbaccess/source/filter/xml/xmlDataSourceInfo \
+ dbaccess/source/filter/xml/xmlDataSourceSetting \
+ dbaccess/source/filter/xml/xmlDataSourceSettings \
+ dbaccess/source/filter/xml/xmlDocuments \
+ dbaccess/source/filter/xml/xmlExport \
+ dbaccess/source/filter/xml/xmlFileBasedDatabase \
+ dbaccess/source/filter/xml/xmlfilter \
+ dbaccess/source/filter/xml/xmlHelper \
+ dbaccess/source/filter/xml/xmlHierarchyCollection \
+ dbaccess/source/filter/xml/xmlLogin \
+ dbaccess/source/filter/xml/xmlQuery \
+ dbaccess/source/filter/xml/xmlServerDatabase \
+ dbaccess/source/filter/xml/xmlservices \
+ dbaccess/source/filter/xml/xmlStyleImport \
+ dbaccess/source/filter/xml/xmlTable \
+ dbaccess/source/filter/xml/xmlTableFilterList \
+ dbaccess/source/filter/xml/xmlTableFilterPattern \
+ dbaccess/source/shared/flt_reghelper \
))
-$(eval $(call gb_Library_add_noexception_objects,dbaxml, \
- dbaccess/source/shared/flt_reghelper \
- dbaccess/source/shared/xmlstrings \
+$(eval $(call gb_Library_add_noexception_objects,dbaxml,\
+ dbaccess/source/shared/xmlstrings \
))
-# vim: set noet sw=4 ts=4:
+# vim: set noet ts=4 sw=4:
diff --git a/dbaccess/Library_dbmm.mk b/dbaccess/Library_dbmm.mk
index ef918f89a..db6b152b2 100644
--- a/dbaccess/Library_dbmm.mk
+++ b/dbaccess/Library_dbmm.mk
@@ -1,74 +1,77 @@
-#*************************************************************************
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
#
-# OpenOffice.org - a multi-platform office productivity suite
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
#
-# This file is part of OpenOffice.org.
+# Major Contributor(s):
#
-# 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.
+# For minor contributions see the git repository.
#
-# 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.
-#
-#*************************************************************************
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
$(eval $(call gb_Library_Library,dbmm))
-$(eval $(call gb_Library_add_package_headers,dbmm,dbaccess_inc))
-$(eval $(call gb_Library_add_precompiled_header,dbmm,$(SRCDIR)/dbaccess/inc/pch/precompiled_dbmm))
-$(eval $(call gb_Library_set_componentfile,dbmm,dbaccess/source/ext/macromigration/dbmm))
+$(eval $(call gb_Library_add_package_headers,dbmm,\
+ dbaccess_inc \
+))
+
+$(eval $(call gb_Library_add_precompiled_header,dbmm,$(SRCDIR)/dbaccess/inc/pch/precompiled_dbaccess))
$(eval $(call gb_Library_set_include,dbmm,\
- -I$(SRCDIR)/dbaccess/inc \
- -I$(SRCDIR)/dbaccess/source/ext/macromigration \
- -I$(SRCDIR)/dbaccess/inc/pch \
- $$(SOLARINC) \
- -I$(OUTDIR)/inc/offuh \
+ $$(INCLUDE) \
+ -I$(realpath $(SRCDIR)/dbaccess/inc) \
+ -I$(realpath $(SRCDIR)/dbaccess/inc/pch) \
+ -I$(OUTDIR)/inc \
+ -I$(OUTDIR)/inc/offuh \
))
$(eval $(call gb_Library_add_linked_libs,dbmm,\
- cppu \
- cppuhelper \
- comphelper \
- utl \
- tl \
- sal \
- svt \
- svl \
- vcl \
- svxcore \
- svx \
- ucbhelper \
- stl \
- xcr \
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ svl \
+ svt \
+ svxcore \
+ svx \
+ tl \
+ ucbhelper \
+ utl \
+ vcl \
+ xcr \
$(gb_STDLIBS) \
))
+$(eval $(call gb_Library_set_componentfile,dbmm,dbaccess/source/ext/macromigration/dbmm))
+
$(eval $(call gb_Library_add_exception_objects,dbmm,\
- dbaccess/source/ext/macromigration/macromigrationwizard \
- dbaccess/source/ext/macromigration/macromigrationdialog \
- dbaccess/source/ext/macromigration/macromigrationpages \
- dbaccess/source/ext/macromigration/dbmm_module \
- dbaccess/source/ext/macromigration/dbmm_services \
- dbaccess/source/ext/macromigration/migrationengine \
- dbaccess/source/ext/macromigration/docinteraction \
- dbaccess/source/ext/macromigration/progresscapture \
- dbaccess/source/ext/macromigration/progressmixer \
- dbaccess/source/ext/macromigration/migrationlog \
- dbaccess/source/ext/macromigration/dbmm_types \
+ dbaccess/source/ext/macromigration/dbmm_module \
+ dbaccess/source/ext/macromigration/dbmm_services \
+ dbaccess/source/ext/macromigration/dbmm_types \
+ dbaccess/source/ext/macromigration/docinteraction \
+ dbaccess/source/ext/macromigration/macromigrationdialog \
+ dbaccess/source/ext/macromigration/macromigrationpages \
+ dbaccess/source/ext/macromigration/macromigrationwizard \
+ dbaccess/source/ext/macromigration/migrationengine \
+ dbaccess/source/ext/macromigration/migrationlog \
+ dbaccess/source/ext/macromigration/progresscapture \
+ dbaccess/source/ext/macromigration/progressmixer \
))
-# vim: set noet sw=4 ts=4:
+# vim: set noet ts=4 sw=4:
diff --git a/dbaccess/Library_dbu.mk b/dbaccess/Library_dbu.mk
new file mode 100644
index 000000000..7f8c6db47
--- /dev/null
+++ b/dbaccess/Library_dbu.mk
@@ -0,0 +1,321 @@
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_Library_Library,dbu))
+
+$(eval $(call gb_Library_add_precompiled_header,dbu,$(SRCDIR)/dbaccess/inc/pch/precompiled_dbaccess))
+
+$(eval $(call gb_Library_set_include,dbu,\
+ $$(INCLUDE) \
+ -I$(realpath $(SRCDIR)/dbaccess/inc) \
+ -I$(realpath $(SRCDIR)/dbaccess/inc/pch) \
+ -I$(realpath $(SRCDIR)/dbaccess/source/inc) \
+ -I$(realpath $(SRCDIR)/dbaccess/source/ui/inc) \
+ -I$(WORKDIR)/inc/dbaccess \
+ -I$(OUTDIR)/inc \
+ -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_Library_set_defs,dbu,\
+ $$(DEFS) \
+ -DDBACCESS_DLLIMPLEMENTATION \
+ $(if $(filter YES,$(SYSTEM_ODBC_HEADERS)),-DSYSTEM_ODBC_HEADERS) \
+))
+
+ifeq (,$(strip $(PROF_EDITION)))
+$(eval $(call gb_Library_set_defs,dbu,\
+ $$(DEFS) \
+ -DWINDOWS_VISTA_PSDK \
+))
+endif
+
+ifeq ($(GUI)$(COM),WNTGCC) # for adoint.h
+$(eval $(call gb_Library_set_cflags,dbu,\
+ $$(CFLAGS) \
+ -fpermissive \
+))
+endif
+
+$(eval $(call gb_Library_add_linked_libs,dbu,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ dba \
+ dbtools \
+ editeng \
+ fwe \
+ sal \
+ salhelper \
+ sfx \
+ sot \
+ svl \
+ svt \
+ svxcore \
+ svx \
+ tk \
+ tl \
+ ucbhelper \
+ utl \
+ vcl \
+ $(gb_STDLIBS) \
+))
+
+ifeq ($(GUI),WNT)
+$(eval $(call gb_Library_add_linked_libs,dbu,\
+ ole32 \
+ oleaut32 \
+ uuid \
+))
+endif
+
+$(eval $(call gb_Library_set_componentfile,dbu,dbaccess/util/dbu))
+
+$(eval $(call gb_Library_add_exception_objects,dbu,\
+ dbaccess/source/shared/dbu_reghelper \
+ dbaccess/source/ui/app/AppController \
+ dbaccess/source/ui/app/AppControllerDnD \
+ dbaccess/source/ui/app/AppControllerGen \
+ dbaccess/source/ui/app/AppDetailPageHelper \
+ dbaccess/source/ui/app/AppDetailView \
+ dbaccess/source/ui/app/AppIconControl \
+ dbaccess/source/ui/app/AppSwapWindow \
+ dbaccess/source/ui/app/AppTitleWindow \
+ dbaccess/source/ui/app/AppView \
+ dbaccess/source/ui/app/closeveto \
+ dbaccess/source/ui/app/subcomponentmanager \
+ dbaccess/source/ui/browser/AsyncronousLink \
+ dbaccess/source/ui/browser/brwctrlr \
+ dbaccess/source/ui/browser/brwview \
+ dbaccess/source/ui/browser/dataview \
+ dbaccess/source/ui/browser/dbexchange \
+ dbaccess/source/ui/browser/dbloader \
+ dbaccess/source/ui/browser/dbtreemodel \
+ dbaccess/source/ui/browser/dbtreeview \
+ dbaccess/source/ui/browser/dsbrowserDnD \
+ dbaccess/source/ui/browser/dsEntriesNoExp \
+ dbaccess/source/ui/browser/exsrcbrw \
+ dbaccess/source/ui/browser/formadapter \
+ dbaccess/source/ui/browser/genericcontroller \
+ dbaccess/source/ui/browser/sbagrid \
+ dbaccess/source/ui/browser/sbamultiplex \
+ dbaccess/source/ui/browser/unodatbr \
+ dbaccess/source/ui/control/charsetlistbox \
+ dbaccess/source/ui/control/ColumnControlWindow \
+ dbaccess/source/ui/control/curledit \
+ dbaccess/source/ui/control/dbtreelistbox \
+ dbaccess/source/ui/control/FieldDescControl \
+ dbaccess/source/ui/control/listviewitems \
+ dbaccess/source/ui/control/marktree \
+ dbaccess/source/ui/control/opendoccontrols \
+ dbaccess/source/ui/control/RelationControl \
+ dbaccess/source/ui/control/sqledit \
+ dbaccess/source/ui/control/SqlNameEdit \
+ dbaccess/source/ui/control/statusbarontroller \
+ dbaccess/source/ui/control/TableGrantCtrl \
+ dbaccess/source/ui/control/tabletree \
+ dbaccess/source/ui/control/toolboxcontroller \
+ dbaccess/source/ui/control/undosqledit \
+ dbaccess/source/ui/control/VertSplitView \
+ dbaccess/source/ui/dlg/AdabasStat \
+ dbaccess/source/ui/dlg/admincontrols \
+ dbaccess/source/ui/dlg/adminpages \
+ dbaccess/source/ui/dlg/adtabdlg \
+ dbaccess/source/ui/dlg/advancedsettings \
+ dbaccess/source/ui/dlg/CollectionView \
+ dbaccess/source/ui/dlg/ConnectionHelper \
+ dbaccess/source/ui/dlg/ConnectionPage \
+ dbaccess/source/ui/dlg/ConnectionPageSetup \
+ dbaccess/source/ui/dlg/dbadmin \
+ dbaccess/source/ui/dlg/DbAdminImpl \
+ dbaccess/source/ui/dlg/dbfindex \
+ dbaccess/source/ui/dlg/DBSetupConnectionPages \
+ dbaccess/source/ui/dlg/dbwiz \
+ dbaccess/source/ui/dlg/dbwizsetup \
+ dbaccess/source/ui/dlg/detailpages \
+ dbaccess/source/ui/dlg/directsql \
+ dbaccess/source/ui/dlg/dlgattr \
+ dbaccess/source/ui/dlg/dlgsave \
+ dbaccess/source/ui/dlg/dlgsize \
+ dbaccess/source/ui/dlg/DriverSettings \
+ dbaccess/source/ui/dlg/dsselect \
+ dbaccess/source/ui/dlg/finteraction \
+ dbaccess/source/ui/dlg/generalpage \
+ dbaccess/source/ui/dlg/indexdialog \
+ dbaccess/source/ui/dlg/indexfieldscontrol \
+ dbaccess/source/ui/dlg/odbcconfig \
+ dbaccess/source/ui/dlg/paramdialog \
+ dbaccess/source/ui/dlg/queryfilter \
+ dbaccess/source/ui/dlg/queryorder \
+ dbaccess/source/ui/dlg/RelationDlg \
+ dbaccess/source/ui/dlg/sqlmessage \
+ dbaccess/source/ui/dlg/tablespage \
+ dbaccess/source/ui/dlg/TablesSingleDlg \
+ dbaccess/source/ui/dlg/TextConnectionHelper \
+ dbaccess/source/ui/dlg/textconnectionsettings \
+ dbaccess/source/ui/dlg/UserAdmin \
+ dbaccess/source/ui/dlg/UserAdminDlg \
+ dbaccess/source/ui/misc/asyncmodaldialog \
+ dbaccess/source/ui/misc/charsets \
+ dbaccess/source/ui/misc/controllerframe \
+ dbaccess/source/ui/misc/databaseobjectview \
+ dbaccess/source/ui/misc/datasourceconnector \
+ dbaccess/source/ui/misc/dbaundomanager \
+ dbaccess/source/ui/misc/dbsubcomponentcontroller \
+ dbaccess/source/ui/misc/defaultobjectnamecheck \
+ dbaccess/source/ui/misc/DExport \
+ dbaccess/source/ui/misc/dsmeta \
+ dbaccess/source/ui/misc/HtmlReader \
+ dbaccess/source/ui/misc/imageprovider \
+ dbaccess/source/ui/misc/indexcollection \
+ dbaccess/source/ui/misc/linkeddocuments \
+ dbaccess/source/ui/misc/moduledbu \
+ dbaccess/source/ui/misc/propertysetitem \
+ dbaccess/source/ui/misc/propertystorage \
+ dbaccess/source/ui/misc/RowSetDrop \
+ dbaccess/source/ui/misc/RtfReader \
+ dbaccess/source/ui/misc/singledoccontroller \
+ dbaccess/source/ui/misc/stringlistitem \
+ dbaccess/source/ui/misc/TableCopyHelper \
+ dbaccess/source/ui/misc/TokenWriter \
+ dbaccess/source/ui/misc/ToolBoxHelper \
+ dbaccess/source/ui/misc/uiservices \
+ dbaccess/source/ui/misc/UITools \
+ dbaccess/source/ui/misc/WColumnSelect \
+ dbaccess/source/ui/misc/WCopyTable \
+ dbaccess/source/ui/misc/WCPage \
+ dbaccess/source/ui/misc/WExtendPages \
+ dbaccess/source/ui/misc/WNameMatch \
+ dbaccess/source/ui/misc/WTypeSelect \
+ dbaccess/source/ui/querydesign/ConnectionLine \
+ dbaccess/source/ui/querydesign/ConnectionLineAccess \
+ dbaccess/source/ui/querydesign/JAccess \
+ dbaccess/source/ui/querydesign/JoinController \
+ dbaccess/source/ui/querydesign/JoinDesignView \
+ dbaccess/source/ui/querydesign/JoinExchange \
+ dbaccess/source/ui/querydesign/JoinTableView \
+ dbaccess/source/ui/querydesign/QTableConnection \
+ dbaccess/source/ui/querydesign/QTableConnectionData \
+ dbaccess/source/ui/querydesign/QTableWindow \
+ dbaccess/source/ui/querydesign/QTableWindowData \
+ dbaccess/source/ui/querydesign/querycontainerwindow \
+ dbaccess/source/ui/querydesign/querycontroller \
+ dbaccess/source/ui/querydesign/QueryDesignView \
+ dbaccess/source/ui/querydesign/querydlg \
+ dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct \
+ dbaccess/source/ui/querydesign/QueryTabConnUndoAction \
+ dbaccess/source/ui/querydesign/QueryTableView \
+ dbaccess/source/ui/querydesign/QueryTabWinUndoAct \
+ dbaccess/source/ui/querydesign/QueryTextView \
+ dbaccess/source/ui/querydesign/queryview \
+ dbaccess/source/ui/querydesign/QueryViewSwitch \
+ dbaccess/source/ui/querydesign/SelectionBrowseBox \
+ dbaccess/source/ui/querydesign/TableConnection \
+ dbaccess/source/ui/querydesign/TableConnectionData \
+ dbaccess/source/ui/querydesign/TableFieldDescription \
+ dbaccess/source/ui/querydesign/TableWindow \
+ dbaccess/source/ui/querydesign/TableWindowAccess \
+ dbaccess/source/ui/querydesign/TableWindowData \
+ dbaccess/source/ui/querydesign/TableWindowListBox \
+ dbaccess/source/ui/querydesign/TableWindowTitle \
+ dbaccess/source/ui/relationdesign/RelationController \
+ dbaccess/source/ui/relationdesign/RelationDesignView \
+ dbaccess/source/ui/relationdesign/RelationTableView \
+ dbaccess/source/ui/relationdesign/RTableConnection \
+ dbaccess/source/ui/relationdesign/RTableConnectionData \
+ dbaccess/source/ui/tabledesign/FieldDescGenWin \
+ dbaccess/source/ui/tabledesign/FieldDescriptions \
+ dbaccess/source/ui/tabledesign/TableController \
+ dbaccess/source/ui/tabledesign/TableDesignControl \
+ dbaccess/source/ui/tabledesign/TableDesignHelpBar \
+ dbaccess/source/ui/tabledesign/TableDesignView \
+ dbaccess/source/ui/tabledesign/TableFieldControl \
+ dbaccess/source/ui/tabledesign/TableFieldDescWin \
+ dbaccess/source/ui/tabledesign/TableRow \
+ dbaccess/source/ui/tabledesign/TableRowExchange \
+ dbaccess/source/ui/tabledesign/TableUndo \
+ dbaccess/source/ui/tabledesign/TEditControl \
+ dbaccess/source/ui/uno/admindlg \
+ dbaccess/source/ui/uno/AdvancedSettingsDlg \
+ dbaccess/source/ui/uno/ColumnControl \
+ dbaccess/source/ui/uno/ColumnModel \
+ dbaccess/source/ui/uno/ColumnPeer \
+ dbaccess/source/ui/uno/composerdialogs \
+ dbaccess/source/ui/uno/dbinteraction \
+ dbaccess/source/ui/uno/DBTypeWizDlg \
+ dbaccess/source/ui/uno/DBTypeWizDlgSetup \
+ dbaccess/source/ui/uno/TableFilterDlg \
+ dbaccess/source/ui/uno/textconnectionsettings_uno \
+ dbaccess/source/ui/uno/unoadmin \
+ dbaccess/source/ui/uno/unoDirectSql \
+ dbaccess/source/ui/uno/unosqlmessage \
+ dbaccess/source/ui/uno/UserSettingsDlg \
+))
+
+$(eval $(call gb_Library_add_noexception_objects,dbu,\
+ dbaccess/source/shared/dbustrings \
+ dbaccess/source/ui/control/ScrollHelper \
+ dbaccess/source/ui/dlg/optionalboolitem \
+ dbaccess/source/ui/querydesign/ConnectionLineData \
+ dbaccess/source/ui/querydesign/TableFieldInfo \
+))
+
+ifeq ($(GUI),WNT)
+ifneq (,$(strip $(WINDOWS_VISTA_PSDK)))
+ifeq (,$(strip $(PROF_EDITION)))
+dbu_DISABLE_ADO := $(true)
+endif
+endif
+ifneq ($(dbu_DISABLE_ADO),$(true))
+$(eval $(call gb_Library_add_noexception_objects,dbu,\
+ dbaccess/source/ui/dlg/adodatalinks \
+))
+endif
+endif
+
+# workaround for issue http://qa.openoffice.org/issues/show_bug.cgi?id=102305 Linux specific
+ifeq ($(COM),GCC)
+$(eval $(call gb_Library_add_cxxobjects,dbu,\
+ dbaccess/source/ui/uno/copytablewizard \
+ , $(gb_LinkTarget_EXCEPTIONFLAGS) $(gb_COMPILERNOOPTFLAGS) \
+))
+else
+$(eval $(call gb_Library_add_exception_objects,dbu,\
+ dbaccess/source/ui/uno/copytablewizard \
+))
+endif
+
+$(foreach object,\
+ dbaccess/source/ui/dlg/ConnectionHelper \
+ dbaccess/source/ui/dlg/ConnectionPage \
+ dbaccess/source/ui/dlg/ConnectionPageSetup \
+ dbaccess/source/ui/dlg/DBSetupConnectionPages \
+ dbaccess/source/ui/dlg/detailpages \
+ dbaccess/source/ui/dlg/tablespage \
+ dbaccess/source/ui/dlg/TextConnectionHelper \
+ ,$(eval $(call gb_CxxObject_get_target,$(object)) : $(WORKDIR)/inc/dbaccess/AutoControls.hrc))
+
+# vim: set noet ts=4 sw=4:
diff --git a/dbaccess/Library_sdbt.mk b/dbaccess/Library_sdbt.mk
index cecbc00d0..a93bc256b 100644
--- a/dbaccess/Library_sdbt.mk
+++ b/dbaccess/Library_sdbt.mk
@@ -1,67 +1,72 @@
-#*************************************************************************
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
#
-# OpenOffice.org - a multi-platform office productivity suite
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
#
-# This file is part of OpenOffice.org.
+# Major Contributor(s):
#
-# 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.
+# For minor contributions see the git repository.
#
-# 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.
-#
-#*************************************************************************
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
$(eval $(call gb_Library_Library,sdbt))
-$(eval $(call gb_Library_add_package_headers,sdbt,dbaccess_inc))
-$(eval $(call gb_Library_set_componentfile,sdbt,dbaccess/util/sdbt))
+$(eval $(call gb_Library_add_package_headers,sdbt,\
+ dbaccess_inc \
+))
+
+$(eval $(call gb_Library_add_precompiled_header,sdbt,$(SRCDIR)/dbaccess/inc/pch/precompiled_dbaccess))
$(eval $(call gb_Library_set_include,sdbt,\
- -I$(SRCDIR)/dbaccess/inc \
- -I$(SRCDIR)/dbaccess/source/sdbtools/inc \
- -I$(SRCDIR)/dbaccess/source/inc \
- -I$(SRCDIR)/dbaccess/inc/pch \
- $$(SOLARINC) \
- -I$(OUTDIR)/inc/offuh \
+ $$(INCLUDE) \
+ -I$(realpath $(SRCDIR)/dbaccess/inc) \
+ -I$(realpath $(SRCDIR)/dbaccess/inc/pch) \
+ -I$(realpath $(SRCDIR)/dbaccess/source/inc/) \
+ -I$(realpath $(SRCDIR)/dbaccess/source/sdbtools/inc) \
+ -I$(OUTDIR)/inc \
+ -I$(OUTDIR)/inc/offuh \
))
$(eval $(call gb_Library_add_linked_libs,sdbt,\
- tl \
- cppuhelper \
- cppu \
- comphelper \
- utl \
- sal \
- stl \
- dbtools \
+ comphelper \
+ cppu \
+ cppuhelper \
+ dbtools \
+ sal \
+ tl \
+ utl \
$(gb_STDLIBS) \
))
+$(eval $(call gb_Library_set_componentfile,sdbt,dbaccess/util/sdbt))
+
$(eval $(call gb_Library_add_exception_objects,sdbt,\
- dbaccess/source/sdbtools/connection/connectiontools \
- dbaccess/source/sdbtools/connection/tablename \
- dbaccess/source/sdbtools/connection/objectnames \
- dbaccess/source/sdbtools/connection/datasourcemetadata \
- dbaccess/source/sdbtools/misc/sdbt_services \
- dbaccess/source/sdbtools/misc/module_sdbt \
+ dbaccess/source/sdbtools/connection/connectiontools \
+ dbaccess/source/sdbtools/connection/datasourcemetadata \
+ dbaccess/source/sdbtools/connection/objectnames \
+ dbaccess/source/sdbtools/connection/tablename \
+ dbaccess/source/sdbtools/misc/module_sdbt \
+ dbaccess/source/sdbtools/misc/sdbt_services \
))
-$(eval $(call gb_Library_add_noexception_objects,sdbt, \
- dbaccess/source/shared/sdbtstrings \
+$(eval $(call gb_Library_add_noexception_objects,sdbt,\
+ dbaccess/source/shared/sdbtstrings \
))
-# vim: set noet sw=4 ts=4:
+# vim: set noet ts=4 sw=4:
diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk
index 2f41e13c7..51fe77bd9 100644
--- a/dbaccess/Module_dbaccess.mk
+++ b/dbaccess/Module_dbaccess.mk
@@ -1,58 +1,52 @@
-#*************************************************************************
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
#
-# OpenOffice.org - a multi-platform office productivity suite
+# The Initial Developer of the Original Code is
+# Bjoern Michaelsen, Canonical Ltd. <bjoern.michaelsen@canonical.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
#
-# This file is part of OpenOffice.org.
+# Major Contributor(s):
#
-# 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.
+# For minor contributions see the git repository.
#
-# 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.
-#
-#*************************************************************************
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
$(eval $(call gb_Module_Module,dbaccess))
$(eval $(call gb_Module_add_targets,dbaccess,\
- AllLangResTarget_adabasui \
- AllLangResTarget_dba \
- AllLangResTarget_dbmm \
- AllLangResTarget_dbui \
- AllLangResTarget_sdbt \
- Library_adabasui \
- Library_dba \
- Library_dbaxml \
- Library_dbmm \
- Library_dbui \
- Library_sdbt \
- Package_inc \
- Package_uiconfig \
- Package_xml \
-))
-
-ifeq ($(GUI),WNT)
-$(eval $(call gb_Module_add_targets,dbaccess,\
- Executable_odbcconfig \
+ $(if $(filter WNT,$(GUI)),Executable_odbcconfig) \
+ AllLangResTarget_adabasui \
+ AllLangResTarget_dba \
+ AllLangResTarget_dbmm \
+ AllLangResTarget_dbu \
+ AllLangResTarget_sdbt \
+ Library_adabasui \
+ Library_dba \
+ Library_dbaxml \
+ Library_dbmm \
+ Library_dbu \
+ Library_sdbt \
+ Package_inc \
+ Package_uiconfig \
))
-endif
$(eval $(call gb_Module_add_subsequentcheck_targets,dbaccess,\
JunitTest_dbaccess_complex \
- JunitTest_dbaccess_unoapi \
+ JunitTest_dbaccess_unoapi \
))
# vim: set noet ts=4 sw=4:
diff --git a/dbaccess/Package_inc.mk b/dbaccess/Package_inc.mk
index 753fd9c69..7ea77cd4b 100644
--- a/dbaccess/Package_inc.mk
+++ b/dbaccess/Package_inc.mk
@@ -1,39 +1,41 @@
-#*************************************************************************
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
#
-# OpenOffice.org - a multi-platform office productivity suite
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
#
-# This file is part of OpenOffice.org.
+# Major Contributor(s):
#
-# 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.
+# For minor contributions see the git repository.
#
-# 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.
-#
-#*************************************************************************
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
$(eval $(call gb_Package_Package,dbaccess_inc,$(SRCDIR)/dbaccess/inc))
-$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/AsyncronousLink.hxx ,AsyncronousLink.hxx ))
-$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/IController.hxx ,IController.hxx ))
-$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/IReference.hxx ,IReference.hxx ))
-$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/ToolBoxHelper.hxx ,ToolBoxHelper.hxx ))
-$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/controllerframe.hxx ,controllerframe.hxx ))
-$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/dataview.hxx ,dataview.hxx ))
-$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/dbaundomanager.hxx ,dbaundomanager.hxx ))
-$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/dbaccessdllapi.h ,dbaccessdllapi.h ))
-$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/dbsubcomponentcontroller.hxx ,dbsubcomponentcontroller.hxx ))
-$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/genericcontroller.hxx ,genericcontroller.hxx ))
+$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/AsyncronousLink.hxx,AsyncronousLink.hxx))
+$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/IController.hxx,IController.hxx))
+$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/IReference.hxx,IReference.hxx))
+$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/ToolBoxHelper.hxx,ToolBoxHelper.hxx))
+$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/controllerframe.hxx,controllerframe.hxx))
+$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/dataview.hxx,dataview.hxx))
+$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/dbaccessdllapi.h,dbaccessdllapi.h))
+$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/dbaundomanager.hxx,dbaundomanager.hxx))
+$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/dbsubcomponentcontroller.hxx,dbsubcomponentcontroller.hxx))
+$(eval $(call gb_Package_add_file,dbaccess_inc,inc/dbaccess/genericcontroller.hxx,genericcontroller.hxx))
+
+# vim: set noet ts=4 sw=4:
diff --git a/dbaccess/Package_uiconfig.mk b/dbaccess/Package_uiconfig.mk
index 5596c9d7a..91890f4be 100644
--- a/dbaccess/Package_uiconfig.mk
+++ b/dbaccess/Package_uiconfig.mk
@@ -1,48 +1,50 @@
-#*************************************************************************
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
#
-# OpenOffice.org - a multi-platform office productivity suite
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
#
-# This file is part of OpenOffice.org.
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
#
-# 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.
+# Major Contributor(s):
#
-# 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).
+# For minor contributions see the git repository.
#
-# 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.
-#
-#*************************************************************************
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
$(eval $(call gb_Package_Package,dbaccess_uiconfig,$(SRCDIR)/dbaccess/uiconfig))
$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbapp/menubar/menubar.xml,dbapp/menubar/menubar.xml))
-$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbtdata/menubar/menubar.xml,dbtdata/menubar/menubar.xml))
-$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbquery/menubar/menubar.xml,dbquery/menubar/menubar.xml))
-$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbrelation/menubar/menubar.xml,dbrelation/menubar/menubar.xml))
-$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbtable/menubar/menubar.xml,dbtable/menubar/menubar.xml))
+$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbapp/statusbar/statusbar.xml,dbapp/statusbar/statusbar.xml))
$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbapp/toolbar/formobjectbar.xml,dbapp/toolbar/formobjectbar.xml))
$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbapp/toolbar/queryobjectbar.xml,dbapp/toolbar/queryobjectbar.xml))
$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbapp/toolbar/reportobjectbar.xml,dbapp/toolbar/reportobjectbar.xml))
$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbapp/toolbar/tableobjectbar.xml,dbapp/toolbar/tableobjectbar.xml))
$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbapp/toolbar/toolbar.xml,dbapp/toolbar/toolbar.xml))
-$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbapp/statusbar/statusbar.xml,dbapp/statusbar/statusbar.xml))
$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbbrowser/menubar/compat.xml,dbbrowser/menubar/compat.xml))
$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbbrowser/toolbar/toolbar.xml,dbbrowser/toolbar/toolbar.xml))
-$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbtdata/toolbar/toolbar.xml,dbtdata/toolbar/toolbar.xml))
+$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbquery/menubar/menubar.xml,dbquery/menubar/menubar.xml))
$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbquery/toolbar/designobjectbar.xml,dbquery/toolbar/designobjectbar.xml))
$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbquery/toolbar/sqlobjectbar.xml,dbquery/toolbar/sqlobjectbar.xml))
$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbquery/toolbar/toolbar.xml,dbquery/toolbar/toolbar.xml))
+$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbrelation/menubar/menubar.xml,dbrelation/menubar/menubar.xml))
$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbrelation/toolbar/toolbar.xml,dbrelation/toolbar/toolbar.xml))
+$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbtable/menubar/menubar.xml,dbtable/menubar/menubar.xml))
$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbtable/toolbar/toolbar.xml,dbtable/toolbar/toolbar.xml))
+$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbtdata/menubar/menubar.xml,dbtdata/menubar/menubar.xml))
+$(eval $(call gb_Package_add_file,dbaccess_uiconfig,xml/uiconfig/modules/dbtdata/toolbar/toolbar.xml,dbtdata/toolbar/toolbar.xml))
+
+# vim: set noet ts=4 sw=4:
diff --git a/dbaccess/inc/AsyncronousLink.hxx b/dbaccess/inc/AsyncronousLink.hxx
index 7fb16cb40..2157ebd3e 100644
--- a/dbaccess/inc/AsyncronousLink.hxx
+++ b/dbaccess/inc/AsyncronousLink.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,3 +70,4 @@ namespace dbaui
}
#endif // DBAUI_ASYNCRONOUSLINK_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/inc/IController.hxx b/dbaccess/inc/IController.hxx
index 43357406d..81a358175 100644
--- a/dbaccess/inc/IController.hxx
+++ b/dbaccess/inc/IController.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,9 @@
#ifndef DBAUI_ICONTROLLER_HXX
#define DBAUI_ICONTROLLER_HXX
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
-#endif
-#ifndef DBAUI_IREFERENCE_HXX
#include "IReference.hxx"
-#endif
#include "dbaccessdllapi.h"
namespace com { namespace sun { namespace star {
@@ -138,3 +133,5 @@ namespace dbaui
};
}
#endif // DBAUI_ICONTROLLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/inc/IReference.hxx b/dbaccess/inc/IReference.hxx
index d8657c304..bd2e45927 100644
--- a/dbaccess/inc/IReference.hxx
+++ b/dbaccess/inc/IReference.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,4 @@ namespace dbaui
#endif // DBAUI_IREFERENCE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/inc/ToolBoxHelper.hxx b/dbaccess/inc/ToolBoxHelper.hxx
index db1c5b282..1adf4945a 100644
--- a/dbaccess/inc/ToolBoxHelper.hxx
+++ b/dbaccess/inc/ToolBoxHelper.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,18 +29,10 @@
#ifndef DBAUI_TOOLBOXHELPER_HXX
#define DBAUI_TOOLBOXHELPER_HXX
-#ifndef _SAL_TYPES_H_
#include <sal/types.h>
-#endif
-#ifndef _LINK_HXX
#include <tools/link.hxx>
-#endif
-#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
-#endif
-#ifndef _SV_IMAGE_HXX
#include <vcl/image.hxx>
-#endif
#include "dbaccessdllapi.h"
class SvtMiscOptions;
@@ -50,7 +43,6 @@ namespace dbaui
{
class DBACCESS_DLLPUBLIC OToolBoxHelper
{
- sal_Bool m_bIsHiContrast;// true when the toolbox is in hi contrast mode
sal_Int16 m_nSymbolsSize; // shows the toolbox large or small bitmaps
ToolBox* m_pToolBox; // our toolbox (may be NULL)
public:
@@ -69,7 +61,7 @@ namespace dbaui
@param _bHiContast
<TRUE/> when in high contrast mode.
*/
- virtual ImageList getImageList(sal_Int16 _eSymbolsSize,sal_Bool _bHiContast) const = 0;
+ virtual ImageList getImageList(sal_Int16 _eSymbolsSize) const = 0;
/** only the member will be set, derived classes can overload this function and do what need to be done.
@param _pTB
@@ -79,13 +71,12 @@ namespace dbaui
*/
virtual void setToolBox(ToolBox* _pTB);
- inline ToolBox* getToolBox() const { return m_pToolBox; }
+ inline ToolBox* getToolBox() const { return m_pToolBox; }
/** checks if the toolbox needs a new imagelist.
*/
void checkImageList();
-
- inline sal_Bool isToolBoxHiContrast() const { return m_bIsHiContrast; }
+
protected:
DECL_LINK(ConfigOptionsChanged, SvtMiscOptions*);
DECL_LINK(SettingsChanged, VclWindowEvent* );
@@ -93,3 +84,4 @@ namespace dbaui
}
#endif // DBAUI_TOOLBOXHELPER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/inc/controllerframe.hxx b/dbaccess/inc/controllerframe.hxx
index 057e0f765..7fb7bd7c3 100644
--- a/dbaccess/inc/controllerframe.hxx
+++ b/dbaccess/inc/controllerframe.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,5 @@ namespace dbaui
//........................................................................
#endif // DBACCESS_CONTROLLERFRAME_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/inc/dataview.hxx b/dbaccess/inc/dataview.hxx
index 53d71d772..e105db3d9 100644
--- a/dbaccess/inc/dataview.hxx
+++ b/dbaccess/inc/dataview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,6 +32,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <svtools/acceleratorexecute.hxx>
+#include <sal/macros.h>
#include <vcl/fixed.hxx>
#include <memory>
@@ -90,3 +92,4 @@ namespace dbaui
}
#endif // DBAUI_DATAVIEW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/inc/dbaccessdllapi.h b/dbaccess/inc/dbaccessdllapi.h
index b6dffd6d6..5b28a894f 100644
--- a/dbaccess/inc/dbaccessdllapi.h
+++ b/dbaccess/inc/dbaccessdllapi.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,3 +42,4 @@
#endif /* INCLUDED_DBACCESSDLLAPI_H */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/inc/dbaundomanager.hxx b/dbaccess/inc/dbaundomanager.hxx
index 1b8627f66..1b8627f66 100755..100644
--- a/dbaccess/inc/dbaundomanager.hxx
+++ b/dbaccess/inc/dbaundomanager.hxx
diff --git a/dbaccess/inc/dbsubcomponentcontroller.hxx b/dbaccess/inc/dbsubcomponentcontroller.hxx
index 6b9042c58..98cb76552 100644
--- a/dbaccess/inc/dbsubcomponentcontroller.hxx
+++ b/dbaccess/inc/dbsubcomponentcontroller.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -94,7 +95,7 @@ namespace dbaui
// ----------------------------------------------------------------
// asking for connection-related stuff
-
+
sal_Bool isConnected() const;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >
@@ -211,3 +212,4 @@ namespace dbaui
#endif // DBAUI_SUBCOMPONENTCONTROLLER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/inc/genericcontroller.hxx b/dbaccess/inc/genericcontroller.hxx
index 68de06c62..53407af03 100644
--- a/dbaccess/inc/genericcontroller.hxx
+++ b/dbaccess/inc/genericcontroller.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -540,3 +541,4 @@ namespace dbaui
#endif //DBAUI_GENERICCONTROLLER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/inc/makefile.mk b/dbaccess/inc/makefile.mk
deleted file mode 100644
index 5aa9bfe11..000000000
--- a/dbaccess/inc/makefile.mk
+++ /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.
-#
-#*************************************************************************
-PRJ=..
-
-PRJNAME=dbaccess
-TARGET=inc
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.IF "$(ENABLE_PCH)"!=""
-ALLTAR : \
- $(SLO)$/precompiled.pch \
- $(SLO)$/precompiled_ex.pch
-
-.ENDIF # "$(ENABLE_PCH)"!=""
-
diff --git a/dbaccess/inc/pch/precompiled_dbaccess.cxx b/dbaccess/inc/pch/precompiled_dbaccess.cxx
index 44bd67786..a5a4e8af7 100644
--- a/dbaccess/inc/pch/precompiled_dbaccess.cxx
+++ b/dbaccess/inc/pch/precompiled_dbaccess.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,3 +28,4 @@
#include "precompiled_dbaccess.hxx"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/inc/pch/precompiled_dbaccess.hxx b/dbaccess/inc/pch/precompiled_dbaccess.hxx
index f16091db2..dc926527e 100644
--- a/dbaccess/inc/pch/precompiled_dbaccess.hxx
+++ b/dbaccess/inc/pch/precompiled_dbaccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -476,6 +477,8 @@
#include "editeng/svxenum.hxx"
#include "svx/svxids.hrc"
+#include "rtl/ref.hxx"
+#include "salhelper/simplereferenceobject.hxx"
#include "tools/diagnose_ex.h"
@@ -498,10 +501,7 @@
#include "unotools/processfactory.hxx"
-#include "vos/mutex.hxx"
-#include "vos/ref.hxx"
-#include "vos/refernce.hxx"
-#include "vos/thread.hxx"
+#include "osl/mutex.hxx"
#include "xmloff/ProgressBarHelper.hxx"
#include "xmloff/XMLConstantsPropertyHandler.hxx"
@@ -518,3 +518,4 @@
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/prj/build.lst b/dbaccess/prj/build.lst
index a9ab55033..45372a76e 100644
--- a/dbaccess/prj/build.lst
+++ b/dbaccess/prj/build.lst
@@ -1,2 +1,3 @@
-ba dbaccess : L10N:l10n BOOST:boost connectivity svx stoc qadevOOo xmlscript LIBXSLT:libxslt test NULL
-ba dbaccess\prj nmake - all ba_prj NULL \ No newline at end of file
+ba dbaccess : TRANSLATIONS:translations BOOST:boost connectivity svx stoc qadevOOo xmlscript LIBXSLT:libxslt test NULL
+ba dbaccess usr1 - all ba_mkout NULL
+ba dbaccess\prj nmake - all ba_prj NULL
diff --git a/dbaccess/prj/makefile.mk b/dbaccess/prj/makefile.mk
index 88cd9dfe0..e312a7cca 100644..100755
--- a/dbaccess/prj/makefile.mk
+++ b/dbaccess/prj/makefile.mk
@@ -37,4 +37,4 @@ VERBOSEFLAG := -s
.ENDIF
all:
- cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
index 44a59dc6a..6f7106aab 100644
--- a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
+++ b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
@@ -627,7 +627,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
" oEvent.EventName = \"OnLoad\"\n" +
" oEvent.Source = ThisComponent\n" +
"\n" +
- " oCallback.documentEventOccured( oEvent )\n" +
+ " oCallback.documentEventOccurred( oEvent )\n" +
"End Sub\n";
XModel databaseDoc = impl_createDocWithMacro( libName, moduleName, eventHandlerCode );
final String documentURL = databaseDoc.getURL();
diff --git a/dbaccess/qa/complex/dbaccess/RowSet.java b/dbaccess/qa/complex/dbaccess/RowSet.java
index 57c82c7d7..742ce59c8 100644
--- a/dbaccess/qa/complex/dbaccess/RowSet.java
+++ b/dbaccess/qa/complex/dbaccess/RowSet.java
@@ -101,11 +101,7 @@ public class RowSet extends TestCase
for (int i = 0; m_resultSet.next(); ++i)
{
int pos = m_resultSet.getRow();
- // final int val = m_row.getInt(1);
-// System.out.println("Clone Move(" + m_id +") before i: " + (i+1) + " Pos: " + pos + " Val: " + val);
testPosition(m_resultSet, m_row, i + 1, "clone move(" + m_id + ")");
-// val = m_row.getInt(1);
-// System.out.println("Clone Move(" + m_id +") after i: " + (i+1) + " Pos: " + pos + " Val: " + val);
int pos2 = m_resultSet.getRow();
assertTrue("ResultSetMovementStress wrong position: " + i + " Pos1: " + pos + " Pos2: " + pos2, pos == pos2);
}
@@ -358,7 +354,6 @@ public class RowSet extends TestCase
System.out.println("testing Thread");
try
{
- // final XRow _row = (XRow)UnoRuntime.queryInterface(XRow.class,_resultSet);
_resultSet.beforeFirst();
final int numberOfThreads = 10;
diff --git a/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java b/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
index a0e1c3cac..f40aff96e 100755
--- a/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
+++ b/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
@@ -163,7 +163,7 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase
try
{
System.out.println("check setElementaryQuery");
-
+
final String simpleQuery2 = "SELECT * FROM \"customers\" WHERE \"Name\" = 'oranges'";
m_composer.setElementaryQuery(simpleQuery2);
assertTrue("setElementaryQuery/getQuery inconsistent", m_composer.getQuery().equals(simpleQuery2));
@@ -172,20 +172,20 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase
final String simpleQuery = "SELECT * FROM \"customers\"";
m_composer.setQuery(simpleQuery);
assertTrue("set/getQuery inconsistent", m_composer.getQuery().equals(simpleQuery));
-
+
checkAttributeAccess("Filter", "\"Name\" = 'oranges'");
checkAttributeAccess("Group", "\"City\"");
checkAttributeAccess("Order", "\"Address\"");
checkAttributeAccess("HavingClause", "\"ID\" <> 4");
-
+
final XIndexAccess orderColumns = m_composer.getOrderColumns();
assertTrue("Order columns doesn't exist: \"Address\"",
orderColumns != null && orderColumns.getCount() == 1 && orderColumns.getByIndex(0) != null);
-
+
final XIndexAccess groupColumns = m_composer.getGroupColumns();
assertTrue("Group columns doesn't exist: \"City\"",
groupColumns != null && groupColumns.getCount() == 1 && groupColumns.getByIndex(0) != null);
-
+
// XColumnsSupplier
final XColumnsSupplier xSelectColumns = UnoRuntime.queryInterface(XColumnsSupplier.class, m_composer);
assertTrue("no select columns, or wrong number of select columns",
@@ -252,7 +252,7 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase
final XIndexAccess parameters = suppParams.getParameters();
final String expectedParamNames[] =
-
+
{
"cname",
"Product Name"
@@ -285,7 +285,7 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase
m_composer.setQuery("SELECT * FROM \"customers\"");
final Object initArgs[] =
-
+
{
new NamedValue("AutomaticAddition", Boolean.valueOf(true))
};
diff --git a/dbaccess/qa/unoapi/makefile.mk b/dbaccess/qa/unoapi/makefile.mk
deleted file mode 100644
index 41ed9480f..000000000
--- a/dbaccess/qa/unoapi/makefile.mk
+++ /dev/null
@@ -1,48 +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.
-#***********************************************************************/
-
-.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
-nothing .PHONY:
-.ELSE
-
-PRJ = ../..
-PRJNAME = dbaccess
-TARGET = qa_unoapi
-
-.IF "$(OOO_JUNIT_JAR)" != ""
-PACKAGE = org/openoffice/dbaccess/qa/unoapi
-JAVATESTFILES = Test.java
-JAVAFILES = $(JAVATESTFILES)
-JARFILES = OOoRunner.jar ridl.jar test.jar
-EXTRAJARFILES = $(OOO_JUNIT_JAR)
-.END
-
-.INCLUDE: settings.mk
-.INCLUDE: target.mk
-.INCLUDE: installationtest.mk
-
-ALLTAR : javatest
-
-.END
diff --git a/dbaccess/source/core/api/BookmarkSet.cxx b/dbaccess/source/core/api/BookmarkSet.cxx
index e8964693a..f9cf63233 100644
--- a/dbaccess/source/core/api/BookmarkSet.cxx
+++ b/dbaccess/source/core/api/BookmarkSet.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -42,11 +43,9 @@ using namespace ::dbtools;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::sdbc;
-// using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
-// using namespace ::cppu;
using namespace ::osl;
void OBookmarkSet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::OUString& i_sRowSetFilter)
@@ -55,43 +54,43 @@ void OBookmarkSet::construct(const Reference< XResultSet>& _xDriverSet,const ::r
OCacheSet::construct(_xDriverSet,i_sRowSetFilter);
m_xRowLocate.set(_xDriverSet,UNO_QUERY);
}
-// -----------------------------------------------------------------------------
+
Any SAL_CALL OBookmarkSet::getBookmark() throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::getBookmark" );
return m_xRowLocate->getBookmark();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OBookmarkSet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::moveToBookmark" );
return m_xRowLocate->moveToBookmark(bookmark);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OBookmarkSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::moveRelativeToBookmark" );
return m_xRowLocate->moveRelativeToBookmark(bookmark,rows);
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OBookmarkSet::compareBookmarks( const Any& _first, const Any& _second ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::compareBookmarks" );
return m_xRowLocate->compareBookmarks(_first,_second);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OBookmarkSet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::hasOrderedBookmarks" );
return m_xRowLocate->hasOrderedBookmarks();
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OBookmarkSet::hashBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::hashBookmark" );
return m_xRowLocate->hashBookmark(bookmark);
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::sdbcx::XDeleteRows
Sequence< sal_Int32 > SAL_CALL OBookmarkSet::deleteRows( const Sequence< Any >& rows ,const connectivity::OSQLTable& /*_xTable*/) throw(SQLException, RuntimeException)
{
@@ -103,7 +102,7 @@ Sequence< sal_Int32 > SAL_CALL OBookmarkSet::deleteRows( const Sequence< Any >&
}
return Sequence< sal_Int32 >();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OBookmarkSet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::insertRow" );
@@ -128,11 +127,10 @@ void SAL_CALL OBookmarkSet::insertRow( const ORowSetRow& _rInsertRow,const conne
else
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XRESULTSETUPDATE ), SQL_GENERAL_ERROR, *this );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OBookmarkSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::updateRow" );
- // OCacheSet::updateRow( _rInsertRow,_rOrginalRow,_xTable);
Reference<XRowUpdate> xUpdRow(m_xRowLocate,UNO_QUERY);
if(!xUpdRow.is())
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XROWUPDATE ), SQL_GENERAL_ERROR, *this );
@@ -153,7 +151,7 @@ void SAL_CALL OBookmarkSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowS
else
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XRESULTSETUPDATE ), SQL_GENERAL_ERROR, *this );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OBookmarkSet::deleteRow(const ORowSetRow& /*_rDeleteRow*/ ,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::deleteRow" );
@@ -161,12 +159,12 @@ void SAL_CALL OBookmarkSet::deleteRow(const ORowSetRow& /*_rDeleteRow*/ ,const c
xUpd->deleteRow();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OBookmarkSet::cancelRowUpdates( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::cancelRowUpdates" );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OBookmarkSet::moveToInsertRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::moveToInsertRow" );
@@ -174,18 +172,18 @@ void SAL_CALL OBookmarkSet::moveToInsertRow( ) throw(SQLException, RuntimeExcep
if(xUpd.is())
xUpd->moveToInsertRow();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OBookmarkSet::moveToCurrentRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::moveToCurrentRow" );
}
-// -------------------------------------------------------------------------
+
void OBookmarkSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::fillValueRow" );
OCacheSet::fillValueRow(_rRow,_nPosition);
}
-// -------------------------------------------------------------------------
+
void OBookmarkSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xParameter,const ORowSetValue& _rValue)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::updateColumn" );
@@ -204,8 +202,6 @@ void OBookmarkSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xParamet
break;
case DataType::CHAR:
case DataType::VARCHAR:
- //case DataType::DECIMAL:
- //case DataType::NUMERIC:
_xParameter->updateString(nPos,_rValue);
break;
case DataType::BIGINT:
@@ -265,4 +261,4 @@ void OBookmarkSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xParamet
}
}
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/BookmarkSet.hxx b/dbaccess/source/core/api/BookmarkSet.hxx
index e1b6566ef..1b7b8052c 100644
--- a/dbaccess/source/core/api/BookmarkSet.hxx
+++ b/dbaccess/source/core/api/BookmarkSet.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,12 +29,8 @@
#ifndef DBACCESS_CORE_API_BOOKMARKSET_HXX
#define DBACCESS_CORE_API_BOOKMARKSET_HXX
-#ifndef DBACCESS_CORE_API_CACHESET_HXX
#include "CacheSet.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROWUPDATE_HPP_
#include <com/sun/star/sdbc/XRowUpdate.hpp>
-#endif
namespace dbaccess
{
@@ -73,3 +70,4 @@ namespace dbaccess
}
#endif // DBACCESS_CORE_API_BOOKMARKSET_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/CIndexColumn.hxx b/dbaccess/source/core/api/CIndexColumn.hxx
index 81a3302b3..3bd08da3d 100644
--- a/dbaccess/source/core/api/CIndexColumn.hxx
+++ b/dbaccess/source/core/api/CIndexColumn.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,9 +29,7 @@
#ifndef DBACCESS_INDEXCOLUMN_HXX_
#define DBACCESS_INDEXCOLUMN_HXX_
-#ifndef _CONNECTIVITY_ADABAS_COLUMN_HXX_
#include "adabas/BColumn.hxx"
-#endif
namespace connectivity
{
@@ -57,3 +56,5 @@ namespace connectivity
}
}
#endif // DBACCESS_INDEXCOLUMN_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/CIndexes.cxx b/dbaccess/source/core/api/CIndexes.cxx
index f24a358ca..8ea223cff 100644
--- a/dbaccess/source/core/api/CIndexes.cxx
+++ b/dbaccess/source/core/api/CIndexes.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,30 +28,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBACCESS_INDEXES_HXX_
#include "CIndexes.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_
#include <com/sun/star/sdbc/XResultSet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_INDEXTYPE_HPP_
#include <com/sun/star/sdbc/IndexType.hpp>
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
using namespace connectivity;
@@ -75,7 +60,7 @@ ObjectType OIndexes::createObject(const ::rtl::OUString& _rName)
return xRet;
}
-// -------------------------------------------------------------------------
+
Reference< XPropertySet > OIndexes::createDescriptor()
{
Reference<XDataDescriptorFactory> xData( m_xIndexes,UNO_QUERY);
@@ -84,7 +69,7 @@ Reference< XPropertySet > OIndexes::createDescriptor()
else
return OIndexesHelper::createDescriptor();
}
-// -------------------------------------------------------------------------
+
// XAppend
ObjectType OIndexes::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
@@ -95,7 +80,7 @@ ObjectType OIndexes::appendObject( const ::rtl::OUString& _rForName, const Refer
xData->appendByDescriptor(descriptor);
return createObject( _rForName );
}
-// -------------------------------------------------------------------------
+
// XDrop
void OIndexes::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
{
@@ -108,7 +93,7 @@ void OIndexes::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
else
OIndexesHelper::dropObject(_nPos,_sElementName);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OIndexes::disposing(void)
{
if ( m_xIndexes.is() )
@@ -116,8 +101,4 @@ void SAL_CALL OIndexes::disposing(void)
else
OIndexesHelper::disposing();
}
-// -----------------------------------------------------------------------------
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/CIndexes.hxx b/dbaccess/source/core/api/CIndexes.hxx
index 784e2ba80..ec58d93f9 100644
--- a/dbaccess/source/core/api/CIndexes.hxx
+++ b/dbaccess/source/core/api/CIndexes.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,9 +29,7 @@
#ifndef DBACCESS_INDEXES_HXX_
#define DBACCESS_INDEXES_HXX_
-#ifndef CONNECTIVITY_INDEXESHELPER_HXX
#include "connectivity/TIndexes.hxx"
-#endif
namespace dbaccess
{
@@ -56,3 +55,5 @@ namespace dbaccess
}
#endif // DBACCESS_INDEXES_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/CRowSetColumn.cxx b/dbaccess/source/core/api/CRowSetColumn.cxx
index 60c4fe1d4..444169cf9 100644
--- a/dbaccess/source/core/api/CRowSetColumn.cxx
+++ b/dbaccess/source/core/api/CRowSetColumn.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -43,32 +44,25 @@ using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::beans;
-//..............................................................................
namespace dbaccess
{
-//..............................................................................
-//------------------------------------------------------------------------------
ORowSetColumn::ORowSetColumn( const Reference < XResultSetMetaData >& _xMetaData, const Reference < XRow >& _xRow, sal_Int32 _nPos,
const Reference< XDatabaseMetaData >& _rxDBMeta, const ::rtl::OUString& _rDescription, const ::rtl::OUString& i_sLabel,ORowSetCacheIterator& _rColumnValue )
:ORowSetDataColumn( _xMetaData, _xRow, NULL, _nPos, _rxDBMeta, _rDescription, i_sLabel,_rColumnValue )
{
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* ORowSetColumn::createArrayHelper( ) const
{
- const sal_Int32 nDerivedProperties = 21;
- Sequence< Property> aDerivedProperties( nDerivedProperties );
- Property* pDesc = aDerivedProperties.getArray();
- sal_Int32 nPos = 0;
+ BEGIN_PROPERTY_SEQUENCE(21)
DECL_PROP1( CATALOGNAME, ::rtl::OUString, READONLY );
DECL_PROP1( DISPLAYSIZE, sal_Int32, READONLY );
DECL_PROP1_BOOL( ISAUTOINCREMENT, READONLY );
DECL_PROP1_BOOL( ISCASESENSITIVE, READONLY );
DECL_PROP1_BOOL( ISCURRENCY, READONLY );
- DECL_PROP1_BOOL( ISDEFINITELYWRITABLE, READONLY );
+ DECL_PROP1_BOOL( ISDEFINITELYWRITABLE, READONLY );
DECL_PROP1( ISNULLABLE, sal_Int32, READONLY );
DECL_PROP1_BOOL( ISREADONLY, BOUND );
DECL_PROP1_BOOL( ISROWVERSION, READONLY );
@@ -84,21 +78,20 @@ ORowSetColumn::ORowSetColumn( const Reference < XResultSetMetaData >& _xMetaData
DECL_PROP1( TYPE, sal_Int32, READONLY );
DECL_PROP1( TYPENAME, ::rtl::OUString, READONLY );
DECL_PROP2( VALUE, Any, READONLY, BOUND );
- OSL_ENSURE( nPos == nDerivedProperties, "ORowSetColumn::createArrayHelper: inconsistency!" );
+
+ END_PROPERTY_SEQUENCE()
Sequence< Property > aRegisteredProperties;
describeProperties( aRegisteredProperties );
- return new ::cppu::OPropertyArrayHelper( ::comphelper::concatSequences( aDerivedProperties, aRegisteredProperties ), sal_False );
+ return new ::cppu::OPropertyArrayHelper( ::comphelper::concatSequences( aDescriptor, aRegisteredProperties ), sal_False );
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& ORowSetColumn::getInfoHelper()
{
return *static_cast< ::comphelper::OPropertyArrayUsageHelper< ORowSetColumn >* >(this)->getArrayHelper();
}
-//------------------------------------------------------------------------------
void SAL_CALL ORowSetColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue )throw (Exception)
{
OSL_ENSURE( nHandle != PROPERTY_ID_VALUE, "ORowSetColumn::setFastPropertyValue_NoBroadcast: hmm? This property is marked as READONLY!" );
@@ -106,6 +99,5 @@ void SAL_CALL ORowSetColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,
ORowSetDataColumn::setFastPropertyValue_NoBroadcast( nHandle, rValue );
}
-//..............................................................................
} // namespace dbaccess
-//..............................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/CRowSetColumn.hxx b/dbaccess/source/core/api/CRowSetColumn.hxx
index 3b16166da..f2c84a3b2 100644
--- a/dbaccess/source/core/api/CRowSetColumn.hxx
+++ b/dbaccess/source/core/api/CRowSetColumn.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,25 +28,17 @@
#ifndef DBACCESS_CORE_API_CROWSETCOLUMN_HXX
#define DBACCESS_CORE_API_CROWSETCOLUMN_HXX
-#ifndef DBACCESS_CORE_API_ROWSETROW_HXX
#include "RowSetRow.hxx"
-#endif
-#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
#include <connectivity/CommonTools.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
#include <comphelper/proparrhlp.hxx>
-#endif
-#ifndef DBACCESS_CORE_API_CROWSETDATACOLUMN_HXX
#include "CRowSetDataColumn.hxx"
-#endif
namespace dbaccess
{
class ORowSetColumn;
class ORowSetColumn :public ORowSetDataColumn
,public ::comphelper::OPropertyArrayUsageHelper< ORowSetColumn >
-
+
{
public:
ORowSetColumn( const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XResultSetMetaData >& _xMetaData,
@@ -64,3 +57,5 @@ namespace dbaccess
}
#endif // DBACCESS_CORE_API_CROWSETCOLUMN_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx
index 502a0a631..9e6bfe87d 100644
--- a/dbaccess/source/core/api/CRowSetDataColumn.cxx
+++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,34 +29,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBACORE_DATACOLUMN_HXX_
#include "CRowSetDataColumn.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
using namespace dbaccess;
using namespace comphelper;
using namespace connectivity;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
-// using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
@@ -64,7 +50,7 @@ using namespace cppu;
using namespace osl;
DBG_NAME(ORowSetDataColumn)
-// -------------------------------------------------------------------------
+
ORowSetDataColumn::ORowSetDataColumn( const Reference < XResultSetMetaData >& _xMetaData,
const Reference < XRow >& _xRow,
const Reference < XRowUpdate >& _xRowUpdate,
@@ -82,20 +68,16 @@ ORowSetDataColumn::ORowSetDataColumn( const Reference < XResultSetMetaData >& _x
OColumnSettings::registerProperties( *this );
registerProperty( PROPERTY_DESCRIPTION, PROPERTY_ID_DESCRIPTION, PropertyAttribute::READONLY, &m_aDescription, ::getCppuType( &m_aDescription ) );
}
-// -------------------------------------------------------------------------
+
ORowSetDataColumn::~ORowSetDataColumn()
{
DBG_DTOR(ORowSetDataColumn,NULL);
}
-// -------------------------------------------------------------------------
+
// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* ORowSetDataColumn::createArrayHelper( ) const
{
- const sal_Int32 nDerivedProperties = 21;
- Sequence< Property> aDerivedProperties( nDerivedProperties );
- Property* pDesc = aDerivedProperties.getArray();
- sal_Int32 nPos = 0;
+ BEGIN_PROPERTY_SEQUENCE(21)
DECL_PROP1( CATALOGNAME, ::rtl::OUString, READONLY );
DECL_PROP1( DISPLAYSIZE, sal_Int32, READONLY );
@@ -118,26 +100,26 @@ ORowSetDataColumn::~ORowSetDataColumn()
DECL_PROP1( TYPE, sal_Int32, READONLY );
DECL_PROP1( TYPENAME, ::rtl::OUString, READONLY );
DECL_PROP1( VALUE, Any, BOUND );
- OSL_ENSURE( nPos == nDerivedProperties, "ORowSetDataColumn::createArrayHelper: inconsistency!" );
+
+ END_PROPERTY_SEQUENCE()
Sequence< Property > aRegisteredProperties;
describeProperties( aRegisteredProperties );
- return new ::cppu::OPropertyArrayHelper( ::comphelper::concatSequences( aDerivedProperties, aRegisteredProperties ), sal_False );
+ return new ::cppu::OPropertyArrayHelper( ::comphelper::concatSequences( aDescriptor, aRegisteredProperties ), sal_False );
}
// cppu::OPropertySetHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& ORowSetDataColumn::getInfoHelper()
{
return *static_cast< ::comphelper::OPropertyArrayUsageHelper< ORowSetDataColumn >* >(this)->getArrayHelper();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSetDataColumn::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
if ( PROPERTY_ID_VALUE == nHandle )
{
- if ( !m_aColumnValue.isNull() && m_aColumnValue->isValid() )
+ if ( !m_aColumnValue.isNull() && m_aColumnValue->is() )
{
::osl::Mutex* pMutex = m_aColumnValue.getMutex();
::osl::MutexGuard aGuard( *pMutex );
@@ -154,7 +136,6 @@ void SAL_CALL ORowSetDataColumn::getFastPropertyValue( Any& rValue, sal_Int32 nH
ODataColumn::getFastPropertyValue( rValue, nHandle );
}
-// -------------------------------------------------------------------------
void SAL_CALL ORowSetDataColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue )throw (Exception)
{
switch( nHandle )
@@ -174,7 +155,7 @@ void SAL_CALL ORowSetDataColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHan
break;
}
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetDataColumn::convertFastPropertyValue( Any & rConvertedValue,
Any & rOldValue,
sal_Int32 nHandle,
@@ -204,7 +185,7 @@ sal_Bool SAL_CALL ORowSetDataColumn::convertFastPropertyValue( Any & rConvertedV
return bModified;
}
-//--------------------------------------------------------------------------
+
Sequence< sal_Int8 > ORowSetDataColumn::getImplementationId() throw (RuntimeException)
{
static OImplementationId * pId = 0;
@@ -219,10 +200,10 @@ Sequence< sal_Int8 > ORowSetDataColumn::getImplementationId() throw (RuntimeExce
}
return pId->getImplementationId();
}
-// -------------------------------------------------------------------------
+
void ORowSetDataColumn::fireValueChange(const ORowSetValue& _rOldValue)
{
- if ( !m_aColumnValue.isNull() && m_aColumnValue->isValid() && (!(((*m_aColumnValue)->get())[m_nPos] == _rOldValue)) )
+ if ( !m_aColumnValue.isNull() && m_aColumnValue->is() && (!(((*m_aColumnValue)->get())[m_nPos] == _rOldValue)) )
{
sal_Int32 nHandle = PROPERTY_ID_VALUE;
m_aOldValue = _rOldValue.makeAny();
@@ -239,11 +220,11 @@ void ORowSetDataColumn::fireValueChange(const ORowSetValue& _rOldValue)
fire(&nHandle, &aNew, &m_aOldValue, 1, sal_False );
}
}
-// -----------------------------------------------------------------------------
+
DBG_NAME(ORowSetDataColumns )
ORowSetDataColumns::ORowSetDataColumns(
sal_Bool _bCase,
- const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,
+ const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,
::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,
const ::std::vector< ::rtl::OUString> &_rVector
@@ -252,12 +233,12 @@ ORowSetDataColumns::ORowSetDataColumns(
{
DBG_CTOR(ORowSetDataColumns ,NULL);
}
-// -----------------------------------------------------------------------------
+
ORowSetDataColumns::~ORowSetDataColumns()
{
DBG_DTOR(ORowSetDataColumns ,NULL);
}
-// -----------------------------------------------------------------------------
+
sdbcx::ObjectType ORowSetDataColumns::createObject(const ::rtl::OUString& _rName)
{
connectivity::sdbcx::ObjectType xNamed;
@@ -269,24 +250,20 @@ sdbcx::ObjectType ORowSetDataColumns::createObject(const ::rtl::OUString& _rName
return xNamed;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ORowSetDataColumns::disposing(void)
{
- // clear_NoDispose();
ORowSetDataColumns_BASE::disposing();
m_aColumns = NULL;
- // m_aColumns.clear();
}
-// -----------------------------------------------------------------------------
-void ORowSetDataColumns::assign(const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,const ::std::vector< ::rtl::OUString> &_rVector)
+
+void ORowSetDataColumns::assign(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,const ::std::vector< ::rtl::OUString> &_rVector)
{
m_aColumns = _rColumns;
reFill(_rVector);
}
-// -----------------------------------------------------------------------------
+
void ORowSetDataColumns::impl_refresh() throw(::com::sun::star::uno::RuntimeException)
{
}
-// -----------------------------------------------------------------------------
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/CRowSetDataColumn.hxx b/dbaccess/source/core/api/CRowSetDataColumn.hxx
index 90677d117..477328ef8 100644
--- a/dbaccess/source/core/api/CRowSetDataColumn.hxx
+++ b/dbaccess/source/core/api/CRowSetDataColumn.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -63,7 +64,7 @@ namespace dbaccess
const ::rtl::OUString& i_sLabel,
const ORowSetCacheIterator& _rColumnValue);
-
+
// com::sun::star::lang::XTypeProvider
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
// comphelper::OPropertyArrayUsageHelper
@@ -83,21 +84,18 @@ namespace dbaccess
protected:
using ODataColumn::getFastPropertyValue;
};
- // -------------------------------------------------------------------------
-// typedef connectivity::ORefVector< ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> >
-// ORowSetDataColumns_COLLECTION;
typedef connectivity::sdbcx::OCollection ORowSetDataColumns_BASE;
class ORowSetDataColumns : public ORowSetDataColumns_BASE
{
- ::vos::ORef< ::connectivity::OSQLColumns> m_aColumns;
+ ::rtl::Reference< ::connectivity::OSQLColumns> m_aColumns;
protected:
virtual connectivity::sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
public:
ORowSetDataColumns(
sal_Bool _bCase,
- const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,
+ const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,
::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,
const ::std::vector< ::rtl::OUString> &_rVector
@@ -105,9 +103,10 @@ namespace dbaccess
virtual ~ORowSetDataColumns();
// only the name is identical to ::cppu::OComponentHelper
virtual void SAL_CALL disposing(void);
- void assign(const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,const ::std::vector< ::rtl::OUString> &_rVector);
+ void assign(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,const ::std::vector< ::rtl::OUString> &_rVector);
};
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index 19a3bdd29..39121e0c2 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,64 +28,28 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBACCESS_CORE_API_CACHESET_HXX
#include "CacheSet.hxx"
-#endif
-#ifndef _DBA_CORE_RESOURCE_HXX_
#include "core_resource.hxx"
-#endif
-#ifndef _DBA_CORE_RESOURCE_HRC_
#include "core_resource.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_COMPAREBOOKMARK_HPP_
#include <com/sun/star/sdbcx/CompareBookmark.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XPREPAREDSTATEMENT_HPP_
#include <com/sun/star/sdbc/XPreparedStatement.hpp>
-#endif
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#ifndef _COM_SUN_STAR_SDBC_XPARAMETERS_HPP_
#include <com/sun/star/sdbc/XParameters.hpp>
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XKEYSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XINDEXESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XIndexesSupplier.hpp>
-#endif
#include <limits>
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_KEYTYPE_HPP_
#include <com/sun/star/sdbcx/KeyType.hpp>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_
#include <com/sun/star/io/XInputStream.hpp>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
#include <rtl/ustrbuf.hxx>
#include <rtl/logfile.hxx>
@@ -96,17 +61,15 @@ using namespace connectivity;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::sdbc;
-// using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::io;
-// using namespace ::cppu;
using namespace ::osl;
DBG_NAME(OCacheSet)
-// -------------------------------------------------------------------------
-OCacheSet::OCacheSet(sal_Int32 i_nMaxRows)
+
+OCacheSet::OCacheSet(sal_Int32 i_nMaxRows)
:m_nMaxRows(i_nMaxRows)
,m_bInserted(sal_False)
,m_bUpdated(sal_False)
@@ -116,7 +79,7 @@ OCacheSet::OCacheSet(sal_Int32 i_nMaxRows)
DBG_CTOR(OCacheSet,NULL);
}
-// -------------------------------------------------------------------------
+
::rtl::OUString OCacheSet::getIdentifierQuoteString() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getIdentifierQuoteString" );
@@ -126,8 +89,8 @@ OCacheSet::OCacheSet(sal_Int32 i_nMaxRows)
sQuote = xMeta->getIdentifierQuoteString();
return sQuote;
}
-// -------------------------------------------------------------------------
-void OCacheSet::construct( const Reference< XResultSet>& _xDriverSet,const ::rtl::OUString& /*i_sRowSetFilter*/)
+
+void OCacheSet::construct( const Reference< XResultSet>& _xDriverSet,const ::rtl::OUString& /*i_sRowSetFilter*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::construct" );
OSL_ENSURE(_xDriverSet.is(),"Invalid resultSet");
@@ -163,28 +126,28 @@ void OCacheSet::construct( const Reference< XResultSet>& _xDriverSet,const ::rtl
}
}
}
-// -------------------------------------------------------------------------
+
OCacheSet::~OCacheSet()
{
try
{
- m_xDriverSet = NULL;
- m_xDriverRow = NULL;
+ m_xDriverSet = NULL;
+ m_xDriverRow = NULL;
m_xSetMetaData = NULL;
- m_xConnection = NULL;
+ m_xConnection = NULL;
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception occured");
+ OSL_FAIL("Exception occurred");
}
catch(...)
{
- OSL_ENSURE(0,"Unknown Exception occured");
+ OSL_FAIL("Unknown Exception occurred");
}
DBG_DTOR(OCacheSet,NULL);
}
-// -----------------------------------------------------------------------------
+
void OCacheSet::fillTableName(const Reference<XPropertySet>& _xTable) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::fillTableName" );
@@ -200,7 +163,7 @@ void OCacheSet::fillTableName(const Reference<XPropertySet>& _xTable) throw(SQL
,::dbtools::eInDataManipulation);
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OCacheSet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::insertRow" );
@@ -209,9 +172,9 @@ void SAL_CALL OCacheSet::insertRow( const ORowSetRow& _rInsertRow,const connecti
fillTableName(xSet);
aSql.append(m_aComposedTableName);
- aSql.append(::rtl::OUString::createFromAscii(" ( "));
+ aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ( ")));
// set values and column names
- ::rtl::OUStringBuffer aValues = ::rtl::OUString::createFromAscii(" VALUES ( ");
+ ::rtl::OUStringBuffer aValues = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" VALUES ( "));
static ::rtl::OUString aPara(RTL_CONSTASCII_USTRINGPARAM("?,"));
::rtl::OUString aQuote = getIdentifierQuoteString();
static ::rtl::OUString aComma(RTL_CONSTASCII_USTRINGPARAM(","));
@@ -244,33 +207,18 @@ void SAL_CALL OCacheSet::insertRow( const ORowSetRow& _rInsertRow,const connecti
m_bInserted = xPrep->executeUpdate() > 0;
}
-
-// ::rtl::OUString aCountSql = ::rtl::OUString::createFromAscii("SELECT COUNT(*) FROM ");
-// aCountSql += m_aComposedTableName;
-// try
-// {
-// Reference< XStatement > xStmt(m_xConnection->createStatement());
-// Reference<XResultSet> xRes(xStmt->executeQuery(aCountSql));
-// if(xRes.is() && xRes->next())
-// {
-// Reference<XRow> xRow(xRes,UNO_QUERY);
-// }
-// }
-// catch(SQLException&)
-// {
-// }
-
+
// TODO set the bookmark in the insert row
}
-// -------------------------------------------------------------------------
+
void OCacheSet::fillParameters( const ORowSetRow& _rRow
- ,const connectivity::OSQLTable& _xTable
+ ,const connectivity::OSQLTable& _xTable
,::rtl::OUStringBuffer& _sCondition
,::rtl::OUStringBuffer& _sParameter
,::std::list< sal_Int32>& _rOrgValues)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::fillParameters" );
- // use keys and indexes for excat postioning
+ // use keys and indexes for exact positioning
// first the keys
Reference<XPropertySet> xSet(_xTable,UNO_QUERY);
const Reference<XNameAccess> xPrimaryKeyColumns = getPrimaryKeyColumns_throw(xSet);
@@ -298,15 +246,15 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
}
::rtl::OUString aColumnName;
-
- static ::rtl::OUString aPara = ::rtl::OUString::createFromAscii("?,");
- static ::rtl::OUString aAnd = ::rtl::OUString::createFromAscii(" AND ");
+
+ static ::rtl::OUString aPara(RTL_CONSTASCII_USTRINGPARAM("?,"));
+ static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
::rtl::OUString aQuote = getIdentifierQuoteString();
sal_Int32 nCheckCount = 1; // index for the orginal values
sal_Int32 i = 1;
-
+
::rtl::OUString sIsNull(RTL_CONSTASCII_USTRINGPARAM(" IS NULL"));
::rtl::OUString sParam(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
ORowVector< ORowSetValue >::Vector::const_iterator aIter = _rRow->get().begin()+1;
@@ -324,7 +272,7 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
_sCondition.append(aAnd);
_rOrgValues.push_back(nCheckCount);
- } // if(xPrimaryKeyColumns.is() && xPrimaryKeyColumns->hasByName(aColumnName))
+ }
::std::vector< Reference<XNameAccess> >::const_iterator aIndexEnd = aAllIndexColumns.end();
for( ::std::vector< Reference<XNameAccess> >::const_iterator aIndexIter = aAllIndexColumns.begin();
aIndexIter != aIndexEnd;++aIndexIter)
@@ -348,18 +296,18 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
}
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::updateRow" );
Reference<XPropertySet> xSet(_xTable,UNO_QUERY);
fillTableName(xSet);
- ::rtl::OUStringBuffer aSql = ::rtl::OUString::createFromAscii("UPDATE ");
+ ::rtl::OUStringBuffer aSql = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UPDATE "));
aSql.append(m_aComposedTableName);
- aSql.append(::rtl::OUString::createFromAscii(" SET "));
+ aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" SET ")));
// list all cloumns that should be set
-
+
::rtl::OUStringBuffer aCondition;
::std::list< sal_Int32> aOrgValues;
fillParameters(_rInsertRow,_xTable,aCondition,aSql,aOrgValues);
@@ -368,7 +316,7 @@ void SAL_CALL OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetR
{
aCondition.setLength(aCondition.getLength()-5);
- aSql.append(::rtl::OUString::createFromAscii(" WHERE "));
+ aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE ")));
aSql.append(aCondition.makeStringAndClear());
}
else
@@ -387,7 +335,7 @@ void SAL_CALL OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetR
setParameter(i,xParameter,*aIter,m_xSetMetaData->getColumnType(i),m_xSetMetaData->getScale(i));
++i;
}
- } // for(ORowVector< ORowSetValue >::Vector::const_iterator aIter = _rInsertRow->get().begin()+1; aIter != aEnd;++aIter)
+ }
::std::list< sal_Int32>::const_iterator aOrgValueEnd = aOrgValues.end();
for(::std::list< sal_Int32>::const_iterator aOrgValue = aOrgValues.begin(); aOrgValue != aOrgValueEnd;++aOrgValue,++i)
{
@@ -396,22 +344,22 @@ void SAL_CALL OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetR
m_bUpdated = xPrep->executeUpdate() > 0;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OCacheSet::deleteRow(const ORowSetRow& _rDeleteRow ,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::deleteRow" );
Reference<XPropertySet> xSet(_xTable,UNO_QUERY);
fillTableName(xSet);
- ::rtl::OUStringBuffer aSql = ::rtl::OUString::createFromAscii("DELETE FROM ");
+ ::rtl::OUStringBuffer aSql = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DELETE FROM "));
aSql.append(m_aComposedTableName);
- aSql.append(::rtl::OUString::createFromAscii(" WHERE "));
+ aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE ")));
// list all cloumns that should be set
::rtl::OUString aQuote = getIdentifierQuoteString();
- static ::rtl::OUString aAnd = ::rtl::OUString::createFromAscii(" AND ");
+ static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
- // use keys and indexes for excat postioning
+ // use keys and indexes for exact positioning
// first the keys
const Reference<XNameAccess> xPrimaryKeyColumns = getPrimaryKeyColumns_throw(xSet);
// second the indexes
@@ -440,10 +388,10 @@ void SAL_CALL OCacheSet::deleteRow(const ORowSetRow& _rDeleteRow ,const connecti
::rtl::OUStringBuffer aColumnName;
::std::list< sal_Int32> aOrgValues;
fillParameters(_rDeleteRow,_xTable,aSql,aColumnName,aOrgValues);
-
+
aSql.setLength(aSql.getLength()-5);
- // now create end execute the prepared statement
+ // now create and execute the prepared statement
Reference< XPreparedStatement > xPrep(m_xConnection->prepareStatement(aSql.makeStringAndClear()));
Reference< XParameters > xParameter(xPrep,UNO_QUERY);
sal_Int32 i = 1;
@@ -455,7 +403,7 @@ void SAL_CALL OCacheSet::deleteRow(const ORowSetRow& _rDeleteRow ,const connecti
m_bDeleted = xPrep->executeUpdate() > 0;
}
-// -------------------------------------------------------------------------
+
void OCacheSet::setParameter(sal_Int32 nPos
,const Reference< XParameters >& _xParameter
,const ORowSetValue& _rValue
@@ -466,7 +414,7 @@ void OCacheSet::setParameter(sal_Int32 nPos
sal_Int32 nType = ( _nType != DataType::OTHER ) ? _nType : _rValue.getTypeKind();
::dbtools::setObjectWithInfo(_xParameter,nPos,_rValue,nType,_nScale);
}
-// -------------------------------------------------------------------------
+
void OCacheSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::fillValueRow" );
@@ -484,127 +432,127 @@ void OCacheSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition)
aIter->fill(i,m_aColumnTypes[i-1],m_aNullable[i-1],this);
}
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::wasNull( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::wasNull" );
return m_xDriverRow->wasNull();
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OCacheSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getString" );
return m_xDriverRow->getString(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getBoolean" );
return m_xDriverRow->getBoolean(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int8 SAL_CALL OCacheSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getByte" );
return m_xDriverRow->getByte(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int16 SAL_CALL OCacheSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getShort" );
return m_xDriverRow->getShort(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OCacheSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getInt" );
return m_xDriverRow->getInt(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int64 SAL_CALL OCacheSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getLong" );
return m_xDriverRow->getLong(columnIndex);
}
-// -------------------------------------------------------------------------
+
float SAL_CALL OCacheSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getFloat" );
return m_xDriverRow->getFloat(columnIndex);
}
-// -------------------------------------------------------------------------
+
double SAL_CALL OCacheSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getDouble" );
return m_xDriverRow->getDouble(columnIndex);
}
-// -------------------------------------------------------------------------
+
Sequence< sal_Int8 > SAL_CALL OCacheSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getBytes" );
return m_xDriverRow->getBytes(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::Date SAL_CALL OCacheSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getDate" );
return m_xDriverRow->getDate(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::Time SAL_CALL OCacheSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getTime" );
return m_xDriverRow->getTime(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::DateTime SAL_CALL OCacheSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getTimestamp" );
return m_xDriverRow->getTimestamp(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCacheSet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getBinaryStream" );
return m_xDriverRow->getBinaryStream(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCacheSet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getCharacterStream" );
return m_xDriverRow->getCharacterStream(columnIndex);
}
-// -------------------------------------------------------------------------
+
Any SAL_CALL OCacheSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getObject" );
return m_xDriverRow->getObject(columnIndex,typeMap);
}
-// -------------------------------------------------------------------------
+
Reference< XRef > SAL_CALL OCacheSet::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getRef" );
return m_xDriverRow->getRef(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< XBlob > SAL_CALL OCacheSet::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getBlob" );
return m_xDriverRow->getBlob(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< XClob > SAL_CALL OCacheSet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getClob" );
return m_xDriverRow->getClob(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< XArray > SAL_CALL OCacheSet::getArray( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getArray" );
return m_xDriverRow->getArray(columnIndex);
}
-// -------------------------------------------------------------------------
+
// XResultSet
sal_Bool SAL_CALL OCacheSet::next( ) throw(SQLException, RuntimeException)
{
@@ -612,157 +560,157 @@ sal_Bool SAL_CALL OCacheSet::next( ) throw(SQLException, RuntimeException)
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
return m_xDriverSet->next();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::isBeforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::isBeforeFirst" );
return m_xDriverSet->isBeforeFirst();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::isAfterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::isAfterLast" );
return m_xDriverSet->isAfterLast();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::isFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::isFirst" );
return m_xDriverSet->isFirst();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::isLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::isLast" );
return m_xDriverSet->isLast();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OCacheSet::beforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::beforeFirst" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
m_xDriverSet->beforeFirst();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OCacheSet::afterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::afterLast" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
m_xDriverSet->afterLast();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::first( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::first" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
return m_xDriverSet->first();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::last( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::last" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
return m_xDriverSet->last();
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OCacheSet::getRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getRow" );
return m_xDriverSet->getRow();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::absolute" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
return m_xDriverSet->absolute(row);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::relative( sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::relative" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
return m_xDriverSet->relative(rows);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::previous( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::previous" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
return m_xDriverSet->previous();
}
+
sal_Bool OCacheSet::last_checked( sal_Bool /*i_bFetchRow*/)
{
return last();
}
-// -------------------------------------------------------------------------
+
sal_Bool OCacheSet::previous_checked( sal_Bool /*i_bFetchRow*/ )
{
return previous();
}
-// -------------------------------------------------------------------------
+
sal_Bool OCacheSet::absolute_checked( sal_Int32 row,sal_Bool /*i_bFetchRow*/ )
{
return absolute(row);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OCacheSet::refreshRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::refreshRow" );
m_xDriverSet->refreshRow();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::rowUpdated( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::rowUpdated" );
return m_xDriverSet->rowUpdated();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::rowInserted( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::rowInserted" );
return m_xDriverSet->rowInserted();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::rowDeleted( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::rowDeleted" );
return m_xDriverSet->rowDeleted();
}
-// -------------------------------------------------------------------------
+
Reference< XInterface > SAL_CALL OCacheSet::getStatement( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getStatement" );
return m_xDriverSet->getStatement();
}
-// -----------------------------------------------------------------------------
+
bool OCacheSet::isResultSetChanged() const
{
return false;
}
-// -----------------------------------------------------------------------------
+
void OCacheSet::reset(const Reference< XResultSet>& /*_xDriverSet*/)
{
- OSL_ENSURE(0,"Illegal call!");
+ OSL_FAIL("Illegal call!");
}
-// -----------------------------------------------------------------------------
+
void OCacheSet::mergeColumnValues(sal_Int32 i_nColumnIndex,ORowSetValueVector::Vector& /*io_aInsertRow*/,ORowSetValueVector::Vector& /*io_aRow*/,::std::vector<sal_Int32>& o_aChangedColumns)
{
o_aChangedColumns.push_back(i_nColumnIndex);
}
-// -----------------------------------------------------------------------------
+
bool OCacheSet::columnValuesUpdated(ORowSetValueVector::Vector& /*io_aCachedRow*/,const ORowSetValueVector::Vector& /*io_aRow*/)
{
return false;
}
-// -----------------------------------------------------------------------------
+
bool OCacheSet::updateColumnValues(const ORowSetValueVector::Vector& /*io_aCachedRow*/,ORowSetValueVector::Vector& /*io_aRow*/,const ::std::vector<sal_Int32>& /*i_aChangedColumns*/)
{
return true;
}
-// -----------------------------------------------------------------------------
+
void OCacheSet::fillMissingValues(ORowSetValueVector::Vector& /*io_aRow*/) const
{
}
-// -----------------------------------------------------------------------------
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/CacheSet.hxx b/dbaccess/source/core/api/CacheSet.hxx
index 626e64323..03f98cbc5 100644
--- a/dbaccess/source/core/api/CacheSet.hxx
+++ b/dbaccess/source/core/api/CacheSet.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -77,7 +78,7 @@ namespace dbaccess
,sal_Int32 _nScale
) const;
void fillParameters( const ORowSetRow& _rRow
- ,const connectivity::OSQLTable& _xTable
+ ,const connectivity::OSQLTable& _xTable
,::rtl::OUStringBuffer& _sCondition
,::rtl::OUStringBuffer& _sParameter
,::std::list< sal_Int32>& _rOrgValues);
@@ -85,7 +86,7 @@ namespace dbaccess
::rtl::OUString getIdentifierQuoteString() const;
public:
-
+
// late constructor
virtual void construct(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xDriverSet,const ::rtl::OUString& i_sRowSetFilter);
virtual void fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition);
@@ -160,3 +161,4 @@ namespace dbaccess
}
#endif //DBACCESS_CORE_API_CACHESET_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx
index e71ddf79b..fdee0412e 100644
--- a/dbaccess/source/core/api/FilteredContainer.cxx
+++ b/dbaccess/source/core/api/FilteredContainer.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -56,12 +57,11 @@ namespace dbaccess
using namespace ::cppu;
using namespace ::connectivity::sdbcx;
-//------------------------------------------------------------------------------
/** creates a vector of WildCards and reduce the _rTableFilter of the length of WildsCards
*/
sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std::vector< WildCard >& _rOut)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OFilteredContainer::createWildCardVector" );
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OFilteredContainer::createWildCardVector" );
// for wildcard search : remove all table filters which are a wildcard expression and build a WilCard
// for them
::rtl::OUString* pTableFilters = _rTableFilter.getArray();
@@ -87,7 +87,6 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
return nShiftPos;
}
- // -------------------------------------------------------------------------
bool lcl_isElementAllowed( const ::rtl::OUString& _rName,
const Sequence< ::rtl::OUString >& _rTableFilter,
const ::std::vector< WildCard >& _rWCSearch )
@@ -110,7 +109,6 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
return bFilterMatch;
}
- //--------------------------------------------------------------------------
typedef ::boost::optional< ::rtl::OUString > OptionalString;
struct TableInfo
{
@@ -137,7 +135,6 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
};
typedef ::std::vector< TableInfo > TableInfos;
- //--------------------------------------------------------------------------
void lcl_ensureComposedName( TableInfo& _io_tableInfo, const Reference< XDatabaseMetaData >& _metaData )
{
if ( !_metaData.is() )
@@ -154,7 +151,6 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
}
}
- //--------------------------------------------------------------------------
void lcl_ensureType( TableInfo& _io_tableInfo, const Reference< XDatabaseMetaData >& _metaData, const Reference< XNameAccess >& _masterContainer )
{
if ( !!_io_tableInfo.sType )
@@ -178,7 +174,6 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
_io_tableInfo.sType = OptionalString( sTypeName );
}
- //--------------------------------------------------------------------------
connectivity::TStringVector lcl_filter( const TableInfos& _unfilteredTables,
const Sequence< ::rtl::OUString >& _tableFilter, const Sequence< ::rtl::OUString >& _tableTypeFilter,
const Reference< XDatabaseMetaData >& _metaData, const Reference< XNameAccess >& _masterContainer )
@@ -194,7 +189,7 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
}
else
{
- // for wildcard search : remove all table filters which are a wildcard expression and build a WilCard
+ // for wildcard search : remove all table filters which are a wildcard expression and build a WildCard
// for them
::std::vector< WildCard > aWildCardTableFilter;
Sequence< ::rtl::OUString > aNonWildCardTableFilter = _tableFilter;
@@ -256,7 +251,7 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
//==========================================================================
//= OViewContainer
//==========================================================================
- OFilteredContainer::OFilteredContainer(::cppu::OWeakObject& _rParent,
+ OFilteredContainer::OFilteredContainer(::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,
const Reference< XConnection >& _xCon,
sal_Bool _bCase,
@@ -269,9 +264,9 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
,m_pRefreshListener(_pRefreshListener)
,m_nInAppend(_nInAppend)
,m_xConnection(_xCon)
- {
+ {
}
- // -------------------------------------------------------------------------
+
void OFilteredContainer::construct(const Reference< XNameAccess >& _rxMasterContainer,
const Sequence< ::rtl::OUString >& _rTableFilter,
const Sequence< ::rtl::OUString >& _rTableTypeFilter)
@@ -288,7 +283,7 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
}
m_xMasterContainer = _rxMasterContainer;
-
+
if ( m_xMasterContainer.is() )
{
addMasterContainerListener();
@@ -311,17 +306,16 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
construct( _rTableFilter, _rTableTypeFilter );
}
}
- //------------------------------------------------------------------------------
+
void OFilteredContainer::construct(const Sequence< ::rtl::OUString >& _rTableFilter, const Sequence< ::rtl::OUString >& _rTableTypeFilter)
{
// build sorted versions of the filter sequences, so the visibility decision is faster
Sequence< ::rtl::OUString > aTableFilter(_rTableFilter);
- sal_Int32 nTableFilterLen = aTableFilter.getLength();
- // for wildcard search : remove all table filters which are a wildcard expression and build a WilCard
+ // for wildcard search : remove all table filters which are a wildcard expression and build a WildCard
// for them
::std::vector< WildCard > aWCSearch;
- nTableFilterLen = createWildCardVector(aTableFilter,aWCSearch);
+ createWildCardVector(aTableFilter,aWCSearch);
try
{
@@ -367,7 +361,7 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
}
}
- static const ::rtl::OUString sAll = ::rtl::OUString::createFromAscii("%");
+ static const ::rtl::OUString sAll(RTL_CONSTASCII_USTRINGPARAM("%"));
Reference< XResultSet > xTables = m_xMetaData->getTables( Any(), sAll, sAll, aTableTypeFilter );
Reference< XRow > xCurrentRow( xTables, UNO_QUERY_THROW );
@@ -399,7 +393,6 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
m_bConstructed = sal_True;
}
- //------------------------------------------------------------------------------
void OFilteredContainer::disposing()
{
OCollection::disposing();
@@ -410,11 +403,10 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
m_xMasterContainer = NULL;
m_xMetaData = NULL;
m_pWarningsContainer = NULL;
- m_pRefreshListener = NULL;
+ m_pRefreshListener = NULL;
m_bConstructed = sal_False;
}
- // -------------------------------------------------------------------------
void OFilteredContainer::impl_refresh() throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OFilteredContainer::impl_refresh" );
@@ -428,14 +420,12 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
}
}
- // -----------------------------------------------------------------------------
::rtl::OUString OFilteredContainer::getNameForObject(const ObjectType& _xObject)
{
OSL_ENSURE( _xObject.is(), "OFilteredContainer::getNameForObject: Object is NULL!" );
return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::eInDataManipulation, false, false, false );
}
- // -----------------------------------------------------------------------------
// multiple to obtain all tables from XDatabaseMetaData::getTables, via passing a particular
// table type filter:
// adhere to the standard, which requests to pass a NULL table type filter, if
@@ -469,7 +459,7 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
switch ( nFilterMode )
{
default:
- OSL_ENSURE( sal_False, "OTableContainer::getAllTableTypeFilter: unknown TableTypeFilterMode!" );
+ OSL_FAIL( "OTableContainer::getAllTableTypeFilter: unknown TableTypeFilterMode!" );
case FILTER_MODE_MIX_ALL:
_rFilter.realloc( 3 );
_rFilter[0] = sView;
@@ -491,8 +481,5 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
}
}
-// ..............................................................................
} // namespace
-// ..............................................................................
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/HelperCollections.cxx b/dbaccess/source/core/api/HelperCollections.cxx
index 85dbc2892..acc2d3ef3 100644
--- a/dbaccess/source/core/api/HelperCollections.cxx
+++ b/dbaccess/source/core/api/HelperCollections.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,13 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBA_HELPERCOLLECTIONS_HXX
#include "HelperCollections.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
namespace dbaccess
{
@@ -50,8 +47,8 @@ namespace dbaccess
using namespace ::com::sun::star::script;
using namespace ::cppu;
using namespace ::osl;
- // -----------------------------------------------------------------------------
- OPrivateColumns::OPrivateColumns(const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,
+
+ OPrivateColumns::OPrivateColumns(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,
sal_Bool _bCase,
::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,
@@ -62,8 +59,7 @@ namespace dbaccess
{
}
- // -------------------------------------------------------------------------
- OPrivateColumns* OPrivateColumns::createWithIntrinsicNames( const ::vos::ORef< ::connectivity::OSQLColumns >& _rColumns,
+ OPrivateColumns* OPrivateColumns::createWithIntrinsicNames( const ::rtl::Reference< ::connectivity::OSQLColumns >& _rColumns,
sal_Bool _bCase, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex )
{
::std::vector< ::rtl::OUString > aNames; aNames.reserve( _rColumns->get().size() );
@@ -81,7 +77,6 @@ namespace dbaccess
return new OPrivateColumns( _rColumns, _bCase, _rParent, _rMutex, aNames, sal_False );
}
- // -------------------------------------------------------------------------
void SAL_CALL OPrivateColumns::disposing(void)
{
m_aColumns = NULL;
@@ -90,10 +85,10 @@ namespace dbaccess
// So we're not allowed to dispose our elements.
OPrivateColumns_Base::disposing();
}
- // -------------------------------------------------------------------------
+
connectivity::sdbcx::ObjectType OPrivateColumns::createObject(const ::rtl::OUString& _rName)
{
- if ( m_aColumns.isValid() )
+ if ( m_aColumns.is() )
{
::connectivity::OSQLColumns::Vector::const_iterator aIter = find(m_aColumns->get().begin(),m_aColumns->get().end(),_rName,isCaseSensitive());
if(aIter == m_aColumns->get().end())
@@ -102,11 +97,11 @@ namespace dbaccess
if(aIter != m_aColumns->get().end())
return connectivity::sdbcx::ObjectType(*aIter,UNO_QUERY);
- OSL_ENSURE(0,"Column not found in collection!");
+ OSL_FAIL("Column not found in collection!");
}
return NULL;
}
- // -------------------------------------------------------------------------
+
connectivity::sdbcx::ObjectType OPrivateTables::createObject(const ::rtl::OUString& _rName)
{
if ( !m_aTables.empty() )
@@ -114,9 +109,11 @@ namespace dbaccess
OSQLTables::iterator aIter = m_aTables.find(_rName);
OSL_ENSURE(aIter != m_aTables.end(),"Table not found!");
OSL_ENSURE(aIter->second.is(),"Table is null!");
+ (void)aIter;
return connectivity::sdbcx::ObjectType(m_aTables.find(_rName)->second,UNO_QUERY);
}
return NULL;
}
- // -----------------------------------------------------------------------------
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/HelperCollections.hxx b/dbaccess/source/core/api/HelperCollections.hxx
index 049f2c000..ec24c9cba 100644
--- a/dbaccess/source/core/api/HelperCollections.hxx
+++ b/dbaccess/source/core/api/HelperCollections.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,21 +28,11 @@
#ifndef DBA_HELPERCOLLECTIONS_HXX
#define DBA_HELPERCOLLECTIONS_HXX
-#ifndef _CONNECTIVITY_SDBCX_COLLECTION_HXX_
#include "connectivity/sdbcx/VCollection.hxx"
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _DBHELPER_DBCONVERSION_HXX_
#include <connectivity/dbconversion.hxx>
-#endif
-#ifndef _CONNECTIVITY_SDBCX_COLUMN_HXX_
#include <connectivity/PColumn.hxx>
-#endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
-#endif
+#include <rtl/ref.hxx>
namespace dbaccess
{
@@ -58,11 +49,11 @@ namespace dbaccess
using namespace ::com::sun::star::script;
using namespace ::cppu;
using namespace ::osl;
- // -----------------------------------------------------------------------------
+
typedef connectivity::sdbcx::OCollection OPrivateColumns_Base;
class OPrivateColumns : public OPrivateColumns_Base
{
- ::vos::ORef< ::connectivity::OSQLColumns> m_aColumns;
+ ::rtl::Reference< ::connectivity::OSQLColumns> m_aColumns;
protected:
virtual connectivity::sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
virtual void impl_refresh() throw(RuntimeException) {}
@@ -71,7 +62,7 @@ namespace dbaccess
return NULL;
}
public:
- OPrivateColumns(const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,
+ OPrivateColumns(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,
sal_Bool _bCase,
::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,
@@ -82,7 +73,7 @@ namespace dbaccess
/** creates a columns instance as above, but taking the names from the columns itself
*/
static OPrivateColumns* createWithIntrinsicNames(
- const ::vos::ORef< ::connectivity::OSQLColumns >& _rColumns,
+ const ::rtl::Reference< ::connectivity::OSQLColumns >& _rColumns,
sal_Bool _bCase,
::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex
@@ -126,3 +117,5 @@ namespace dbaccess
};
}
#endif // DBA_HELPERCOLLECTIONS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 8420c5e22..eda1e4231 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -1,7 +1,8 @@
+/* -*- 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 andor its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,85 +29,35 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBACCESS_CORE_API_KEYSET_HXX
#include "KeySet.hxx"
-#endif
-#ifndef _DBA_CORE_RESOURCE_HXX_
#include "core_resource.hxx"
-#endif
-#ifndef _DBA_CORE_RESOURCE_HRC_
#include "core_resource.hrc"
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#ifndef _COM_SUN_STAR_SDBC_XPREPAREDSTATEMENT_HPP_
#include <com/sun/star/sdbc/XPreparedStatement.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCxParameterS_HPP_
#include <com/sun/star/sdbc/XParameters.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XGENERATEDRESULTSET_HPP_
#include <com/sun/star/sdbc/XGeneratedResultSet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCOLUMNLOCATE_HPP_
#include <com/sun/star/sdbc/XColumnLocate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
#include <com/sun/star/container/XIndexAccess.hpp>
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XKEYSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSER_HPP_
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XINDEXESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XIndexesSupplier.hpp>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_KEYTYPE_HPP_
#include <com/sun/star/sdbcx/KeyType.hpp>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
#include <list>
#include <algorithm>
#include <string.h>
-#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_
#include <com/sun/star/io/XInputStream.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef DBACCESS_CORE_API_QUERYCOMPOSER_HXX
#include "querycomposer.hxx"
-#endif
-#ifndef DBACCESS_SOURCE_CORE_INC_COMPOSERTOOLS_HXX
#include "composertools.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
#include <string.h>
#include <rtl/logfile.hxx>
#include "PrivateRow.hxx"
@@ -148,7 +99,7 @@ namespace
}
}
DBG_NAME(OKeySet)
-// -------------------------------------------------------------------------
+
OKeySet::OKeySet(const connectivity::OSQLTable& _xTable,
const Reference< XIndexAccess>& _xTableKeys,
const ::rtl::OUString& _rUpdateTableName, // this can be the alias or the full qualified name
@@ -173,20 +124,20 @@ OKeySet::OKeySet(const connectivity::OSQLTable& _xTable,
DBG_CTOR(OKeySet,NULL);
}
-// -----------------------------------------------------------------------------
+
OKeySet::~OKeySet()
{
try
{
::comphelper::disposeComponent(m_xStatement);
}
- catch(Exception&)
+ catch(const Exception&)
{
m_xStatement = NULL;
}
catch(...)
{
- OSL_ENSURE(0,"Unknown Exception occured");
+ OSL_FAIL("Unknown Exception occurred");
}
m_xComposer = NULL;
@@ -229,7 +180,7 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable,
::rtl::OUString sUpdateTableName( i_rUpdateTableName );
if ( sUpdateTableName.getLength() == 0 )
{
- OSL_ENSURE( false, "OKeySet::findTableColumnsMatching_throw: This is a fallback only - it won't work when the table has an alias name." );
+ OSL_FAIL( "OKeySet::findTableColumnsMatching_throw: This is a fallback only - it won't work when the table has an alias name." );
// If i_aTable originates from a query composer, and is a table which appears with an alias in the SELECT statement,
// then the below code will not produce correct results.
// For instance, imagine a "SELECT alias.col FROM table AS alias". Now i_aTable would be the table named
@@ -272,7 +223,7 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable,
}
::rtl::OUStringBuffer OKeySet::createKeyFilter()
{
- static ::rtl::OUString aAnd = ::rtl::OUString::createFromAscii(" AND ");
+ static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
const ::rtl::OUString aQuote = getIdentifierQuoteString();
::rtl::OUStringBuffer aFilter;
static ::rtl::OUString s_sDot(RTL_CONSTASCII_USTRINGPARAM("."));
@@ -292,13 +243,13 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable,
}
return aFilter;
}
-// -----------------------------------------------------------------------------
+
void OKeySet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::OUString& i_sRowSetFilter)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::construct" );
OCacheSet::construct(_xDriverSet,i_sRowSetFilter);
initColumns();
-
+
Reference<XNameAccess> xKeyColumns = getKeyColumns();
Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData();
Reference<XColumnsSupplier> xQueryColSup(m_xComposer,UNO_QUERY);
@@ -321,7 +272,7 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::O
const Sequence< ::rtl::OUString> aSeq = xSelectTables->getElementNames();
if ( aSeq.getLength() > 1 ) // special handling for join
{
- static ::rtl::OUString aAnd = ::rtl::OUString::createFromAscii(" AND ");
+ static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
const ::rtl::OUString aQuote = getIdentifierQuoteString();
static ::rtl::OUString s_sDot(RTL_CONSTASCII_USTRINGPARAM("."));
static ::rtl::OUString s_sParam(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
@@ -334,27 +285,24 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::O
connectivity::OSQLTable xSelColSup(xSelectTables->getByName(*pIter),uno::UNO_QUERY);
Reference<XPropertySet> xProp(xSelColSup,uno::UNO_QUERY);
::rtl::OUString sSelectTableName = ::dbtools::composeTableName( xMeta, xProp, ::dbtools::eInDataManipulation, false, false, false );
-
- ::dbaccess::getColumnPositions(xQueryColumns,xSelColSup->getColumns()->getElementNames(),sSelectTableName,(*m_pForeignColumnNames));
-
+
+ ::dbaccess::getColumnPositions(xQueryColumns,xSelColSup->getColumns()->getElementNames(),sSelectTableName,(*m_pForeignColumnNames));
+
SelectColumnsMetaData::iterator aPosEnd = (*m_pForeignColumnNames).end();
for(SelectColumnsMetaData::iterator aPosIter = (*m_pForeignColumnNames).begin();aPosIter != aPosEnd;++aPosIter)
{
// look for columns not in the source columns to use them as filter as well
- // if ( !xSourceColumns->hasByName(aPosIter->first) )
- {
if ( aFilter.getLength() )
aFilter.append(aAnd);
aFilter.append(::dbtools::quoteName( aQuote,sSelectTableName));
aFilter.append(s_sDot);
aFilter.append(::dbtools::quoteName( aQuote,aPosIter->second.sRealName));
aFilter.append(s_sParam);
- }
}
break;
}
}
- } // if ( aSeq.getLength() > 1 ) // special handling for join
+ }
executeStatement(aFilter,i_sRowSetFilter,xAnalyzer);
}
void OKeySet::executeStatement(::rtl::OUStringBuffer& io_aFilter,const ::rtl::OUString& i_sRowSetFilter,Reference<XSingleSelectQueryComposer>& io_xAnalyzer)
@@ -380,7 +328,7 @@ void OKeySet::executeStatement(::rtl::OUStringBuffer& io_aFilter,const ::rtl::OU
for(;pAnd != pAndEnd;++pAnd)
{
::rtl::OUString sValue;
- if ( !(pAnd->Value >>= sValue) || !(sValue.equalsAscii("?") || sValue.matchAsciiL(":",1,0)) )
+ if ( !(pAnd->Value >>= sValue) || !(sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("?")) || sValue.matchAsciiL(":",1,0)) )
{ // we have a criteria which has to be taken into account for updates
m_aFilterColumns.push_back(pAnd->Name);
}
@@ -390,7 +338,7 @@ void OKeySet::executeStatement(::rtl::OUStringBuffer& io_aFilter,const ::rtl::OU
m_xStatement = m_xConnection->prepareStatement(io_xAnalyzer->getQueryWithSubstitution());
::comphelper::disposeComponent(io_xAnalyzer);
}
-// -------------------------------------------------------------------------
+
Any SAL_CALL OKeySet::getBookmark() throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getBookmark" );
@@ -399,7 +347,6 @@ Any SAL_CALL OKeySet::getBookmark() throw(SQLException, RuntimeException)
return makeAny(m_aKeyIter->first);
}
-// -------------------------------------------------------------------------
sal_Bool SAL_CALL OKeySet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::moveToBookmark" );
@@ -407,7 +354,7 @@ sal_Bool SAL_CALL OKeySet::moveToBookmark( const Any& bookmark ) throw(SQLExcept
m_aKeyIter = m_aKeyMap.find(::comphelper::getINT32(bookmark));
return m_aKeyIter != m_aKeyMap.end();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::moveRelativeToBookmark" );
@@ -420,7 +367,7 @@ sal_Bool SAL_CALL OKeySet::moveRelativeToBookmark( const Any& bookmark, sal_Int3
return !isBeforeFirst() && !isAfterLast();
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OKeySet::compareBookmarks( const Any& _first, const Any& _second ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::compareBookmarks" );
@@ -430,19 +377,19 @@ sal_Int32 SAL_CALL OKeySet::compareBookmarks( const Any& _first, const Any& _sec
return (nFirst != nSecond) ? CompareBookmark::NOT_EQUAL : CompareBookmark::EQUAL;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::hasOrderedBookmarks" );
return sal_True;
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OKeySet::hashBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::hashBookmark" );
return ::comphelper::getINT32(bookmark);
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::sdbcx::XDeleteRows
Sequence< sal_Int32 > SAL_CALL OKeySet::deleteRows( const Sequence< Any >& rows ,const connectivity::OSQLTable& _xTable) throw(SQLException, RuntimeException)
{
@@ -450,22 +397,22 @@ Sequence< sal_Int32 > SAL_CALL OKeySet::deleteRows( const Sequence< Any >& rows
Reference<XPropertySet> xSet(_xTable,UNO_QUERY);
fillTableName(xSet);
- ::rtl::OUStringBuffer aSql = ::rtl::OUString::createFromAscii("DELETE FROM ");
+ ::rtl::OUStringBuffer aSql = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DELETE FROM "));
aSql.append(m_aComposedTableName);
- aSql.append(::rtl::OUString::createFromAscii(" WHERE "));
+ aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE ")));
// list all cloumns that should be set
const ::rtl::OUString aQuote = getIdentifierQuoteString();
- static ::rtl::OUString aAnd = ::rtl::OUString::createFromAscii(" AND ");
- static ::rtl::OUString aOr = ::rtl::OUString::createFromAscii(" OR ");
- static ::rtl::OUString aEqual = ::rtl::OUString::createFromAscii(" = ?");
+ static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
+ static ::rtl::OUString aOr(RTL_CONSTASCII_USTRINGPARAM(" OR "));
+ static ::rtl::OUString aEqual(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
// use keys and indexes for excat postioning
// first the keys
Reference<XNameAccess> xKeyColumns = getKeyColumns();
- ::rtl::OUStringBuffer aCondition = ::rtl::OUString::createFromAscii("( ");
+ ::rtl::OUStringBuffer aCondition = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("( "));
SelectColumnsMetaData::const_iterator aIter = (*m_pKeyColumnNames).begin();
SelectColumnsMetaData::const_iterator aPosEnd = (*m_pKeyColumnNames).end();
@@ -531,20 +478,20 @@ Sequence< sal_Int32 > SAL_CALL OKeySet::deleteRows( const Sequence< Any >& rows
}
return aRet;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::updateRow" );
Reference<XPropertySet> xSet(_xTable,UNO_QUERY);
fillTableName(xSet);
- ::rtl::OUStringBuffer aSql = ::rtl::OUString::createFromAscii("UPDATE ");
+ ::rtl::OUStringBuffer aSql = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UPDATE "));
aSql.append(m_aComposedTableName);
- aSql.append(::rtl::OUString::createFromAscii(" SET "));
+ aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" SET ")));
// list all cloumns that should be set
- static ::rtl::OUString aPara = ::rtl::OUString::createFromAscii(" = ?,");
+ static ::rtl::OUString aPara(RTL_CONSTASCII_USTRINGPARAM(" = ?,"));
::rtl::OUString aQuote = getIdentifierQuoteString();
- static ::rtl::OUString aAnd = ::rtl::OUString::createFromAscii(" AND ");
+ static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
::rtl::OUString sIsNull(RTL_CONSTASCII_USTRINGPARAM(" IS NULL"));
::rtl::OUString sParam(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
@@ -573,7 +520,6 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow
SelectColumnsMetaData::const_iterator aEnd = m_pColumnNames->end();
for(;aIter != aEnd;++aIter,++i)
{
- //if(xKeyColumns.is() && xKeyColumns->hasByName(aIter->first))
if ( m_pKeyColumnNames->find(aIter->first) != m_pKeyColumnNames->end() )
{
sKeyCondition.append(::dbtools::quoteName( aQuote,aIter->second.sRealName));
@@ -620,7 +566,7 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow
if(sKeyCondition.getLength() || sIndexCondition.getLength())
{
- aSql.append(::rtl::OUString::createFromAscii(" WHERE "));
+ aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE ")));
if(sKeyCondition.getLength() && sIndexCondition.getLength())
{
aSql.append(sKeyCondition.makeStringAndClear());
@@ -640,11 +586,10 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_CONDITION_FOR_PK ), SQL_GENERAL_ERROR, m_xConnection );
// now create end execute the prepared statement
-
::rtl::OUString sEmpty;
executeUpdate(_rInsertRow ,_rOrginalRow,aSql.makeStringAndClear(),sEmpty,aIndexColumnPositions);
}
-// -----------------------------------------------------------------------------
+
void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const ::rtl::OUString& i_sSQL,const ::rtl::OUString& i_sTableName,const ::std::vector<sal_Int32>& _aIndexColumnPositions)
{
// now create end execute the prepared statement
@@ -710,16 +655,16 @@ void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rO
tryRefetch(_rInsertRow,bRefetch);
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::insertRow" );
- ::rtl::OUStringBuffer aSql(::rtl::OUString::createFromAscii("INSERT INTO "));
+ ::rtl::OUStringBuffer aSql(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INSERT INTO ")));
Reference<XPropertySet> xSet(_xTable,UNO_QUERY);
fillTableName(xSet);
aSql.append(m_aComposedTableName);
- aSql.append(::rtl::OUString::createFromAscii(" ( "));
+ aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ( ")));
// set values and column names
::rtl::OUStringBuffer aValues(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" VALUES ( ")));
static ::rtl::OUString aPara(RTL_CONSTASCII_USTRINGPARAM("?,"));
@@ -755,7 +700,7 @@ void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivi
::rtl::OUString sEmpty;
executeInsert(_rInsertRow,aSql.makeStringAndClear(),sEmpty,bRefetch);
}
-// -------------------------------------------------------------------------
+
void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString& i_sSQL,const ::rtl::OUString& i_sTableName,bool bRefetch )
{
// now create,fill and execute the prepared statement
@@ -821,9 +766,9 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
}
}
}
- catch(Exception&)
+ catch(const Exception&)
{
- OSL_ENSURE(0,"Could not execute GeneratedKeys() stmt");
+ OSL_FAIL("Could not execute GeneratedKeys() stmt");
}
}
@@ -854,10 +799,10 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
if(sMaxStmt.getLength())
{
- sMaxStmt = sMaxStmt.replaceAt(sMaxStmt.getLength()-1,1,::rtl::OUString::createFromAscii(" "));
- ::rtl::OUString sStmt = ::rtl::OUString::createFromAscii("SELECT ");
+ sMaxStmt = sMaxStmt.replaceAt(sMaxStmt.getLength()-1,1,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")));
+ ::rtl::OUString sStmt = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT "));
sStmt += sMaxStmt;
- sStmt += ::rtl::OUString::createFromAscii("FROM ");
+ sStmt += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FROM "));
::rtl::OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(m_xConnection->getMetaData(),m_sUpdateTableName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
sStmt += ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable );
@@ -882,7 +827,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
}
catch(SQLException&)
{
- OSL_ENSURE(0,"Could not fetch with MAX() ");
+ OSL_FAIL("Could not fetch with MAX() ");
}
}
}
@@ -892,7 +837,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
--aKeyIter;
ORowSetRow aKeyRow = new connectivity::ORowVector< ORowSetValue >(m_pKeyColumnNames->size());
copyRowValue(_rInsertRow,aKeyRow,aKeyIter->first + 1);
-
+
m_aKeyIter = m_aKeyMap.insert(OKeySetMatrix::value_type(aKeyIter->first + 1,OKeySetValue(aKeyRow,::std::pair<sal_Int32,Reference<XRow> >(1,NULL)))).first;
// now we set the bookmark for this row
(_rInsertRow->get())[0] = makeAny((sal_Int32)m_aKeyIter->first);
@@ -915,7 +860,7 @@ void OKeySet::tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch)
connectivity::ORowVector< ORowSetValue >::Vector::const_iterator aParaEnd;
OUpdatedParameter::iterator aUpdateFind = m_aUpdatedParameter.find(m_aKeyIter->first);
if ( aUpdateFind == m_aUpdatedParameter.end() )
- {
+ {
aParaIter = m_aParameterValueForCache.get().begin();
aParaEnd = m_aParameterValueForCache.get().end();
}
@@ -924,7 +869,7 @@ void OKeySet::tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch)
aParaIter = aUpdateFind->second.get().begin();
aParaEnd = aUpdateFind->second.get().end();
}
-
+
for(++aParaIter;aParaIter != aParaEnd;++aParaIter,++nPos)
{
::dbtools::setObjectWithInfo( xParameter, nPos, aParaIter->makeAny(), aParaIter->getTypeKind() );
@@ -943,7 +888,7 @@ void OKeySet::tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch)
OSL_ENSURE(m_xSet.is(),"No resultset form statement!");
bRefetch = m_xSet->next();
}
- catch(Exception)
+ catch(const Exception&)
{
bRefetch = false;
}
@@ -953,7 +898,7 @@ void OKeySet::tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch)
m_aKeyIter->second.second.second = new OPrivateRow(_rInsertRow->get());
}
}
-// -----------------------------------------------------------------------------
+
void OKeySet::copyRowValue(const ORowSetRow& _rInsertRow,ORowSetRow& _rKeyRow,sal_Int32 i_nBookmark)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::copyRowValue" );
@@ -993,20 +938,20 @@ void OKeySet::copyRowValue(const ORowSetRow& _rInsertRow,ORowSetRow& _rKeyRow,sa
aIter->setTypeKind(aPosIter->second.nType);
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::deleteRow" );
Reference<XPropertySet> xSet(_xTable,UNO_QUERY);
fillTableName(xSet);
- ::rtl::OUStringBuffer aSql = ::rtl::OUString::createFromAscii("DELETE FROM ");
+ ::rtl::OUStringBuffer aSql = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DELETE FROM "));
aSql.append(m_aComposedTableName);
- aSql.append(::rtl::OUString::createFromAscii(" WHERE "));
+ aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE ")));
// list all cloumns that should be set
::rtl::OUString aQuote = getIdentifierQuoteString();
- static ::rtl::OUString aAnd = ::rtl::OUString::createFromAscii(" AND ");
+ static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
// use keys and indexes for excat postioning
Reference<XNameAccess> xKeyColumns = getKeyColumns();
@@ -1034,11 +979,11 @@ void SAL_CALL OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivit
aSql.append(::dbtools::quoteName( aQuote,aIter->second.sRealName));
if((_rDeleteRow->get())[aIter->second.nPosition].isNull())
{
- OSL_ENSURE(0,"can a primary key be null");
- aSql.append(::rtl::OUString::createFromAscii(" IS NULL"));
+ OSL_FAIL("can a primary key be null");
+ aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" IS NULL")));
}
else
- aSql.append(::rtl::OUString::createFromAscii(" = ?"));
+ aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" = ?")));
aSql.append(aAnd);
}
else
@@ -1051,10 +996,10 @@ void SAL_CALL OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivit
{
sIndexCondition.append(::dbtools::quoteName( aQuote,aIter->second.sRealName));
if((_rDeleteRow->get())[aIter->second.nPosition].isNull())
- sIndexCondition.append(::rtl::OUString::createFromAscii(" IS NULL"));
+ sIndexCondition.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" IS NULL")));
else
{
- sIndexCondition.append(::rtl::OUString::createFromAscii(" = ?"));
+ sIndexCondition.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" = ?")));
aIndexColumnPositions.push_back(aIter->second.nPosition);
}
sIndexCondition.append(aAnd);
@@ -1099,29 +1044,29 @@ void SAL_CALL OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivit
m_bDeleted = sal_True;
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OKeySet::cancelRowUpdates( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::cancelRowUpdates" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OKeySet::moveToInsertRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::moveToInsertRow" );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OKeySet::moveToCurrentRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::moveToCurrentRow" );
}
-// -------------------------------------------------------------------------
+
Reference<XNameAccess> OKeySet::getKeyColumns() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getKeyColumns" );
// use keys and indexes for excat postioning
// first the keys
-
+
Reference<XIndexAccess> xKeys = m_xTableKeys;
if ( !xKeys.is() )
{
@@ -1156,7 +1101,7 @@ Reference<XNameAccess> OKeySet::getKeyColumns() const
return xKeyColumns;
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::next( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::next" );
@@ -1182,19 +1127,19 @@ sal_Bool SAL_CALL OKeySet::next( ) throw(SQLException, RuntimeException)
refreshRow();
return !isAfterLast();
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::isBeforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::isBeforeFirst" );
return m_aKeyIter == m_aKeyMap.begin();
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::isAfterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::isAfterLast" );
return m_bRowCountFinal && m_aKeyIter == m_aKeyMap.end();
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::isFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::isFirst" );
@@ -1202,7 +1147,7 @@ sal_Bool SAL_CALL OKeySet::isFirst( ) throw(SQLException, RuntimeException)
++aTemp;
return m_aKeyIter == aTemp && m_aKeyIter != m_aKeyMap.end();
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::isLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::isLast" );
@@ -1213,7 +1158,7 @@ sal_Bool SAL_CALL OKeySet::isLast( ) throw(SQLException, RuntimeException)
--aTemp;
return m_aKeyIter == aTemp;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OKeySet::beforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::beforeFirst" );
@@ -1222,7 +1167,7 @@ void SAL_CALL OKeySet::beforeFirst( ) throw(SQLException, RuntimeException)
m_xRow = NULL;
::comphelper::disposeComponent(m_xSet);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OKeySet::afterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::afterLast" );
@@ -1232,7 +1177,7 @@ void SAL_CALL OKeySet::afterLast( ) throw(SQLException, RuntimeException)
m_xRow = NULL;
::comphelper::disposeComponent(m_xSet);
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::first( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::first" );
@@ -1245,7 +1190,7 @@ sal_Bool SAL_CALL OKeySet::first( ) throw(SQLException, RuntimeException)
refreshRow();
return m_aKeyIter != m_aKeyMap.end() && m_aKeyIter != m_aKeyMap.begin();
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::last( ) throw(SQLException, RuntimeException)
{
return last_checked(sal_True);
@@ -1263,7 +1208,7 @@ sal_Bool OKeySet::last_checked( sal_Bool i_bFetchRow)
refreshRow();
return m_aKeyIter != m_aKeyMap.end() && m_aKeyIter != m_aKeyMap.begin();
}
-// -----------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OKeySet::getRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getRow" );
@@ -1272,7 +1217,7 @@ sal_Int32 SAL_CALL OKeySet::getRow( ) throw(SQLException, RuntimeException)
return ::std::distance(m_aKeyMap.begin(),m_aKeyIter);
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException)
{
return absolute_checked(row,sal_True);
@@ -1320,7 +1265,7 @@ sal_Bool OKeySet::absolute_checked( sal_Int32 row,sal_Bool i_bFetchRow )
return m_aKeyIter != m_aKeyMap.end() && m_aKeyIter != m_aKeyMap.begin();
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::relative( sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::relative" );
@@ -1331,7 +1276,7 @@ sal_Bool SAL_CALL OKeySet::relative( sal_Int32 rows ) throw(SQLException, Runtim
}
return absolute(getRow()+rows);
}
-// -----------------------------------------------------------------------------
+
sal_Bool OKeySet::previous_checked( sal_Bool i_bFetchRow )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::previous" );
@@ -1344,7 +1289,6 @@ sal_Bool OKeySet::previous_checked( sal_Bool i_bFetchRow )
}
return m_aKeyIter != m_aKeyMap.begin();
}
-// -----------------------------------------------------------------------------
sal_Bool SAL_CALL OKeySet::previous( ) throw(SQLException, RuntimeException)
{
return previous_checked(sal_True);
@@ -1375,7 +1319,7 @@ void SAL_CALL OKeySet::refreshRow() throw(SQLException, RuntimeException)
connectivity::ORowVector< ORowSetValue >::Vector::const_iterator aParaEnd;
OUpdatedParameter::iterator aUpdateFind = m_aUpdatedParameter.find(m_aKeyIter->first);
if ( aUpdateFind == m_aUpdatedParameter.end() )
- {
+ {
aParaIter = m_aParameterValueForCache.get().begin();
aParaEnd = m_aParameterValueForCache.get().end();
}
@@ -1384,7 +1328,7 @@ void SAL_CALL OKeySet::refreshRow() throw(SQLException, RuntimeException)
aParaIter = aUpdateFind->second.get().begin();
aParaEnd = aUpdateFind->second.get().end();
}
-
+
for(++aParaIter;aParaIter != aParaEnd;++aParaIter,++nPos)
{
::dbtools::setObjectWithInfo( xParameter, nPos, aParaIter->makeAny(), aParaIter->getTypeKind() );
@@ -1418,7 +1362,7 @@ void SAL_CALL OKeySet::refreshRow() throw(SQLException, RuntimeException)
OSL_ENSURE(m_xRow.is(),"No row form statement!");
}
}
-// -----------------------------------------------------------------------------
+
sal_Bool OKeySet::fetchRow()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::fetchRow" );
@@ -1452,7 +1396,7 @@ sal_Bool OKeySet::fetchRow()
m_bRowCountFinal = sal_True;
return bRet;
}
-// -------------------------------------------------------------------------
+
void OKeySet::fillAllRows()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::fillAllRows" );
@@ -1468,152 +1412,152 @@ sal_Bool SAL_CALL OKeySet::wasNull( ) throw(SQLException, RuntimeException)
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::wasNull" );
return m_xRow->wasNull();
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OKeySet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getString" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getString(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getBoolean" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getBoolean(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int8 SAL_CALL OKeySet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getByte" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getByte(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int16 SAL_CALL OKeySet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getShort" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getShort(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OKeySet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getInt" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getInt(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int64 SAL_CALL OKeySet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getLong" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getLong(columnIndex);
}
-// -------------------------------------------------------------------------
+
float SAL_CALL OKeySet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getFloat" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getFloat(columnIndex);
}
-// -------------------------------------------------------------------------
+
double SAL_CALL OKeySet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getDouble" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getDouble(columnIndex);
}
-// -------------------------------------------------------------------------
+
Sequence< sal_Int8 > SAL_CALL OKeySet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getBytes" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getBytes(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::Date SAL_CALL OKeySet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getDate" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getDate(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::Time SAL_CALL OKeySet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getTime" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getTime(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::DateTime SAL_CALL OKeySet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getTimestamp" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getTimestamp(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > SAL_CALL OKeySet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getBinaryStream" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getBinaryStream(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > SAL_CALL OKeySet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getCharacterStream" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getCharacterStream(columnIndex);
}
-// -------------------------------------------------------------------------
+
Any SAL_CALL OKeySet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getObject" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getObject(columnIndex,typeMap);
}
-// -------------------------------------------------------------------------
+
Reference< XRef > SAL_CALL OKeySet::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getRef" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getRef(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< XBlob > SAL_CALL OKeySet::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getBlob" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getBlob(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< XClob > SAL_CALL OKeySet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getClob" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getClob(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< XArray > SAL_CALL OKeySet::getArray( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getArray" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getArray(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::rowUpdated( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::rowUpdated" );
return m_aKeyIter != m_aKeyMap.begin() && m_aKeyIter != m_aKeyMap.end() && m_aKeyIter->second.second.first == 2;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::rowInserted( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::rowInserted" );
return m_aKeyIter != m_aKeyMap.begin() && m_aKeyIter != m_aKeyMap.end() && m_aKeyIter->second.second.first == 1;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::rowDeleted( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::rowDeleted" );
@@ -1621,7 +1565,7 @@ sal_Bool SAL_CALL OKeySet::rowDeleted( ) throw(SQLException, RuntimeException)
m_bDeleted = sal_False;
return bDeleted;
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OKeySet::getComposedTableName(const ::rtl::OUString& _sCatalog,
const ::rtl::OUString& _sSchema,
const ::rtl::OUString& _sTable)
@@ -1654,7 +1598,7 @@ sal_Bool SAL_CALL OKeySet::rowDeleted( ) throw(SQLException, RuntimeException)
return aComposedName;
}
-// -----------------------------------------------------------------------------
+
namespace dbaccess
{
@@ -1699,7 +1643,7 @@ void getColumnPositions(const Reference<XNameAccess>& _rxQueryColumns,
sal_Int32 nNullable = ColumnValue::NULLABLE_UNKNOWN;
OSL_VERIFY( xQueryColumnProp->getPropertyValue( PROPERTY_ISNULLABLE ) >>= nNullable );
-
+
if ( i_bAppendTableName )
{
::rtl::OUStringBuffer sName;
@@ -1709,11 +1653,11 @@ void getColumnPositions(const Reference<XNameAccess>& _rxQueryColumns,
SelectColumnDescription aColDesc( nPos, nType,nScale,nNullable != sdbc::ColumnValue::NO_NULLS, sColumnDefault );
aColDesc.sRealName = sRealName;
aColDesc.sTableName = sTableName;
- o_rColumnNames[sName.makeStringAndClear()] = aColDesc;
+ o_rColumnNames[sName.makeStringAndClear()] = aColDesc;
}
else
o_rColumnNames[sRealName] = SelectColumnDescription( nPos, nType,nScale,nNullable != sdbc::ColumnValue::NO_NULLS, sColumnDefault );
-
+
break;
}
}
@@ -1721,7 +1665,7 @@ void getColumnPositions(const Reference<XNameAccess>& _rxQueryColumns,
}
}
}
-// -----------------------------------------------------------------------------
+
void OKeySet::impl_convertValue_throw(const ORowSetRow& _rInsertRow,const SelectColumnDescription& i_aMetaData)
{
ORowSetValue& aValue((_rInsertRow->get())[i_aMetaData.nPosition]);
@@ -1742,5 +1686,4 @@ void OKeySet::impl_convertValue_throw(const ORowSetRow& _rInsertRow,const Select
break;
}
}
-// -----------------------------------------------------------------------------
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/KeySet.hxx b/dbaccess/source/core/api/KeySet.hxx
index 3ce26fcae..99326960c 100644
--- a/dbaccess/source/core/api/KeySet.hxx
+++ b/dbaccess/source/core/api/KeySet.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,24 +29,16 @@
#ifndef DBACCESS_CORE_API_KEYSET_HXX
#define DBACCESS_CORE_API_KEYSET_HXX
-#ifndef DBACCESS_CORE_API_CACHESET_HXX
#include "CacheSet.hxx"
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
#include <memory>
#include <map>
-#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#endif
#include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.hpp>
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
namespace dbaccess
{
@@ -59,8 +52,6 @@ namespace dbaccess
sal_Int32 nScale;
sal_Bool bNullable;
-
-
SelectColumnDescription()
:nPosition( 0 )
,nType( 0 )
@@ -96,7 +87,7 @@ namespace dbaccess
protected:
OKeySetMatrix m_aKeyMap;
OKeySetMatrix::iterator m_aKeyIter;
-
+
::std::vector< ::rtl::OUString > m_aAutoColumns; // contains all columns which are autoincrement ones
OUpdatedParameter m_aUpdatedParameter; // contains all parameter which have been updated and are needed for refetching
@@ -114,7 +105,7 @@ namespace dbaccess
::rtl::OUString m_sUpdateTableName;
::std::vector< ::rtl::OUString > m_aFilterColumns;
sal_Int32& m_rRowCount;
-
+
sal_Bool m_bRowCountFinal;
/**
@@ -136,7 +127,7 @@ namespace dbaccess
+ \param i_nBookmark The bookmark is used to update the parameter
*/
void copyRowValue(const ORowSetRow& _rInsertRow,ORowSetRow& _rKeyRow,sal_Int32 i_nBookmark);
-
+
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > getKeyColumns() const;
void fillAllRows();
sal_Bool fetchRow();
@@ -153,7 +144,7 @@ namespace dbaccess
void executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const ::rtl::OUString& i_sSQL,const ::rtl::OUString& i_sTableName,const ::std::vector<sal_Int32>& _aIndexColumnPositions = ::std::vector<sal_Int32>());
void executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString& i_sSQL,const ::rtl::OUString& i_sTableName = ::rtl::OUString(),bool bRefetch = false);
void executeStatement(::rtl::OUStringBuffer& io_aFilter,const ::rtl::OUString& i_sRowSetFilter,::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer>& io_xAnalyzer);
-
+
virtual ~OKeySet();
public:
OKeySet(const connectivity::OSQLTable& _xTable,
@@ -163,7 +154,7 @@ namespace dbaccess
const ORowSetValueVector& _aParameterValueForCache,
sal_Int32 i_nMaxRows,
sal_Int32& o_nRowCount);
-
+
// 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);
@@ -210,17 +201,17 @@ namespace dbaccess
virtual void SAL_CALL refreshRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// ::com::sun::star::sdbcx::XRowLocate
virtual ::com::sun::star::uno::Any SAL_CALL getBookmark() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // -------------------------------------------------------------------------
+
virtual sal_Bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // -------------------------------------------------------------------------
+
virtual sal_Bool SAL_CALL moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // -------------------------------------------------------------------------
+
virtual sal_Int32 SAL_CALL compareBookmarks( const ::com::sun::star::uno::Any& first, const ::com::sun::star::uno::Any& second ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // -------------------------------------------------------------------------
+
virtual sal_Bool SAL_CALL hasOrderedBookmarks( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // -------------------------------------------------------------------------
+
virtual sal_Int32 SAL_CALL hashBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // -------------------------------------------------------------------------
+
// ::com::sun::star::sdbcx::XDeleteRows
virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rows ,const connectivity::OSQLTable& _xTable) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// ::com::sun::star::sdbc::XResultSetUpdate
@@ -239,3 +230,4 @@ namespace dbaccess
}
#endif // DBACCESS_CORE_API_KEYSET_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index ed522c1aa..8e8fc2386 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -1,14 +1,13 @@
+
+/* -*- 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 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: OptimisticSet.cxx,v $
- * $Revision: 1.73 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -98,7 +97,7 @@ namespace
}
DBG_NAME(OptimisticSet)
-// -------------------------------------------------------------------------
+
OptimisticSet::OptimisticSet(const ::comphelper::ComponentContext& _rContext,
const Reference< XConnection>& i_xConnection,
const Reference< XSingleSelectQueryAnalyzer >& _xComposer,
@@ -113,12 +112,12 @@ OptimisticSet::OptimisticSet(const ::comphelper::ComponentContext& _rContext,
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OptimisticSet::OptimisticSet" );
DBG_CTOR(OptimisticSet,NULL);
}
-// -----------------------------------------------------------------------------
+
OptimisticSet::~OptimisticSet()
{
DBG_DTOR(OptimisticSet,NULL);
}
-// -----------------------------------------------------------------------------
+
void OptimisticSet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::OUString& i_sRowSetFilter)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OptimisticSet::construct" );
@@ -174,23 +173,23 @@ void OptimisticSet::construct(const Reference< XResultSet>& _xDriverSet,const ::
m_xStatement = m_xConnection->prepareStatement(xAnalyzer->getQueryWithSubstitution());
::comphelper::disposeComponent(xAnalyzer);
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::sdbcx::XDeleteRows
Sequence< sal_Int32 > SAL_CALL OptimisticSet::deleteRows( const Sequence< Any >& /*rows*/ ,const connectivity::OSQLTable& /*_xTable*/) throw(SQLException, RuntimeException)
{
Sequence< sal_Int32 > aRet;
return aRet;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OptimisticSet::updateRow" );
if ( m_aJoinedKeyColumns.empty() )
throw SQLException();
// list all cloumns that should be set
- static ::rtl::OUString s_sPara = ::rtl::OUString::createFromAscii(" = ?");
+ static ::rtl::OUString s_sPara(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
::rtl::OUString aQuote = getIdentifierQuoteString();
- static ::rtl::OUString aAnd = ::rtl::OUString::createFromAscii(" AND ");
+ static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
::rtl::OUString sIsNull(RTL_CONSTASCII_USTRINGPARAM(" IS NULL"));
::rtl::OUString sParam(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
@@ -201,7 +200,6 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
TSQLStatements aIndexConditions;
TSQLStatements aSql;
- // sal_Int32 i = 1;
// here we build the condition part for the update statement
SelectColumnsMetaData::const_iterator aIter = m_pColumnNames->begin();
SelectColumnsMetaData::const_iterator aEnd = m_pColumnNames->end();
@@ -258,10 +256,8 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
sSql.append(s_sSET);
sSql.append(aSqlIter->second);
::rtl::OUStringBuffer& rCondition = aKeyConditions[aSqlIter->first];
- bool bAddWhere = true;
if ( rCondition.getLength() )
{
- bAddWhere = false;
sSql.appendAscii(" WHERE ");
sSql.append( rCondition );
}
@@ -269,7 +265,7 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
}
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OptimisticSet::insertRow" );
@@ -278,10 +274,10 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
TSQLStatements aKeyConditions;
::std::map< ::rtl::OUString,bool > aResultSetChanged;
::rtl::OUString aQuote = getIdentifierQuoteString();
- static ::rtl::OUString aAnd = ::rtl::OUString::createFromAscii(" AND ");
+ static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
::rtl::OUString sIsNull(RTL_CONSTASCII_USTRINGPARAM(" IS NULL"));
::rtl::OUString sParam(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
-
+
// here we build the condition part for the update statement
SelectColumnsMetaData::const_iterator aIter = m_pColumnNames->begin();
SelectColumnsMetaData::const_iterator aEnd = m_pColumnNames->end();
@@ -289,7 +285,7 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
{
if ( aResultSetChanged.find( aIter->second.sTableName ) == aResultSetChanged.end() )
aResultSetChanged[aIter->second.sTableName] = false;
-
+
const ::rtl::OUString sQuotedColumnName = ::dbtools::quoteName( aQuote,aIter->second.sRealName);
if ( (_rInsertRow->get())[aIter->second.nPosition].isModified() )
{
@@ -368,19 +364,19 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
if ( xRow.is() && xRes->next() )
{
m_bResultSetChanged = true;
- continue;
+ continue;
}
}
catch(const SQLException&)
{
}
}
-
+
executeInsert(_rInsertRow,sSql.makeStringAndClear(),aSqlIter->first);
}
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OptimisticSet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
::rtl::OUString sParam(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
@@ -394,7 +390,6 @@ void SAL_CALL OptimisticSet::deleteRow(const ORowSetRow& _rDeleteRow,const conne
TSQLStatements aIndexConditions;
TSQLStatements aSql;
- // sal_Int32 i = 1;
// here we build the condition part for the update statement
SelectColumnsMetaData::const_iterator aIter = m_pColumnNames->begin();
SelectColumnsMetaData::const_iterator aEnd = m_pColumnNames->end();
@@ -426,12 +421,12 @@ void SAL_CALL OptimisticSet::deleteRow(const ORowSetRow& _rDeleteRow,const conne
}
}
}
-// -------------------------------------------------------------------------
+
void OptimisticSet::executeDelete(const ORowSetRow& _rDeleteRow,const ::rtl::OUString& i_sSQL,const ::rtl::OUString& i_sTableName)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OptimisticSet::executeDelete" );
- // now create end execute the prepared statement
+ // now create and execute the prepared statement
Reference< XPreparedStatement > xPrep(m_xConnection->prepareStatement(i_sSQL));
Reference< XParameters > xParameter(xPrep,UNO_QUERY);
@@ -454,41 +449,17 @@ void OptimisticSet::executeDelete(const ORowSetRow& _rDeleteRow,const ::rtl::OUS
m_bDeleted = sal_True;
}
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OptimisticSet::getComposedTableName(const ::rtl::OUString& /*_sCatalog*/,
const ::rtl::OUString& /*_sSchema*/,
const ::rtl::OUString& /*_sTable*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OptimisticSet::getComposedTableName" );
::rtl::OUString aComposedName;
-/*
- Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData();
- if( xMetaData.is() && xMetaData->supportsTableCorrelationNames() )
- {
- aComposedName = ::dbtools::composeTableName( xMetaData, _sCatalog, _sSchema, _sTable, sal_False, ::dbtools::eInDataManipulation );
- // first we have to check if the composed tablename is in the select clause or if an alias is used
- Reference<XTablesSupplier> xTabSup(m_xComposer,UNO_QUERY);
- Reference<XNameAccess> xSelectTables = xTabSup->getTables();
- OSL_ENSURE(xSelectTables.is(),"No Select tables!");
- if(xSelectTables.is())
- {
- if(!xSelectTables->hasByName(aComposedName))
- { // the composed name isn't used in the select clause so we have to find out which name is used instead
- ::rtl::OUString sCatalog,sSchema,sTable;
- ::dbtools::qualifiedNameComponents(xMetaData,m_sUpdateTableName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
- aComposedName = ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable );
- }
- else
- aComposedName = ::dbtools::composeTableNameForSelect( m_xConnection, _sCatalog, _sSchema, _sTable );
- }
- }
- else
- aComposedName = ::dbtools::composeTableNameForSelect( m_xConnection, _sCatalog, _sSchema, _sTable );
-*/
return aComposedName;
}
-// -----------------------------------------------------------------------------
+
void OptimisticSet::fillJoinedColumns_throw(const ::std::vector< TNodePair >& i_aJoinColumns)
{
::std::vector< TNodePair >::const_iterator aIter = i_aJoinColumns.begin();
@@ -507,9 +478,9 @@ void OptimisticSet::fillJoinedColumns_throw(const ::std::vector< TNodePair >& i_
fillJoinedColumns_throw(sLeft.makeStringAndClear(),sRight.makeStringAndClear());
}
}
-// -----------------------------------------------------------------------------
+
void OptimisticSet::fillJoinedColumns_throw(const ::rtl::OUString& i_sLeftColumn,const ::rtl::OUString& i_sRightColumn)
-{
+{
sal_Int32 nLeft = 0,nRight = 0;
SelectColumnsMetaData::const_iterator aLeftIter = m_pKeyColumnNames->find(i_sLeftColumn);
SelectColumnsMetaData::const_iterator aRightIter = m_pKeyColumnNames->find(i_sRightColumn);
@@ -547,14 +518,14 @@ void OptimisticSet::fillJoinedColumns_throw(const ::rtl::OUString& i_sLeftColumn
else
m_aJoinedColumns[nRight] = nLeft;
}
-// -----------------------------------------------------------------------------
+
bool OptimisticSet::isResultSetChanged() const
{
bool bOld = m_bResultSetChanged;
m_bResultSetChanged = false;
return bOld;
}
-// -----------------------------------------------------------------------------
+
void OptimisticSet::reset(const Reference< XResultSet>& _xDriverSet)
{
OCacheSet::construct(_xDriverSet,::rtl::OUString());
@@ -563,7 +534,7 @@ void OptimisticSet::reset(const Reference< XResultSet>& _xDriverSet)
m_aKeyMap.insert(OKeySetMatrix::value_type(0,OKeySetValue(NULL,::std::pair<sal_Int32,Reference<XRow> >(0,NULL))));
m_aKeyIter = m_aKeyMap.begin();
}
-// -----------------------------------------------------------------------------
+
void OptimisticSet::mergeColumnValues(sal_Int32 i_nColumnIndex,ORowSetValueVector::Vector& io_aInsertRow,ORowSetValueVector::Vector& io_aRow,::std::vector<sal_Int32>& o_aChangedColumns)
{
o_aChangedColumns.push_back(i_nColumnIndex);
@@ -605,7 +576,7 @@ namespace
}
};
}
-// -----------------------------------------------------------------------------
+
bool OptimisticSet::updateColumnValues(const ORowSetValueVector::Vector& io_aCachedRow,ORowSetValueVector::Vector& io_aRow,const ::std::vector<sal_Int32>& i_aChangedColumns)
{
bool bRet = false;
@@ -642,7 +613,7 @@ bool OptimisticSet::updateColumnValues(const ORowSetValueVector::Vector& io_aCac
}
return bRet;
}
-// -----------------------------------------------------------------------------
+
bool OptimisticSet::columnValuesUpdated(ORowSetValueVector::Vector& o_aCachedRow,const ORowSetValueVector::Vector& i_aRow)
{
bool bRet = false;
@@ -681,14 +652,14 @@ bool OptimisticSet::columnValuesUpdated(ORowSetValueVector::Vector& o_aCachedRow
}
return bRet;
}
-// -----------------------------------------------------------------------------
+
void OptimisticSet::fillMissingValues(ORowSetValueVector::Vector& io_aRow) const
{
TSQLStatements aSql;
TSQLStatements aKeyConditions;
::std::map< ::rtl::OUString,bool > aResultSetChanged;
::rtl::OUString aQuote = getIdentifierQuoteString();
- static ::rtl::OUString aAnd = ::rtl::OUString::createFromAscii(" AND ");
+ static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
::rtl::OUString sIsNull(RTL_CONSTASCII_USTRINGPARAM(" IS NULL"));
::rtl::OUString sParam(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
// here we build the condition part for the update statement
@@ -765,5 +736,4 @@ void OptimisticSet::fillMissingValues(ORowSetValueVector::Vector& io_aRow) const
}
}
}
-// -----------------------------------------------------------------------------
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/OptimisticSet.hxx b/dbaccess/source/core/api/OptimisticSet.hxx
index c2b985760..b9b8fbe11 100644
--- a/dbaccess/source/core/api/OptimisticSet.hxx
+++ b/dbaccess/source/core/api/OptimisticSet.hxx
@@ -1,14 +1,12 @@
+/* -*- 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 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: KeySet.hxx,v $
- * $Revision: 1.30 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -49,11 +47,10 @@ namespace dbaccess
{
::connectivity::OSQLParser m_aSqlParser;
::connectivity::OSQLParseTreeIterator m_aSqlIterator;
-
+
::std::map<sal_Int32,sal_Int32> m_aJoinedColumns;
- ::std::map<sal_Int32,sal_Int32> m_aJoinedKeyColumns;
-
-
+ ::std::map<sal_Int32,sal_Int32> m_aJoinedKeyColumns;
+
mutable bool m_bResultSetChanged;
/**
@@ -67,9 +64,9 @@ namespace dbaccess
::rtl::OUString getComposedTableName( const ::rtl::OUString& _sCatalog,
const ::rtl::OUString& _sSchema,
const ::rtl::OUString& _sTable);
-
+
void impl_convertValue_throw(const ORowSetRow& _rInsertRow,const SelectColumnDescription& i_aMetaData);
-
+
void executeDelete(const ORowSetRow& _rDeleteRow,const ::rtl::OUString& i_sSQL,const ::rtl::OUString& i_sTableName);
void fillJoinedColumns_throw(const ::std::vector< ::connectivity::TNodePair>& i_aJoinColumns);
void fillJoinedColumns_throw(const ::rtl::OUString& i_sLeftColumn,const ::rtl::OUString& i_sRightColumn);
@@ -82,11 +79,10 @@ namespace dbaccess
const ORowSetValueVector& _aParameterValueForCache,
sal_Int32 i_nMaxRows,
sal_Int32& o_nRowCount);
-
+
// 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);
- // -------------------------------------------------------------------------
// ::com::sun::star::sdbcx::XDeleteRows
virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rows ,const connectivity::OSQLTable& _xTable) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// ::com::sun::star::sdbc::XResultSetUpdate
@@ -109,3 +105,4 @@ namespace dbaccess
}
#endif // DBACCESS_CORE_API_OPTIMISTICSET_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/PrivateRow.cxx b/dbaccess/source/core/api/PrivateRow.cxx
index 2d3baedc4..05eed3b2b 100644
--- a/dbaccess/source/core/api/PrivateRow.cxx
+++ b/dbaccess/source/core/api/PrivateRow.cxx
@@ -1,7 +1,8 @@
+/* -*- 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 andor its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -140,3 +141,4 @@ using namespace ::com::sun::star;
return Reference< XArray >(m_aRow[m_nPos].makeAny(),UNO_QUERY);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/PrivateRow.hxx b/dbaccess/source/core/api/PrivateRow.hxx
index aabcb0d4a..e03e8dcdc 100644
--- a/dbaccess/source/core/api/PrivateRow.hxx
+++ b/dbaccess/source/core/api/PrivateRow.hxx
@@ -1,14 +1,12 @@
+/* -*- 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 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: OptimisticSet.cxx,v $
- * $Revision: 1.73 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -67,3 +65,5 @@ namespace dbaccess
};
} // dbaccess
#endif // PRIVATE_ROW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index dd0643b01..3825516e4 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -40,6 +41,7 @@
#include "core_resource.hrc"
#include "core_resource.hxx"
#include "tablecontainer.hxx"
+#include "dbastrings.hrc"
/** === begin UNO includes === **/
#include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -102,12 +104,10 @@ using namespace ::com::sun::star::util;
using namespace ::cppu;
using namespace ::osl;
-//--------------------------------------------------------------------------
extern "C" void SAL_CALL createRegistryInfo_ORowSet()
{
static ::dba::OAutoRegistration< ORowSet > aAutoRegistration;
}
-// -----------------------------------------------------------------------------
#define NOTIFY_LISTERNERS_CHECK(_rListeners,T,method) \
Sequence< Reference< XInterface > > aListenerSeq = _rListeners.getElements(); \
@@ -134,16 +134,14 @@ extern "C" void SAL_CALL createRegistryInfo_ORowSet()
_rGuard.reset();
-//..................................................................
namespace dbaccess
{
-//..................................................................
-//--------------------------------------------------------------------------
+
Reference< XInterface > ORowSet_CreateInstance(const Reference< XMultiServiceFactory >& _rxFactory)
{
return *(new ORowSet(_rxFactory));
}
-//--------------------------------------------------------------------------
+
ORowSet::ORowSet( const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB )
:ORowSet_BASE1(m_aMutex)
,ORowSetBase( _rxORB, ORowSet_BASE1::rBHelper, &m_aMutex )
@@ -170,6 +168,7 @@ ORowSet::ORowSet( const Reference< ::com::sun::star::lang::XMultiServiceFactory
,m_bNew(sal_False)
,m_bCanUpdateInsertedRows(sal_True)
,m_bOwnConnection(sal_False)
+ ,m_bPropChangeNotifyEnabled(sal_True)
{
m_nResultSetType = ResultSetType::SCROLL_SENSITIVE;
m_nResultSetConcurrency = ResultSetConcurrency::UPDATABLE;
@@ -222,19 +221,21 @@ ORowSet::ORowSet( const Reference< ::com::sun::star::lang::XMultiServiceFactory
registerProperty(PROPERTY_UPDATE_CATALOGNAME, PROPERTY_ID_UPDATE_CATALOGNAME, PropertyAttribute::BOUND, &m_aUpdateCatalogName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
registerProperty(PROPERTY_UPDATE_SCHEMANAME, PROPERTY_ID_UPDATE_SCHEMANAME, PropertyAttribute::BOUND, &m_aUpdateSchemaName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
registerProperty(PROPERTY_UPDATE_TABLENAME, PROPERTY_ID_UPDATE_TABLENAME, PropertyAttribute::BOUND, &m_aUpdateTableName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+
+ // ???
+ registerProperty(PROPERTY_CHANGE_NOTIFICATION_ENABLED, PROPERTY_ID_PROPCHANGE_NOTIFY, PropertyAttribute::BOUND, &m_bPropChangeNotifyEnabled, ::getBooleanCppuType());
}
ORowSet::~ORowSet()
{
if ( !m_rBHelper.bDisposed && !m_rBHelper.bInDispose )
{
- OSL_ENSURE(0, "Please check who doesn't dispose this component!");
+ OSL_FAIL("Please check who doesn't dispose this component!");
osl_incrementInterlockedCount( &m_refCount );
dispose();
}
}
-// -----------------------------------------------------------------------------
void ORowSet::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefault ) const
{
switch( _nHandle )
@@ -286,9 +287,8 @@ void ORowSet::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefault ) c
break;
}
}
-// -------------------------------------------------------------------------
-// typedef ::comphelper::OPropertyArrayUsageHelper<ORowSet> ORowSet_Prop;
+// typedef ::comphelper::OPropertyArrayUsageHelper<ORowSet> ORowSet_Prop;
void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)
{
switch(nHandle)
@@ -373,11 +373,14 @@ void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const
case PROPERTY_ID_TYPEMAP:
::cppu::extractInterface(m_xTypeMap,m_aTypeMap);
break;
+ case PROPERTY_ID_PROPCHANGE_NOTIFY:
+ m_bPropChangeNotifyEnabled = ::cppu::any2bool(rValue);
+ break;
default:
break;
};
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
{
if(m_pCache)
@@ -413,12 +416,15 @@ void SAL_CALL ORowSet::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
case PROPERTY_ID_TYPEMAP:
rValue <<= m_xTypeMap;
break;
+ case PROPERTY_ID_PROPCHANGE_NOTIFY:
+ rValue <<= m_bPropChangeNotifyEnabled;
+ break;
default:
ORowSetBase::getFastPropertyValue(rValue,nHandle);
}
}
}
-// -------------------------------------------------------------------------
+
// com::sun::star::XTypeProvider
Sequence< Type > SAL_CALL ORowSet::getTypes() throw (RuntimeException)
{
@@ -428,7 +434,7 @@ Sequence< Type > SAL_CALL ORowSet::getTypes() throw (RuntimeException)
::comphelper::concatSequences(ORowSet_BASE1::getTypes(),ORowSetBase::getTypes()));
return aTypes.getTypes();
}
-// -------------------------------------------------------------------------
+
Sequence< sal_Int8 > SAL_CALL ORowSet::getImplementationId() throw (RuntimeException)
{
static OImplementationId * pId = 0;
@@ -443,24 +449,22 @@ Sequence< sal_Int8 > SAL_CALL ORowSet::getImplementationId() throw (RuntimeExcep
}
return pId->getImplementationId();
}
-// -------------------------------------------------------------------------
// com::sun::star::XInterface
Any SAL_CALL ORowSet::queryInterface( const Type & rType ) throw (RuntimeException)
{
return ORowSet_BASE1::queryInterface( rType);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::acquire() throw()
{
ORowSet_BASE1::acquire();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::release() throw()
{
ORowSet_BASE1::release();
}
-// -------------------------------------------------------------------------
// com::sun::star::XUnoTunnel
sal_Int64 SAL_CALL ORowSet::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
@@ -470,7 +474,7 @@ sal_Int64 SAL_CALL ORowSet::getSomething( const Sequence< sal_Int8 >& rId ) thro
return 0;
}
-// -------------------------------------------------------------------------
+
// com::sun::star::XAggregation
Any SAL_CALL ORowSet::queryAggregation( const Type& rType ) throw(RuntimeException)
{
@@ -479,23 +483,23 @@ Any SAL_CALL ORowSet::queryAggregation( const Type& rType ) throw(RuntimeExcepti
aRet = ORowSet_BASE1::queryAggregation(rType);
return aRet;
}
-//------------------------------------------------------------------------------
+
rtl::OUString ORowSet::getImplementationName_static( ) throw(RuntimeException)
{
- return rtl::OUString::createFromAscii("com.sun.star.comp.dba.ORowSet");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.dba.ORowSet"));
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::XServiceInfo
::rtl::OUString SAL_CALL ORowSet::getImplementationName( ) throw(RuntimeException)
{
return getImplementationName_static();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSet::supportsService( const ::rtl::OUString& _rServiceName ) throw(RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > ORowSet::getSupportedServiceNames_static( ) throw (RuntimeException)
{
Sequence< rtl::OUString > aSNS( 5 );
@@ -506,18 +510,18 @@ Sequence< ::rtl::OUString > ORowSet::getSupportedServiceNames_static( ) throw (
aSNS[4] = SERVICE_SDB_ROWSET;
return aSNS;
}
-// -------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL ORowSet::getSupportedServiceNames( ) throw(RuntimeException)
{
return getSupportedServiceNames_static();
}
-//------------------------------------------------------------------------------
+
Reference< XInterface > ORowSet::Create(const Reference< XComponentContext >& _rxContext)
{
::comphelper::ComponentContext aContext( _rxContext );
return ORowSet_CreateInstance( aContext.getLegacyServiceFactory() );
}
-// -------------------------------------------------------------------------
+
// OComponentHelper
void SAL_CALL ORowSet::disposing()
{
@@ -549,14 +553,14 @@ void SAL_CALL ORowSet::disposing()
ORowSetBase::disposing();
}
-// -------------------------------------------------------------------------
+
void ORowSet::freeResources( bool _bComplete )
{
MutexGuard aGuard(m_aMutex);
// free all clones
connectivity::OWeakRefArray::iterator aEnd = m_aClones.end();
- for (connectivity::OWeakRefArray::iterator i = m_aClones.begin(); aEnd != i; i++)
+ for (connectivity::OWeakRefArray::iterator i = m_aClones.begin(); aEnd != i; ++i)
{
Reference< XComponent > xComp(i->get(), UNO_QUERY);
if (xComp.is())
@@ -598,7 +602,7 @@ void ORowSet::freeResources( bool _bComplete )
m_bIsInsertRow = sal_False;
m_bLastKnownRowCountFinal = sal_False;
m_nLastKnownRowCount = 0;
- if ( m_aOldRow.isValid() )
+ if ( m_aOldRow.is() )
m_aOldRow->clearRow();
impl_disposeParametersContainer_nothrow();
@@ -607,7 +611,6 @@ void ORowSet::freeResources( bool _bComplete )
}
}
-// -------------------------------------------------------------------------
void ORowSet::setActiveConnection( Reference< XConnection >& _rxNewConn, sal_Bool _bFireEvent )
{
if (_rxNewConn.get() == m_xActiveConnection.get())
@@ -653,7 +656,6 @@ void ORowSet::setActiveConnection( Reference< XConnection >& _rxNewConn, sal_Boo
}
}
-// -------------------------------------------------------------------------
// ::com::sun::star::XEventListener
void SAL_CALL ORowSet::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(RuntimeException)
{
@@ -669,7 +671,6 @@ void SAL_CALL ORowSet::disposing( const ::com::sun::star::lang::EventObject& Sou
}
}
}
-// -------------------------------------------------------------------------
// XCloseable
void SAL_CALL ORowSet::close( ) throw(SQLException, RuntimeException)
@@ -681,7 +682,7 @@ void SAL_CALL ORowSet::close( ) throw(SQLException, RuntimeException)
// additionals things to set
freeResources( true );
}
-// -------------------------------------------------------------------------
+
// comphelper::OPropertyArrayUsageHelper
::cppu::IPropertyArrayHelper* ORowSet::createArrayHelper( ) const
{
@@ -689,14 +690,14 @@ void SAL_CALL ORowSet::close( ) throw(SQLException, RuntimeException)
describeProperties(aProps);
return new ::cppu::OPropertyArrayHelper(aProps);
}
-// -------------------------------------------------------------------------
+
// cppu::OPropertySetHelper
::cppu::IPropertyArrayHelper& SAL_CALL ORowSet::getInfoHelper()
{
typedef ::comphelper::OPropertyArrayUsageHelper<ORowSet> ORowSet_PROP;
return *ORowSet_PROP::getArrayHelper();
}
-// -----------------------------------------------------------------------------
+
void ORowSet::updateValue(sal_Int32 columnIndex,const ORowSetValue& x)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -711,7 +712,7 @@ void ORowSet::updateValue(sal_Int32 columnIndex,const ORowSetValue& x)
m_bModified = m_bModified || !aNotify.getChangedColumns().empty();
aNotify.firePropertyChange();
}
-// -------------------------------------------------------------------------
+
// XRowUpdate
void SAL_CALL ORowSet::updateNull( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
@@ -727,92 +728,82 @@ void SAL_CALL ORowSet::updateNull( sal_Int32 columnIndex ) throw(SQLException, R
m_bModified = m_bModified || !aNotify.getChangedColumns().empty();
aNotify.firePropertyChange();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateFloat( sal_Int32 columnIndex, float x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateDouble( sal_Int32 columnIndex, double x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateString( sal_Int32 columnIndex, const ::rtl::OUString& x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateBytes( sal_Int32 columnIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateDate( sal_Int32 columnIndex, const ::com::sun::star::util::Date& x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateTime( sal_Int32 columnIndex, const ::com::sun::star::util::Time& x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateTimestamp( sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateBinaryStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
::osl::MutexGuard aGuard( *m_pMutex );
checkUpdateConditions(columnIndex);
checkUpdateIterator();
-
- //if(((*m_aCurrentRow)->get())[columnIndex].getTypeKind() == DataType::BLOB)
- //{
- // ::connectivity::ORowSetValue aOldValue = ((*m_aCurrentRow)->get())[columnIndex];
- // m_pCache->updateBinaryStream(columnIndex,x,length);
- // ((*m_aCurrentRow)->get())[columnIndex] = makeAny(x);
- // ((*m_aCurrentRow)->get())[columnIndex].setTypeKind(DataType::BLOB);
- // firePropertyChange(columnIndex-1 ,aOldValue);
- // fireProperty(PROPERTY_ID_ISMODIFIED,sal_True,sal_False);
- //}
- //else
- {
+
+ {
Sequence<sal_Int8> aSeq;
if(x.is())
x->readBytes(aSeq,length);
updateValue(columnIndex,aSeq);
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateCharacterStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -825,7 +816,7 @@ void SAL_CALL ORowSet::updateCharacterStream( sal_Int32 columnIndex, const Refer
m_bModified = m_bModified || !aNotify.getChangedColumns().empty();
aNotify.firePropertyChange();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateObject( sal_Int32 columnIndex, const Any& x ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -870,7 +861,7 @@ void SAL_CALL ORowSet::updateObject( sal_Int32 columnIndex, const Any& x ) throw
aNotify.firePropertyChange();
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 scale ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -883,7 +874,6 @@ void SAL_CALL ORowSet::updateNumericObject( sal_Int32 columnIndex, const Any& x,
m_bModified = m_bModified || !aNotify.getChangedColumns().empty();
aNotify.firePropertyChange();
}
-// -------------------------------------------------------------------------
// XResultSetUpdate
void SAL_CALL ORowSet::insertRow( ) throw(SQLException, RuntimeException)
@@ -894,7 +884,7 @@ void SAL_CALL ORowSet::insertRow( ) throw(SQLException, RuntimeException)
// when the row isn't modified
// or the concurency is read only
::osl::ResettableMutexGuard aGuard( *m_pMutex );
-
+
if(!m_pCache || !m_bNew || !m_bModified || m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY)
throwFunctionSequenceException(*this);
@@ -903,7 +893,7 @@ void SAL_CALL ORowSet::insertRow( ) throw(SQLException, RuntimeException)
ORowSetRow aOldValues;
if ( !m_aCurrentRow.isNull() )
- aOldValues = new ORowSetValueVector( m_aCurrentRow->getBody() );
+ aOldValues = new ORowSetValueVector( *(*m_aCurrentRow));
Sequence<Any> aChangedBookmarks;
RowsChangeEvent aEvt(*this,RowChangeAction::INSERT,1,aChangedBookmarks);
notifyAllListenersRowBeforeChange(aGuard,aEvt);
@@ -923,7 +913,7 @@ void SAL_CALL ORowSet::insertRow( ) throw(SQLException, RuntimeException)
// - rowChanged
notifyAllListenersRowChanged(aGuard,aEvt);
-
+
if ( !aBookmarks.empty() )
{
RowsChangeEvent aUpEvt(*this,RowChangeAction::UPDATE,aBookmarks.size(),Sequence<Any>(&(*aBookmarks.begin()),aBookmarks.size()));
@@ -942,16 +932,16 @@ void SAL_CALL ORowSet::insertRow( ) throw(SQLException, RuntimeException)
// - RowCount/IsRowCountFinal
fireRowcount();
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL ORowSet::getRow( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
- checkCache();
+ checkCache();
// check if we are inserting a row
return (m_pCache && isInsertRow()) ? 0 : ORowSetBase::getRow();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateRow( ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -959,13 +949,13 @@ void SAL_CALL ORowSet::updateRow( ) throw(SQLException, RuntimeException)
::osl::ResettableMutexGuard aGuard( *m_pMutex );
if ( !m_pCache || m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY || m_bNew || ((m_pCache->m_nPrivileges & Privilege::UPDATE ) != Privilege::UPDATE) )
throwFunctionSequenceException(*this);
-
+
if(m_bModified)
{
ORowSetRow aOldValues;
if ( !m_aCurrentRow.isNull() )
- aOldValues = new ORowSetValueVector( m_aCurrentRow->getBody() );
+ aOldValues = new ORowSetValueVector( *(*m_aCurrentRow) );
Sequence<Any> aChangedBookmarks;
RowsChangeEvent aEvt(*this,RowChangeAction::UPDATE,1,aChangedBookmarks);
@@ -974,12 +964,11 @@ void SAL_CALL ORowSet::updateRow( ) throw(SQLException, RuntimeException)
::std::vector< Any > aBookmarks;
m_pCache->updateRow(m_aCurrentRow.operator ->(),aBookmarks);
if ( !aBookmarks.empty() )
- aEvt.Bookmarks = Sequence<Any>(&(*aBookmarks.begin()),aBookmarks.size());
+ aEvt.Bookmarks = Sequence<Any>(&(*aBookmarks.begin()),aBookmarks.size());
aEvt.Rows += aBookmarks.size();
m_aBookmark = m_pCache->getBookmark();
m_aCurrentRow = m_pCache->m_aMatrixIter;
- m_bIsInsertRow = sal_False;
- if ( m_pCache->m_aMatrixIter != m_pCache->getEnd() && (*m_pCache->m_aMatrixIter).isValid() )
+ if ( m_pCache->m_aMatrixIter != m_pCache->getEnd() && (*m_pCache->m_aMatrixIter).is() )
{
if ( m_pCache->isResultSetChanged() )
{
@@ -987,7 +976,7 @@ void SAL_CALL ORowSet::updateRow( ) throw(SQLException, RuntimeException)
}
else
{
- m_aOldRow->setRow(new ORowSetValueVector(m_aCurrentRow->getBody()));
+ m_aOldRow->setRow(new ORowSetValueVector(*(*m_aCurrentRow)));
// notification order
// - column values
@@ -1010,7 +999,7 @@ void SAL_CALL ORowSet::updateRow( ) throw(SQLException, RuntimeException)
}
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::deleteRow( ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -1037,8 +1026,8 @@ void SAL_CALL ORowSet::deleteRow( ) throw(SQLException, RuntimeException)
notifyRowSetAndClonesRowDelete( aBookmarkToDelete );
ORowSetRow aOldValues;
- if ( m_pCache->m_aMatrixIter != m_pCache->getEnd() && m_pCache->m_aMatrixIter->isValid() )
- aOldValues = new ORowSetValueVector( m_pCache->m_aMatrixIter->getBody() );
+ if ( m_pCache->m_aMatrixIter != m_pCache->getEnd() && m_pCache->m_aMatrixIter->is() )
+ aOldValues = new ORowSetValueVector( *(*(m_pCache->m_aMatrixIter)) );
Sequence<Any> aChangedBookmarks;
RowsChangeEvent aEvt(*this,RowChangeAction::DELETE,1,aChangedBookmarks);
@@ -1062,7 +1051,6 @@ void SAL_CALL ORowSet::deleteRow( ) throw(SQLException, RuntimeException)
fireRowcount();
}
-// -------------------------------------------------------------------------
void ORowSet::implCancelRowUpdates( sal_Bool _bNotifyModified ) SAL_THROW( ( SQLException, RuntimeException ) )
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -1083,7 +1071,7 @@ void ORowSet::implCancelRowUpdates( sal_Bool _bNotifyModified ) SAL_THROW( ( SQL
ORowSetRow aOldValues;
if ( !m_bModified && _bNotifyModified && !m_aCurrentRow.isNull() )
- aOldValues = new ORowSetValueVector( m_aCurrentRow->getBody() );
+ aOldValues = new ORowSetValueVector( *(*m_aCurrentRow) );
m_pCache->cancelRowUpdates();
@@ -1102,13 +1090,11 @@ void ORowSet::implCancelRowUpdates( sal_Bool _bNotifyModified ) SAL_THROW( ( SQL
}
}
-// -------------------------------------------------------------------------
void SAL_CALL ORowSet::cancelRowUpdates( ) throw(SQLException, RuntimeException)
{
implCancelRowUpdates( sal_True );
}
-// -------------------------------------------------------------------------
void SAL_CALL ORowSet::addRowSetListener( const Reference< XRowSetListener >& listener ) throw(RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -1117,7 +1103,7 @@ void SAL_CALL ORowSet::addRowSetListener( const Reference< XRowSetListener >& li
if(listener.is())
m_aRowsetListeners.addInterface(listener);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::removeRowSetListener( const Reference< XRowSetListener >& listener ) throw(RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -1126,7 +1112,7 @@ void SAL_CALL ORowSet::removeRowSetListener( const Reference< XRowSetListener >&
if(listener.is())
m_aRowsetListeners.removeInterface(listener);
}
-// -----------------------------------------------------------------------------
+
void ORowSet::notifyAllListeners(::osl::ResettableMutexGuard& _rGuard)
{
EventObject aEvt(*m_pMySelf);
@@ -1134,7 +1120,7 @@ void ORowSet::notifyAllListeners(::osl::ResettableMutexGuard& _rGuard)
m_aRowsetListeners.notifyEach( &XRowSetListener::rowSetChanged, aEvt );
_rGuard.reset();
}
-// -------------------------------------------------------------------------
+
void ORowSet::notifyAllListenersCursorMoved(::osl::ResettableMutexGuard& _rGuard)
{
EventObject aEvt(*m_pMySelf);
@@ -1142,7 +1128,7 @@ void ORowSet::notifyAllListenersCursorMoved(::osl::ResettableMutexGuard& _rGuard
m_aRowsetListeners.notifyEach( &XRowSetListener::cursorMoved, aEvt );
_rGuard.reset();
}
-// -------------------------------------------------------------------------
+
void ORowSet::notifyAllListenersRowChanged(::osl::ResettableMutexGuard& _rGuard, const RowsChangeEvent& aEvt)
{
_rGuard.clear();
@@ -1150,21 +1136,21 @@ void ORowSet::notifyAllListenersRowChanged(::osl::ResettableMutexGuard& _rGuard,
m_aRowsChangeListener.notifyEach( &XRowsChangeListener::rowsChanged, aEvt );
_rGuard.reset();
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSet::notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard& _rGuard)
{
EventObject aEvt(*m_pMySelf);
NOTIFY_LISTERNERS_CHECK(m_aApproveListeners,XRowSetApproveListener,approveCursorMove);
return bCheck;
}
-// -------------------------------------------------------------------------
+
void ORowSet::notifyAllListenersRowBeforeChange(::osl::ResettableMutexGuard& _rGuard,const RowChangeEvent &aEvt)
{
NOTIFY_LISTERNERS_CHECK(m_aApproveListeners,XRowSetApproveListener,approveRowChange);
if ( !bCheck )
m_aErrors.raiseTypedException( sdb::ErrorCondition::ROW_SET_OPERATION_VETOED, *this, ::cppu::UnoType< RowSetVetoException >::get() );
}
-// -------------------------------------------------------------------------
+
void ORowSet::fireRowcount()
{
sal_Int32 nCurrentRowCount( impl_getRowCount() );
@@ -1188,7 +1174,7 @@ void ORowSet::fireRowcount()
m_bLastKnownRowCountFinal = bCurrentRowCountFinal;
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::moveToInsertRow( ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -1215,9 +1201,9 @@ void SAL_CALL ORowSet::moveToInsertRow( ) throw(SQLException, RuntimeException)
if ( !m_bBeforeFirst
&& !m_bAfterLast
&& m_pCache->m_aMatrixIter != m_pCache->getEnd()
- && m_pCache->m_aMatrixIter->isValid()
+ && m_pCache->m_aMatrixIter->is()
)
- aOldValues = new ORowSetValueVector( m_pCache->m_aMatrixIter->getBody() );
+ aOldValues = new ORowSetValueVector( *(*(m_pCache->m_aMatrixIter)) );
const sal_Bool bNewState = m_bNew;
const sal_Bool bModState = m_bModified;
@@ -1248,34 +1234,34 @@ void SAL_CALL ORowSet::moveToInsertRow( ) throw(SQLException, RuntimeException)
fireRowcount();
}
}
-// -------------------------------------------------------------------------
+
void ORowSet::impl_setDataColumnsWriteable_throw()
{
impl_restoreDataColumnsWriteable_throw();
TDataColumns::iterator aIter = m_aDataColumns.begin();
m_aReadOnlyDataColumns.resize(m_aDataColumns.size(),false);
- ::std::bit_vector::iterator aReadIter = m_aReadOnlyDataColumns.begin();
+ ::std::vector<bool, std::allocator<bool> >::iterator aReadIter = m_aReadOnlyDataColumns.begin();
for(;aIter != m_aDataColumns.end();++aIter,++aReadIter)
{
sal_Bool bReadOnly = sal_False;
(*aIter)->getPropertyValue(PROPERTY_ISREADONLY) >>= bReadOnly;
*aReadIter = bReadOnly;
-
+
(*aIter)->setPropertyValue(PROPERTY_ISREADONLY,makeAny(sal_False));
}
}
-// -------------------------------------------------------------------------
+
void ORowSet::impl_restoreDataColumnsWriteable_throw()
{
TDataColumns::iterator aIter = m_aDataColumns.begin();
- ::std::bit_vector::iterator aReadIter = m_aReadOnlyDataColumns.begin();
+ ::std::vector<bool, std::allocator<bool> >::iterator aReadIter = m_aReadOnlyDataColumns.begin();
for(;aReadIter != m_aReadOnlyDataColumns.end();++aIter,++aReadIter)
{
(*aIter)->setPropertyValue(PROPERTY_ISREADONLY,makeAny((sal_Bool)*aReadIter ));
}
m_aReadOnlyDataColumns.clear();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::moveToCurrentRow( ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -1310,7 +1296,7 @@ void SAL_CALL ORowSet::moveToCurrentRow( ) throw(SQLException, RuntimeException
aNotifier.fire();
}
}
-// -------------------------------------------------------------------------
+
// XRow
sal_Bool SAL_CALL ORowSet::wasNull( ) throw(SQLException, RuntimeException)
{
@@ -1319,7 +1305,7 @@ sal_Bool SAL_CALL ORowSet::wasNull( ) throw(SQLException, RuntimeException)
return ( m_pCache && isInsertRow() ) ? ((*m_pCache->m_aInsertRow)->get())[m_nLastColumnIndex].isNull() : ORowSetBase::wasNull();
}
-// -----------------------------------------------------------------------------
+
const ORowSetValue& ORowSet::getInsertValue(sal_Int32 columnIndex)
{
checkCache();
@@ -1329,79 +1315,79 @@ const ORowSetValue& ORowSet::getInsertValue(sal_Int32 columnIndex)
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL ORowSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int8 SAL_CALL ORowSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int16 SAL_CALL ORowSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL ORowSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int64 SAL_CALL ORowSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
float SAL_CALL ORowSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
double SAL_CALL ORowSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
Sequence< sal_Int8 > SAL_CALL ORowSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::Date SAL_CALL ORowSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::Time SAL_CALL ORowSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::DateTime SAL_CALL ORowSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
@@ -1413,7 +1399,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSet::getBinaryStrea
return ORowSetBase::getBinaryStream(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
@@ -1425,18 +1411,18 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSet::getCharacterSt
return ORowSetBase::getCharacterStream(columnIndex);
}
-// -------------------------------------------------------------------------
+
Any SAL_CALL ORowSet::getObject( sal_Int32 columnIndex, const Reference< XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex).makeAny();
}
-// -------------------------------------------------------------------------
+
Reference< XRef > SAL_CALL ORowSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
{
return Reference< XRef >();
}
-// -------------------------------------------------------------------------
+
Reference< XBlob > SAL_CALL ORowSet::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
if ( m_pCache && isInsertRow() )
@@ -1446,17 +1432,17 @@ Reference< XBlob > SAL_CALL ORowSet::getBlob( sal_Int32 columnIndex ) throw(SQLE
}
return ORowSetBase::getBlob(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< XClob > SAL_CALL ORowSet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
return Reference< XClob >(getInsertValue(columnIndex).makeAny(),UNO_QUERY);
}
-// -------------------------------------------------------------------------
+
Reference< XArray > SAL_CALL ORowSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
{
return Reference< XArray >();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::executeWithCompletion( const Reference< XInteractionHandler >& _rxHandler ) throw(SQLException, RuntimeException)
{
if (!_rxHandler.is())
@@ -1490,7 +1476,7 @@ void SAL_CALL ORowSet::executeWithCompletion( const Reference< XInteractionHandl
const sal_Int32 nParamCount = xParamsAsIndicies.is() ? xParamsAsIndicies->getCount() : 0;
if ( m_aParametersSet.size() < (size_t)nParamCount )
m_aParametersSet.resize( nParamCount ,false);
-
+
::dbtools::askForParameters( xComposer, this, m_xActiveConnection, _rxHandler,m_aParametersSet );
}
// ensure that only the allowed exceptions leave this block
@@ -1504,7 +1490,7 @@ void SAL_CALL ORowSet::executeWithCompletion( const Reference< XInteractionHandl
}
catch(Exception&)
{
- DBG_ERROR("ORowSet::executeWithCompletion: caught an unexpected exception type while filling in the parameters!");
+ OSL_FAIL("ORowSet::executeWithCompletion: caught an unexpected exception type while filling in the parameters!");
}
// we're done with the parameters, now for the real execution
@@ -1513,7 +1499,6 @@ void SAL_CALL ORowSet::executeWithCompletion( const Reference< XInteractionHandl
execute_NoApprove_NoNewConn(aGuard);
}
-// -------------------------------------------------------------------------
Reference< XIndexAccess > SAL_CALL ORowSet::getParameters( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
@@ -1540,7 +1525,6 @@ Reference< XIndexAccess > SAL_CALL ORowSet::getParameters( ) throw (RuntimeExce
return m_pParameters.get();
}
-// -------------------------------------------------------------------------
void ORowSet::approveExecution() throw (RowSetVetoException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aColumnsMutex );
@@ -1568,9 +1552,8 @@ void ORowSet::approveExecution() throw (RowSetVetoException, RuntimeException)
}
}
}
-// -------------------------------------------------------------------------
+
// XRowSet
-// -------------------------------------------------------------------------
void SAL_CALL ORowSet::execute( ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -1595,7 +1578,6 @@ void SAL_CALL ORowSet::execute( ) throw(SQLException, RuntimeException)
execute_NoApprove_NoNewConn(aGuard);
}
-//------------------------------------------------------------------------------
void ORowSet::setStatementResultSetType( const Reference< XPropertySet >& _rxStatement, sal_Int32 _nDesiredResultSetType, sal_Int32 _nDesiredResultSetConcurrency )
{
OSL_ENSURE( _rxStatement.is(), "ORowSet::setStatementResultSetType: invalid statement - this will crash!" );
@@ -1604,7 +1586,7 @@ void ORowSet::setStatementResultSetType( const Reference< XPropertySet >& _rxSta
sal_Int32 nResultSetConcurrency( _nDesiredResultSetConcurrency );
// there *might* be a data source setting which tells use to be more defensive with those settings
- // #i15113# / 2005-02-10 / frank.schoenheit@sun.com
+ // #i15113#
sal_Bool bRespectDriverRST = sal_False;
Any aSetting;
if ( getDataSourceSetting( ::dbaccess::getDataSource( m_xActiveConnection ), "RespectDriverResultSetType", aSetting ) )
@@ -1649,7 +1631,6 @@ void ORowSet::setStatementResultSetType( const Reference< XPropertySet >& _rxSta
_rxStatement->setPropertyValue( PROPERTY_RESULTSETCONCURRENCY, makeAny( nResultSetConcurrency ) );
}
-// -----------------------------------------------------------------------------
Reference< XResultSet > ORowSet::impl_prepareAndExecute_throw()
{
::rtl::OUString sCommandToExecute;
@@ -1711,7 +1692,6 @@ Reference< XResultSet > ORowSet::impl_prepareAndExecute_throw()
return xResultSet;
}
-// -----------------------------------------------------------------------------
void ORowSet::impl_initializeColumnSettings_nothrow( const Reference< XPropertySet >& _rxTemplateColumn, const Reference< XPropertySet >& _rxRowSetColumn )
{
OSL_ENSURE( _rxTemplateColumn.is() && _rxRowSetColumn.is(),
@@ -1727,7 +1707,7 @@ void ORowSet::impl_initializeColumnSettings_nothrow( const Reference< XPropertyS
PROPERTY_ALIGN, PROPERTY_RELATIVEPOSITION, PROPERTY_WIDTH, PROPERTY_HIDDEN, PROPERTY_CONTROLMODEL,
PROPERTY_HELPTEXT, PROPERTY_CONTROLDEFAULT
};
- for ( size_t i=0; i<sizeof( aPropertyNames ) / sizeof( aPropertyNames[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS( aPropertyNames ); ++i )
{
if ( xInfo->hasPropertyByName( aPropertyNames[i] ) )
{
@@ -1797,7 +1777,6 @@ void ORowSet::impl_initializeColumnSettings_nothrow( const Reference< XPropertyS
}
}
-// -----------------------------------------------------------------------------
void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotification)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "frank.schoenheit@sun.com", "ORowSet::execute_NoApprove_NoNewConn" );
@@ -1840,9 +1819,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
}
// get the locale
- // ConfigManager* pConfigMgr = ConfigManager::GetConfigManager();
Locale aLocale = SvtSysLocale().GetLocaleData().getLocale();
- // pConfigMgr->GetDirectConfigProperty(ConfigManager::LOCALE) >>= aLocale;
// get the numberformatTypes
OSL_ENSURE(m_xActiveConnection.is(),"No ActiveConnection");
@@ -1851,10 +1828,9 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
if ( xNumberFormat.is() )
m_xNumberFormatTypes.set(xNumberFormat->getNumberFormats(),UNO_QUERY);
- ::vos::ORef< ::connectivity::OSQLColumns> aColumns = new ::connectivity::OSQLColumns();
+ ::rtl::Reference< ::connectivity::OSQLColumns> aColumns = new ::connectivity::OSQLColumns();
::std::vector< ::rtl::OUString> aNames;
::rtl::OUString aDescription;
- sal_Int32 nFormatKey = 0;
const ::std::map<sal_Int32,sal_Int32>& rKeyColumns = m_pCache->getKeyColumns();
if(!m_xColumns.is())
@@ -1905,7 +1881,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
try
{
- nFormatKey = 0;
+ sal_Int32 nFormatKey = 0;
if(m_xNumberFormatTypes.is())
nFormatKey = ::dbtools::getDefaultNumberFormat(pColumn,m_xNumberFormatTypes,aLocale);
@@ -1948,7 +1924,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
m_xColumns->getByName(sColumnLabel) >>= xColumn;
if (!xColumn.is() && m_xColumns->hasByName(sName))
m_xColumns->getByName(sName) >>= xColumn;
-
+
// check if column already in the list we need another
if ( aAllColumns.find( xColumn ) != aAllColumns.end() )
{
@@ -1959,8 +1935,6 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
if(!xColumn.is())
{
// no column found so we could look at the position i
- //bReFetchName = sal_True;
- //sColumnLabel = ::rtl::OUString();
Reference<XIndexAccess> xIndexAccess(m_xColumns,UNO_QUERY);
if(xIndexAccess.is() && i <= xIndexAccess->getCount())
{
@@ -2000,9 +1974,9 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
sParseLabel,
m_aCurrentRow);
aColumns->get().push_back(pColumn);
-
+
pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_ISREADONLY,makeAny(rKeyColumns.find(i) != rKeyColumns.end()));
-
+
if(!sColumnLabel.getLength())
{
if(xColumn.is())
@@ -2033,7 +2007,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
// notify the rowset listeners
notifyAllListeners(_rClearForNotification);
}
-// -------------------------------------------------------------------------
+
// XRowSetApproveBroadcaster
void SAL_CALL ORowSet::addRowSetApproveListener( const Reference< XRowSetApproveListener >& listener ) throw(RuntimeException)
{
@@ -2043,7 +2017,7 @@ void SAL_CALL ORowSet::addRowSetApproveListener( const Reference< XRowSetApprove
m_aApproveListeners.addInterface(listener);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::removeRowSetApproveListener( const Reference< XRowSetApproveListener >& listener ) throw(RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -2061,7 +2035,7 @@ void SAL_CALL ORowSet::addRowsChangeListener( const Reference< XRowsChangeListen
m_aRowsChangeListener.addInterface(listener);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::removeRowsChangeListener( const Reference< XRowsChangeListener >& listener ) throw(RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -2070,7 +2044,6 @@ void SAL_CALL ORowSet::removeRowsChangeListener( const Reference< XRowsChangeLis
m_aRowsChangeListener.removeInterface(listener);
}
-// -------------------------------------------------------------------------
// XResultSetAccess
Reference< XResultSet > SAL_CALL ORowSet::createResultSet( ) throw(SQLException, RuntimeException)
@@ -2086,14 +2059,12 @@ Reference< XResultSet > SAL_CALL ORowSet::createResultSet( ) throw(SQLException
}
return Reference< XResultSet >();
}
-// -------------------------------------------------------------------------
// ::com::sun::star::util::XCancellable
void SAL_CALL ORowSet::cancel( ) throw(RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
}
-// -------------------------------------------------------------------------
// ::com::sun::star::sdbcx::XDeleteRows
Sequence< sal_Int32 > SAL_CALL ORowSet::deleteRows( const Sequence< Any >& rows ) throw(SQLException, RuntimeException)
@@ -2149,14 +2120,14 @@ Sequence< sal_Int32 > SAL_CALL ORowSet::deleteRows( const Sequence< Any >& rows
return aResults;
}
-// -----------------------------------------------------------------------------
+
void ORowSet::notifyRowSetAndClonesRowDelete( const Any& _rBookmark )
{
// notify ourself
onDeleteRow( _rBookmark );
// notify the clones
connectivity::OWeakRefArray::iterator aEnd = m_aClones.end();
- for (connectivity::OWeakRefArray::iterator i = m_aClones.begin(); aEnd != i; i++)
+ for (connectivity::OWeakRefArray::iterator i = m_aClones.begin(); aEnd != i; ++i)
{
Reference< XUnoTunnel > xTunnel(i->get(),UNO_QUERY);
if(xTunnel.is())
@@ -2167,14 +2138,14 @@ void ORowSet::notifyRowSetAndClonesRowDelete( const Any& _rBookmark )
}
}
}
-//------------------------------------------------------------------------------
+
void ORowSet::notifyRowSetAndClonesRowDeleted( const Any& _rBookmark, sal_Int32 _nPos )
{
// notify ourself
onDeletedRow( _rBookmark, _nPos );
// notify the clones
connectivity::OWeakRefArray::iterator aEnd = m_aClones.end();
- for (connectivity::OWeakRefArray::iterator i = m_aClones.begin(); aEnd != i; i++)
+ for (connectivity::OWeakRefArray::iterator i = m_aClones.begin(); aEnd != i; ++i)
{
Reference< XUnoTunnel > xTunnel(i->get(),UNO_QUERY);
if(xTunnel.is())
@@ -2185,7 +2156,7 @@ void ORowSet::notifyRowSetAndClonesRowDeleted( const Any& _rBookmark, sal_Int32
}
}
}
-//------------------------------------------------------------------------------
+
Reference< XConnection > ORowSet::calcConnection(const Reference< XInteractionHandler >& _rxHandler) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -2229,7 +2200,7 @@ Reference< XConnection > ORowSet::calcConnection(const Reference< XInteractionH
}
return m_xActiveConnection;
}
-//------------------------------------------------------------------------------
+
Reference< XNameAccess > ORowSet::impl_getTables_throw()
{
Reference< XNameAccess > xTables;
@@ -2262,14 +2233,13 @@ Reference< XNameAccess > ORowSet::impl_getTables_throw()
m_pTables = new OTableContainer(*this,m_aMutex,m_xActiveConnection,bCase,NULL,NULL,NULL,m_nInAppend);
xTables = m_pTables;
Sequence< ::rtl::OUString> aTableFilter(1);
- aTableFilter[0] = ::rtl::OUString::createFromAscii("%");
+ aTableFilter[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%"));
m_pTables->construct(aTableFilter,Sequence< ::rtl::OUString>());
}
return xTables;
}
-//------------------------------------------------------------------------------
void ORowSet::impl_resetTables_nothrow()
{
if ( !m_pTables )
@@ -2287,7 +2257,6 @@ void ORowSet::impl_resetTables_nothrow()
DELETEZ( m_pTables );
}
-//------------------------------------------------------------------------------
sal_Bool ORowSet::impl_initComposer_throw( ::rtl::OUString& _out_rCommandToExecute )
{
sal_Bool bUseEscapeProcessing = impl_buildActiveCommand_throw( );
@@ -2318,9 +2287,8 @@ sal_Bool ORowSet::impl_initComposer_throw( ::rtl::OUString& _out_rCommandToExecu
{ // append a "0=1" filter
// don't simply overwrite an existent filter, this would lead to problems if this existent
// filter contains paramters (since a keyset may add parameters itself)
- // 2003-12-12 - #23418# - fs@openoffice.org
m_xComposer->setElementaryQuery( m_xComposer->getQuery( ) );
- m_xComposer->setFilter( ::rtl::OUString::createFromAscii( "0 = 1" ) );
+ m_xComposer->setFilter( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "0 = 1" ) ) );
}
m_xComposer->setOrder( m_aOrder );
@@ -2335,11 +2303,10 @@ sal_Bool ORowSet::impl_initComposer_throw( ::rtl::OUString& _out_rCommandToExecu
impl_initParametersContainer_nothrow();
_out_rCommandToExecute = m_xComposer->getQueryWithSubstitution();
-
+
return bUseEscapeProcessing;
}
-//------------------------------------------------------------------------------
sal_Bool ORowSet::impl_buildActiveCommand_throw()
{
// create the sql command
@@ -2363,32 +2330,6 @@ sal_Bool ORowSet::impl_buildActiveCommand_throw()
Reference< XNameAccess > xTables( impl_getTables_throw() );
if ( xTables->hasByName(m_aCommand) )
{
-/*
- Reference< XPropertySet > xTable;
- try
- {
- xTables->getByName( m_aCommand ) >>= xTable;
- }
- catch(const WrappedTargetException& e)
- {
- SQLException e2;
- if ( e.TargetException >>= e2 )
- throw e2;
- }
- catch(Exception&)
- {
- DBG_UNHANDLED_EXCEPTION();
- }
-
- Reference<XColumnsSupplier> xSup(xTable,UNO_QUERY);
- if ( xSup.is() )
- m_xColumns = xSup->getColumns();
-
- sCommand = rtl::OUString::createFromAscii("SELECT * FROM ");
- ::rtl::OUString sCatalog, sSchema, sTable;
- ::dbtools::qualifiedNameComponents( m_xActiveConnection->getMetaData(), m_aCommand, sCatalog, sSchema, sTable, ::dbtools::eInDataManipulation );
- sCommand += ::dbtools::composeTableNameForSelect( m_xActiveConnection, sCatalog, sSchema, sTable );
-*/
}
else
{
@@ -2399,7 +2340,7 @@ sal_Bool ORowSet::impl_buildActiveCommand_throw()
}
else
{
- sCommand = rtl::OUString::createFromAscii("SELECT * FROM ");
+ sCommand = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT * FROM "));
::rtl::OUString sCatalog, sSchema, sTable;
::dbtools::qualifiedNameComponents( m_xActiveConnection->getMetaData(), m_aCommand, sCatalog, sSchema, sTable, ::dbtools::eInDataManipulation );
sCommand += ::dbtools::composeTableNameForSelect( m_xActiveConnection, sCatalog, sSchema, sTable );
@@ -2434,11 +2375,6 @@ sal_Bool ORowSet::impl_buildActiveCommand_throw()
xQuery->getPropertyValue(PROPERTY_UPDATE_TABLENAME) >>= aTable;
if(aTable.getLength())
m_aUpdateTableName = composeTableName( m_xActiveConnection->getMetaData(), aCatalog, aSchema, aTable, sal_False, ::dbtools::eInDataManipulation );
-/*
- Reference<XColumnsSupplier> xSup(xQuery,UNO_QUERY);
- if(xSup.is())
- m_xColumns = xSup->getColumns();
-*/
}
}
else
@@ -2466,7 +2402,6 @@ sal_Bool ORowSet::impl_buildActiveCommand_throw()
return bDoEscapeProcessing;
}
-//------------------------------------------------------------------------------
void ORowSet::impl_initParametersContainer_nothrow()
{
OSL_PRECOND( !m_pParameters.is(), "ORowSet::impl_initParametersContainer_nothrow: already initialized the parameters!" );
@@ -2480,7 +2415,6 @@ void ORowSet::impl_initParametersContainer_nothrow()
}
}
-//------------------------------------------------------------------------------
void ORowSet::impl_disposeParametersContainer_nothrow()
{
if ( !m_pParameters.is() )
@@ -2498,7 +2432,6 @@ void ORowSet::impl_disposeParametersContainer_nothrow()
m_pParameters = NULL;
}
-// -----------------------------------------------------------------------------
ORowSetValue& ORowSet::getParameterStorage(sal_Int32 parameterIndex)
{
::connectivity::checkDisposed( ORowSet_BASE1::rBHelper.bDisposed );
@@ -2531,7 +2464,7 @@ ORowSetValue& ORowSet::getParameterStorage(sal_Int32 parameterIndex)
m_aPrematureParamValues.get().resize( parameterIndex );
return m_aPrematureParamValues.get()[ parameterIndex - 1 ];
}
-// -------------------------------------------------------------------------
+
// XParameters
void SAL_CALL ORowSet::setNull( sal_Int32 parameterIndex, sal_Int32 /*sqlType*/ ) throw(SQLException, RuntimeException)
{
@@ -2539,12 +2472,12 @@ void SAL_CALL ORowSet::setNull( sal_Int32 parameterIndex, sal_Int32 /*sqlType*/
getParameterStorage( parameterIndex ).setNull();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& /*typeName*/ ) throw(SQLException, RuntimeException)
{
setNull( parameterIndex, sqlType );
}
-// -----------------------------------------------------------------------------
+
void ORowSet::setParameter(sal_Int32 parameterIndex, const ORowSetValue& x)
{
::osl::MutexGuard aGuard( m_aColumnsMutex );
@@ -2552,67 +2485,66 @@ void ORowSet::setParameter(sal_Int32 parameterIndex, const ORowSetValue& x)
getParameterStorage( parameterIndex ) = x;
}
-// -------------------------------------------------------------------------
void SAL_CALL ORowSet::setBoolean( sal_Int32 parameterIndex, sal_Bool x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setByte( sal_Int32 parameterIndex, sal_Int8 x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setShort( sal_Int32 parameterIndex, sal_Int16 x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setInt( sal_Int32 parameterIndex, sal_Int32 x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setLong( sal_Int32 parameterIndex, sal_Int64 x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setFloat( sal_Int32 parameterIndex, float x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setDouble( sal_Int32 parameterIndex, double x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setString( sal_Int32 parameterIndex, const ::rtl::OUString& x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setBytes( sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setDate( sal_Int32 parameterIndex, const ::com::sun::star::util::Date& x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setTime( sal_Int32 parameterIndex, const ::com::sun::star::util::Time& x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setTimestamp( sal_Int32 parameterIndex, const ::com::sun::star::util::DateTime& x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setBinaryStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aColumnsMutex );
@@ -2630,7 +2562,7 @@ void SAL_CALL ORowSet::setBinaryStream( sal_Int32 parameterIndex, const Referenc
throw SQLException();
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setCharacterStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aColumnsMutex );
@@ -2652,7 +2584,7 @@ void SAL_CALL ORowSet::setCharacterStream( sal_Int32 parameterIndex, const Refer
throw SQLException();
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setObject( sal_Int32 parameterIndex, const Any& x ) throw(SQLException, RuntimeException)
{
if ( !::dbtools::implSetObject( this, parameterIndex, x ) )
@@ -2660,7 +2592,7 @@ void SAL_CALL ORowSet::setObject( sal_Int32 parameterIndex, const Any& x ) throw
throw SQLException();
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 targetSqlType, sal_Int32 /*scale*/ ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aColumnsMutex );
@@ -2668,27 +2600,27 @@ void SAL_CALL ORowSet::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x
setObject( parameterIndex, x );
rParamValue.setTypeKind( targetSqlType );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setRef( sal_Int32 /*parameterIndex*/, const Reference< XRef >& /*x*/ ) throw(SQLException, RuntimeException)
{
::dbtools::throwFeatureNotImplementedException( "XParameters::setRef", *this );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setBlob( sal_Int32 /*parameterIndex*/, const Reference< XBlob >& /*x*/ ) throw(SQLException, RuntimeException)
{
::dbtools::throwFeatureNotImplementedException( "XParameters::setBlob", *this );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setClob( sal_Int32 /*parameterIndex*/, const Reference< XClob >& /*x*/ ) throw(SQLException, RuntimeException)
{
::dbtools::throwFeatureNotImplementedException( "XParameters::setClob", *this );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setArray( sal_Int32 /*parameterIndex*/, const Reference< XArray >& /*x*/ ) throw(SQLException, RuntimeException)
{
::dbtools::throwFeatureNotImplementedException( "XParameters::setArray", *this );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::clearParameters( ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -2701,21 +2633,18 @@ void SAL_CALL ORowSet::clearParameters( ) throw(SQLException, RuntimeException)
m_aParametersSet.clear();
}
-// -------------------------------------------------------------------------
Any SAL_CALL ORowSet::getWarnings( ) throw (SQLException, RuntimeException)
{
return m_aWarnings.getWarnings();
}
-// -------------------------------------------------------------------------
void SAL_CALL ORowSet::clearWarnings( ) throw (SQLException, RuntimeException)
{
m_aWarnings.clearWarnings();
}
-// -----------------------------------------------------------------------------
+
void ORowSet::doCancelModification( )
{
- //OSL_ENSURE( isModification(), "ORowSet::doCancelModification: invalid call (no cache!)!" );
if ( isModification() )
{
// read-only flag restored
@@ -2726,25 +2655,26 @@ void ORowSet::doCancelModification( )
m_bIsInsertRow = sal_False;
}
-// -----------------------------------------------------------------------------
sal_Bool ORowSet::isModification( )
{
return isNew();
}
-// -----------------------------------------------------------------------------
sal_Bool ORowSet::isModified( )
{
return m_bModified;
}
-// -----------------------------------------------------------------------------
sal_Bool ORowSet::isNew( )
{
return m_bNew;
}
-// -----------------------------------------------------------------------------
+sal_Bool ORowSet::isPropertyChangeNotificationEnabled() const
+{
+ return m_bPropChangeNotifyEnabled;
+}
+
void ORowSet::checkUpdateIterator()
{
if(!m_bIsInsertRow)
@@ -2754,7 +2684,7 @@ void ORowSet::checkUpdateIterator()
m_bIsInsertRow = sal_True;
}
}
-// -----------------------------------------------------------------------------
+
void ORowSet::checkUpdateConditions(sal_Int32 columnIndex)
{
checkCache();
@@ -2770,10 +2700,10 @@ void ORowSet::checkUpdateConditions(sal_Int32 columnIndex)
if ( columnIndex <= 0 || sal_Int32((*m_aCurrentRow)->get().size()) <= columnIndex )
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_INVALID_INDEX ), SQL_INVALID_DESCRIPTOR_INDEX, *this );
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ORowSet::refreshRow( ) throw(SQLException, RuntimeException)
{
-
+
ORowSetNotifier aNotifier( this );
// this will call cancelRowModification on the cache if necessary
@@ -2788,7 +2718,7 @@ void SAL_CALL ORowSet::refreshRow( ) throw(SQLException, RuntimeException)
// - IsNew
aNotifier.fire( );
}
-// -----------------------------------------------------------------------------
+
void ORowSet::impl_rebuild_throw(::osl::ResettableMutexGuard& _rGuard)
{
Reference< XResultSet > xResultSet( m_xStatement->executeQuery() );
@@ -2800,7 +2730,7 @@ void ORowSet::impl_rebuild_throw(::osl::ResettableMutexGuard& _rGuard)
// ORowSetClone
// ***********************************************************
DBG_NAME(ORowSetClone);
-//--------------------------------------------------------------------------
+
ORowSetClone::ORowSetClone( const ::comphelper::ComponentContext& _rContext, ORowSet& rParent, ::osl::Mutex* _pMutex )
:OSubComponent(m_aMutex, rParent)
,ORowSetBase( _rContext, OComponentHelper::rBHelper, _pMutex )
@@ -2824,13 +2754,10 @@ ORowSetClone::ORowSetClone( const ::comphelper::ComponentContext& _rContext, ORo
m_aOldRow = m_pCache->registerOldRow();
- ::vos::ORef< ::connectivity::OSQLColumns> aColumns = new ::connectivity::OSQLColumns();
+ ::rtl::Reference< ::connectivity::OSQLColumns> aColumns = new ::connectivity::OSQLColumns();
::std::vector< ::rtl::OUString> aNames;
::rtl::OUString aDescription;
- // ConfigManager* pConfigMgr = ConfigManager::GetConfigManager();
- // Locale aLocale;
- // pConfigMgr->GetDirectConfigProperty(ConfigManager::LOCALE) >>= aLocale;
Locale aLocale = SvtSysLocale().GetLocaleData().getLocale();
if ( rParent.m_pColumns )
@@ -2873,7 +2800,7 @@ ORowSetClone::ORowSetClone( const ::comphelper::ComponentContext& _rContext, ORo
pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_HELPTEXT,xColumn->getPropertyValue(PROPERTY_HELPTEXT));
pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_CONTROLDEFAULT,xColumn->getPropertyValue(PROPERTY_CONTROLDEFAULT));
- } // for(sal_Int32 i=1;pIter != pEnd ;++pIter,++i)
+ }
}
Reference<XDatabaseMetaData> xMeta = rParent.m_xActiveConnection->getMetaData();
m_pColumns = new ORowSetDataColumns(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers(),
@@ -2882,7 +2809,6 @@ ORowSetClone::ORowSetClone( const ::comphelper::ComponentContext& _rContext, ORo
sal_Int32 nRT = PropertyAttribute::READONLY | PropertyAttribute::TRANSIENT;
// sdb.RowSet Properties
- // registerProperty(PROPERTY_CURSORNAME, PROPERTY_ID_CURSORNAME, PropertyAttribute::READONLY, &m_aDataSourceName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
registerMayBeVoidProperty(PROPERTY_ACTIVE_CONNECTION,PROPERTY_ID_ACTIVE_CONNECTION, PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, &rParent.m_aActiveConnection, ::getCppuType(reinterpret_cast< Reference< XConnection >* >(NULL)));
registerProperty(PROPERTY_RESULTSETCONCURRENCY, PROPERTY_ID_RESULTSETCONCURRENCY, PropertyAttribute::READONLY, &m_nResultSetConcurrency,::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
registerProperty(PROPERTY_RESULTSETTYPE, PROPERTY_ID_RESULTSETTYPE, PropertyAttribute::READONLY, &m_nResultSetType, ::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
@@ -2891,19 +2817,18 @@ ORowSetClone::ORowSetClone( const ::comphelper::ComponentContext& _rContext, ORo
registerProperty(PROPERTY_ISBOOKMARKABLE, PROPERTY_ID_ISBOOKMARKABLE, nRT, &m_bIsBookmarable, ::getBooleanCppuType());
}
-//--------------------------------------------------------------------------
ORowSetClone::~ORowSetClone()
{
DBG_DTOR(ORowSetClone, NULL);
}
+
// com::sun::star::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > ORowSetClone::getTypes() throw (RuntimeException)
{
return ::comphelper::concatSequences(OSubComponent::getTypes(),ORowSetBase::getTypes());
}
+
// com::sun::star::XInterface
-//--------------------------------------------------------------------------
Any ORowSetClone::queryInterface( const Type & rType ) throw (RuntimeException)
{
Any aRet = ORowSetBase::queryInterface(rType);
@@ -2911,32 +2836,28 @@ Any ORowSetClone::queryInterface( const Type & rType ) throw (RuntimeException)
aRet = OSubComponent::queryInterface(rType);
return aRet;
}
-//------------------------------------------------------------------------------
+
void ORowSetClone::acquire() throw()
{
OSubComponent::acquire();
}
-//------------------------------------------------------------------------------
void ORowSetClone::release() throw()
{
OSubComponent::release();
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString ORowSetClone::getImplementationName( ) throw(RuntimeException)
{
- return rtl::OUString::createFromAscii("com.sun.star.sdb.ORowSetClone");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ORowSetClone"));
}
-//------------------------------------------------------------------------------
sal_Bool ORowSetClone::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > ORowSetClone::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
@@ -2946,7 +2867,6 @@ Sequence< ::rtl::OUString > ORowSetClone::getSupportedServiceNames( ) throw (Ru
}
// OComponentHelper
-//------------------------------------------------------------------------------
void ORowSetClone::disposing()
{
MutexGuard aGuard( m_aMutex );
@@ -2958,7 +2878,6 @@ void ORowSetClone::disposing()
}
// XCloseable
-//------------------------------------------------------------------------------
void ORowSetClone::close(void) throw( SQLException, RuntimeException )
{
{
@@ -2968,7 +2887,6 @@ void ORowSetClone::close(void) throw( SQLException, RuntimeException )
}
dispose();
}
-// -------------------------------------------------------------------------
// comphelper::OPropertyArrayUsageHelper
::cppu::IPropertyArrayHelper* ORowSetClone::createArrayHelper( ) const
@@ -2977,7 +2895,6 @@ void ORowSetClone::close(void) throw( SQLException, RuntimeException )
describeProperties(aProps);
return new ::cppu::OPropertyArrayHelper(aProps);
}
-// -------------------------------------------------------------------------
// cppu::OPropertySetHelper
::cppu::IPropertyArrayHelper& SAL_CALL ORowSetClone::getInfoHelper()
@@ -2985,8 +2902,7 @@ void ORowSetClone::close(void) throw( SQLException, RuntimeException )
typedef ::comphelper::OPropertyArrayUsageHelper<ORowSetClone> ORowSetClone_PROP;
return *ORowSetClone_PROP::getArrayHelper();
}
-// -------------------------------------------------------------------------
-//--------------------------------------------------------------------------
+
Sequence< sal_Int8 > ORowSetClone::getUnoTunnelImplementationId()
{
static ::cppu::OImplementationId * pId = 0;
@@ -3001,7 +2917,7 @@ Sequence< sal_Int8 > ORowSetClone::getUnoTunnelImplementationId()
}
return pId->getImplementationId();
}
-// -----------------------------------------------------------------------------
+
// com::sun::star::XUnoTunnel
sal_Int64 SAL_CALL ORowSetClone::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
@@ -3010,7 +2926,7 @@ sal_Int64 SAL_CALL ORowSetClone::getSomething( const Sequence< sal_Int8 >& rId )
return 0;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ORowSetClone::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)
{
if ( nHandle == PROPERTY_ID_FETCHSIZE )
@@ -3022,46 +2938,40 @@ void SAL_CALL ORowSetClone::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,c
OPropertyStateContainer::setFastPropertyValue_NoBroadcast(nHandle,rValue);
}
-// -----------------------------------------------------------------------------
void ORowSetClone::doCancelModification( )
{
- //OSL_ENSURE( sal_False, "ORowSetClone::doCancelModification: invalid call!" );
}
-// -----------------------------------------------------------------------------
sal_Bool ORowSetClone::isModification( )
{
return sal_False;
}
-// -----------------------------------------------------------------------------
sal_Bool ORowSetClone::isModified( )
{
return sal_False;
}
-// -----------------------------------------------------------------------------
sal_Bool ORowSetClone::isNew( )
{
return sal_False;
}
-// -------------------------------------------------------------------------
void SAL_CALL ORowSetClone::execute( ) throw(SQLException, RuntimeException)
{
throwFunctionNotSupportedException( "RowSetClone::XRowSet::execute", *this );
}
-// -------------------------------------------------------------------------
void SAL_CALL ORowSetClone::addRowSetListener( const Reference< XRowSetListener >& ) throw(RuntimeException)
{
throwFunctionNotSupportedException( "RowSetClone::XRowSet", *this );
}
-// -------------------------------------------------------------------------
void SAL_CALL ORowSetClone::removeRowSetListener( const Reference< XRowSetListener >& ) throw(RuntimeException)
{
throwFunctionNotSupportedException( "RowSetClone::XRowSet", *this );
}
} // dbaccess
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/RowSet.hxx b/dbaccess/source/core/api/RowSet.hxx
index fdd0ecb85..d4b92170a 100644
--- a/dbaccess/source/core/api/RowSet.hxx
+++ b/dbaccess/source/core/api/RowSet.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -99,8 +100,8 @@ namespace dbaccess
*/
ORowSetValueVector m_aPrematureParamValues;
ORowSetValueVector m_aParameterValueForCache;
- ::std::bit_vector m_aParametersSet;
- ::std::bit_vector m_aReadOnlyDataColumns;
+ ::std::vector<bool> m_aParametersSet;
+ ::std::vector<bool> m_aReadOnlyDataColumns;
::cppu::OInterfaceContainerHelper m_aRowsetListeners;
::cppu::OInterfaceContainerHelper m_aApproveListeners;
@@ -145,6 +146,7 @@ namespace dbaccess
sal_Bool m_bNew ;
sal_Bool m_bCanUpdateInsertedRows;
sal_Bool m_bOwnConnection;
+ sal_Bool m_bPropChangeNotifyEnabled;
private:
/** builds m_aActiveCommand from our settings
@@ -177,7 +179,7 @@ namespace dbaccess
m_xActiveConnection points to a valid SDB-level connection
@throws com::sun::star::sdb::SQLException
- if an database-related error occured
+ if an database-related error occurred
@throws com::sun::star::uno::RuntimeException
if any of the components involved throws a com::sun::star::uno::RuntimeException
@@ -248,6 +250,7 @@ namespace dbaccess
virtual sal_Bool isModification( );
virtual sal_Bool isModified( );
virtual sal_Bool isNew( );
+ virtual sal_Bool isPropertyChangeNotificationEnabled() const;
virtual ~ORowSet();
@@ -542,3 +545,4 @@ namespace dbaccess
}
#endif // DBACCESS_CORE_API_ROWSET_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index 97719fc36..81fbd93ea 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -70,7 +71,6 @@ namespace dbaccess
// =========================================================================
// = OEmptyCollection
// =========================================================================
-// -------------------------------------------------------------------------
class OEmptyCollection : public sdbcx::OCollection
{
protected:
@@ -79,22 +79,21 @@ protected:
public:
OEmptyCollection(::cppu::OWeakObject& _rParent,::osl::Mutex& _rMutex) : OCollection(_rParent,sal_True,_rMutex,::std::vector< ::rtl::OUString>()){}
};
-// -----------------------------------------------------------------------------
+
void OEmptyCollection::impl_refresh() throw(RuntimeException)
{
}
-// -----------------------------------------------------------------------------
+
connectivity::sdbcx::ObjectType OEmptyCollection::createObject(const ::rtl::OUString& /*_rName*/)
{
return connectivity::sdbcx::ObjectType();
}
-// -----------------------------------------------------------------------------
// =========================================================================
// = ORowSetBase
// =========================================================================
DBG_NAME(ORowSetBase)
-// -------------------------------------------------------------------------
+
ORowSetBase::ORowSetBase( const ::comphelper::ComponentContext& _rContext, ::cppu::OBroadcastHelper& _rBHelper, ::osl::Mutex* _pMutex )
:OPropertyStateContainer(_rBHelper)
,m_pMutex(_pMutex)
@@ -124,7 +123,7 @@ ORowSetBase::ORowSetBase( const ::comphelper::ComponentContext& _rContext, ::cpp
registerPropertyNoMember( PROPERTY_ROWCOUNT, PROPERTY_ID_ROWCOUNT, nRBT, ::getCppuType( &nInitialRowCountValue ), &nInitialRowCountValue );
registerPropertyNoMember( PROPERTY_ISROWCOUNTFINAL, PROPERTY_ID_ISROWCOUNTFINAL, nRBT, ::getBooleanCppuType(), &bInitialRowCountFinalValue );
}
-// -----------------------------------------------------------------------------
+
ORowSetBase::~ORowSetBase()
{
if(m_pColumns)
@@ -141,15 +140,15 @@ ORowSetBase::~ORowSetBase()
DBG_DTOR(ORowSetBase,NULL);
}
+
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > ORowSetBase::getTypes() throw (RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getTypes" );
return ::comphelper::concatSequences(ORowSetBase_BASE::getTypes(),OPropertyStateContainer::getTypes());
}
+
// com::sun::star::uno::XInterface
-//--------------------------------------------------------------------------
Any ORowSetBase::queryInterface( const Type & rType ) throw (RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::queryInterface" );
@@ -158,7 +157,7 @@ Any ORowSetBase::queryInterface( const Type & rType ) throw (RuntimeException)
aRet = OPropertyStateContainer::queryInterface(rType);
return aRet;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSetBase::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getFastPropertyValue" );
@@ -179,7 +178,7 @@ void SAL_CALL ORowSetBase::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) c
else
OPropertyStateContainer::getFastPropertyValue(rValue,nHandle);
}
-// -------------------------------------------------------------------------
+
// OComponentHelper
void SAL_CALL ORowSetBase::disposing(void)
{
@@ -198,7 +197,7 @@ void SAL_CALL ORowSetBase::disposing(void)
}
m_pCache = NULL;
}
-// -------------------------------------------------------------------------
+
// comphelper::OPropertyArrayUsageHelper
::cppu::IPropertyArrayHelper* ORowSetBase::createArrayHelper( ) const
{
@@ -207,14 +206,14 @@ void SAL_CALL ORowSetBase::disposing(void)
describeProperties(aProps);
return new ::cppu::OPropertyArrayHelper(aProps);
}
-// -------------------------------------------------------------------------
+
// cppu::OPropertySetHelper
::cppu::IPropertyArrayHelper& SAL_CALL ORowSetBase::getInfoHelper()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getInfoHelper" );
return *const_cast<ORowSetBase*>(this)->getArrayHelper();
}
-// -------------------------------------------------------------------------
+
// XRow
sal_Bool SAL_CALL ORowSetBase::wasNull( ) throw(SQLException, RuntimeException)
{
@@ -223,27 +222,26 @@ sal_Bool SAL_CALL ORowSetBase::wasNull( ) throw(SQLException, RuntimeException)
checkCache();
return impl_wasNull();
}
-// -----------------------------------------------------------------------------
+
sal_Bool ORowSetBase::impl_wasNull()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::impl_wasNull" );
- return ((m_nLastColumnIndex != -1) && !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid()) ? ((*m_aCurrentRow)->get())[m_nLastColumnIndex].isNull() : sal_True;
+ return ((m_nLastColumnIndex != -1) && !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is()) ? ((*m_aCurrentRow)->get())[m_nLastColumnIndex].isNull() : sal_True;
}
-// -----------------------------------------------------------------------------
const ORowSetValue& ORowSetBase::getValue(sal_Int32 columnIndex)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getValue" );
checkCache();
return impl_getValue(columnIndex);
}
-// -----------------------------------------------------------------------------
+
const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex)
-{
+{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::impl_getValue" );
if ( m_bBeforeFirst || m_bAfterLast )
{
- OSL_ENSURE(0,"ORowSetBase::getValue: Illegal call here (we're before first or after last)!");
+ OSL_FAIL("ORowSetBase::getValue: Illegal call here (we're before first or after last)!");
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_CURSOR_BEFORE_OR_AFTER ), SQL_INVALID_CURSOR_POSITION, *m_pMySelf );
}
@@ -252,7 +250,7 @@ const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex)
return m_aEmptyValue;
}
- bool bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid() );
+ bool bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is() );
if ( !bValidCurrentRow )
{
// currentrow is null when the clone moves the window
@@ -261,7 +259,7 @@ const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex)
m_bIsInsertRow = sal_False;
OSL_ENSURE(!m_aCurrentRow.isNull(),"ORowSetBase::getValue: we don't stand on a valid row! Row is null.");
- bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid() );
+ bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is() );
}
if ( bValidCurrentRow )
@@ -278,14 +276,14 @@ const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex)
ORowSetMatrix::iterator k = aHelper.aIterator;
for (; k != m_pCache->getEnd(); ++k)
{
- ORowSetValueVector* pTemp = k->getBodyPtr();
+ ORowSetValueVector* pTemp = k->get();
OSL_ENSURE( pTemp != (void*)0xfeeefeee,"HALT!" );
}
#endif
OSL_ENSURE(!m_aCurrentRow.isNull() && m_aCurrentRow < m_pCache->getEnd() && aCacheIter != m_pCache->m_aCacheIterators.end(),"Invalid iterator set for currentrow!");
#if OSL_DEBUG_LEVEL > 0
ORowSetRow rRow = (*m_aCurrentRow);
- OSL_ENSURE(rRow.isValid() && static_cast<sal_uInt16>(columnIndex) < (rRow->get()).size(),"Invalid size of vector!");
+ OSL_ENSURE(rRow.is() && static_cast<sal_uInt16>(columnIndex) < (rRow->get()).size(),"Invalid size of vector!");
#endif
return ((*m_aCurrentRow)->get())[m_nLastColumnIndex = columnIndex];
}
@@ -293,100 +291,100 @@ const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex)
// we should normally never reach this
return m_aEmptyValue;
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL ORowSetBase::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getString" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getBoolean" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int8 SAL_CALL ORowSetBase::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getByte" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int16 SAL_CALL ORowSetBase::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getShort" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL ORowSetBase::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getInt" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int64 SAL_CALL ORowSetBase::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getLong" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
float SAL_CALL ORowSetBase::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getFloat" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
double SAL_CALL ORowSetBase::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getDouble" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
Sequence< sal_Int8 > SAL_CALL ORowSetBase::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getBytes" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::Date SAL_CALL ORowSetBase::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getDate" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::Time SAL_CALL ORowSetBase::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getTime" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::DateTime SAL_CALL ORowSetBase::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getTimestamp" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSetBase::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getBinaryStream" );
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
-
+
if ( m_bBeforeFirst || m_bAfterLast )
{
- OSL_ENSURE(0,"ORowSetBase::getBinaryStream: Illegal call here (we're before first or after last)!");
+ OSL_FAIL("ORowSetBase::getBinaryStream: Illegal call here (we're before first or after last)!");
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_CURSOR_BEFORE_OR_AFTER ), SQL_INVALID_CURSOR_POSITION, *m_pMySelf );
}
@@ -395,7 +393,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSetBase::getBinaryS
return NULL;
}
- bool bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid() );
+ bool bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is() );
if ( !bValidCurrentRow )
{
positionCache( MOVE_NONE_REFRESH_ONLY );
@@ -403,7 +401,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSetBase::getBinaryS
m_bIsInsertRow = sal_False;
OSL_ENSURE(!m_aCurrentRow.isNull(),"ORowSetBase::getBinaryStream: we don't stand on a valid row! Row is null.");
- bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid() );
+ bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is() );
}
if ( bValidCurrentRow )
@@ -412,13 +410,13 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSetBase::getBinaryS
// we should normally never reach this
return Reference< ::com::sun::star::io::XInputStream >();
}
-// -------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSetBase::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getCharacterStream" );
return getBinaryStream(columnIndex);
}
-// -------------------------------------------------------------------------
+
Any SAL_CALL ORowSetBase::getObject( sal_Int32 columnIndex, const Reference< XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getObject" );
@@ -427,42 +425,42 @@ Any SAL_CALL ORowSetBase::getObject( sal_Int32 columnIndex, const Reference< XNa
return getValue(columnIndex).makeAny();
}
-// -------------------------------------------------------------------------
+
Reference< XRef > SAL_CALL ORowSetBase::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getRef" );
::dbtools::throwFeatureNotImplementedException( "XRow::getRef", *m_pMySelf );
return NULL;
}
-// -------------------------------------------------------------------------
+
Reference< XBlob > SAL_CALL ORowSetBase::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getBlob" );
return Reference< XBlob >(getValue(columnIndex).makeAny(),UNO_QUERY);
}
-// -------------------------------------------------------------------------
+
Reference< XClob > SAL_CALL ORowSetBase::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getClob" );
return Reference< XClob >(getValue(columnIndex).makeAny(),UNO_QUERY);
}
-// -------------------------------------------------------------------------
+
Reference< XArray > SAL_CALL ORowSetBase::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getArray" );
::dbtools::throwFeatureNotImplementedException( "XRow::getArray", *m_pMySelf );
return NULL;
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::sdbcx::XRowLocate
Any SAL_CALL ORowSetBase::getBookmark( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getBookmark" );
- DBG_TRACE2("DBACCESS ORowSetBase::getBookmark() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::getBookmark() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
-
+
if ( m_bBeforeFirst || m_bAfterLast )
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_BOOKMARK_BEFORE_OR_AFTER ), SQL_INVALID_CURSOR_POSITION, *m_pMySelf );
@@ -472,20 +470,20 @@ Any SAL_CALL ORowSetBase::getBookmark( ) throw(SQLException, RuntimeException)
OSL_ENSURE( m_aBookmark.hasValue(), "ORowSetBase::getBookmark: bookmark has no value!" );
return m_aBookmark;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::moveToBookmark" );
- DBG_TRACE2("DBACCESS ORowSetBase::moveToBookmark(Any) Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::moveToBookmark(Any) Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
OSL_ENSURE(bookmark.hasValue(),"ORowSetBase::moveToBookmark bookmark has no value!");
::osl::ResettableMutexGuard aGuard( *m_pMutex );
if(!bookmark.hasValue() || m_nResultSetType == ResultSetType::FORWARD_ONLY)
{
if(bookmark.hasValue())
- OSL_ENSURE(0,"MoveToBookmark is not possible when we are only forward");
+ OSL_FAIL("MoveToBookmark is not possible when we are only forward");
else
- OSL_ENSURE(0,"Bookmark is not valid");
+ OSL_FAIL("Bookmark is not valid");
throwFunctionSequenceException(*m_pMySelf);
}
@@ -521,14 +519,14 @@ sal_Bool SAL_CALL ORowSetBase::moveToBookmark( const Any& bookmark ) throw(SQLEx
// - IsNew
aNotifier.fire( );
}
- DBG_TRACE2("DBACCESS ORowSetBase::moveToBookmark(Any) = %i Clone = %i\n",bRet,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::moveToBookmark(Any) = %i Clone = %i\n",bRet,m_bClone);
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::moveRelativeToBookmark" );
- DBG_TRACE2("DBACCESS ORowSetBase::moveRelativeToBookmark(Any,%i) Clone = %i\n",rows,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::moveRelativeToBookmark(Any,%i) Clone = %i\n",rows,m_bClone);
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::ResettableMutexGuard aGuard( *m_pMutex );
@@ -565,10 +563,10 @@ sal_Bool SAL_CALL ORowSetBase::moveRelativeToBookmark( const Any& bookmark, sal_
// RowCount/IsRowCountFinal
fireRowcount();
}
- DBG_TRACE3("DBACCESS ORowSetBase::moveRelativeToBookmark(Any,%i) = %i Clone = %i\n",rows,bRet,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::moveRelativeToBookmark(Any,%i) = %i Clone = %i\n",rows,bRet,m_bClone);
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL ORowSetBase::compareBookmarks( const Any& _first, const Any& _second ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::compareBookmarks" );
@@ -576,7 +574,7 @@ sal_Int32 SAL_CALL ORowSetBase::compareBookmarks( const Any& _first, const Any&
checkCache();
return m_pCache->compareBookmarks(_first,_second);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::hasOrderedBookmarks( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::hasOrderedBookmarks" );
@@ -584,7 +582,7 @@ sal_Bool SAL_CALL ORowSetBase::hasOrderedBookmarks( ) throw(SQLException, Runti
checkCache();
return m_pCache->hasOrderedBookmarks();
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL ORowSetBase::hashBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::hashBookmark" );
@@ -592,8 +590,7 @@ sal_Int32 SAL_CALL ORowSetBase::hashBookmark( const Any& bookmark ) throw(SQLExc
checkCache();
return m_pCache->hashBookmark(bookmark);
}
-// -------------------------------------------------------------------------
-// -------------------------------------------------------------------------
+
// XResultSetMetaDataSupplier
Reference< XResultSetMetaData > SAL_CALL ORowSetBase::getMetaData( ) throw(SQLException, RuntimeException)
{
@@ -606,7 +603,6 @@ Reference< XResultSetMetaData > SAL_CALL ORowSetBase::getMetaData( ) throw(SQLE
return xMeta;
}
-// -------------------------------------------------------------------------
// XColumnLocate
sal_Int32 SAL_CALL ORowSetBase::findColumn( const ::rtl::OUString& columnName ) throw(SQLException, RuntimeException)
@@ -615,10 +611,9 @@ sal_Int32 SAL_CALL ORowSetBase::findColumn( const ::rtl::OUString& columnName )
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::MutexGuard aGuard( m_aColumnsMutex );
- // it is possible to save some time her when we remember the names - position relation in a map
+ // it is possible to save some time here when we remember the names - position relation in a map
return m_pColumns ? m_pColumns->findColumn(columnName) : sal_Int32(0);
}
-// -------------------------------------------------------------------------
// ::com::sun::star::sdbcx::XColumnsSupplier
Reference< XNameAccess > SAL_CALL ORowSetBase::getColumns( ) throw(RuntimeException)
@@ -636,12 +631,12 @@ Reference< XNameAccess > SAL_CALL ORowSetBase::getColumns( ) throw(RuntimeExcep
return m_pColumns;
}
-// -------------------------------------------------------------------------
+
// XResultSet
sal_Bool SAL_CALL ORowSetBase::next( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::next" );
- DBG_TRACE2("DBACCESS ORowSetBase::next() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::next() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::osl::ResettableMutexGuard aGuard( *m_pMutex );
checkCache();
@@ -660,7 +655,6 @@ sal_Bool SAL_CALL ORowSetBase::next( ) throw(SQLException, RuntimeException)
sal_Bool bAfterLast = m_pCache->isAfterLast();
bRet = m_pCache->next();
doCancelModification( );
-
if ( bRet || bAfterLast != m_pCache->isAfterLast() )
{
@@ -684,10 +678,10 @@ sal_Bool SAL_CALL ORowSetBase::next( ) throw(SQLException, RuntimeException)
// - RowCount/IsRowCountFinal
fireRowcount();
}
- DBG_TRACE3("DBACCESS ORowSetBase::next() = %i Clone = %i ID = %i\n",bRet,m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::next() = %i Clone = %i ID = %i\n",bRet,m_bClone,osl_getThreadIdentifier(NULL));
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::isBeforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::isBeforeFirst" );
@@ -695,32 +689,32 @@ sal_Bool SAL_CALL ORowSetBase::isBeforeFirst( ) throw(SQLException, RuntimeExce
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
- DBG_TRACE2("DBACCESS ORowSetBase::isBeforeFirst() = %i Clone = %i\n",m_bBeforeFirst,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::isBeforeFirst() = %i Clone = %i\n",m_bBeforeFirst,m_bClone);
return m_bBeforeFirst;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::isAfterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::isAfterLast" );
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
- DBG_TRACE2("DBACCESS ORowSetBase::isAfterLast() = %i Clone = %i\n",m_bAfterLast,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::isAfterLast() = %i Clone = %i\n",m_bAfterLast,m_bClone);
return m_bAfterLast;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetBase::isOnFirst()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::isOnFirst" );
return isFirst();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::isFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::isFirst" );
- DBG_TRACE2("DBACCESS ORowSetBase::isFirst() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::isFirst() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::MutexGuard aGuard( *m_pMutex );
@@ -735,20 +729,20 @@ sal_Bool SAL_CALL ORowSetBase::isFirst( ) throw(SQLException, RuntimeException)
positionCache( MOVE_NONE_REFRESH_ONLY );
sal_Bool bIsFirst = m_pCache->isFirst();
- DBG_TRACE2("DBACCESS ORowSetBase::isFirst() = %i Clone = %i\n",bIsFirst,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::isFirst() = %i Clone = %i\n",bIsFirst,m_bClone);
return bIsFirst;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetBase::isOnLast()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::isOnLast" );
return isLast();
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::isLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::isLast" );
- DBG_TRACE2("DBACCESS ORowSetBase::isLast() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::isLast() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
@@ -767,14 +761,14 @@ sal_Bool SAL_CALL ORowSetBase::isLast( ) throw(SQLException, RuntimeException)
positionCache( MOVE_NONE_REFRESH_ONLY );
sal_Bool bIsLast = m_pCache->isLast();
- DBG_TRACE2("DBACCESS ORowSetBase::isLast() = %i Clone = %i\n",bIsLast,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::isLast() = %i Clone = %i\n",bIsLast,m_bClone);
return bIsLast;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSetBase::beforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::beforeFirst" );
- DBG_TRACE2("DBACCESS ORowSetBase::beforeFirst() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::beforeFirst() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::ResettableMutexGuard aGuard( *m_pMutex );
@@ -810,13 +804,13 @@ void SAL_CALL ORowSetBase::beforeFirst( ) throw(SQLException, RuntimeException)
// to be done _after_ the notifications!
m_aOldRow->clearRow();
}
- DBG_TRACE2("DBACCESS ORowSetBase::beforeFirst() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::beforeFirst() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSetBase::afterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::afterLast" );
- DBG_TRACE2("DBACCESS ORowSetBase::afterLast() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::afterLast() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::ResettableMutexGuard aGuard( *m_pMutex );
@@ -850,14 +844,14 @@ void SAL_CALL ORowSetBase::afterLast( ) throw(SQLException, RuntimeException)
fireRowcount();
}
}
- DBG_TRACE2("DBACCESS ORowSetBase::afterLast() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::afterLast() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::move( ::std::mem_fun_t<sal_Bool,ORowSetBase>& _aCheckFunctor,
::std::mem_fun_t<sal_Bool,ORowSetCache>& _aMovementFunctor)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::move" );
- DBG_TRACE2("DBACCESS ORowSetBase::move() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::move() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::ResettableMutexGuard aGuard( *m_pMutex );
checkPositioningAllowed();
@@ -897,40 +891,40 @@ sal_Bool SAL_CALL ORowSetBase::move( ::std::mem_fun_t<sal_Bool,ORowSetBase>& _aC
// - RowCount/IsRowCountFinal
fireRowcount();
}
- DBG_TRACE2("DBACCESS ORowSetBase::move() = %i Clone = %i\n",bRet,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::move() = %i Clone = %i\n",bRet,m_bClone);
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::first( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::first" );
- DBG_TRACE2("DBACCESS ORowSetBase::first() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::first() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::std::mem_fun_t<sal_Bool,ORowSetBase> ioF_tmp(&ORowSetBase::isOnFirst);
::std::mem_fun_t<sal_Bool,ORowSetCache> F_tmp(&ORowSetCache::first);
return move(ioF_tmp,F_tmp);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::last( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::last" );
- DBG_TRACE2("DBACCESS ORowSetBase::last() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::last() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::std::mem_fun_t<sal_Bool,ORowSetBase> ioL_tmp(&ORowSetBase::isOnLast);
::std::mem_fun_t<sal_Bool,ORowSetCache> L_tmp(&ORowSetCache::last);
return move(ioL_tmp,L_tmp);
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL ORowSetBase::getRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getRow" );
- DBG_TRACE2("DBACCESS ORowSetBase::getRow() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::getRow() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::osl::MutexGuard aGuard( *m_pMutex );
-
+
checkCache();
return impl_getRow();
}
-// -------------------------------------------------------------------------
+
sal_Int32 ORowSetBase::impl_getRow()
-{
+{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::impl_getRow" );
sal_Int32 nPos = 0;
if ( m_bBeforeFirst )
@@ -952,14 +946,14 @@ sal_Int32 ORowSetBase::impl_getRow()
}
nPos = m_pCache->getRow();
}
- DBG_TRACE3("DBACCESS ORowSetBase::impl_getRow() = %i Clone = %i ID = %i\n",nPos,m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::impl_getRow() = %i Clone = %i ID = %i\n",nPos,m_bClone,osl_getThreadIdentifier(NULL));
return nPos;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::absolute( sal_Int32 row ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::absolute" );
- DBG_TRACE2("DBACCESS ORowSetBase::absolute(%i) Clone = %i\n",row,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::absolute(%i) Clone = %i\n",row,m_bClone);
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::ResettableMutexGuard aGuard( *m_pMutex );
checkPositioningAllowed();
@@ -998,14 +992,14 @@ sal_Bool SAL_CALL ORowSetBase::absolute( sal_Int32 row ) throw(SQLException, Run
// - RowCount/IsRowCountFinal
fireRowcount();
}
- DBG_TRACE3("DBACCESS ORowSetBase::absolute(%i) = %i Clone = %i\n",row,bRet,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::absolute(%i) = %i Clone = %i\n",row,bRet,m_bClone);
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::relative( sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::relative" );
- DBG_TRACE2("DBACCESS ORowSetBase::relative(%i) Clone = %i\n",rows,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::relative(%i) Clone = %i\n",rows,m_bClone);
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::ResettableMutexGuard aGuard( *m_pMutex );
@@ -1054,14 +1048,14 @@ sal_Bool SAL_CALL ORowSetBase::relative( sal_Int32 rows ) throw(SQLException, Ru
// - RowCount/IsRowCountFinal
fireRowcount();
}
- DBG_TRACE3("DBACCESS ORowSetBase::relative(%i) = %i Clone = %i\n",rows,bRet,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::relative(%i) = %i Clone = %i\n",rows,bRet,m_bClone);
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::previous( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::previous" );
- DBG_TRACE2("DBACCESS ORowSetBase::previous() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::previous() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::ResettableMutexGuard aGuard( *m_pMutex );
@@ -1094,7 +1088,7 @@ sal_Bool SAL_CALL ORowSetBase::previous( ) throw(SQLException, RuntimeException
}
else
{
- DBG_ERROR( "ORowSetBase::previous: inconsistency!" );
+ OSL_FAIL( "ORowSetBase::previous: inconsistency!" );
// we should never reach this place, as we should not get into this whole branch if m_bBeforeFirst
// was |true| from the beginning
movementFailed();
@@ -1107,17 +1101,16 @@ sal_Bool SAL_CALL ORowSetBase::previous( ) throw(SQLException, RuntimeException
// - RowCount/IsRowCountFinal
fireRowcount();
}
- DBG_TRACE2("DBACCESS ORowSetBase::previous() = %i Clone = %i\n",bRet,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::previous() = %i Clone = %i\n",bRet,m_bClone);
return bRet;
}
-// -----------------------------------------------------------------------------
+
void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const ORowSetRow& _rOldValues, ::osl::ResettableMutexGuard& _rGuard )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::setCurrentRow" );
- DBG_TRACE2("DBACCESS ORowSetBase::setCurrentRow() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::setCurrentRow() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
m_bBeforeFirst = m_pCache->isBeforeFirst();
m_bAfterLast = m_pCache->isAfterLast();
- //m_pCache->resetInsertRow(sal_True);
if(!(m_bBeforeFirst || m_bAfterLast))
{
@@ -1128,7 +1121,7 @@ void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const OR
OSL_ENSURE(!m_aCurrentRow.isNull(),"CurrentRow is null!");
m_aCurrentRow.setBookmark(m_aBookmark);
OSL_ENSURE(!m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd(),"Position of matrix iterator isn't valid!");
- OSL_ENSURE(m_aCurrentRow->isValid(),"Currentrow isn't valid");
+ OSL_ENSURE(m_aCurrentRow->is(),"Currentrow isn't valid");
OSL_ENSURE(m_aBookmark.hasValue(),"Bookmark has no value!");
#if OSL_DEBUG_LEVEL > 0
@@ -1144,10 +1137,9 @@ void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const OR
OSL_ENSURE(!m_aCurrentRow.isNull(),"CurrentRow is nul after positionCache!");
#if OSL_DEBUG_LEVEL > 0
ORowSetRow rRow = (*m_aCurrentRow);
- OSL_ENSURE(rRow.isValid() ,"Invalid size of vector!");
+ OSL_ENSURE(rRow.is() ,"Invalid size of vector!");
#endif
// the cache could repositioned so we need to adjust the cache
- // #104144# OJ
if ( _bMoved && m_aCurrentRow.isNull() )
{
positionCache( MOVE_NONE_REFRESH_ONLY );
@@ -1170,29 +1162,29 @@ void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const OR
firePropertyChange(_rOldValues);
// TODO: can this be done before the notifications?
- if(!(m_bBeforeFirst || m_bAfterLast) && !m_aCurrentRow.isNull() && m_aCurrentRow->isValid() && m_aCurrentRow != m_pCache->getEnd())
- m_aOldRow->setRow(new ORowSetValueVector(m_aCurrentRow->getBody()));
+ if(!(m_bBeforeFirst || m_bAfterLast) && !m_aCurrentRow.isNull() && m_aCurrentRow->is() && m_aCurrentRow != m_pCache->getEnd())
+ m_aOldRow->setRow(new ORowSetValueVector( *(*m_aCurrentRow) ));
if ( _bMoved && _bDoNotify )
// - cursorMoved
notifyAllListenersCursorMoved( _rGuard );
- DBG_TRACE2("DBACCESS ORowSetBase::setCurrentRow() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::setCurrentRow() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
-// -----------------------------------------------------------------------------
+
void ORowSetBase::checkPositioningAllowed() throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::checkPositioningAllowed" );
if(!m_pCache || m_nResultSetType == ResultSetType::FORWARD_ONLY)
throwFunctionSequenceException(*m_pMySelf);
}
-//------------------------------------------------------------------------------
+
Reference< XInterface > ORowSetBase::getStatement(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getStatement" );
return NULL;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSetBase::refreshRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::refreshRow" );
@@ -1211,32 +1203,32 @@ void SAL_CALL ORowSetBase::refreshRow( ) throw(SQLException, RuntimeException)
firePropertyChange(aOldValues);
}
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::rowUpdated( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::rowUpdated" );
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
-
+
if ( impl_rowDeleted() )
return sal_False;
return m_pCache->rowUpdated();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::rowInserted( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::rowInserted" );
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
-
+
if ( impl_rowDeleted() )
return sal_False;
return m_pCache->rowInserted();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::rowDeleted( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::rowDeleted" );
@@ -1244,12 +1236,12 @@ sal_Bool SAL_CALL ORowSetBase::rowDeleted( ) throw(SQLException, RuntimeExcepti
checkCache();
return impl_rowDeleted();
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetBase::impl_rowDeleted( )
{
return !m_aBookmark.hasValue() && !m_bBeforeFirst && !m_bAfterLast;
}
-// -------------------------------------------------------------------------
+
// XWarningsSupplier
Any SAL_CALL ORowSetBase::getWarnings( ) throw(SQLException, RuntimeException)
{
@@ -1265,7 +1257,7 @@ Any SAL_CALL ORowSetBase::getWarnings( ) throw(SQLException, RuntimeException)
return Any();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSetBase::clearWarnings( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::clearWarnings" );
@@ -1278,11 +1270,14 @@ void SAL_CALL ORowSetBase::clearWarnings( ) throw(SQLException, RuntimeExceptio
xWarnings->clearWarnings();
}
}
-// -------------------------------------------------------------------------
+
void ORowSetBase::firePropertyChange(const ORowSetRow& _rOldRow)
{
+ if (!isPropertyChangeNotificationEnabled())
+ return;
+
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::firePropertyChange" );
- DBG_TRACE2("DBACCESS ORowSetBase::firePropertyChange() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::firePropertyChange() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
OSL_ENSURE(m_pColumns,"Columns can not be NULL here!");
#if OSL_DEBUG_LEVEL > 1
sal_Bool bNull;
@@ -1294,47 +1289,48 @@ void ORowSetBase::firePropertyChange(const ORowSetRow& _rOldRow)
try
{
TDataColumns::iterator aEnd = m_aDataColumns.end();
- for(TDataColumns::iterator aIter = m_aDataColumns.begin();aIter != aEnd;++aIter,++i) // #104278# OJ ++i inserted
- (*aIter)->fireValueChange(_rOldRow.isValid() ? (_rOldRow->get())[i+1] : ::connectivity::ORowSetValue());
+ for(TDataColumns::iterator aIter = m_aDataColumns.begin();aIter != aEnd;++aIter,++i)
+ (*aIter)->fireValueChange(_rOldRow.is() ? (_rOldRow->get())[i+1] : ::connectivity::ORowSetValue());
}
catch(Exception&)
{
- OSL_ENSURE(0,"firePropertyChange: Exception");
+ OSL_FAIL("firePropertyChange: Exception");
}
- DBG_TRACE2("DBACCESS ORowSetBase::firePropertyChange() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::firePropertyChange() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
-// -------------------------------------------------------------------------
+
void ORowSetBase::firePropertyChange(sal_Int32 _nPos,const ::connectivity::ORowSetValue& _rOldValue)
{
OSL_ENSURE(_nPos < (sal_Int32)m_aDataColumns.size(),"nPos is invalid!");
m_aDataColumns[_nPos]->fireValueChange(_rOldValue);
}
-// -----------------------------------------------------------------------------
+
void ORowSetBase::fireRowcount()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::fireRowcount" );
}
-// -----------------------------------------------------------------------------
sal_Bool ORowSetBase::notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard& /*_rGuard*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::notifyAllListenersCursorBeforeMove" );
return sal_True;
}
-// -----------------------------------------------------------------------------
void ORowSetBase::notifyAllListenersCursorMoved(::osl::ResettableMutexGuard& /*_rGuard*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::notifyAllListenersCursorMoved" );
}
-// -----------------------------------------------------------------------------
void ORowSetBase::notifyAllListeners(::osl::ResettableMutexGuard& /*_rGuard*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::notifyAllListeners" );
}
-// -----------------------------------------------------------------------------
+sal_Bool ORowSetBase::isPropertyChangeNotificationEnabled() const
+{
+ return sal_True;
+}
+
void ORowSetBase::fireProperty( sal_Int32 _nProperty, sal_Bool _bNew, sal_Bool _bOld )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::fireProperty" );
@@ -1343,11 +1339,10 @@ void ORowSetBase::fireProperty( sal_Int32 _nProperty, sal_Bool _bNew, sal_Bool _
fire( &_nProperty, &aNew, &aOld, 1, sal_False );
}
-// -----------------------------------------------------------------------------
void ORowSetBase::positionCache( CursorMoveDirection _ePrepareForDirection )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::positionCache" );
- DBG_TRACE2("DBACCESS ORowSetBase::positionCache() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::positionCache() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
sal_Bool bSuccess = sal_False;
if ( m_aBookmark.hasValue() )
@@ -1396,10 +1391,11 @@ void ORowSetBase::positionCache( CursorMoveDirection _ePrepareForDirection )
}
}
OSL_ENSURE( bSuccess, "ORowSetBase::positionCache: failed!" );
+ (void)bSuccess;
- DBG_TRACE2("DBACCESS ORowSetBase::positionCache() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::positionCache() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
-// -----------------------------------------------------------------------------
+
void ORowSetBase::checkCache()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::checkCache" );
@@ -1407,11 +1403,11 @@ void ORowSetBase::checkCache()
if(!m_pCache)
throwFunctionSequenceException(*m_pMySelf);
}
-// -----------------------------------------------------------------------------
+
void ORowSetBase::movementFailed()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::movementFailed" );
- DBG_TRACE2("DBACCESS ORowSetBase::movementFailed() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::movementFailed() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
m_aOldRow->clearRow();
m_aCurrentRow = m_pCache->getEnd();
m_bBeforeFirst = m_pCache->isBeforeFirst();
@@ -1419,25 +1415,25 @@ void ORowSetBase::movementFailed()
m_aBookmark = Any();
m_aCurrentRow.setBookmark(m_aBookmark);
OSL_ENSURE(m_bBeforeFirst || m_bAfterLast,"BeforeFirst or AfterLast is wrong!");
- DBG_TRACE2("DBACCESS ORowSetBase::movementFailed() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::movementFailed() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
-// -----------------------------------------------------------------------------
+
ORowSetRow ORowSetBase::getOldRow(sal_Bool _bWasNew)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getOldRow" );
- OSL_ENSURE(m_aOldRow.isValid(),"RowSetRowHElper isn't valid!");
+ OSL_ENSURE(m_aOldRow.is(),"RowSetRowHElper isn't valid!");
ORowSetRow aOldValues;
- if ( !_bWasNew && m_aOldRow->getRow().isValid() )
- aOldValues = new ORowSetValueVector( m_aOldRow->getRow().getBody()); // remember the old values
+ if ( !_bWasNew && m_aOldRow->getRow().is() )
+ aOldValues = new ORowSetValueVector( *(m_aOldRow->getRow())); // remember the old values
return aOldValues;
}
-// -----------------------------------------------------------------------------
+
void ORowSetBase::getPropertyDefaultByHandle( sal_Int32 /*_nHandle*/, Any& _rDefault ) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getPropertyDefaultByHandle" );
_rDefault.clear();
}
-// -----------------------------------------------------------------------------
+
void ORowSetBase::onDeleteRow( const Any& _rBookmark )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::onDeleteRow" );
@@ -1453,7 +1449,7 @@ void ORowSetBase::onDeleteRow( const Any& _rBookmark )
m_nDeletedPosition = m_pCache->getRow();
}
}
-// -----------------------------------------------------------------------------
+
void ORowSetBase::onDeletedRow( const Any& _rBookmark, sal_Int32 _nPos )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::onDeletedRow" );
@@ -1476,7 +1472,7 @@ void ORowSetBase::onDeletedRow( const Any& _rBookmark, sal_Int32 _nPos )
m_aCurrentRow.setBookmark( m_aBookmark );
}
}
-// -----------------------------------------------------------------------------
+
sal_Int32 ORowSetBase::impl_getRowCount() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::impl_getRowCount" );
@@ -1494,7 +1490,7 @@ struct ORowSetNotifierImpl
};
DBG_NAME(ORowSetNotifier)
-// -----------------------------------------------------------------------------
+
ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet )
:m_pRowSet( _pRowSet )
,m_bWasNew( sal_False )
@@ -1515,7 +1511,7 @@ ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet )
if ( m_pRowSet->isModification( ORowSetBase::GrantNotifierAccess() ) )
m_pRowSet->doCancelModification( ORowSetBase::GrantNotifierAccess() );
}
-// -----------------------------------------------------------------------------
+
ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet,const ORowSetValueVector::Vector& i_aRow )
:m_pImpl(new ORowSetNotifierImpl)
,m_pRowSet( _pRowSet )
@@ -1530,14 +1526,13 @@ ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet,const ORowSetValueVector
OSL_ENSURE( m_pRowSet, "ORowSetNotifier::ORowSetNotifier: invalid row set. This wil crash." );
m_pImpl->aRow = i_aRow; // yes, create a copy to store the old values
}
-// -----------------------------------------------------------------------------
+
ORowSetNotifier::~ORowSetNotifier( )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetNotifier::~ORowSetNotifier" );
DBG_DTOR(ORowSetNotifier,NULL);
}
-// -----------------------------------------------------------------------------
void ORowSetNotifier::fire()
{
// we're not interested in firing changes FALSE->TRUE, only TRUE->FALSE.
@@ -1557,19 +1552,19 @@ void ORowSetNotifier::fire()
m_bNotifyCalled = sal_True;
#endif
}
-// -----------------------------------------------------------------------------
+
::std::vector<sal_Int32>& ORowSetNotifier::getChangedColumns() const
{
OSL_ENSURE(m_pImpl.get(),"Illegal CTor call, use the other one!");
return m_pImpl->aChangedColumns;
}
-// -----------------------------------------------------------------------------
+
::std::vector<Any>& ORowSetNotifier::getChangedBookmarks() const
{
OSL_ENSURE(m_pImpl.get(),"Illegal CTor call, use the other one!");
return m_pImpl->aChangedBookmarks;
}
-// -----------------------------------------------------------------------------
+
void ORowSetNotifier::firePropertyChange()
{
OSL_ENSURE(m_pImpl.get(),"Illegal CTor call, use the other one!");
@@ -1585,3 +1580,5 @@ void ORowSetNotifier::firePropertyChange()
}
}
} // namespace dbaccess
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/RowSetBase.hxx b/dbaccess/source/core/api/RowSetBase.hxx
index 62d778a56..5b1f0d08e 100644
--- a/dbaccess/source/core/api/RowSetBase.hxx
+++ b/dbaccess/source/core/api/RowSetBase.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,76 +28,34 @@
#ifndef DBACCESS_CORE_API_ROWSETBASE_HXX
#define DBACCESS_CORE_API_ROWSETBASE_HXX
-#ifndef _CPPUHELPER_IMPLBASE10_HXX_
#include <cppuhelper/implbase10.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCOLUMNLOCATE_HPP_
#include <com/sun/star/sdbc/XColumnLocate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCLOSEABLE_HPP_
#include <com/sun/star/sdbc/XCloseable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XROWLOCATE_HPP_
#include <com/sun/star/sdbcx/XRowLocate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XWARNINGSSUPPLIER_HPP_
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#endif
-#ifndef _CPPUHELPER_INTERFACECONTAINER_H_
#include <cppuhelper/interfacecontainer.h>
-#endif
-#ifndef CONNECTIVITY_SQLERROR_HXX
#include <connectivity/sqlerror.hxx>
-#endif
-#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
#include <connectivity/CommonTools.hxx>
-#endif
-#ifndef COMPHELPER_PROPERTYSTATECONTAINER_HXX
#include <comphelper/propertystatecontainer.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
#include <comphelper/proparrhlp.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROWSET_HPP_
#include <com/sun/star/sdbc/XRowSet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTYPES_HPP_
#include <com/sun/star/util/XNumberFormatTypes.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef DBACCESS_CORE_API_ROWSETROW_HXX
#include "RowSetRow.hxx"
-#endif
-#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
#include <comphelper/broadcasthelper.hxx>
-#endif
-#ifndef DBACCESS_ROWSETCACHEITERATOR_HXX
#include "RowSetCacheIterator.hxx"
-#endif
#include "core_resource.hxx"
#include <comphelper/componentcontext.hxx>
#include <functional>
-namespace com { namespace sun { namespace star {
+namespace com { namespace sun { namespace star {
namespace sdb { struct RowChangeEvent; }
namespace lang { struct Locale; }
} } }
@@ -191,6 +150,9 @@ namespace dbaccess
virtual sal_Bool isModified( ) = 0;
// return <TRUE/> if and only if the current row is the insert row
virtual sal_Bool isNew( ) = 0;
+ // return <TRUE/> if the property change notification should be fired
+ // upon property change.
+ virtual sal_Bool isPropertyChangeNotificationEnabled() const;
// notify the change of a boolean property
void fireProperty( sal_Int32 _nProperty, sal_Bool _bNew, sal_Bool _bOld );
@@ -229,7 +191,7 @@ namespace dbaccess
const connectivity::ORowSetValue& getValue(sal_Int32 columnIndex);
// the cache has to be checked before calling this method
const connectivity::ORowSetValue& impl_getValue(sal_Int32 columnIndex);
- // sets the current and the bookmark
+ // sets the current and the bookmark
void setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const ORowSetRow& _rOldValues, ::osl::ResettableMutexGuard& _rGuard);
void checkPositioningAllowed() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// checks if the cache is null
@@ -413,7 +375,7 @@ namespace dbaccess
// a method of ORowSetBase (or derivees)
sal_Bool m_bWasNew;
sal_Bool m_bWasModified;
-
+
#ifdef DBG_UTIL
sal_Bool m_bNotifyCalled;
#endif
@@ -455,10 +417,11 @@ namespace dbaccess
*/
::std::vector<sal_Int32>& getChangedColumns() const;
::std::vector<com::sun::star::uno::Any>& getChangedBookmarks() const;
-
+
};
} // end of namespace
#endif // DBACCESS_CORE_API_ROWSETBASE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index 43b2f580e..364bfbfb5 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-
#include "BookmarkSet.hxx"
#include "CRowSetColumn.hxx"
#include "CRowSetDataColumn.hxx"
@@ -42,7 +42,6 @@
#include "core_resource.hxx"
#include "dbastrings.hrc"
-/** === begin UNO includes === **/
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbcx/CompareBookmark.hpp>
@@ -51,7 +50,6 @@
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-/** === end UNO includes === **/
#include <comphelper/extract.hxx>
#include <comphelper/property.hxx>
@@ -64,6 +62,7 @@
#include <connectivity/sqlparse.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <algorithm>
@@ -83,7 +82,7 @@ using namespace ::osl;
#define CHECK_MATRIX_POS(M) OSL_ENSURE(((M) >= static_cast<ORowSetMatrix::difference_type>(0)) && ((M) < static_cast<sal_Int32>(m_pMatrix->size())),"Position is invalid!")
DBG_NAME(ORowSetCache)
-// -------------------------------------------------------------------------
+
ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
const Reference< XSingleSelectQueryAnalyzer >& _xAnalyzer,
const ::comphelper::ComponentContext& _rContext,
@@ -179,7 +178,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
OSL_ENSURE(xTabSup.is(),"ORowSet::execute composer isn't a tablesupplier!");
Reference<XNameAccess> xTables = xTabSup->getTables();
Sequence< ::rtl::OUString> aTableNames = xTables->getElementNames();
- if ( aTableNames.getLength() > 1 && !_rUpdateTableName.getLength() && bNeedKeySet )
+ 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,i_nMaxRows,m_nRowCount);
@@ -195,7 +194,6 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
}
catch(const Exception&)
{
- // DBG_UNHANDLED_EXCEPTION();
}
m_pCacheSet = NULL;
m_xCacheSet.clear();
@@ -273,13 +271,10 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
// need to check if we could handle this select clause
bAllKeysFound = bAllKeysFound && (nTablesCount == 1 || checkJoin(xConnection,_xAnalyzer,aUpdateTableName));
- // || !(comphelper::hasProperty(PROPERTY_CANUPDATEINSERTEDROWS,xProp) && any2bool(xProp->getPropertyValue(PROPERTY_CANUPDATEINSERTEDROWS)))
-
- // oj removed because keyset uses only the next// || (xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_RESULTSETTYPE) && comphelper::getINT32(xProp->getPropertyValue(PROPERTY_RESULTSETTYPE)) == ResultSetType::FORWARD_ONLY)
if(!bAllKeysFound )
{
if ( bBookmarkable )
- {
+ {
// here I know that we have a read only bookmarable cursor
_xRs->beforeFirst();
m_nPrivileges = Privilege::SELECT;
@@ -366,7 +361,6 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
m_nPrivileges = Privilege::SELECT;
}
-// -------------------------------------------------------------------------
ORowSetCache::~ORowSetCache()
{
m_pCacheSet = NULL;
@@ -389,7 +383,6 @@ ORowSetCache::~ORowSetCache()
DBG_DTOR(ORowSetCache,NULL);
}
-// -------------------------------------------------------------------------
void ORowSetCache::setFetchSize(sal_Int32 _nSize)
{
if(_nSize == m_nFetchSize)
@@ -433,7 +426,7 @@ void ORowSetCache::setFetchSize(sal_Int32 _nSize)
m_aMatrixIter = m_pMatrix->end();
m_aMatrixEnd = m_pMatrix->end();
- // now adjust their positions because a resize invalid all iterators
+ // now adjust their positions because a resize invalidates all iterators
::std::vector<sal_Int32>::const_iterator aIter = aPositions.begin();
::std::map<sal_Int32,sal_Bool>::const_iterator aPosChangeIter = aCacheIterToChange.begin();
for( aCacheIter = m_aCacheIterators.begin();
@@ -465,14 +458,13 @@ void ORowSetCache::setFetchSize(sal_Int32 _nSize)
m_nEndPos = _nSize;
}
}
-// -------------------------------------------------------------------------
// XResultSetMetaDataSupplier
Reference< XResultSetMetaData > ORowSetCache::getMetaData( )
{
return m_xMetaData;
}
-// -------------------------------------------------------------------------
+
Any lcl_getBookmark(ORowSetValue& i_aValue,OCacheSet* i_pCacheSet)
{
switch ( i_aValue.getTypeKind() )
@@ -487,22 +479,21 @@ Any lcl_getBookmark(ORowSetValue& i_aValue,OCacheSet* i_pCacheSet)
return i_aValue.getAny();
}
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::sdbcx::XRowLocate
Any ORowSetCache::getBookmark( )
{
-
if(m_bAfterLast)
throwFunctionSequenceException(m_xSet.get());
- if ( m_aMatrixIter >= m_pMatrix->end() || m_aMatrixIter < m_pMatrix->begin() || !(*m_aMatrixIter).isValid())
+ if ( m_aMatrixIter >= m_pMatrix->end() || m_aMatrixIter < m_pMatrix->begin() || !(*m_aMatrixIter).is())
{
return Any(); // this is allowed here because the rowset knowns what it is doing
}
return lcl_getBookmark(((*m_aMatrixIter)->get())[0],m_pCacheSet);
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::moveToBookmark( const Any& bookmark )
{
if ( m_pCacheSet->moveToBookmark(bookmark) )
@@ -519,7 +510,7 @@ sal_Bool ORowSetCache::moveToBookmark( const Any& bookmark )
if ( !m_bAfterLast )
{
m_aMatrixIter = calcPosition();
- OSL_ENSURE(m_aMatrixIter->isValid(),"Iterator after moveToBookmark not valid");
+ OSL_ENSURE(m_aMatrixIter->is(),"Iterator after moveToBookmark not valid");
}
else
m_aMatrixIter = m_pMatrix->end();
@@ -530,9 +521,9 @@ sal_Bool ORowSetCache::moveToBookmark( const Any& bookmark )
else
return sal_False;
- return m_aMatrixIter != m_pMatrix->end() && (*m_aMatrixIter).isValid();
+ return m_aMatrixIter != m_pMatrix->end() && (*m_aMatrixIter).is();
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows )
{
sal_Bool bRet( moveToBookmark( bookmark ) );
@@ -540,30 +531,29 @@ sal_Bool ORowSetCache::moveRelativeToBookmark( const Any& bookmark, sal_Int32 ro
{
m_nPosition = m_pCacheSet->getRow() + rows;
absolute(m_nPosition);
- // for(sal_Int32 i=0;i<rows && m_aMatrixIter != m_pMatrix->end();++i,++m_aMatrixIter) ;
- bRet = m_aMatrixIter != m_pMatrix->end() && (*m_aMatrixIter).isValid();
+ bRet = m_aMatrixIter != m_pMatrix->end() && (*m_aMatrixIter).is();
}
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Int32 ORowSetCache::compareBookmarks( const Any& _first, const Any& _second )
{
return (!_first.hasValue() || !_second.hasValue()) ? CompareBookmark::NOT_COMPARABLE : m_pCacheSet->compareBookmarks(_first,_second);
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::hasOrderedBookmarks( )
{
return m_pCacheSet->hasOrderedBookmarks();
}
-// -------------------------------------------------------------------------
+
sal_Int32 ORowSetCache::hashBookmark( const Any& bookmark )
{
return m_pCacheSet->hashBookmark(bookmark);
}
+
// XRowUpdate
-// -----------------------------------------------------------------------------
void ORowSetCache::updateNull(sal_Int32 columnIndex,ORowSetValueVector::Vector& io_aRow
,::std::vector<sal_Int32>& o_ChangedColumns
)
@@ -582,7 +572,7 @@ void ORowSetCache::updateNull(sal_Int32 columnIndex,ORowSetValueVector::Vector&
impl_updateRowFromCache_throw(io_aRow,o_ChangedColumns);
}
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::updateValue(sal_Int32 columnIndex,const ORowSetValue& x
,ORowSetValueVector::Vector& io_aRow
,::std::vector<sal_Int32>& o_ChangedColumns
@@ -602,7 +592,7 @@ void ORowSetCache::updateValue(sal_Int32 columnIndex,const ORowSetValue& x
impl_updateRowFromCache_throw(io_aRow,o_ChangedColumns);
}
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::updateCharacterStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x
, sal_Int32 length,ORowSetValueVector::Vector& io_aRow
,::std::vector<sal_Int32>& o_ChangedColumns
@@ -623,10 +613,10 @@ void ORowSetCache::updateCharacterStream( sal_Int32 columnIndex, const Reference
m_pCacheSet->mergeColumnValues(columnIndex,rInsert,io_aRow,o_ChangedColumns);
impl_updateRowFromCache_throw(io_aRow,o_ChangedColumns);
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::updateObject( sal_Int32 columnIndex, const Any& x
,ORowSetValueVector::Vector& io_aRow
- ,::std::vector<sal_Int32>& o_ChangedColumns
+ ,::std::vector<sal_Int32>& o_ChangedColumns
)
{
checkUpdateConditions(columnIndex);
@@ -645,7 +635,7 @@ void ORowSetCache::updateObject( sal_Int32 columnIndex, const Any& x
impl_updateRowFromCache_throw(io_aRow,o_ChangedColumns);
}
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 /*scale*/
,ORowSetValueVector::Vector& io_aRow
,::std::vector<sal_Int32>& o_ChangedColumns
@@ -667,7 +657,7 @@ void ORowSetCache::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal
impl_updateRowFromCache_throw(io_aRow,o_ChangedColumns);
}
}
-// -------------------------------------------------------------------------
+
// XResultSet
sal_Bool ORowSetCache::next( )
{
@@ -690,27 +680,27 @@ sal_Bool ORowSetCache::next( )
return !m_bAfterLast;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::isBeforeFirst( )
{
return m_bBeforeFirst;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::isAfterLast( )
{
return m_bAfterLast;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::isFirst( )
{
return m_nPosition == 1; // ask resultset for
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::isLast( )
{
return m_nPosition == m_nRowCount;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::beforeFirst( )
{
if(!m_bBeforeFirst)
@@ -724,7 +714,7 @@ sal_Bool ORowSetCache::beforeFirst( )
}
return sal_True;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::afterLast( )
{
if(!m_bAfterLast)
@@ -745,7 +735,7 @@ sal_Bool ORowSetCache::afterLast( )
}
return sal_True;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos)
{
OSL_ENSURE(_nNewStartPos != _nNewEndPos,"ORowSetCache::fillMatrix: StartPos and EndPos can not be equal!");
@@ -765,12 +755,12 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos
}
bCheck = m_pCacheSet->absolute(i); // -1 no need to
-
+
for(;i<_nNewEndPos;++i,++aIter)
{
if(bCheck)
{
- if(!aIter->isValid())
+ if(!aIter->is())
*aIter = new ORowSetValueVector(m_xMetaData->getColumnCount());
m_pCacheSet->fillValueRow(*aIter,i);
if(!m_bRowCountFinal)
@@ -799,7 +789,7 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos
{
if(bCheck)
{
- if(!aIter->isValid())
+ if(!aIter->is())
*aIter = new ORowSetValueVector(m_xMetaData->getColumnCount());
m_pCacheSet->fillValueRow(*aIter,nPos++);
}
@@ -813,7 +803,6 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos
if ( i < (_nNewEndPos-1) )
bCheck = m_pCacheSet->next();
}
- // m_nStartPos = _nNewStartPos;
// we have to read one row forward to ensure that we know when we are on last row
// but only when we don't know it already
/*
@@ -832,15 +821,13 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos
*/
return bCheck;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::moveWindow()
{
-
sal_Bool bRet = sal_True;
sal_Int32 nDiff = (sal_Int32)(m_nFetchSize*0.5 -0.5);
sal_Int32 nNewStartPos = (m_nPosition - nDiff);
- // sal_Int32 nNewEndPos = (m_nPosition+m_nFetchSize*0.5);
sal_Int32 nNewEndPos = nNewStartPos + m_nFetchSize;
if ( m_nPosition <= m_nStartPos )
@@ -914,8 +901,8 @@ sal_Bool ORowSetCache::moveWindow()
}
}
else
- { // normaly this should never happen
- OSL_ENSURE(0,"What the hell is happen here!");
+ { // normally this should never happen
+ OSL_FAIL("What the hell is happen here!");
return sal_False;
}
}
@@ -936,7 +923,7 @@ sal_Bool ORowSetCache::moveWindow()
bCheck = m_pCacheSet->next();
if ( bCheck )
{
- if(!aIter->isValid())
+ if(!aIter->is())
*aIter = new ORowSetValueVector(m_xMetaData->getColumnCount());
m_pCacheSet->fillValueRow(*aIter,i+1);
}
@@ -955,7 +942,7 @@ sal_Bool ORowSetCache::moveWindow()
{ // position in window
OSL_ENSURE((m_nPosition - m_nStartPos -1) < (sal_Int32)m_pMatrix->size(),"Position is behind end()!");
m_aMatrixIter = calcPosition();
- if(!m_aMatrixIter->isValid())
+ if(!m_aMatrixIter->is())
{
sal_Bool bOk( m_pCacheSet->absolute( m_nPosition ) );
if ( bOk )
@@ -1017,7 +1004,6 @@ sal_Bool ORowSetCache::moveWindow()
{ // the end was reached before end() so we can set the start before nNewStartPos
m_nStartPos += (aIter - m_pMatrix->begin());
- // m_nStartPos = (aIter - m_pMatrix->begin());
::std::rotate(m_pMatrix->begin(),aIter,m_pMatrix->end());
// now correct the iterator in our iterator vector
rotateCacheIterator( (sal_Int16)( aIter - m_pMatrix->begin() ) );
@@ -1035,13 +1021,13 @@ sal_Bool ORowSetCache::moveWindow()
m_nStartPos = 0;
}
// here we need only to check if the begining row is valid. If not we have to fetch it.
- if(!m_pMatrix->begin()->isValid())
+ if(!m_pMatrix->begin()->is())
{
aIter = m_pMatrix->begin();
nPos = m_nStartPos;
bCheck = m_pCacheSet->absolute_checked(m_nStartPos,sal_False);
- for(; !aIter->isValid() && bCheck;++aIter)
+ for(; !aIter->is() && bCheck;++aIter)
{
OSL_ENSURE(aIter != m_pMatrix->end(),"Invalid iterator");
bCheck = m_pCacheSet->next();
@@ -1063,7 +1049,7 @@ sal_Bool ORowSetCache::moveWindow()
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::first( )
{
// first move to the first row
@@ -1088,7 +1074,7 @@ sal_Bool ORowSetCache::first( )
}
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::last( )
{
sal_Bool bRet = m_pCacheSet->last();
@@ -1104,10 +1090,6 @@ sal_Bool ORowSetCache::last( )
moveWindow();
// we have to repositioning because moveWindow can modify the cache
m_pCacheSet->last();
-// if(m_nPosition > m_nFetchSize)
-// m_aMatrixIter = m_pMatrix->end() -1;
-// else
-// m_aMatrixIter = m_pMatrix->begin() + m_nPosition - 1;
OSL_ENSURE(((m_nPosition - m_nStartPos) - 1) < (sal_Int32)m_pMatrix->size(),"Position is behind end()!");
m_aMatrixIter = calcPosition();
}
@@ -1121,18 +1103,18 @@ sal_Bool ORowSetCache::last( )
#if OSL_DEBUG_LEVEL > 1
if(bRet)
{
- OSL_ENSURE((*m_aMatrixIter).isValid(),"ORowSetCache::last: Row not valid!");
+ OSL_ENSURE((*m_aMatrixIter).is(),"ORowSetCache::last: Row not valid!");
}
#endif
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Int32 ORowSetCache::getRow( )
{
return (isBeforeFirst() || isAfterLast()) ? 0 : m_nPosition;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::absolute( sal_Int32 row )
{
if(!row )
@@ -1185,7 +1167,7 @@ sal_Bool ORowSetCache::absolute( sal_Int32 row )
return !(m_bAfterLast || m_bBeforeFirst);
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::relative( sal_Int32 rows )
{
sal_Bool bErg = sal_True;
@@ -1213,7 +1195,7 @@ sal_Bool ORowSetCache::relative( sal_Int32 rows )
}
return bErg;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::previous( )
{
sal_Bool bRet = sal_False;
@@ -1238,13 +1220,13 @@ sal_Bool ORowSetCache::previous( )
else
{
m_aMatrixIter = calcPosition();
- bRet = (*m_aMatrixIter).isValid();
+ bRet = (*m_aMatrixIter).is();
}
}
}
return bRet;
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::refreshRow( )
{
if(isAfterLast())
@@ -1257,21 +1239,21 @@ void ORowSetCache::refreshRow( )
cancelRowModification();
}
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::rowUpdated( )
{
return m_pCacheSet->rowUpdated();
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::rowInserted( )
{
return m_pCacheSet->rowInserted();
}
-// -------------------------------------------------------------------------
+
// XResultSetUpdate
sal_Bool ORowSetCache::insertRow(::std::vector< Any >& o_aBookmarks)
{
- if ( !m_bNew || !m_aInsertRow->isValid() )
+ if ( !m_bNew || !m_aInsertRow->is() )
throw SQLException(DBACORE_RESSTRING(RID_STR_NO_MOVETOINSERTROW_CALLED),NULL,SQLSTATE_GENERAL,1000,Any() );
m_pCacheSet->insertRow(*m_aInsertRow,m_aUpdateTable);
@@ -1290,7 +1272,7 @@ sal_Bool ORowSetCache::insertRow(::std::vector< Any >& o_aBookmarks)
ORowSetMatrix::iterator aIter = m_pMatrix->begin();
for(;aIter != m_pMatrix->end();++aIter)
{
- if ( m_aMatrixIter != aIter && aIter->isValid() && m_pCacheSet->columnValuesUpdated((*aIter)->get(),rCurrentRow) )
+ if ( m_aMatrixIter != aIter && aIter->is() && m_pCacheSet->columnValuesUpdated((*aIter)->get(),rCurrentRow) )
{
o_aBookmarks.push_back(lcl_getBookmark((*aIter)->get()[0],m_pCacheSet));
}
@@ -1298,12 +1280,12 @@ sal_Bool ORowSetCache::insertRow(::std::vector< Any >& o_aBookmarks)
}
else
{
- OSL_ENSURE(0,"There must be a bookmark after the row was inserted!");
+ OSL_FAIL("There must be a bookmark after the row was inserted!");
}
}
return bRet;
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::resetInsertRow(sal_Bool _bClearInsertRow)
{
if ( _bClearInsertRow )
@@ -1311,7 +1293,7 @@ void ORowSetCache::resetInsertRow(sal_Bool _bClearInsertRow)
m_bNew = sal_False;
m_bModified = sal_False;
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::cancelRowModification()
{
// clear the insertrow references -> implies that the current row of the rowset changes as well
@@ -1321,10 +1303,10 @@ void ORowSetCache::cancelRowModification()
{
if ( aCacheIter->second.pRowSet->isInsertRow() && aCacheIter->second.aIterator == m_aInsertRow )
aCacheIter->second.aIterator = m_pMatrix->end();
- } // for(;aCacheIter != aCacheEnd;++aCacheIter)
+ }
resetInsertRow(sal_False);
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow,::std::vector< Any >& o_aBookmarks )
{
if(isAfterLast() || isBeforeFirst())
@@ -1338,7 +1320,7 @@ void ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow,::std::vector
m_pCacheSet->updateRow(*_rUpdateRow,*m_aMatrixIter,m_aUpdateTable);
// refetch the whole row
(*m_aMatrixIter) = NULL;
-
+
if ( moveToBookmark(aBookmark) )
{
// update the cached values
@@ -1346,7 +1328,7 @@ void ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow,::std::vector
ORowSetMatrix::iterator aIter = m_pMatrix->begin();
for(;aIter != m_pMatrix->end();++aIter)
{
- if ( m_aMatrixIter != aIter && aIter->isValid() && m_pCacheSet->columnValuesUpdated((*aIter)->get(),rCurrentRow) )
+ if ( m_aMatrixIter != aIter && aIter->is() && m_pCacheSet->columnValuesUpdated((*aIter)->get(),rCurrentRow) )
{
o_aBookmarks.push_back(lcl_getBookmark((*aIter)->get()[0],m_pCacheSet));
}
@@ -1355,13 +1337,12 @@ void ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow,::std::vector
m_bModified = sal_False;
}
-// -------------------------------------------------------------------------
+
bool ORowSetCache::deleteRow( )
{
if(isAfterLast() || isBeforeFirst())
throw SQLException(DBACORE_RESSTRING(RID_STR_NO_DELETEROW),NULL,SQLSTATE_GENERAL,1000,Any() );
- // m_pCacheSet->absolute(m_nPosition);
m_pCacheSet->deleteRow(*m_aMatrixIter,m_aUpdateTable);
if ( !m_pCacheSet->rowDeleted() )
return false;
@@ -1372,7 +1353,7 @@ bool ORowSetCache::deleteRow( )
(*aPos) = NULL;
ORowSetMatrix::iterator aEnd = m_pMatrix->end();
- for(++aPos;aPos != aEnd && aPos->isValid();++aPos)
+ for(++aPos;aPos != aEnd && aPos->is();++aPos)
{
*(aPos-1) = *aPos;
(*aPos) = NULL;
@@ -1382,13 +1363,13 @@ bool ORowSetCache::deleteRow( )
--m_nPosition;
return true;
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::cancelRowUpdates( )
{
m_bNew = m_bModified = sal_False;
if(!m_nPosition)
{
- OSL_ENSURE(0,"cancelRowUpdates:Invalid positions pos == 0");
+ OSL_FAIL("cancelRowUpdates:Invalid positions pos == 0");
::dbtools::throwFunctionSequenceException(NULL);
}
@@ -1396,18 +1377,18 @@ void ORowSetCache::cancelRowUpdates( )
m_pCacheSet->fillValueRow(*m_aMatrixIter,m_nPosition);
else
{
- OSL_ENSURE(0,"cancelRowUpdates couldn't position right with absolute");
+ OSL_FAIL("cancelRowUpdates couldn't position right with absolute");
::dbtools::throwFunctionSequenceException(NULL);
}
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::moveToInsertRow( )
{
m_bNew = sal_True;
m_bUpdated = m_bAfterLast = sal_False;
m_aInsertRow = m_pInsertMatrix->begin();
- if(!m_aInsertRow->isValid())
+ if(!m_aInsertRow->is())
*m_aInsertRow = new ORowSetValueVector(m_xMetaData->getColumnCount());
// we don't unbound the bookmark column
@@ -1421,16 +1402,15 @@ void ORowSetCache::moveToInsertRow( )
aIter->setTypeKind(m_xMetaData->getColumnType(i));
}
}
-// -------------------------------------------------------------------------
+
ORowSetCacheIterator ORowSetCache::createIterator(ORowSetBase* _pRowSet)
{
-
ORowSetCacheIterator_Helper aHelper;
aHelper.aIterator = m_pMatrix->end();
aHelper.pRowSet = _pRowSet;
return ORowSetCacheIterator(m_aCacheIterators.insert(m_aCacheIterators.begin(),ORowSetCacheMap::value_type(m_aCacheIterators.size()+1,aHelper)),this,_pRowSet);
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::deleteIterator(const ORowSetBase* _pRowSet)
{
ORowSetCacheMap::iterator aCacheIter = m_aCacheIterators.begin();
@@ -1440,12 +1420,12 @@ void ORowSetCache::deleteIterator(const ORowSetBase* _pRowSet)
{
m_aCacheIterators.erase(aCacheIter);
aCacheIter = m_aCacheIterators.begin();
- } // if ( aCacheIter->second.pRowSet == _pRowSet )
+ }
else
++aCacheIter;
}
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::rotateCacheIterator(ORowSetMatrix::difference_type _nDist)
{
if(_nDist)
@@ -1474,11 +1454,11 @@ void ORowSetCache::rotateCacheIterator(ORowSetMatrix::difference_type _nDist)
}
}
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::setUpdateIterator(const ORowSetMatrix::iterator& _rOriginalRow)
{
m_aInsertRow = m_pInsertMatrix->begin();
- if(!m_aInsertRow->isValid())
+ if(!m_aInsertRow->is())
*m_aInsertRow = new ORowSetValueVector(m_xMetaData->getColumnCount());
(*(*m_aInsertRow)) = (*(*_rOriginalRow));
@@ -1488,7 +1468,7 @@ void ORowSetCache::setUpdateIterator(const ORowSetMatrix::iterator& _rOriginalRo
for(;aIter != aEnd;++aIter)
aIter->setModified(sal_False);
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::checkPositionFlags()
{
if(m_bRowCountFinal)
@@ -1498,13 +1478,13 @@ void ORowSetCache::checkPositionFlags()
m_nPosition = 0;//m_nRowCount;
}
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::checkUpdateConditions(sal_Int32 columnIndex)
{
if(m_bAfterLast || columnIndex >= (sal_Int32)(*m_aInsertRow)->get().size())
throwFunctionSequenceException(m_xSet.get());
}
-//------------------------------------------------------------------------------
+
sal_Bool ORowSetCache::checkInnerJoin(const ::connectivity::OSQLParseNode *pNode,const Reference< XConnection>& _xConnection,const ::rtl::OUString& _sUpdateTableName)
{
sal_Bool bOk = sal_False;
@@ -1514,10 +1494,10 @@ sal_Bool ORowSetCache::checkInnerJoin(const ::connectivity::OSQLParseNode *pNode
{
bOk = checkInnerJoin(pNode->getChild(1),_xConnection,_sUpdateTableName);
}
- else if ((SQL_ISRULE(pNode,search_condition) || SQL_ISRULE(pNode,boolean_term)) && // AND/OR-Verknuepfung:
+ else if ((SQL_ISRULE(pNode,search_condition) || SQL_ISRULE(pNode,boolean_term)) && // AND/OR link
pNode->count() == 3)
{
- // nur AND Verknüpfung zulassen
+ // only allow an AND link
if ( SQL_ISTOKEN(pNode->getChild(1),AND) )
bOk = checkInnerJoin(pNode->getChild(0),_xConnection,_sUpdateTableName)
&& checkInnerJoin(pNode->getChild(2),_xConnection,_sUpdateTableName);
@@ -1525,7 +1505,7 @@ sal_Bool ORowSetCache::checkInnerJoin(const ::connectivity::OSQLParseNode *pNode
else if (SQL_ISRULE(pNode,comparison_predicate))
{
// only the comparison of columns is allowed
- DBG_ASSERT(pNode->count() == 3,"checkInnerJoin: Fehler im Parse Tree");
+ OSL_ENSURE(pNode->count() == 3,"checkInnerJoin: Fehler im Parse Tree");
if (!(SQL_ISRULE(pNode->getChild(0),column_ref) &&
SQL_ISRULE(pNode->getChild(2),column_ref) &&
pNode->getChild(1)->getNodeType() == SQL_NODE_EQUAL))
@@ -1543,7 +1523,7 @@ sal_Bool ORowSetCache::checkInnerJoin(const ::connectivity::OSQLParseNode *pNode
}
return bOk;
}
-// -----------------------------------------------------------------------------
+
sal_Bool ORowSetCache::checkJoin(const Reference< XConnection>& _xConnection,
const Reference< XSingleSelectQueryAnalyzer >& _xAnalyzer,
const ::rtl::OUString& _sUpdateTableName )
@@ -1603,11 +1583,11 @@ sal_Bool ORowSetCache::checkJoin(const Reference< XConnection>& _xConnection,
}
return bOk;
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::clearInsertRow()
{
// we don't unbound the bookmark column
- if ( m_aInsertRow != m_pInsertMatrix->end() && m_aInsertRow->isValid() )
+ if ( m_aInsertRow != m_pInsertMatrix->end() && m_aInsertRow->is() )
{
ORowSetValueVector::Vector::iterator aIter = (*m_aInsertRow)->get().begin()+1;
ORowSetValueVector::Vector::iterator aEnd = (*m_aInsertRow)->get().end();
@@ -1616,17 +1596,16 @@ void ORowSetCache::clearInsertRow()
aIter->setBound(sal_False);
aIter->setModified(sal_False);
aIter->setNull();
- } // for(;aIter != (*m_aInsertRow)->end();++aIter)
+ }
}
}
-// -----------------------------------------------------------------------------
+
ORowSetMatrix::iterator ORowSetCache::calcPosition() const
{
sal_Int32 nValue = (m_nPosition - m_nStartPos) - 1;
CHECK_MATRIX_POS(nValue);
return ( nValue < 0 || nValue >= static_cast<sal_Int32>(m_pMatrix->size()) ) ? m_pMatrix->end() : (m_pMatrix->begin() + nValue);
}
-// -----------------------------------------------------------------------------
TORowSetOldRowHelperRef ORowSetCache::registerOldRow()
{
@@ -1634,13 +1613,13 @@ TORowSetOldRowHelperRef ORowSetCache::registerOldRow()
m_aOldRows.push_back(pRef);
return pRef;
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::deregisterOldRow(const TORowSetOldRowHelperRef& _rRow)
{
TOldRowSetRows::iterator aOldRowEnd = m_aOldRows.end();
for (TOldRowSetRows::iterator aOldRowIter = m_aOldRows.begin(); aOldRowIter != aOldRowEnd; ++aOldRowIter)
{
- if ( aOldRowIter->getBodyPtr() == _rRow.getBodyPtr() )
+ if ( aOldRowIter->get() == _rRow.get() )
{
m_aOldRows.erase(aOldRowIter);
break;
@@ -1648,35 +1627,35 @@ void ORowSetCache::deregisterOldRow(const TORowSetOldRowHelperRef& _rRow)
}
}
-// -----------------------------------------------------------------------------
+
sal_Bool ORowSetCache::reFillMatrix(sal_Int32 _nNewStartPos,sal_Int32 _nNewEndPos)
{
TOldRowSetRows::iterator aOldRowEnd = m_aOldRows.end();
for (TOldRowSetRows::iterator aOldRowIter = m_aOldRows.begin(); aOldRowIter != aOldRowEnd; ++aOldRowIter)
{
- if ( aOldRowIter->isValid() && aOldRowIter->getBody().getRow().isValid() )
- aOldRowIter->getBody().setRow(new ORowSetValueVector(aOldRowIter->getBody().getRow().getBody()) );
+ if ( aOldRowIter->is() && (*aOldRowIter)->getRow().is() )
+ (*aOldRowIter)->setRow(new ORowSetValueVector( *((*aOldRowIter)->getRow()) ) );
}
sal_Int32 nNewSt = _nNewStartPos;
sal_Bool bRet = fillMatrix(nNewSt,_nNewEndPos);
m_nStartPos = nNewSt - 1;
- rotateCacheIterator(static_cast<sal_Int16>(m_nFetchSize+1)); // forces that every iterator will be set to null
+ rotateCacheIterator(static_cast<sal_Int16>(m_nFetchSize+1)); // forces every iterator to null
return bRet;
}
-// -----------------------------------------------------------------------------
+
sal_Bool ORowSetCache::fill(ORowSetMatrix::iterator& _aIter,const ORowSetMatrix::iterator& _aEnd,sal_Int32& _nPos,sal_Bool _bCheck)
{
sal_Int32 nColumnCount = m_xMetaData->getColumnCount();
for(; _bCheck && _aIter != _aEnd;)
{
- if ( !_aIter->isValid() )
+ if ( !_aIter->is() )
*_aIter = new ORowSetValueVector(nColumnCount);
else
{
TOldRowSetRows::iterator aOldRowEnd = m_aOldRows.end();
for (TOldRowSetRows::iterator aOldRowIter = m_aOldRows.begin(); aOldRowIter != aOldRowEnd; ++aOldRowIter)
{
- if ( aOldRowIter->getBody().getRow().isEqualBody(*_aIter) )
+ if ( (*aOldRowIter)->getRow() == *_aIter )
*_aIter = new ORowSetValueVector(nColumnCount);
}
}
@@ -1685,12 +1664,12 @@ sal_Bool ORowSetCache::fill(ORowSetMatrix::iterator& _aIter,const ORowSetMatrix:
}
return _bCheck;
}
-// -----------------------------------------------------------------------------
+
bool ORowSetCache::isResultSetChanged() const
{
return m_pCacheSet->isResultSetChanged();
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::reset(const Reference< XResultSet>& _xDriverSet)
{
m_xMetaData.set(Reference< XResultSetMetaDataSupplier >(_xDriverSet,UNO_QUERY)->getMetaData());
@@ -1700,7 +1679,7 @@ void ORowSetCache::reset(const Reference< XResultSet>& _xDriverSet)
m_nRowCount = 0;
reFillMatrix(m_nStartPos+1,m_nEndPos+1);
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::impl_updateRowFromCache_throw(ORowSetValueVector::Vector& io_aRow
,::std::vector<sal_Int32>& o_ChangedColumns)
{
@@ -1709,16 +1688,16 @@ void ORowSetCache::impl_updateRowFromCache_throw(ORowSetValueVector::Vector& io_
ORowSetMatrix::iterator aIter = m_pMatrix->begin();
for(;aIter != m_pMatrix->end();++aIter)
{
- if ( aIter->isValid() && m_pCacheSet->updateColumnValues((*aIter)->get(),io_aRow,o_ChangedColumns))
+ if ( aIter->is() && m_pCacheSet->updateColumnValues((*aIter)->get(),io_aRow,o_ChangedColumns))
{
break;
}
}
-
+
if ( aIter == m_pMatrix->end() )
{
m_pCacheSet->fillMissingValues(io_aRow);
}
}
}
-// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/RowSetCache.hxx b/dbaccess/source/core/api/RowSetCache.hxx
index 065fb2fad..0ce22af54 100644
--- a/dbaccess/source/core/api/RowSetCache.hxx
+++ b/dbaccess/source/core/api/RowSetCache.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,78 +28,30 @@
#ifndef DBACCESS_CORE_API_ROWSETCACHE_HXX
#define DBACCESS_CORE_API_ROWSETCACHE_HXX
-#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
#include <connectivity/CommonTools.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XPREPAREDSTATEMENT_HPP_
#include <com/sun/star/sdbc/XPreparedStatement.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYANALYZER_HPP_
#include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYANALYZER_HPP_
#include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XWARNINGSSUPPLIER_HPP_
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XRESULTSETACCESS_HPP_
#include <com/sun/star/sdb/XResultSetAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCOLUMNLOCATE_HPP_
#include <com/sun/star/sdbc/XColumnLocate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XROWLOCATE_HPP_
#include <com/sun/star/sdbcx/XRowLocate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROWUPDATE_HPP_
#include <com/sun/star/sdbc/XRowUpdate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETUPDATE_HPP_
#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XROWSETAPPROVEBROADCASTER_HPP_
#include <com/sun/star/sdb/XRowSetApproveBroadcaster.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_RESULTSETTYPE_HPP_
#include <com/sun/star/sdbc/ResultSetType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDELETEROWS_HPP_
#include <com/sun/star/sdbcx/XDeleteRows.hpp>
-#endif
-#ifndef _CPPUHELPER_COMPBASE11_HXX_
#include <cppuhelper/compbase11.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTYCONTAINER_HXX_
#include <comphelper/propertycontainer.hxx>
-#endif
-#ifndef COMPHELPER_COMPONENTCONTEXT_HXX
#include <comphelper/componentcontext.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE5_HXX_
#include <cppuhelper/implbase5.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
#include <comphelper/proparrhlp.hxx>
-#endif
-#ifndef DBACCESS_CORE_API_ROWSETROW_HXX
#include "RowSetRow.hxx"
-#endif
-#ifndef DBACCESS_ROWSETCACHEITERATOR_HXX
#include "RowSetCacheIterator.hxx"
-#endif
namespace connectivity
{
@@ -137,7 +90,6 @@ namespace dbaccess
ORowSetMatrix* m_pInsertMatrix; // represent the rows which should be inserted normally this is only one
ORowSetMatrix::iterator m_aInsertRow; // represent a insert row
- // ORowSetRow m_aInsertRow; // present the row that should be inserted
sal_Int32 m_nLastColumnIndex; // the last column ask for, used for wasNull()
connectivity::OSQLTable m_aUpdateTable; // used for updates/deletes and inserts
@@ -272,3 +224,4 @@ namespace dbaccess
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/RowSetCacheIterator.cxx b/dbaccess/source/core/api/RowSetCacheIterator.cxx
index 91863147c..986a9bb5d 100644
--- a/dbaccess/source/core/api/RowSetCacheIterator.cxx
+++ b/dbaccess/source/core/api/RowSetCacheIterator.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,15 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBACCESS_ROWSETCACHEITERATOR_HXX
#include "RowSetCacheIterator.hxx"
-#endif
-#ifndef DBACCESS_CORE_API_ROWSETCACHE_HXX
#include "RowSetCache.hxx"
-#endif
-#ifndef DBACCESS_CORE_API_ROWSETBASE_HXX
#include "RowSetBase.hxx"
-#endif
#include <rtl/logfile.hxx>
using namespace dbaccess;
@@ -46,12 +41,12 @@ ORowSetCacheIterator::ORowSetCacheIterator(const ORowSetCacheIterator& _rRH)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetCacheIterator::ORowSetCacheIterator" );
}
-// -----------------------------------------------------------------------------
+
ORowSetCacheIterator::operator ORowSetMatrix::iterator()
{
return m_aIter->second.aIterator;
}
-// -----------------------------------------------------------------------------
+
ORowSetCacheIterator& ORowSetCacheIterator::operator =(const ORowSetCacheIterator& _rRH)
{
if(this == &_rRH)
@@ -63,18 +58,18 @@ ORowSetCacheIterator& ORowSetCacheIterator::operator =(const ORowSetCacheIterato
return *this;
}
-// -----------------------------------------------------------------------------
+
ORowSetCacheIterator& ORowSetCacheIterator::operator =(const ORowSetMatrix::iterator& _rIter)
{
m_aIter->second.aIterator = _rIter;
return *this;
}
-// -----------------------------------------------------------------------------
+
ORowSetRow& ORowSetCacheIterator::operator *()
{
return *m_aIter->second.aIterator;
}
-// -----------------------------------------------------------------------------
+
const ORowSetRow& ORowSetCacheIterator::operator *() const
{
if ( !m_pRowSet->isInsertRow() && m_aIter->second.aIterator == m_pCache->m_pMatrix->end() )
@@ -85,12 +80,12 @@ const ORowSetRow& ORowSetCacheIterator::operator *() const
}
return *m_aIter->second.aIterator;
}
-// -----------------------------------------------------------------------------
+
ORowSetMatrix::iterator& ORowSetCacheIterator::operator ->()
{
return m_aIter->second.aIterator;
}
-// -----------------------------------------------------------------------------
+
const ORowSetMatrix::iterator& ORowSetCacheIterator::operator ->() const
{
if ( !m_pRowSet->isInsertRow() && m_aIter->second.aIterator == m_pCache->m_pMatrix->end() )
@@ -101,33 +96,33 @@ const ORowSetMatrix::iterator& ORowSetCacheIterator::operator ->() const
}
return m_aIter->second.aIterator;
}
-// -----------------------------------------------------------------------------
+
bool ORowSetCacheIterator::operator <=(const ORowSetMatrix::iterator& _rRH) const
{
return m_aIter->second.aIterator <= _rRH;
}
-// -----------------------------------------------------------------------------
+
bool ORowSetCacheIterator::operator <(const ORowSetMatrix::iterator& _rRH) const
{
return m_aIter->second.aIterator < _rRH;
}
-// -----------------------------------------------------------------------------
+
bool ORowSetCacheIterator::operator !=(const ORowSetMatrix::iterator& _rRH) const
{
return m_aIter->second.aIterator != _rRH;
}
-// -----------------------------------------------------------------------------
+
bool ORowSetCacheIterator::operator ==(const ORowSetMatrix::iterator& _rRH) const
{
return m_aIter->second.aIterator == _rRH;
}
-// -----------------------------------------------------------------------------
+
void ORowSetCacheIterator::setBookmark(const ::com::sun::star::uno::Any& _rBookmark)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetCacheIterator::setBookmark" );
m_aIter->second.aBookmark = _rBookmark;
}
-// -----------------------------------------------------------------------------
+
sal_Bool ORowSetCacheIterator::isNull() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetCacheIterator::isNull" );
@@ -136,7 +131,7 @@ sal_Bool ORowSetCacheIterator::isNull() const
{
ORowSetCacheIterator_Helper aHelper = m_aIter->second;
bRet = ( m_pRowSet->isInsertRow()
- ?
+ ?
m_aIter->second.aIterator == m_pCache->m_pInsertMatrix->end()
:
m_aIter->second.aIterator == m_pCache->m_pMatrix->end()
@@ -144,9 +139,11 @@ sal_Bool ORowSetCacheIterator::isNull() const
}
return bRet;
}
-// -----------------------------------------------------------------------------
+
::osl::Mutex* ORowSetCacheIterator::getMutex() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetCacheIterator::getMutex" );
return m_pRowSet ? m_pRowSet->getMutex() : NULL;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/RowSetCacheIterator.hxx b/dbaccess/source/core/api/RowSetCacheIterator.hxx
index 641e0309d..1387635d4 100644
--- a/dbaccess/source/core/api/RowSetCacheIterator.hxx
+++ b/dbaccess/source/core/api/RowSetCacheIterator.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,12 +28,8 @@
#ifndef DBACCESS_ROWSETCACHEITERATOR_HXX
#define DBACCESS_ROWSETCACHEITERATOR_HXX
-#ifndef DBACCESS_CORE_API_ROWSETROW_HXX
#include "RowSetRow.hxx"
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
namespace dbaccess
{
@@ -43,7 +40,7 @@ namespace dbaccess
::com::sun::star::uno::Any aBookmark;
ORowSetBase* pRowSet;
} ORowSetCacheIterator_Helper;
-
+
DECLARE_STL_STDKEY_MAP(sal_Int32,ORowSetCacheIterator_Helper,ORowSetCacheMap);
class ORowSetCache;
@@ -54,7 +51,7 @@ namespace dbaccess
ORowSetCache* m_pCache;
ORowSetBase* m_pRowSet;
protected:
- ORowSetCacheIterator(const ORowSetCacheMap::iterator& _rIter,ORowSetCache* _pCache,ORowSetBase* _pRowSet)
+ ORowSetCacheIterator(const ORowSetCacheMap::iterator& _rIter,ORowSetCache* _pCache,ORowSetBase* _pRowSet)
: m_aIter(_rIter)
,m_pCache(_pCache)
,m_pRowSet(_pRowSet)
@@ -71,7 +68,7 @@ namespace dbaccess
ORowSetRow& operator *();
const ORowSetRow& operator *() const;
-
+
ORowSetMatrix::iterator& operator ->();
const ORowSetMatrix::iterator& operator ->() const;
@@ -89,4 +86,4 @@ namespace dbaccess
}
#endif // DBACCESS_ROWSETCACHEITERATOR_HXX
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/RowSetRow.hxx b/dbaccess/source/core/api/RowSetRow.hxx
index e7ccd399d..88e53ea5f 100644
--- a/dbaccess/source/core/api/RowSetRow.hxx
+++ b/dbaccess/source/core/api/RowSetRow.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,23 +28,15 @@
#ifndef DBACCESS_CORE_API_ROWSETROW_HXX
#define DBACCESS_CORE_API_ROWSETROW_HXX
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
-#endif
-#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
+#include <rtl/ref.hxx>
#include <connectivity/CommonTools.hxx>
-#endif
-#ifndef _CONNECTIVITY_FILE_VALUE_HXX_
#include "connectivity/FValue.hxx"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
namespace dbaccess
{
typedef connectivity::ORowVector< connectivity::ORowSetValue > ORowSetValueVector;
- typedef ::vos::ORef< ORowSetValueVector > ORowSetRow;
+ typedef ::rtl::Reference< ORowSetValueVector > ORowSetRow;
typedef ::std::vector< ORowSetRow > ORowSetMatrix;
class ORowSetOldRowHelper
@@ -55,14 +48,10 @@ namespace dbaccess
ORowSetOldRowHelper(const ORowSetOldRowHelper& _rRh);
public:
ORowSetOldRowHelper() : m_refCount(0){}
- ORowSetOldRowHelper(const ORowSetRow& _rRow)
+ ORowSetOldRowHelper(const ORowSetRow& _rRow)
: m_refCount(0)
, m_aRow(_rRow)
{}
-// ORowSetOldRowHelper(const ORowSetOldRowHelper& _rRh)
-// : m_refCount(0)
-// , m_aRow(_rRh.m_aRow)
-// {}
void acquire()
{
@@ -78,7 +67,7 @@ namespace dbaccess
inline void setRow(const ORowSetRow& _rRow) { m_aRow = _rRow; }
};
- typedef ::vos::ORef< ORowSetOldRowHelper > TORowSetOldRowHelperRef;
+ typedef ::rtl::Reference< ORowSetOldRowHelper > TORowSetOldRowHelperRef;
class ORowSetValueCompare
{
@@ -106,3 +95,4 @@ namespace dbaccess
}
#endif // DBACCESS_CORE_API_ROWSETROW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 7587e29fe..518a41912 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -63,6 +64,7 @@
#include <unotools/syslocale.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <unotools/configmgr.hxx>
#include <unotools/sharedunocomponent.hxx>
@@ -104,10 +106,8 @@ namespace BooleanComparisonMode = ::com::sun::star::sdb::BooleanComparisonMode;
#define R_BRACKET ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")"))
#define COMMA ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","))
-// -------------------------------------------------------------------------
namespace
{
- // .....................................................................
/** parses the given statement, using the given parser, returns a parse node representing
the statement
@@ -241,7 +241,7 @@ namespace
}
DBG_NAME(OSingleSelectQueryComposer)
-// -------------------------------------------------------------------------
+
OSingleSelectQueryComposer::OSingleSelectQueryComposer(const Reference< XNameAccess>& _rxTables,
const Reference< XConnection>& _xConnection,
const ::comphelper::ComponentContext& _rContext )
@@ -292,7 +292,7 @@ OSingleSelectQueryComposer::OSingleSelectQueryComposer(const Reference< XNameAcc
{
}
}
-// -------------------------------------------------------------------------
+
OSingleSelectQueryComposer::~OSingleSelectQueryComposer()
{
DBG_DTOR(OSingleSelectQueryComposer,NULL);
@@ -306,7 +306,7 @@ OSingleSelectQueryComposer::~OSingleSelectQueryComposer()
for(;aTabIter != aTabEnd;++aTabIter)
delete *aTabIter;
}
-// -------------------------------------------------------------------------
+
// OComponentHelper
void SAL_CALL OSingleSelectQueryComposer::disposing(void)
{
@@ -328,7 +328,6 @@ IMPLEMENT_SERVICE_INFO1(OSingleSelectQueryComposer,"org.openoffice.comp.dba.OSin
IMPLEMENT_TYPEPROVIDER3(OSingleSelectQueryComposer,OSubComponent,OSingleSelectQueryComposer_BASE,OPropertyContainer)
IMPLEMENT_PROPERTYCONTAINER_DEFAULTS(OSingleSelectQueryComposer)
-// -------------------------------------------------------------------------
// com::sun::star::lang::XUnoTunnel
sal_Int64 SAL_CALL OSingleSelectQueryComposer::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
@@ -339,7 +338,6 @@ sal_Int64 SAL_CALL OSingleSelectQueryComposer::getSomething( const Sequence< sal
return sal_Int64(0);
}
-// -------------------------------------------------------------------------
// XSingleSelectQueryAnalyzer
::rtl::OUString SAL_CALL OSingleSelectQueryComposer::getQuery( ) throw(RuntimeException)
{
@@ -351,7 +349,6 @@ sal_Int64 SAL_CALL OSingleSelectQueryComposer::getSomething( const Sequence< sal
return getStatementPart(F_tmp,m_aSqlIterator);
}
-// -------------------------------------------------------------------------
void SAL_CALL OSingleSelectQueryComposer::setQuery( const ::rtl::OUString& command ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "frank.schoenheit@sun.com", "OSingleSelectQueryComposer::setQuery" );
@@ -372,9 +369,9 @@ void SAL_CALL OSingleSelectQueryComposer::setQuery( const ::rtl::OUString& comma
for ( SQLPart eLoopParts = Where; eLoopParts != SQLPartCount; incSQLPart( eLoopParts ) )
m_aElementaryParts[ eLoopParts ] = ::rtl::OUString();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OSingleSelectQueryComposer::setCommand( const ::rtl::OUString& Command,sal_Int32 _nCommandType ) throw(SQLException, RuntimeException)
-{
+{
::rtl::OUStringBuffer sSQL;
switch(_nCommandType)
{
@@ -400,7 +397,7 @@ void SAL_CALL OSingleSelectQueryComposer::setCommand( const ::rtl::OUString& Com
{
DBG_UNHANDLED_EXCEPTION();
}
-
+
sSQL.append(dbtools::composeTableNameForSelect(m_xConnection,xTable));
}
else
@@ -413,7 +410,7 @@ void SAL_CALL OSingleSelectQueryComposer::setCommand( const ::rtl::OUString& Com
case CommandType::QUERY:
if ( m_xConnectionQueries->hasByName(Command) )
{
-
+
Reference<XPropertySet> xQuery(m_xConnectionQueries->getByName(Command),UNO_QUERY);
::rtl::OUString sCommand;
xQuery->getPropertyValue(PROPERTY_COMMAND) >>= sCommand;
@@ -425,7 +422,7 @@ void SAL_CALL OSingleSelectQueryComposer::setCommand( const ::rtl::OUString& Com
sMessage.SearchAndReplaceAscii( "$table$", Command );
throwGenericSQLException(sMessage,*this);
}
-
+
break;
default:
break;
@@ -441,16 +438,8 @@ void SAL_CALL OSingleSelectQueryComposer::setCommand( const ::rtl::OUString& Com
::rtl::OUString sCommand = sSQL.makeStringAndClear();
setElementaryQuery(sCommand);
m_sOrignal = sCommand;
-/*
- // reset the additive iterator to the same statement
- parseAndCheck_throwError( m_aSqlParser, m_sOrignal, m_aAdditiveIterator, *this );
-
- // we have no "elementary" parts anymore (means filter/groupby/having/order clauses)
- for ( SQLPart eLoopParts = Where; eLoopParts != SQLPartCount; incSQLPart( eLoopParts ) )
- m_aElementaryParts[ eLoopParts ] = ::rtl::OUString();
-*/
}
-// -----------------------------------------------------------------------------
+
void OSingleSelectQueryComposer::setQuery_Impl( const ::rtl::OUString& command )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "frank.schoenheit@sun.com", "OSingleSelectQueryComposer::setQuery_Impl" );
@@ -460,41 +449,38 @@ void OSingleSelectQueryComposer::setQuery_Impl( const ::rtl::OUString& command )
// strip it from all clauses, to have the pure SELECT statement
m_aPureSelectSQL = getPureSelectStatement( m_aSqlIterator.getParseTree(), m_xConnection );
- // update columns and tables
- // why? Shouldn't this be done on request only?
- // otherwise nothing is working anymore :-)
-// getColumns();
+ // update tables
getTables();
}
-// -----------------------------------------------------------------------------
+
Sequence< Sequence< PropertyValue > > SAL_CALL OSingleSelectQueryComposer::getStructuredHavingClause( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getStructuredHavingClause" );
TGetParseNode F_tmp(&OSQLParseTreeIterator::getSimpleHavingTree);
return getStructuredCondition(F_tmp);
}
-// -------------------------------------------------------------------------
+
Sequence< Sequence< PropertyValue > > SAL_CALL OSingleSelectQueryComposer::getStructuredFilter( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getStructuredFilter" );
TGetParseNode F_tmp(&OSQLParseTreeIterator::getSimpleWhereTree);
return getStructuredCondition(F_tmp);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OSingleSelectQueryComposer::appendHavingClauseByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw (SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::appendHavingClauseByColumn" );
::std::mem_fun1_t<bool,OSingleSelectQueryComposer,::rtl::OUString> F_tmp(&OSingleSelectQueryComposer::implSetHavingClause);
setConditionByColumn(column,andCriteria,F_tmp,filterOperator);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OSingleSelectQueryComposer::appendFilterByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::appendFilterByColumn" );
::std::mem_fun1_t<bool,OSingleSelectQueryComposer,::rtl::OUString> F_tmp(&OSingleSelectQueryComposer::implSetFilter);
setConditionByColumn(column,andCriteria,F_tmp,filterOperator);
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OSingleSelectQueryComposer::impl_getColumnName_throw(const Reference< XPropertySet >& column)
{
::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
@@ -564,7 +550,7 @@ void SAL_CALL OSingleSelectQueryComposer::appendFilterByColumn( const Reference<
aNewName = getTableAlias(column) + ::dbtools::quoteName(aQuote,aName);
return aNewName;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OSingleSelectQueryComposer::appendOrderByColumn( const Reference< XPropertySet >& column, sal_Bool ascending ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::appendOrderByColumn" );
@@ -580,7 +566,6 @@ void SAL_CALL OSingleSelectQueryComposer::appendOrderByColumn( const Reference<
setOrder(sOrder);
}
-// -------------------------------------------------------------------------
void SAL_CALL OSingleSelectQueryComposer::appendGroupByColumn( const Reference< XPropertySet >& column) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::appendGroupByColumn" );
@@ -591,11 +576,11 @@ void SAL_CALL OSingleSelectQueryComposer::appendGroupByColumn( const Reference<
aComposer.append( sColumnName );
setGroup( aComposer.getComposedAndClear() );
}
-// -------------------------------------------------------------------------
+
::rtl::OUString OSingleSelectQueryComposer::composeStatementFromParts( const ::std::vector< ::rtl::OUString >& _rParts )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::composeStatementFromParts" );
- DBG_ASSERT( _rParts.size() == (size_t)SQLPartCount, "OSingleSelectQueryComposer::composeStatementFromParts: invalid parts array!" );
+ OSL_ENSURE( _rParts.size() == (size_t)SQLPartCount, "OSingleSelectQueryComposer::composeStatementFromParts: invalid parts array!" );
::rtl::OUStringBuffer aSql( m_aPureSelectSQL );
for ( SQLPart eLoopParts = Where; eLoopParts != SQLPartCount; incSQLPart( eLoopParts ) )
@@ -608,14 +593,12 @@ void SAL_CALL OSingleSelectQueryComposer::appendGroupByColumn( const Reference<
return aSql.makeStringAndClear();
}
-// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL OSingleSelectQueryComposer::getElementaryQuery() throw (::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getElementaryQuery" );
return composeStatementFromParts( m_aElementaryParts );
}
-// -------------------------------------------------------------------------
void SAL_CALL OSingleSelectQueryComposer::setElementaryQuery( const ::rtl::OUString& _rElementary ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "frank.schoenheit@sun.com", "OSingleSelectQueryComposer::setElementaryQuery" );
@@ -644,13 +627,12 @@ void SAL_CALL OSingleSelectQueryComposer::setElementaryQuery( const ::rtl::OUStr
catch( const Exception& e )
{
(void)e;
- DBG_ERROR( "OSingleSelectQueryComposer::setElementaryQuery: there should be no error anymore for the additive statement!" );
+ OSL_FAIL( "OSingleSelectQueryComposer::setElementaryQuery: there should be no error anymore for the additive statement!" );
// every part of the additive statement should have passed other tests already, and should not
// be able to cause any errors ... me thinks
}
}
-// -------------------------------------------------------------------------
namespace
{
::rtl::OUString getComposedClause( const ::rtl::OUString _rElementaryClause, const ::rtl::OUString _rAdditionalClause,
@@ -666,7 +648,6 @@ namespace
}
}
-// -------------------------------------------------------------------------
void OSingleSelectQueryComposer::setSingleAdditiveClause( SQLPart _ePart, const ::rtl::OUString& _rClause )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setSingleAdditiveClause" );
@@ -724,39 +705,36 @@ void OSingleSelectQueryComposer::setSingleAdditiveClause( SQLPart _ePart, const
catch( const Exception& e )
{
(void)e;
- DBG_ERROR( "OSingleSelectQueryComposer::setSingleAdditiveClause: there should be no error anymore for the additive statement!" );
+ OSL_FAIL( "OSingleSelectQueryComposer::setSingleAdditiveClause: there should be no error anymore for the additive statement!" );
// every part of the additive statement should have passed other tests already, and should not
// be able to cause any errors ... me thinks
}
}
-// -------------------------------------------------------------------------
void SAL_CALL OSingleSelectQueryComposer::setFilter( const ::rtl::OUString& filter ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setFilter" );
setSingleAdditiveClause( Where, filter );
}
-// -------------------------------------------------------------------------
void SAL_CALL OSingleSelectQueryComposer::setOrder( const ::rtl::OUString& order ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setOrder" );
setSingleAdditiveClause( Order, order );
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OSingleSelectQueryComposer::setGroup( const ::rtl::OUString& group ) throw (SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setGroup" );
setSingleAdditiveClause( Group, group );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OSingleSelectQueryComposer::setHavingClause( const ::rtl::OUString& filter ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setHavingClause" );
setSingleAdditiveClause( Having, filter );
}
-// -------------------------------------------------------------------------
// XTablesSupplier
Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getTables( ) throw(RuntimeException)
{
@@ -777,7 +755,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getTables( ) thro
return m_pTables;
}
-// -------------------------------------------------------------------------
+
// XColumnsSupplier
Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) throw(RuntimeException)
{
@@ -788,7 +766,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
return m_aCurrentColumns[SelectColumns];
::std::vector< ::rtl::OUString> aNames;
- ::vos::ORef< OSQLColumns> aSelectColumns;
+ ::rtl::Reference< OSQLColumns> aSelectColumns;
sal_Bool bCase = sal_True;
Reference< XNameAccess> xQueryColumns;
if ( m_nCommandType == CommandType::QUERY )
@@ -813,7 +791,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
aSQL.append( STR_WHERE );
// preserve the original WHERE clause
- // #i102234# / 2009-06-02 / frank.schoenheit@sun.com
+ // #i102234#
::rtl::OUString sOriginalWhereClause = getSQLPart( Where, m_aSqlIterator, sal_False );
if ( sOriginalWhereClause.getLength() )
{
@@ -834,7 +812,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
// normalize the statement so that it doesn't contain any application-level features anymore
::rtl::OUString sError;
const ::std::auto_ptr< OSQLParseNode > pStatementTree( m_aSqlParser.parseTree( sError, sSQL, false ) );
- DBG_ASSERT( pStatementTree.get(), "OSingleSelectQueryComposer::getColumns: could not parse the column retrieval statement!" );
+ OSL_ENSURE( pStatementTree.get(), "OSingleSelectQueryComposer::getColumns: could not parse the column retrieval statement!" );
if ( pStatementTree.get() )
if ( !pStatementTree->parseNodeToExecutableStatement( sSQL, m_xConnection, m_aSqlParser, NULL ) )
break;
@@ -861,10 +839,10 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
xResultSetMeta.set( xResMetaDataSup->getMetaData(), UNO_QUERY_THROW );
}
}
- catch( const Exception& )
- {
- //@see issue http://qa.openoffice.org/issues/show_bug.cgi?id=110111
- // access returns a different order of column names when executing select * from
+ catch( const Exception& )
+ {
+ //@see issue http://qa.openoffice.org/issues/show_bug.cgi?id=110111
+ // access returns a different order of column names when executing select * from
// and asking the columns from the metadata.
Reference< XParameters > xParameters( xPreparedStatement, UNO_QUERY_THROW );
Reference< XIndexAccess > xPara = getParameters();
@@ -959,11 +937,10 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
if ( !sColumnName.getLength() )
xProp->getPropertyValue(PROPERTY_NAME) >>= sColumnName;
-
aFindName = ::std::find_if(aNames.begin(),aNames.end(),::std::bind2nd(aCaseCompareFunctor,sColumnName));
sal_Int32 j = 0;
while ( aFindName != aNames.end() )
- {
+ {
sColumnName += ::rtl::OUString::valueOf(++j);
aFindName = ::std::find_if(aNames.begin(),aNames.end(),::std::bind2nd(aCaseCompareFunctor,sColumnName));
}
@@ -971,7 +948,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
pColumn->setName(sColumnName);
pColumn->setRealName(sRealName);
pColumn->setTableName(::comphelper::getString(xProp->getPropertyValue(PROPERTY_TABLENAME)));
-
+
(aSelectColumns->get())[i-1] = pColumn;
}
else
@@ -994,7 +971,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
return m_aCurrentColumns[SelectColumns];
}
-// -------------------------------------------------------------------------
+
sal_Bool OSingleSelectQueryComposer::setORCriteria(OSQLParseNode* pCondition, OSQLParseTreeIterator& _rIterator,
::std::vector< ::std::vector < PropertyValue > >& rFilters, const Reference< ::com::sun::star::util::XNumberFormatter > & xFormatter) const
{
@@ -1015,7 +992,6 @@ sal_Bool OSingleSelectQueryComposer::setORCriteria(OSQLParseNode* pCondition, OS
{
// Ist das erste Element wieder eine OR-Verknuepfung?
// Dann rekursiv absteigen ...
- //if (!i && SQL_ISRULE(pCondition->getChild(i),search_condition))
if (SQL_ISRULE(pCondition->getChild(i),search_condition))
bResult = setORCriteria(pCondition->getChild(i), _rIterator, rFilters, xFormatter);
else
@@ -1033,7 +1009,6 @@ sal_Bool OSingleSelectQueryComposer::setORCriteria(OSQLParseNode* pCondition, OS
}
}
-//--------------------------------------------------------------------------------------------------
sal_Bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode * pCondition,
OSQLParseTreeIterator& _rIterator, ::std::vector < PropertyValue >& rFilter, const Reference< XNumberFormatter > & xFormatter) const
{
@@ -1042,7 +1017,7 @@ sal_Bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode * pCondition,
if (SQL_ISRULE(pCondition,boolean_primary))
{
// this should not occur
- DBG_ERROR("boolean_primary in And-Criteria");
+ OSL_FAIL("boolean_primary in And-Criteria");
return sal_False;
}
// Das erste Element ist (wieder) eine AND-Verknuepfung
@@ -1068,9 +1043,7 @@ sal_Bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode * pCondition,
::rtl::OUString aColumnName;
- // pCondition->parseNodeToStr(aValue,m_xMetaData, xFormatter, m_aLocale,static_cast<sal_Char>(m_sDecimalSep.toChar()));
pCondition->parseNodeToStr( aValue, m_xConnection, NULL );
- // pCondition->getChild(0)->parseNodeToStr(aColumnName,m_xMetaData, xFormatter, m_aLocale,static_cast<sal_Char>(m_sDecimalSep.toChar()));
pCondition->getChild(0)->parseNodeToStr( aColumnName, m_xConnection, NULL );
// don't display the column name
@@ -1096,15 +1069,15 @@ sal_Bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode * pCondition,
}
else if (SQL_ISRULE(pCondition,in_predicate))
{
- OSL_ENSURE( false, "OSingleSelectQueryComposer::setANDCriteria: in_predicate not implemented!" );
+ OSL_FAIL( "OSingleSelectQueryComposer::setANDCriteria: in_predicate not implemented!" );
}
else if (SQL_ISRULE(pCondition,all_or_any_predicate))
{
- OSL_ENSURE( false, "OSingleSelectQueryComposer::setANDCriteria: all_or_any_predicate not implemented!" );
+ OSL_FAIL( "OSingleSelectQueryComposer::setANDCriteria: all_or_any_predicate not implemented!" );
}
else if (SQL_ISRULE(pCondition,between_predicate))
{
- OSL_ENSURE( false, "OSingleSelectQueryComposer::setANDCriteria: between_predicate not implemented!" );
+ OSL_FAIL( "OSingleSelectQueryComposer::setANDCriteria: between_predicate not implemented!" );
}
rFilter.push_back(aItem);
@@ -1124,7 +1097,7 @@ sal_Bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode * pCondition,
return sal_True;
}
-// -----------------------------------------------------------------------------
+
sal_Int32 OSingleSelectQueryComposer::getPredicateType(OSQLParseNode * _pPredicate) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getPredicateType" );
@@ -1150,16 +1123,16 @@ sal_Int32 OSingleSelectQueryComposer::getPredicateType(OSQLParseNode * _pPredica
nPredicate = SQLFilterOperator::GREATER_EQUAL;
break;
default:
- OSL_ENSURE(0,"Wrong NodeType!");
+ OSL_FAIL("Wrong NodeType!");
}
return nPredicate;
}
-//------------------------------------------------------------------------------
+
sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCondition, OSQLParseTreeIterator& _rIterator,
::std::vector < PropertyValue >& rFilter, const Reference< ::com::sun::star::util::XNumberFormatter > & xFormatter) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setComparsionPredicate" );
- DBG_ASSERT(SQL_ISRULE(pCondition, comparison_predicate),"setComparsionPredicate: pCondition ist kein ComparsionPredicate");
+ OSL_ENSURE(SQL_ISRULE(pCondition, comparison_predicate),"setComparsionPredicate: pCondition ist kein ComparsionPredicate");
if (SQL_ISRULE(pCondition->getChild(0), column_ref) ||
SQL_ISRULE(pCondition->getChild(pCondition->count()-1), column_ref))
{
@@ -1277,8 +1250,8 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
}
return sal_True;
}
+
// functions for analysing SQL
-//--------------------------------------------------------------------------------------------------
::rtl::OUString OSingleSelectQueryComposer::getColumnName( ::connectivity::OSQLParseNode* pColumnRef, OSQLParseTreeIterator& _rIterator ) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getColumnName" );
@@ -1286,7 +1259,7 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
_rIterator.getColumnRange(pColumnRef,aColumnName,aTableRange);
return aColumnName;
}
-//------------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OSingleSelectQueryComposer::getFilter( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getFilter" );
@@ -1294,7 +1267,7 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
::osl::MutexGuard aGuard( m_aMutex );
return getSQLPart(Where,m_aAdditiveIterator,sal_False);
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OSingleSelectQueryComposer::getOrder( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getOrder" );
@@ -1302,7 +1275,7 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
::osl::MutexGuard aGuard( m_aMutex );
return getSQLPart(Order,m_aAdditiveIterator,sal_False);
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OSingleSelectQueryComposer::getGroup( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getGroup" );
@@ -1310,7 +1283,7 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
::osl::MutexGuard aGuard( m_aMutex );
return getSQLPart(Group,m_aAdditiveIterator,sal_False);
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OSingleSelectQueryComposer::getHavingClause() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getHavingClause" );
@@ -1318,7 +1291,7 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
::osl::MutexGuard aGuard( m_aMutex );
return getSQLPart(Having,m_aAdditiveIterator,sal_False);
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OSingleSelectQueryComposer::getTableAlias(const Reference< XPropertySet >& column) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getTableAlias" );
@@ -1336,7 +1309,7 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
const ::rtl::OUString* pEnd = pBegin + aNames.getLength();
if(!aTable.getLength())
- { // we don't found a table name, now we must search every table for this column
+ { // we haven't found a table name, now we must search every table for this column
for(;pBegin != pEnd;++pBegin)
{
Reference<XColumnsSupplier> xColumnsSupp;
@@ -1344,10 +1317,6 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
if(xColumnsSupp.is() && xColumnsSupp->getColumns()->hasByName(aColumnName))
{
-// Reference<XPropertySet> xTableProp(xColumnsSupp,UNO_QUERY);
-// xTableProp->getPropertyValue(PROPERTY_CATALOGNAME) >>= aCatalog;
-// xTableProp->getPropertyValue(PROPERTY_SCHEMANAME) >>= aSchema;
-// xTableProp->getPropertyValue(PROPERTY_NAME) >>= aTable;
aTable = *pBegin;
break;
}
@@ -1393,16 +1362,16 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
}
return sReturn;
}
-// -----------------------------------------------------------------------------
+
Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getParameters( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getParameters" );
// now set the Parameters
if ( !m_aCurrentColumns[ParameterColumns] )
{
- ::vos::ORef< OSQLColumns> aCols = m_aSqlIterator.getParameters();
+ ::rtl::Reference< OSQLColumns> aCols = m_aSqlIterator.getParameters();
::std::vector< ::rtl::OUString> aNames;
- OSQLColumns::Vector::const_iterator aEnd = aCols->get().end();
+ OSQLColumns::Vector::const_iterator aEnd = aCols->get().end();
for(OSQLColumns::Vector::const_iterator aIter = aCols->get().begin(); aIter != aEnd;++aIter)
aNames.push_back(getString((*aIter)->getPropertyValue(PROPERTY_NAME)));
m_aCurrentColumns[ParameterColumns] = new OPrivateColumns(aCols,m_xMetaData->supportsMixedCaseQuotedIdentifiers(),*this,m_aMutex,aNames,sal_True);
@@ -1410,7 +1379,7 @@ Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getParameters( )
return m_aCurrentColumns[ParameterColumns];
}
-// -----------------------------------------------------------------------------
+
void OSingleSelectQueryComposer::clearColumns( const EColumnType _eType )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::clearColumns" );
@@ -1422,7 +1391,7 @@ void OSingleSelectQueryComposer::clearColumns( const EColumnType _eType )
m_aCurrentColumns[ _eType ] = NULL;
}
}
-// -----------------------------------------------------------------------------
+
void OSingleSelectQueryComposer::clearCurrentCollections()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::clearCurrentCollections" );
@@ -1445,9 +1414,9 @@ void OSingleSelectQueryComposer::clearCurrentCollections()
m_pTables = NULL;
}
}
-// -----------------------------------------------------------------------------
+
Reference< XIndexAccess > OSingleSelectQueryComposer::setCurrentColumns( EColumnType _eType,
- const ::vos::ORef< OSQLColumns >& _rCols )
+ const ::rtl::Reference< OSQLColumns >& _rCols )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setCurrentColumns" );
::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
@@ -1457,7 +1426,7 @@ Reference< XIndexAccess > OSingleSelectQueryComposer::setCurrentColumns( EColumn
if ( !m_aCurrentColumns[_eType] )
{
::std::vector< ::rtl::OUString> aNames;
- OSQLColumns::Vector::const_iterator aEnd = _rCols->get().end();
+ OSQLColumns::Vector::const_iterator aEnd = _rCols->get().end();
for(OSQLColumns::Vector::const_iterator aIter = _rCols->get().begin(); aIter != aEnd;++aIter)
aNames.push_back(getString((*aIter)->getPropertyValue(PROPERTY_NAME)));
m_aCurrentColumns[_eType] = new OPrivateColumns(_rCols,m_xMetaData->supportsMixedCaseQuotedIdentifiers(),*this,m_aMutex,aNames,sal_True);
@@ -1465,19 +1434,19 @@ Reference< XIndexAccess > OSingleSelectQueryComposer::setCurrentColumns( EColumn
return m_aCurrentColumns[_eType];
}
-// -----------------------------------------------------------------------------
+
Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getGroupColumns( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getGroupColumns" );
return setCurrentColumns( GroupByColumns, m_aAdditiveIterator.getGroupColumns() );
}
-// -------------------------------------------------------------------------
+
Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getOrderColumns( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getOrderColumns" );
return setCurrentColumns( OrderColumns, m_aAdditiveIterator.getOrderColumns() );
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OSingleSelectQueryComposer::getQueryWithSubstitution( ) throw (SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getQueryWithSubstitution" );
@@ -1496,7 +1465,7 @@ Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getOrderColumns(
return sSqlStatement;
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OSingleSelectQueryComposer::getStatementPart( TGetParseNode& _aGetFunctor, OSQLParseTreeIterator& _rIterator )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getStatementPart" );
@@ -1508,7 +1477,7 @@ Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getOrderColumns(
return sResult;
}
-// -----------------------------------------------------------------------------
+
namespace
{
::rtl::OUString lcl_getCondition(const Sequence< Sequence< PropertyValue > >& filter,const OPredicateInputController& i_aPredicateInputController,const Reference< XNameAccess >& i_xSelectColumns)
@@ -1551,21 +1520,21 @@ namespace
return sRet.makeStringAndClear();
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OSingleSelectQueryComposer::setStructuredFilter( const Sequence< Sequence< PropertyValue > >& filter ) throw (SQLException, ::com::sun::star::lang::IllegalArgumentException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setStructuredFilter" );
OPredicateInputController aPredicateInput(m_aContext.getLegacyServiceFactory(),m_xConnection);
setFilter(lcl_getCondition(filter,aPredicateInput,getColumns()));
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OSingleSelectQueryComposer::setStructuredHavingClause( const Sequence< Sequence< PropertyValue > >& filter ) throw (SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setStructuredHavingClause" );
OPredicateInputController aPredicateInput(m_aContext.getLegacyServiceFactory(),m_xConnection);
setHavingClause(lcl_getCondition(filter,aPredicateInput,getColumns()));
}
-// -----------------------------------------------------------------------------
+
void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria ,::std::mem_fun1_t<bool,OSingleSelectQueryComposer,::rtl::OUString>& _aSetFunctor,sal_Int32 filterOperator)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setConditionByColumn" );
@@ -1631,7 +1600,6 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
aSQL.append( ::dbtools::quoteName( aQuote, aName ) );
}
-
if ( aValue.hasValue() )
{
if( !m_xTypeConverter.is() )
@@ -1643,7 +1611,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
::rtl::OUString sEmpty;
lcl_addFilterCriteria_throw(filterOperator,sEmpty,aSQL);
}
-
+
switch(nType)
{
case DataType::VARCHAR:
@@ -1736,7 +1704,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
// add the filter and the sort order
_aSetFunctor(this,sFilter);
}
-// -----------------------------------------------------------------------------
+
Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredCondition( TGetParseNode& _aGetFunctor )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getStructuredCondition" );
@@ -1825,7 +1793,7 @@ Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredC
}
return aFilterSeq;
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OSingleSelectQueryComposer::getKeyword( SQLPart _ePart ) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getKeyword" );
@@ -1833,7 +1801,7 @@ Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredC
switch(_ePart)
{
default:
- OSL_ENSURE( 0, "OSingleSelectQueryComposer::getKeyWord: Invalid enum value!" );
+ OSL_FAIL( "OSingleSelectQueryComposer::getKeyWord: Invalid enum value!" );
// no break, fallback to WHERE
case Where:
sKeyword = STR_WHERE;
@@ -1851,7 +1819,6 @@ Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredC
return sKeyword;
}
-// -----------------------------------------------------------------------------
::rtl::OUString OSingleSelectQueryComposer::getSQLPart( SQLPart _ePart, OSQLParseTreeIterator& _rIterator, sal_Bool _bWithKeyword )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getSQLPart" );
@@ -1872,7 +1839,7 @@ Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredC
F_tmp = TGetParseNode(&OSQLParseTreeIterator::getSimpleOrderTree);
break;
default:
- OSL_ENSURE(0,"Invalid enum value!");
+ OSL_FAIL("Invalid enum value!");
}
::rtl::OUString sRet = getStatementPart( F_tmp, _rIterator );
@@ -1880,4 +1847,4 @@ Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredC
sRet = sKeyword + sRet;
return sRet;
}
-// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/StaticSet.cxx b/dbaccess/source/core/api/StaticSet.cxx
index 7fc52cab1..6668db8f5 100644
--- a/dbaccess/source/core/api/StaticSet.cxx
+++ b/dbaccess/source/core/api/StaticSet.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,33 +29,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBACCESS_CORE_API_STATICSET_HXX
#include "StaticSet.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_COMPAREBOOKMARK_HPP_
#include <com/sun/star/sdbcx/CompareBookmark.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XPREPAREDSTATEMENT_HPP_
#include <com/sun/star/sdbc/XPreparedStatement.hpp>
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
#include <connectivity/CommonTools.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
#include <rtl/logfile.hxx>
using namespace dbaccess;
@@ -62,41 +45,38 @@ using namespace connectivity;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::sdbc;
-// using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
-// using namespace ::cppu;
using namespace ::osl;
-// -------------------------------------------------------------------------
void OStaticSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 /*_nPosition*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::fillValueRow" );
_rRow = *m_aSetIter;
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::sdbcx::XRowLocate
Any SAL_CALL OStaticSet::getBookmark() throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::getBookmark" );
return makeAny(getRow());
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::moveToBookmark" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
return absolute(::comphelper::getINT32(bookmark));
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::moveRelativeToBookmark" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
return absolute(::comphelper::getINT32(bookmark)+rows);
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OStaticSet::compareBookmarks( const Any& _first, const Any& _second ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::compareBookmarks" );
@@ -105,19 +85,19 @@ sal_Int32 SAL_CALL OStaticSet::compareBookmarks( const Any& _first, const Any& _
_second >>= nSecond;
return (nFirst < nSecond) ? CompareBookmark::LESS : ((nFirst > nSecond) ? CompareBookmark::GREATER : CompareBookmark::EQUAL);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::hasOrderedBookmarks" );
return sal_True;
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OStaticSet::hashBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::hashBookmark" );
return ::comphelper::getINT32(bookmark);
}
-// -------------------------------------------------------------------------
+
sal_Bool OStaticSet::fetchRow()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::fetchRow" );
@@ -135,7 +115,7 @@ sal_Bool OStaticSet::fetchRow()
m_bEnd = sal_True;
return bRet;
}
-// -------------------------------------------------------------------------
+
void OStaticSet::fillAllRows()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::fillAllRows" );
@@ -153,7 +133,7 @@ void OStaticSet::fillAllRows()
m_bEnd = sal_True;
}
}
-// -------------------------------------------------------------------------
+
// XResultSet
sal_Bool SAL_CALL OStaticSet::next( ) throw(SQLException, RuntimeException)
{
@@ -172,38 +152,38 @@ sal_Bool SAL_CALL OStaticSet::next( ) throw(SQLException, RuntimeException)
++m_aSetIter;
return !isAfterLast();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::isBeforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::isBeforeFirst" );
return m_aSetIter == m_aSet.begin();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::isAfterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::isAfterLast" );
return m_aSetIter == m_aSet.end() && m_bEnd;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::isFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::isFirst" );
return m_aSetIter == m_aSet.begin()+1;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::isLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::isLast" );
return m_aSetIter == m_aSet.end()-1 && m_bEnd;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::beforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::beforeFirst" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
m_aSetIter = m_aSet.begin();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::afterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::afterLast" );
@@ -211,7 +191,7 @@ void SAL_CALL OStaticSet::afterLast( ) throw(SQLException, RuntimeException)
fillAllRows();
m_aSetIter = m_aSet.end();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::first( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::first" );
@@ -222,17 +202,17 @@ sal_Bool SAL_CALL OStaticSet::first( ) throw(SQLException, RuntimeException)
return m_aSetIter != m_aSet.end();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::last( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::last" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
fillAllRows();
m_aSetIter = m_aSet.end()-1;
-
+
return !isBeforeFirst() && !isAfterLast();
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OStaticSet::getRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::getRow" );
@@ -243,7 +223,7 @@ sal_Int32 SAL_CALL OStaticSet::getRow( ) throw(SQLException, RuntimeException)
OSL_ENSURE(nPos > 0,"RowPos is < 0");
return nPos;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::absolute" );
@@ -273,7 +253,7 @@ sal_Bool SAL_CALL OStaticSet::absolute( sal_Int32 row ) throw(SQLException, Runt
bNext = fetchRow();
}
- if(row > (sal_Int32)m_aSet.size())
+ if(row > (sal_Int32)m_aSet.size())
m_aSetIter = m_aSet.end(); // check again
else
m_aSetIter = m_aSet.begin() + row;
@@ -284,7 +264,7 @@ sal_Bool SAL_CALL OStaticSet::absolute( sal_Int32 row ) throw(SQLException, Runt
return m_aSetIter != m_aSet.end() && m_aSetIter != m_aSet.begin();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::relative( sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::relative" );
@@ -294,41 +274,41 @@ sal_Bool SAL_CALL OStaticSet::relative( sal_Int32 rows ) throw(SQLException, Run
sal_Int32 nCurPos = getRow();
return absolute(nCurPos+rows);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::previous( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::previous" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
-
+
if(m_aSetIter != m_aSet.begin())
--m_aSetIter;
return m_aSetIter != m_aSet.begin();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::refreshRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::refreshRow" );
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::rowUpdated( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::rowUpdated" );
return m_bUpdated;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::rowInserted( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::rowInserted" );
return m_bInserted;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::rowDeleted( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::rowDeleted" );
return m_bDeleted;
}
-// -------------------------------------------------------------------------
+
Sequence< sal_Int32 > SAL_CALL OStaticSet::deleteRows( const Sequence< Any >& rows,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::deleteRows" );
@@ -342,7 +322,7 @@ Sequence< sal_Int32 > SAL_CALL OStaticSet::deleteRows( const Sequence< Any >& ro
}
return aRet;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::insertRow" );
@@ -355,13 +335,13 @@ void SAL_CALL OStaticSet::insertRow( const ORowSetRow& _rInsertRow,const connect
m_bEnd = sal_False;
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::updateRow" );
OCacheSet::updateRow( _rInsertRow,_rOrginalRow,_xTable);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::deleteRow(const ORowSetRow& _rDeleteRow ,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::deleteRow" );
@@ -374,20 +354,19 @@ void SAL_CALL OStaticSet::deleteRow(const ORowSetRow& _rDeleteRow ,const connect
m_aSet.erase(aPos);
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::cancelRowUpdates( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::cancelRowUpdates" );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::moveToInsertRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::moveToInsertRow" );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::moveToCurrentRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::moveToCurrentRow" );
}
-// -------------------------------------------------------------------------
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/StaticSet.hxx b/dbaccess/source/core/api/StaticSet.hxx
index 82f122086..e5cf8a092 100644
--- a/dbaccess/source/core/api/StaticSet.hxx
+++ b/dbaccess/source/core/api/StaticSet.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,9 +29,7 @@
#ifndef DBACCESS_CORE_API_STATICSET_HXX
#define DBACCESS_CORE_API_STATICSET_HXX
-#ifndef DBACCESS_CORE_API_CACHESET_HXX
#include "CacheSet.hxx"
-#endif
namespace dbaccess
{
@@ -91,3 +90,4 @@ namespace dbaccess
}
#endif //DBACCESS_CORE_API_STATICSET_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx
index ee0c02958..13887a786 100644
--- a/dbaccess/source/core/api/TableDeco.cxx
+++ b/dbaccess/source/core/api/TableDeco.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,73 +29,30 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_CORE_TABLEDECORATOR_HXX_
#include "TableDeco.hxx"
-#endif
-#ifndef _DBACORE_DEFINITIONCOLUMN_HXX_
#include <definitioncolumn.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _DBA_CORE_RESOURCE_HXX_
#include "core_resource.hxx"
-#endif
-#ifndef _DBA_CORE_RESOURCE_HRC_
#include "core_resource.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
+#include <osl/diagnose.h>
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _COMPHELPER_ENUMHELPER_HXX_
#include <comphelper/enumhelper.hxx>
-#endif
-#ifndef _COMPHELPER_CONTAINER_HXX_
#include <comphelper/container.hxx>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
#include <comphelper/property.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XREFRESHLISTENER_HPP_
#include <com/sun/star/util/XRefreshListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_PRIVILEGE_HPP_
#include <com/sun/star/sdbcx/Privilege.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef DBA_CONTAINERMEDIATOR_HXX
#include "ContainerMediator.hxx"
-#endif
#include <rtl/logfile.hxx>
using namespace dbaccess;
@@ -114,7 +72,7 @@ using namespace ::cppu;
//= ODBTableDecorator
//==========================================================================
DBG_NAME(ODBTableDecorator)
-// -----------------------------------------------------------------------------
+
ODBTableDecorator::ODBTableDecorator( const Reference< XConnection >& _rxConnection, const Reference< XColumnsSupplier >& _rxNewTable,
const Reference< XNumberFormatsSupplier >& _rxNumberFormats, const Reference< XNameAccess >& _xColumnDefinitions ) throw(SQLException)
:OTableDescriptor_BASE(m_aMutex)
@@ -131,7 +89,7 @@ ODBTableDecorator::ODBTableDecorator( const Reference< XConnection >& _rxConnect
DBG_CTOR(ODBTableDecorator, NULL);
ODataSettings::registerPropertiesFor(this);
}
-// -------------------------------------------------------------------------
+
ODBTableDecorator::~ODBTableDecorator()
{
DBG_DTOR(ODBTableDecorator, NULL);
@@ -139,7 +97,6 @@ ODBTableDecorator::~ODBTableDecorator()
delete m_pColumns;
}
-//--------------------------------------------------------------------------
Sequence< sal_Int8 > ODBTableDecorator::getImplementationId() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getImplementationId" );
@@ -157,7 +114,6 @@ Sequence< sal_Int8 > ODBTableDecorator::getImplementationId() throw (RuntimeExce
}
// OComponentHelper
-//------------------------------------------------------------------------------
void SAL_CALL ODBTableDecorator::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::disposing" );
@@ -174,7 +130,7 @@ void SAL_CALL ODBTableDecorator::disposing()
m_pColumns->disposing();
m_xColumnMediator = NULL;
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODBTableDecorator::convertFastPropertyValue(
Any & rConvertedValue,
Any & rOldValue,
@@ -182,7 +138,6 @@ sal_Bool SAL_CALL ODBTableDecorator::convertFastPropertyValue(
const Any& rValue )
throw (::com::sun::star::lang::IllegalArgumentException)
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::convertFastPropertyValue" );
sal_Bool bRet = sal_True;
switch(nHandle)
{
@@ -196,25 +151,25 @@ sal_Bool SAL_CALL ODBTableDecorator::convertFastPropertyValue(
case PROPERTY_ID_TEXTLINECOLOR:
case PROPERTY_ID_TEXTEMPHASIS:
case PROPERTY_ID_TEXTRELIEF:
- case PROPERTY_ID_FONTCHARWIDTH:
- case PROPERTY_ID_FONTCHARSET:
- case PROPERTY_ID_FONTFAMILY:
- case PROPERTY_ID_FONTHEIGHT:
- case PROPERTY_ID_FONTKERNING:
- case PROPERTY_ID_FONTNAME:
- case PROPERTY_ID_FONTORIENTATION:
- case PROPERTY_ID_FONTPITCH:
- case PROPERTY_ID_FONTSLANT:
- case PROPERTY_ID_FONTSTRIKEOUT:
- case PROPERTY_ID_FONTSTYLENAME:
- case PROPERTY_ID_FONTUNDERLINE:
- case PROPERTY_ID_FONTWEIGHT:
- case PROPERTY_ID_FONTWIDTH:
+ case PROPERTY_ID_FONTCHARWIDTH:
+ case PROPERTY_ID_FONTCHARSET:
+ case PROPERTY_ID_FONTFAMILY:
+ case PROPERTY_ID_FONTHEIGHT:
+ case PROPERTY_ID_FONTKERNING:
+ case PROPERTY_ID_FONTNAME:
+ case PROPERTY_ID_FONTORIENTATION:
+ case PROPERTY_ID_FONTPITCH:
+ case PROPERTY_ID_FONTSLANT:
+ case PROPERTY_ID_FONTSTRIKEOUT:
+ case PROPERTY_ID_FONTSTYLENAME:
+ case PROPERTY_ID_FONTUNDERLINE:
+ case PROPERTY_ID_FONTWEIGHT:
+ case PROPERTY_ID_FONTWIDTH:
case PROPERTY_ID_FONTWORDLINEMODE:
- case PROPERTY_ID_FONTTYPE:
+ case PROPERTY_ID_FONTTYPE:
bRet = ODataSettings::convertFastPropertyValue(rConvertedValue, rOldValue,nHandle,rValue);
break;
-
+
default:
{
Any aValue;
@@ -225,14 +180,14 @@ sal_Bool SAL_CALL ODBTableDecorator::convertFastPropertyValue(
}
return bRet;
}
-// -----------------------------------------------------------------------------
+
void ODBTableDecorator::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const Any& _rValue) throw (Exception)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::setFastPropertyValue_NoBroadcast" );
switch(_nHandle)
{
case PROPERTY_ID_PRIVILEGES:
- OSL_ENSURE(0,"Property is readonly!");
+ OSL_FAIL("Property is readonly!");
case PROPERTY_ID_FILTER:
case PROPERTY_ID_ORDER:
case PROPERTY_ID_APPLYFILTER:
@@ -242,22 +197,22 @@ void ODBTableDecorator::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, con
case PROPERTY_ID_TEXTLINECOLOR:
case PROPERTY_ID_TEXTEMPHASIS:
case PROPERTY_ID_TEXTRELIEF:
- case PROPERTY_ID_FONTCHARWIDTH:
- case PROPERTY_ID_FONTCHARSET:
- case PROPERTY_ID_FONTFAMILY:
- case PROPERTY_ID_FONTHEIGHT:
- case PROPERTY_ID_FONTKERNING:
- case PROPERTY_ID_FONTNAME:
- case PROPERTY_ID_FONTORIENTATION:
- case PROPERTY_ID_FONTPITCH:
- case PROPERTY_ID_FONTSLANT:
- case PROPERTY_ID_FONTSTRIKEOUT:
- case PROPERTY_ID_FONTSTYLENAME:
- case PROPERTY_ID_FONTUNDERLINE:
- case PROPERTY_ID_FONTWEIGHT:
- case PROPERTY_ID_FONTWIDTH:
+ case PROPERTY_ID_FONTCHARWIDTH:
+ case PROPERTY_ID_FONTCHARSET:
+ case PROPERTY_ID_FONTFAMILY:
+ case PROPERTY_ID_FONTHEIGHT:
+ case PROPERTY_ID_FONTKERNING:
+ case PROPERTY_ID_FONTNAME:
+ case PROPERTY_ID_FONTORIENTATION:
+ case PROPERTY_ID_FONTPITCH:
+ case PROPERTY_ID_FONTSLANT:
+ case PROPERTY_ID_FONTSTRIKEOUT:
+ case PROPERTY_ID_FONTSTYLENAME:
+ case PROPERTY_ID_FONTUNDERLINE:
+ case PROPERTY_ID_FONTWEIGHT:
+ case PROPERTY_ID_FONTWIDTH:
case PROPERTY_ID_FONTWORDLINEMODE:
- case PROPERTY_ID_FONTTYPE:
+ case PROPERTY_ID_FONTTYPE:
ODataSettings::setFastPropertyValue_NoBroadcast(_nHandle, _rValue);
break;
@@ -293,10 +248,10 @@ void ODBTableDecorator::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, con
break;
}
}
-//------------------------------------------------------------------------------
+
void ODBTableDecorator::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getFastPropertyValue" );
+
switch(_nHandle)
{
case PROPERTY_ID_PRIVILEGES:
@@ -312,7 +267,7 @@ void ODBTableDecorator::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) c
}
}
// run through
-
+
case PROPERTY_ID_FILTER:
case PROPERTY_ID_ORDER:
case PROPERTY_ID_APPLYFILTER:
@@ -322,22 +277,22 @@ void ODBTableDecorator::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) c
case PROPERTY_ID_TEXTLINECOLOR:
case PROPERTY_ID_TEXTEMPHASIS:
case PROPERTY_ID_TEXTRELIEF:
- case PROPERTY_ID_FONTCHARWIDTH:
- case PROPERTY_ID_FONTCHARSET:
- case PROPERTY_ID_FONTFAMILY:
- case PROPERTY_ID_FONTHEIGHT:
- case PROPERTY_ID_FONTKERNING:
- case PROPERTY_ID_FONTNAME:
- case PROPERTY_ID_FONTORIENTATION:
- case PROPERTY_ID_FONTPITCH:
- case PROPERTY_ID_FONTSLANT:
- case PROPERTY_ID_FONTSTRIKEOUT:
- case PROPERTY_ID_FONTSTYLENAME:
- case PROPERTY_ID_FONTUNDERLINE:
- case PROPERTY_ID_FONTWEIGHT:
- case PROPERTY_ID_FONTWIDTH:
+ case PROPERTY_ID_FONTCHARWIDTH:
+ case PROPERTY_ID_FONTCHARSET:
+ case PROPERTY_ID_FONTFAMILY:
+ case PROPERTY_ID_FONTHEIGHT:
+ case PROPERTY_ID_FONTKERNING:
+ case PROPERTY_ID_FONTNAME:
+ case PROPERTY_ID_FONTORIENTATION:
+ case PROPERTY_ID_FONTPITCH:
+ case PROPERTY_ID_FONTSLANT:
+ case PROPERTY_ID_FONTSTRIKEOUT:
+ case PROPERTY_ID_FONTSTYLENAME:
+ case PROPERTY_ID_FONTUNDERLINE:
+ case PROPERTY_ID_FONTWEIGHT:
+ case PROPERTY_ID_FONTWIDTH:
case PROPERTY_ID_FONTWORDLINEMODE:
- case PROPERTY_ID_FONTTYPE:
+ case PROPERTY_ID_FONTTYPE:
ODataSettings::getFastPropertyValue(_rValue, _nHandle);
break;
case PROPERTY_ID_CATALOGNAME:
@@ -371,10 +326,10 @@ void ODBTableDecorator::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) c
}
break;
default:
- OSL_ENSURE(0,"Invalid Handle for table");
+ OSL_FAIL("Invalid Handle for table");
}
}
-// -------------------------------------------------------------------------
+
void ODBTableDecorator::construct()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::construct" );
@@ -389,13 +344,12 @@ void ODBTableDecorator::construct()
registerProperty(PROPERTY_PRIVILEGES, PROPERTY_ID_PRIVILEGES, PropertyAttribute::BOUND | PropertyAttribute::READONLY,
&m_nPrivileges, ::getCppuType(static_cast<sal_Int32*>(NULL)));
}
-// -----------------------------------------------------------------------------
+
::cppu::IPropertyArrayHelper* ODBTableDecorator::createArrayHelper(sal_Int32 /*_nId*/) const
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::createArrayHelper" );
Reference<XPropertySet> xProp(m_xTable,UNO_QUERY);
Reference<XPropertySetInfo> xInfo = xProp->getPropertySetInfo();
-
+
Sequence< Property > aTableProps = xInfo->getProperties();
Property* pIter = aTableProps.getArray();
Property* pEnd = pIter + aTableProps.getLength();
@@ -416,13 +370,12 @@ void ODBTableDecorator::construct()
}
describeProperties(aTableProps);
-
- return new ::cppu::OPropertyArrayHelper(aTableProps);
+
+ return new ::cppu::OPropertyArrayHelper(aTableProps);
}
-// -----------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper & SAL_CALL ODBTableDecorator::getInfoHelper()
+
+::cppu::IPropertyArrayHelper & SAL_CALL ODBTableDecorator::getInfoHelper()
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getInfoHelper" );
Reference<XPropertySet> xProp(m_xTable,UNO_QUERY);
Reference<XPropertySetInfo> xInfo = xProp->getPropertySetInfo();
@@ -438,39 +391,35 @@ void ODBTableDecorator::construct()
// property set infos: Depending on the table for which we act as decorator, different property
// sets might exist.
}
-// -------------------------------------------------------------------------
+
// XServiceInfo
IMPLEMENT_SERVICE_INFO1(ODBTableDecorator, "com.sun.star.sdb.dbaccess.ODBTableDecorator", SERVICE_SDBCX_TABLE)
-// -------------------------------------------------------------------------
+
Any SAL_CALL ODBTableDecorator::queryInterface( const Type & rType ) throw(RuntimeException)
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::queryInterface" );
Any aRet;
if(m_xTable.is())
{
aRet = m_xTable->queryInterface(rType);
- if(aRet.hasValue())
+ if(aRet.hasValue())
{ // now we know that our table supports this type so we return ourself
aRet = OTableDescriptor_BASE::queryInterface(rType);
if(!aRet.hasValue())
- aRet = ODataSettings::queryInterface(rType);
+ aRet = ODataSettings::queryInterface(rType);
}
}
return aRet;
}
-// -------------------------------------------------------------------------
+
Sequence< Type > SAL_CALL ODBTableDecorator::getTypes( ) throw(RuntimeException)
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getTypes" );
Reference<XTypeProvider> xTypes(m_xTable,UNO_QUERY);
OSL_ENSURE(xTypes.is(),"Table must be a TypePropvider!");
return xTypes->getTypes();
}
-// -----------------------------------------------------------------------------
// XRename,
-//------------------------------------------------------------------------------
void SAL_CALL ODBTableDecorator::rename( const ::rtl::OUString& _rNewName ) throw(SQLException, ElementExistException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::rename" );
@@ -479,9 +428,6 @@ void SAL_CALL ODBTableDecorator::rename( const ::rtl::OUString& _rNewName ) thro
Reference<XRename> xRename(m_xTable,UNO_QUERY);
if(xRename.is())
{
-// ::rtl::OUString sOldName;
-// Reference<XPropertySet> xProp(m_xTable,UNO_QUERY);
-// xProp->getPropertyValue(PROPERTY_NAME) >>= sOldName;
xRename->rename(_rNewName);
}
else // not supported
@@ -489,7 +435,6 @@ void SAL_CALL ODBTableDecorator::rename( const ::rtl::OUString& _rNewName ) thro
}
// XAlterTable,
-//------------------------------------------------------------------------------
void SAL_CALL ODBTableDecorator::alterColumnByName( const ::rtl::OUString& _rName, const Reference< XPropertySet >& _rxDescriptor ) throw(SQLException, NoSuchElementException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::alterColumnByName" );
@@ -506,7 +451,6 @@ void SAL_CALL ODBTableDecorator::alterColumnByName( const ::rtl::OUString& _rNam
m_pColumns->refresh();
}
-//------------------------------------------------------------------------------
void SAL_CALL ODBTableDecorator::alterColumnByIndex( sal_Int32 _nIndex, const Reference< XPropertySet >& _rxDescriptor ) throw(SQLException, IndexOutOfBoundsException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::alterColumnByIndex" );
@@ -522,7 +466,7 @@ void SAL_CALL ODBTableDecorator::alterColumnByIndex( sal_Int32 _nIndex, const Re
else // not supported
throw SQLException(DBACORE_RESSTRING(RID_STR_COLUMN_ALTER_BY_INDEX),*this,SQLSTATE_GENERAL,1000,Any() );
}
-// -----------------------------------------------------------------------------
+
Reference< XNameAccess> ODBTableDecorator::getIndexes() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getIndexes" );
@@ -530,7 +474,7 @@ Reference< XNameAccess> ODBTableDecorator::getIndexes() throw (RuntimeException)
::connectivity::checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
return Reference< XIndexesSupplier>(m_xTable,UNO_QUERY)->getIndexes();
}
-// -------------------------------------------------------------------------
+
Reference< XIndexAccess> ODBTableDecorator::getKeys() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getKeys" );
@@ -538,7 +482,7 @@ Reference< XIndexAccess> ODBTableDecorator::getKeys() throw (RuntimeException)
::connectivity::checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
return Reference< XKeysSupplier>(m_xTable,UNO_QUERY)->getKeys();
}
-// -------------------------------------------------------------------------
+
Reference< XNameAccess> ODBTableDecorator::getColumns() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getColumns" );
@@ -550,7 +494,7 @@ Reference< XNameAccess> ODBTableDecorator::getColumns() throw (RuntimeException)
return m_pColumns;
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL ODBTableDecorator::getName() throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getName" );
@@ -560,7 +504,7 @@ Reference< XNameAccess> ODBTableDecorator::getColumns() throw (RuntimeException)
OSL_ENSURE(xName.is(),"Table should support the XNamed interface");
return xName->getName();
}
-// -----------------------------------------------------------------------------
+
sal_Int64 SAL_CALL ODBTableDecorator::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getSomething" );
@@ -573,7 +517,7 @@ sal_Int64 SAL_CALL ODBTableDecorator::getSomething( const Sequence< sal_Int8 >&
nRet = xTunnel->getSomething(rId);
return nRet;
}
-// -----------------------------------------------------------------------------
+
Sequence< sal_Int8 > ODBTableDecorator::getUnoTunnelImplementationId()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getUnoTunnelImplementationId" );
@@ -589,11 +533,11 @@ Sequence< sal_Int8 > ODBTableDecorator::getUnoTunnelImplementationId()
}
return pId->getImplementationId();
}
-// -----------------------------------------------------------------------------
+
void ODBTableDecorator::fillPrivileges() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::fillPrivileges" );
- // somebody is asking for the privileges an we do not know them, yet
+ // somebody is asking for the privileges and we do not know them, yet
m_nPrivileges = 0;
try
{
@@ -617,10 +561,10 @@ void ODBTableDecorator::fillPrivileges() const
catch(const SQLException& e)
{
(void)e;
- DBG_ERROR("ODBTableDecorator::ODBTableDecorator : could not collect the privileges !");
+ OSL_FAIL("ODBTableDecorator::ODBTableDecorator : could not collect the privileges !");
}
}
-// -----------------------------------------------------------------------------
+
Reference< XPropertySet > SAL_CALL ODBTableDecorator::createDataDescriptor( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::createDataDescriptor" );
@@ -628,7 +572,7 @@ Reference< XPropertySet > SAL_CALL ODBTableDecorator::createDataDescriptor( ) t
::connectivity::checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
Reference< XDataDescriptorFactory > xFactory( m_xTable, UNO_QUERY );
- DBG_ASSERT( xFactory.is(), "ODBTableDecorator::createDataDescriptor: invalid table!" );
+ OSL_ENSURE( xFactory.is(), "ODBTableDecorator::createDataDescriptor: invalid table!" );
Reference< XColumnsSupplier > xColsSupp;
if ( xFactory.is() )
xColsSupp = xColsSupp.query( xFactory->createDataDescriptor() );
@@ -640,13 +584,13 @@ Reference< XPropertySet > SAL_CALL ODBTableDecorator::createDataDescriptor( ) t
NULL
);
}
-// -----------------------------------------------------------------------------
+
Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL ODBTableDecorator::getPropertySetInfo( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getPropertySetInfo" );
return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
}
-// -----------------------------------------------------------------------------
+
void ODBTableDecorator::refreshColumns()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::refreshColumns" );
@@ -654,7 +598,7 @@ void ODBTableDecorator::refreshColumns()
::connectivity::checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
::std::vector< ::rtl::OUString> aVector;
-
+
Reference<XNameAccess> xNames;
if(m_xTable.is())
{
@@ -679,12 +623,12 @@ void ODBTableDecorator::refreshColumns()
OContainerMediator* pMediator = new OContainerMediator( pCol, m_xColumnDefinitions, m_xConnection, OContainerMediator::eColumns );
m_xColumnMediator = pMediator;
pCol->setMediator( pMediator );
- m_pColumns = pCol;
+ m_pColumns = pCol;
}
else
m_pColumns->reFill(aVector);
}
-// -----------------------------------------------------------------------------
+
OColumn* ODBTableDecorator::createColumn(const ::rtl::OUString& _rName) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::createColumn" );
@@ -708,13 +652,13 @@ OColumn* ODBTableDecorator::createColumn(const ::rtl::OUString& _rName) const
}
return pReturn;
}
-// -----------------------------------------------------------------------------
+
void ODBTableDecorator::columnAppended( const Reference< XPropertySet >& /*_rxSourceDescriptor*/ )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::columnAppended" );
// not interested in
}
-// -----------------------------------------------------------------------------
+
void ODBTableDecorator::columnDropped(const ::rtl::OUString& _sName)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::columnDropped" );
@@ -723,7 +667,6 @@ void ODBTableDecorator::columnDropped(const ::rtl::OUString& _sName)
xDrop->dropByName(_sName);
}
-// -----------------------------------------------------------------------------
Reference< XPropertySet > ODBTableDecorator::createColumnDescriptor()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::createColumnDescriptor" );
@@ -735,24 +678,20 @@ Reference< XPropertySet > ODBTableDecorator::createColumnDescriptor()
xRet = new OTableColumnDescriptorWrapper( xNames->createDataDescriptor(), false, true );
return xRet;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODBTableDecorator::acquire() throw()
{
OTableDescriptor_BASE::acquire();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODBTableDecorator::release() throw()
{
OTableDescriptor_BASE::release();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODBTableDecorator::setName( const ::rtl::OUString& /*aName*/ ) throw (::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::setName" );
throwFunctionNotSupportedException( "XNamed::setName", *this );
}
-
-// -----------------------------------------------------------------------------
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/View.cxx b/dbaccess/source/core/api/View.cxx
index 3644c4f42..561482989 100644
--- a/dbaccess/source/core/api/View.cxx
+++ b/dbaccess/source/core/api/View.cxx
@@ -1,14 +1,12 @@
+/* -*- 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 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: View.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -47,10 +45,8 @@
#include <tools/diagnose_ex.h>
#include <unotools/sharedunocomponent.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
/** === begin UNO using === **/
using namespace ::com::sun::star::uno;
@@ -78,7 +74,6 @@ namespace dbaccess
//====================================================================
//= View
//====================================================================
- //--------------------------------------------------------------------
View::View( const Reference< XConnection >& _rxConnection, sal_Bool _bCaseSensitive,
const ::rtl::OUString& _rCatalogName,const ::rtl::OUString& _rSchemaName, const ::rtl::OUString& _rName )
:View_Base( _bCaseSensitive, _rName, _rxConnection->getMetaData(), 0, ::rtl::OUString(), _rSchemaName, _rCatalogName )
@@ -96,15 +91,13 @@ namespace dbaccess
}
}
- //--------------------------------------------------------------------
View::~View()
{
}
- //--------------------------------------------------------------------
IMPLEMENT_FORWARD_REFCOUNT( View, View_Base )
IMPLEMENT_GET_IMPLEMENTATION_ID( View )
- // -------------------------------------------------------------------------
+
Any SAL_CALL View::queryInterface( const Type & _rType ) throw(RuntimeException)
{
if(_rType == getCppuType( (Reference<XAlterView>*)0) && !m_xViewAccess.is() )
@@ -114,14 +107,14 @@ namespace dbaccess
aReturn = View_IBASE::queryInterface( _rType );
return aReturn;
}
- // -------------------------------------------------------------------------
+
Sequence< Type > SAL_CALL View::getTypes( ) throw(RuntimeException)
{
Type aAlterType = getCppuType( (Reference<XAlterView>*)0);
Sequence< Type > aTypes( ::comphelper::concatSequences(View_Base::getTypes(),View_IBASE::getTypes()) );
::std::vector<Type> aOwnTypes;
- aOwnTypes.reserve(aTypes.getLength());
+ aOwnTypes.reserve(aTypes.getLength());
const Type* pIter = aTypes.getConstArray();
const Type* pEnd = pIter + aTypes.getLength();
@@ -130,19 +123,17 @@ namespace dbaccess
if( (*pIter != aAlterType || m_xViewAccess.is()) )
aOwnTypes.push_back(*pIter);
}
-
+
Type* pTypes = aOwnTypes.empty() ? 0 : &aOwnTypes[0];
return Sequence< Type >(pTypes, aOwnTypes.size());
}
- //--------------------------------------------------------------------
void SAL_CALL View::alterCommand( const ::rtl::OUString& _rNewCommand ) throw (SQLException, RuntimeException)
{
OSL_ENSURE(m_xViewAccess.is(),"Illegal call to AlterView!");
m_xViewAccess->alterCommand(this,_rNewCommand);
}
- //--------------------------------------------------------------------
void SAL_CALL View::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
{
if ( _nHandle == m_nCommandHandle && m_xViewAccess.is() )
@@ -155,7 +146,6 @@ namespace dbaccess
View_Base::getFastPropertyValue( _rValue, _nHandle );
}
- // -----------------------------------------------------------------------------
-//........................................................................
+
} // namespace dbaccess
-//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/WrappedResultSet.cxx b/dbaccess/source/core/api/WrappedResultSet.cxx
index 0b9c6b6c2..794015333 100644
--- a/dbaccess/source/core/api/WrappedResultSet.cxx
+++ b/dbaccess/source/core/api/WrappedResultSet.cxx
@@ -1,14 +1,12 @@
+/* -*- 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 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: BookmarkSet.cxx,v $
- * $Revision: 1.21 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -45,11 +43,9 @@ using namespace ::dbtools;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::sdbc;
-// using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
-// using namespace ::cppu;
using namespace ::osl;
void WrappedResultSet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::OUString& i_sRowSetFilter)
@@ -60,7 +56,7 @@ void WrappedResultSet::construct(const Reference< XResultSet>& _xDriverSet,const
m_xRowLocate.set(_xDriverSet,UNO_QUERY_THROW);
m_xUpdRow.set(_xDriverSet,UNO_QUERY_THROW);
}
-// -----------------------------------------------------------------------------
+
Any SAL_CALL WrappedResultSet::getBookmark() throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::getBookmark" );
@@ -70,37 +66,37 @@ Any SAL_CALL WrappedResultSet::getBookmark() throw(SQLException, RuntimeExceptio
}
return makeAny(m_xDriverSet->getRow());
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL WrappedResultSet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::moveToBookmark" );
return m_xRowLocate->moveToBookmark( bookmark );
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL WrappedResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::moveRelativeToBookmark" );
return m_xRowLocate->moveRelativeToBookmark( bookmark,rows );
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL WrappedResultSet::compareBookmarks( const Any& _first, const Any& _second ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::compareBookmarks" );
return m_xRowLocate->compareBookmarks( _first,_second );
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL WrappedResultSet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::hasOrderedBookmarks" );
return m_xRowLocate->hasOrderedBookmarks();
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL WrappedResultSet::hashBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::hashBookmark" );
return m_xRowLocate->hashBookmark(bookmark);
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::sdbcx::XDeleteRows
Sequence< sal_Int32 > SAL_CALL WrappedResultSet::deleteRows( const Sequence< Any >& rows ,const connectivity::OSQLTable& /*_xTable*/) throw(SQLException, RuntimeException)
{
@@ -112,7 +108,7 @@ Sequence< sal_Int32 > SAL_CALL WrappedResultSet::deleteRows( const Sequence< Any
}
return Sequence< sal_Int32 >();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL WrappedResultSet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::insertRow" );
@@ -128,7 +124,7 @@ void SAL_CALL WrappedResultSet::insertRow( const ORowSetRow& _rInsertRow,const c
m_xUpd->insertRow();
(*_rInsertRow->get().begin()) = getBookmark();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL WrappedResultSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::updateRow" );
@@ -142,37 +138,37 @@ void SAL_CALL WrappedResultSet::updateRow(const ORowSetRow& _rInsertRow ,const O
}
m_xUpd->updateRow();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL WrappedResultSet::deleteRow(const ORowSetRow& /*_rDeleteRow*/ ,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::deleteRow" );
m_xUpd->deleteRow();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL WrappedResultSet::cancelRowUpdates( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::cancelRowUpdates" );
m_xUpd->cancelRowUpdates();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL WrappedResultSet::moveToInsertRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::moveToInsertRow" );
m_xUpd->moveToInsertRow();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL WrappedResultSet::moveToCurrentRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::moveToCurrentRow" );
m_xUpd->moveToCurrentRow();
}
-// -------------------------------------------------------------------------
+
void WrappedResultSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::fillValueRow" );
OCacheSet::fillValueRow(_rRow,_nPosition);
}
-// -------------------------------------------------------------------------
+
void WrappedResultSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xParameter,const ORowSetValue& _rValue)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::updateColumn" );
@@ -191,8 +187,6 @@ void WrappedResultSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xPar
break;
case DataType::CHAR:
case DataType::VARCHAR:
- //case DataType::DECIMAL:
- //case DataType::NUMERIC:
_xParameter->updateString(nPos,_rValue);
break;
case DataType::BIGINT:
@@ -252,4 +246,4 @@ void WrappedResultSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xPar
}
}
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/WrappedResultSet.hxx b/dbaccess/source/core/api/WrappedResultSet.hxx
index 7b9f17c68..8765a183a 100644
--- a/dbaccess/source/core/api/WrappedResultSet.hxx
+++ b/dbaccess/source/core/api/WrappedResultSet.hxx
@@ -1,14 +1,12 @@
+/* -*- 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 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: BookmarkSet.hxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,9 +29,7 @@
#ifndef DBACCESS_CORE_API_WRAPPEDRESULTSET_HXX
#define DBACCESS_CORE_API_WRAPPEDRESULTSET_HXX
-#ifndef DBACCESS_CORE_API_CACHESET_HXX
#include "CacheSet.hxx"
-#endif
#include <com/sun/star/sdbc/XRowUpdate.hpp>
#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
@@ -77,3 +73,4 @@ namespace dbaccess
}
#endif // DBACCESS_CORE_API_WRAPPEDRESULTSET_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/callablestatement.cxx b/dbaccess/source/core/api/callablestatement.cxx
index 8398c4eb9..4f052bdf4 100644
--- a/dbaccess/source/core/api/callablestatement.cxx
+++ b/dbaccess/source/core/api/callablestatement.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,24 +28,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_COREAPI_CALLABLESTATEMENT_HXX_
#include <callablestatement.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
#include <comphelper/property.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX //autogen
#include <tools/debug.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
#include <rtl/logfile.hxx>
using namespace dbaccess;
@@ -57,7 +46,6 @@ using namespace ::cppu;
using namespace ::osl;
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > OCallableStatement::getTypes() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getTypes" );
@@ -68,7 +56,6 @@ Sequence< Type > OCallableStatement::getTypes() throw (RuntimeException)
return aTypes.getTypes();
}
-//--------------------------------------------------------------------------
Sequence< sal_Int8 > OCallableStatement::getImplementationId() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getImplementationId" );
@@ -86,7 +73,6 @@ Sequence< sal_Int8 > OCallableStatement::getImplementationId() throw (RuntimeExc
}
// com::sun::star::uno::XInterface
-//--------------------------------------------------------------------------
Any OCallableStatement::queryInterface( const Type & rType ) throw (RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::queryInterface" );
@@ -99,27 +85,23 @@ Any OCallableStatement::queryInterface( const Type & rType ) throw (RuntimeExcep
return aIface;
}
-//--------------------------------------------------------------------------
void OCallableStatement::acquire() throw ()
{
OPreparedStatement::acquire();
}
-//--------------------------------------------------------------------------
void OCallableStatement::release() throw ()
{
OPreparedStatement::release();
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OCallableStatement::getImplementationName( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getImplementationName" );
- return rtl::OUString::createFromAscii("com.sun.star.sdb.OCallableStatement");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OCallableStatement"));
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OCallableStatement::getSupportedServiceNames( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getSupportedServiceNames" );
@@ -130,19 +112,16 @@ Sequence< ::rtl::OUString > OCallableStatement::getSupportedServiceNames( ) thr
}
// XOutParameters
-//------------------------------------------------------------------------------
void SAL_CALL OCallableStatement::registerOutParameter( sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::registerOutParameter" );
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(OComponentHelper::rBHelper.bDisposed);
-
Reference< XOutParameters >(m_xAggregateAsSet, UNO_QUERY)->registerOutParameter( parameterIndex, sqlType, typeName );
}
-//------------------------------------------------------------------------------
void SAL_CALL OCallableStatement::registerNumericOutParameter( sal_Int32 parameterIndex, sal_Int32 sqlType, sal_Int32 scale ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::registerNumericOutParameter" );
@@ -153,7 +132,6 @@ void SAL_CALL OCallableStatement::registerNumericOutParameter( sal_Int32 paramet
}
// XRow
-//------------------------------------------------------------------------------
sal_Bool SAL_CALL OCallableStatement::wasNull( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::wasNull" );
@@ -163,7 +141,6 @@ sal_Bool SAL_CALL OCallableStatement::wasNull( ) throw(SQLException, RuntimeExc
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->wasNull();
}
-//------------------------------------------------------------------------------
::rtl::OUString SAL_CALL OCallableStatement::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getString" );
@@ -173,7 +150,6 @@ sal_Bool SAL_CALL OCallableStatement::wasNull( ) throw(SQLException, RuntimeExc
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getString( columnIndex );
}
-//------------------------------------------------------------------------------
sal_Bool SAL_CALL OCallableStatement::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getBoolean" );
@@ -183,7 +159,6 @@ sal_Bool SAL_CALL OCallableStatement::getBoolean( sal_Int32 columnIndex ) throw(
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getBoolean( columnIndex );
}
-//------------------------------------------------------------------------------
sal_Int8 SAL_CALL OCallableStatement::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getByte" );
@@ -193,7 +168,6 @@ sal_Int8 SAL_CALL OCallableStatement::getByte( sal_Int32 columnIndex ) throw(SQL
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getByte( columnIndex );
}
-//------------------------------------------------------------------------------
sal_Int16 SAL_CALL OCallableStatement::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getShort" );
@@ -202,7 +176,6 @@ sal_Int16 SAL_CALL OCallableStatement::getShort( sal_Int32 columnIndex ) throw(S
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getShort( columnIndex );
}
-//------------------------------------------------------------------------------
sal_Int32 SAL_CALL OCallableStatement::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getInt" );
@@ -211,7 +184,6 @@ sal_Int32 SAL_CALL OCallableStatement::getInt( sal_Int32 columnIndex ) throw(SQL
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getInt( columnIndex );
}
-//------------------------------------------------------------------------------
sal_Int64 SAL_CALL OCallableStatement::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getLong" );
@@ -220,7 +192,6 @@ sal_Int64 SAL_CALL OCallableStatement::getLong( sal_Int32 columnIndex ) throw(SQ
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getLong( columnIndex );
}
-//------------------------------------------------------------------------------
float SAL_CALL OCallableStatement::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getFloat" );
@@ -229,7 +200,6 @@ float SAL_CALL OCallableStatement::getFloat( sal_Int32 columnIndex ) throw(SQLEx
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getFloat( columnIndex );
}
-//------------------------------------------------------------------------------
double SAL_CALL OCallableStatement::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getDouble" );
@@ -238,7 +208,6 @@ double SAL_CALL OCallableStatement::getDouble( sal_Int32 columnIndex ) throw(SQL
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getDouble( columnIndex );
}
-//------------------------------------------------------------------------------
Sequence< sal_Int8 > SAL_CALL OCallableStatement::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getBytes" );
@@ -247,7 +216,6 @@ Sequence< sal_Int8 > SAL_CALL OCallableStatement::getBytes( sal_Int32 columnInde
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getBytes( columnIndex );
}
-//------------------------------------------------------------------------------
::com::sun::star::util::Date SAL_CALL OCallableStatement::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getDate" );
@@ -256,7 +224,6 @@ Sequence< sal_Int8 > SAL_CALL OCallableStatement::getBytes( sal_Int32 columnInde
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getDate( columnIndex );
}
-//------------------------------------------------------------------------------
::com::sun::star::util::Time SAL_CALL OCallableStatement::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getTime" );
@@ -265,7 +232,6 @@ Sequence< sal_Int8 > SAL_CALL OCallableStatement::getBytes( sal_Int32 columnInde
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getTime( columnIndex );
}
-//------------------------------------------------------------------------------
::com::sun::star::util::DateTime SAL_CALL OCallableStatement::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getTimestamp" );
@@ -275,7 +241,6 @@ Sequence< sal_Int8 > SAL_CALL OCallableStatement::getBytes( sal_Int32 columnInde
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getTimestamp( columnIndex );
}
-//------------------------------------------------------------------------------
Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCallableStatement::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getBinaryStream" );
@@ -285,7 +250,6 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCallableStatement::get
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getBinaryStream( columnIndex );
}
-//------------------------------------------------------------------------------
Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCallableStatement::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getCharacterStream" );
@@ -295,7 +259,6 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCallableStatement::get
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getCharacterStream( columnIndex );
}
-//------------------------------------------------------------------------------
Any SAL_CALL OCallableStatement::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getObject" );
@@ -305,7 +268,6 @@ Any SAL_CALL OCallableStatement::getObject( sal_Int32 columnIndex, const Referen
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getObject( columnIndex, typeMap );
}
-//------------------------------------------------------------------------------
Reference< XRef > SAL_CALL OCallableStatement::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getRef" );
@@ -314,7 +276,6 @@ Reference< XRef > SAL_CALL OCallableStatement::getRef( sal_Int32 columnIndex ) t
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getRef( columnIndex );
}
-//------------------------------------------------------------------------------
Reference< XBlob > SAL_CALL OCallableStatement::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getBlob" );
@@ -323,7 +284,6 @@ Reference< XBlob > SAL_CALL OCallableStatement::getBlob( sal_Int32 columnIndex )
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getBlob( columnIndex );
}
-//------------------------------------------------------------------------------
Reference< XClob > SAL_CALL OCallableStatement::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getClob" );
@@ -332,7 +292,6 @@ Reference< XClob > SAL_CALL OCallableStatement::getClob( sal_Int32 columnIndex )
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getClob( columnIndex );
}
-//------------------------------------------------------------------------------
Reference< XArray > SAL_CALL OCallableStatement::getArray( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getArray" );
@@ -342,3 +301,4 @@ Reference< XArray > SAL_CALL OCallableStatement::getArray( sal_Int32 columnIndex
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx
index 43412bb02..d86f9798d 100644
--- a/dbaccess/source/core/api/column.cxx
+++ b/dbaccess/source/core/api/column.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -77,7 +78,6 @@ DBG_NAME(OColumn)
//============================================================
//= OColumn
//============================================================
-//--------------------------------------------------------------------------
OColumn::OColumn( const bool _bNameIsReadOnly )
:OColumnBase( m_aMutex )
,::comphelper::OPropertyContainer( OColumnBase::rBHelper )
@@ -88,14 +88,12 @@ OColumn::OColumn( const bool _bNameIsReadOnly )
&m_sName, ::getCppuType( &m_sName ) );
}
-//--------------------------------------------------------------------------
OColumn::~OColumn()
{
DBG_DTOR(OColumn, NULL);
}
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > OColumn::getTypes() throw (RuntimeException)
{
return ::comphelper::concatSequences(
@@ -108,19 +106,16 @@ Sequence< Type > OColumn::getTypes() throw (RuntimeException)
IMPLEMENT_FORWARD_XINTERFACE2( OColumn, OColumnBase, ::comphelper::OPropertyContainer )
// ::com::sun::star::lang::XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OColumn::getImplementationName( ) throw(RuntimeException)
{
- return rtl::OUString::createFromAscii("com.sun.star.sdb.OColumn");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OColumn"));
}
-//------------------------------------------------------------------------------
sal_Bool OColumn::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OColumn::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 1 );
@@ -129,49 +124,42 @@ Sequence< ::rtl::OUString > OColumn::getSupportedServiceNames( ) throw (Runtime
}
// OComponentHelper
-//------------------------------------------------------------------------------
void OColumn::disposing()
{
OPropertyContainer::disposing();
}
// com::sun::star::beans::XPropertySet
-//------------------------------------------------------------------------------
Reference< XPropertySetInfo > OColumn::getPropertySetInfo() throw (RuntimeException)
{
return createPropertySetInfo( getInfoHelper() ) ;
}
-// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL OColumn::getName( ) throw(::com::sun::star::uno::RuntimeException)
{
return m_sName;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OColumn::setName( const ::rtl::OUString& _rName ) throw(::com::sun::star::uno::RuntimeException)
{
m_sName = _rName;
}
-// -----------------------------------------------------------------------------
void OColumn::fireValueChange(const ::connectivity::ORowSetValue& /*_rOldValue*/)
{
- DBG_ERROR( "OColumn::fireValueChange: not implemented!" );
+ OSL_FAIL( "OColumn::fireValueChange: not implemented!" );
}
-//------------------------------------------------------------------------------
void OColumn::registerProperty( const ::rtl::OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void* _pPointerToMember, const Type& _rMemberType )
{
::comphelper::OPropertyContainer::registerProperty( _rName, _nHandle, _nAttributes, _pPointerToMember, _rMemberType );
}
-//------------------------------------------------------------------------------
void OColumn::registerMayBeVoidProperty( const ::rtl::OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, Any* _pPointerToMember, const Type& _rExpectedType )
{
::comphelper::OPropertyContainer::registerMayBeVoidProperty( _rName, _nHandle, _nAttributes, _pPointerToMember, _rExpectedType );
}
-//------------------------------------------------------------------------------
void OColumn::registerPropertyNoMember( const ::rtl::OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const Type& _rType, const void* _pInitialValue )
{
::comphelper::OPropertyContainer::registerPropertyNoMember( _rName, _nHandle, _nAttributes, _rType, _pInitialValue );
@@ -182,7 +170,6 @@ void OColumn::registerPropertyNoMember( const ::rtl::OUString& _rName, sal_Int32
//============================================================
DBG_NAME(OColumns);
-//--------------------------------------------------------------------------
OColumns::OColumns(::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,
sal_Bool _bCaseSensitive,const ::std::vector< ::rtl::OUString> &_rVector,
@@ -203,7 +190,6 @@ OColumns::OColumns(::cppu::OWeakObject& _rParent,
DBG_CTOR(OColumns, NULL);
}
-// -------------------------------------------------------------------------
OColumns::OColumns(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxDrvColumns,
sal_Bool _bCaseSensitive,const ::std::vector< ::rtl::OUString> &_rVector,
@@ -223,26 +209,23 @@ OColumns::OColumns(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex,
{
DBG_CTOR(OColumns, NULL);
}
-//--------------------------------------------------------------------------
+
OColumns::~OColumns()
{
DBG_DTOR(OColumns, NULL);
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OColumns::getImplementationName( ) throw(RuntimeException)
{
- return rtl::OUString::createFromAscii("com.sun.star.sdb.OColumns");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OColumns"));
}
-//------------------------------------------------------------------------------
sal_Bool OColumns::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OColumns::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 1 );
@@ -271,7 +254,6 @@ void OColumns::clearColumns()
disposing();
}
-// -----------------------------------------------------------------------------
void SAL_CALL OColumns::disposing(void)
{
MutexGuard aGuard(m_rMutex);
@@ -281,14 +263,12 @@ void SAL_CALL OColumns::disposing(void)
OColumns_BASE::disposing();
}
-// -------------------------------------------------------------------------
void OColumns::impl_refresh() throw(::com::sun::star::uno::RuntimeException)
{
if (m_pRefreshColumns)
m_pRefreshColumns->refreshColumns();
}
-// -------------------------------------------------------------------------
connectivity::sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _rName)
{
OSL_ENSURE(m_pColFactoryImpl, "OColumns::createObject: no column factory!");
@@ -308,7 +288,7 @@ connectivity::sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _r
return xRet;
}
-// -------------------------------------------------------------------------
+
Reference< XPropertySet > OColumns::createDescriptor()
{
if ( m_pColFactoryImpl )
@@ -322,16 +302,16 @@ Reference< XPropertySet > OColumns::createDescriptor()
else
return Reference< XPropertySet >();
}
-// -------------------------------------------------------------------------
+
Any SAL_CALL OColumns::queryInterface( const Type & rType ) throw(RuntimeException)
{
Any aRet;
if(m_xDrvColumns.is())
{
aRet = m_xDrvColumns->queryInterface(rType);
- if ( aRet.hasValue() )
+ if ( aRet.hasValue() )
aRet = OColumns_BASE::queryInterface( rType);
- if ( !aRet.hasValue() )
+ if ( !aRet.hasValue() )
aRet = TXChild::queryInterface( rType);
return aRet;
}
@@ -344,11 +324,11 @@ Any SAL_CALL OColumns::queryInterface( const Type & rType ) throw(RuntimeExcepti
}
aRet = OColumns_BASE::queryInterface( rType);
- if ( !aRet.hasValue() )
+ if ( !aRet.hasValue() )
aRet = TXChild::queryInterface( rType);
return aRet;
}
-// -------------------------------------------------------------------------
+
Sequence< Type > SAL_CALL OColumns::getTypes( ) throw(RuntimeException)
{
sal_Bool bAppendFound = sal_False,bDropFound = sal_False;
@@ -399,7 +379,7 @@ Sequence< Type > SAL_CALL OColumns::getTypes( ) throw(RuntimeException)
}
return aRet;
}
-// -------------------------------------------------------------------------
+
// XAppend
sdbcx::ObjectType OColumns::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
@@ -437,7 +417,7 @@ sdbcx::ObjectType OColumns::appendObject( const ::rtl::OUString& _rForName, cons
return xReturn;
}
-// -------------------------------------------------------------------------
+
// XDrop
void OColumns::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
{
@@ -465,17 +445,16 @@ void OColumns::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
::dbaccess::notifyDataSourceModified(m_xParent,sal_True);
}
-// -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OColumns::getParent( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_rMutex);
return m_xParent;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OColumns::setParent( const Reference< XInterface >& _xParent ) throw (NoSupportException, RuntimeException)
{
::osl::MutexGuard aGuard(m_rMutex);
m_xParent = _xParent;
}
-// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/columnsettings.cxx b/dbaccess/source/core/api/columnsettings.cxx
index 1650d068a..985a252cd 100644
--- a/dbaccess/source/core/api/columnsettings.cxx
+++ b/dbaccess/source/core/api/columnsettings.cxx
@@ -1,6 +1,7 @@
+/* -*- 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
@@ -38,6 +39,7 @@
#include <comphelper/property.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/macros.h>
//........................................................................
namespace dbaccess
@@ -66,20 +68,18 @@ namespace dbaccess
//= OColumnSettings
//==============================================================================
DBG_NAME( OColumnSettings )
- //------------------------------------------------------------------------------
+
OColumnSettings::OColumnSettings()
:m_bHidden(sal_False)
{
DBG_CTOR( OColumnSettings, NULL );
}
- //------------------------------------------------------------------------------
OColumnSettings::~OColumnSettings()
{
DBG_DTOR( OColumnSettings, NULL );
}
- //------------------------------------------------------------------------------
void OColumnSettings::registerProperties( IPropertyContainer& _rPropertyContainer )
{
const sal_Int32 nBoundAttr = PropertyAttribute::BOUND;
@@ -98,7 +98,6 @@ namespace dbaccess
_rPropertyContainer.registerProperty( PROPERTY_HIDDEN, PROPERTY_ID_HIDDEN, nBoundAttr, &m_bHidden, ::getCppuType( &m_bHidden ) );
}
- //------------------------------------------------------------------------------
bool OColumnSettings::isColumnSettingProperty( const sal_Int32 _nPropertyHandle )
{
return ( _nPropertyHandle == PROPERTY_ID_ALIGN )
@@ -111,7 +110,6 @@ namespace dbaccess
|| ( _nPropertyHandle == PROPERTY_ID_HIDDEN );
}
- //------------------------------------------------------------------------------
bool OColumnSettings::isDefaulted( const sal_Int32 _nPropertyHandle, const Any& _rPropertyValue )
{
switch ( _nPropertyHandle )
@@ -134,11 +132,10 @@ namespace dbaccess
return !bHidden;
}
}
- OSL_ENSURE( false, "OColumnSettings::isDefaulted: illegal property handle!" );
+ OSL_FAIL( "OColumnSettings::isDefaulted: illegal property handle!" );
return sal_False;
}
- //------------------------------------------------------------------------------
bool OColumnSettings::hasDefaultSettings( const Reference< XPropertySet >& _rxColumn )
{
ENSURE_OR_THROW( _rxColumn.is(), "illegal column" );
@@ -163,7 +160,7 @@ namespace dbaccess
{ PROPERTY_HIDDEN, PROPERTY_ID_HIDDEN }
};
- for ( size_t i=0; i < sizeof( aProps ) / sizeof( aProps[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS( aProps ); ++i )
{
if ( xPSI->hasPropertyByName( aProps[i].sName ) )
if ( !isDefaulted( aProps[i].nHandle, _rxColumn->getPropertyValue( aProps[i].sName ) ) )
@@ -180,3 +177,5 @@ namespace dbaccess
//........................................................................
} // namespace dbaccess
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/datacolumn.cxx b/dbaccess/source/core/api/datacolumn.cxx
index e7bb442c8..bca1cadfc 100644
--- a/dbaccess/source/core/api/datacolumn.cxx
+++ b/dbaccess/source/core/api/datacolumn.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,33 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBACORE_DATACOLUMN_HXX_
#include "datacolumn.hxx"
-#endif
-#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
using namespace dbaccess;
using namespace ::com::sun::star::sdbc;
@@ -67,7 +50,7 @@ using namespace ::comphelper;
using namespace ::cppu;
DBG_NAME(ODataColumn)
-//--------------------------------------------------------------------------
+
ODataColumn::ODataColumn(
const Reference < XResultSetMetaData >& _xMetaData,
const Reference < XRow >& _xRow,
@@ -80,14 +63,13 @@ ODataColumn::ODataColumn(
{
DBG_CTOR(ODataColumn,NULL);
}
-// -----------------------------------------------------------------------------
+
ODataColumn::~ODataColumn()
{
DBG_DTOR(ODataColumn,NULL);
}
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > ODataColumn::getTypes() throw (RuntimeException)
{
OTypeCollection aTypes(::getCppuType( (const Reference< XColumn > *)0 ),
@@ -96,7 +78,6 @@ Sequence< Type > ODataColumn::getTypes() throw (RuntimeException)
return aTypes.getTypes();
}
-//--------------------------------------------------------------------------
Sequence< sal_Int8 > ODataColumn::getImplementationId() throw (RuntimeException)
{
static OImplementationId * pId = 0;
@@ -112,7 +93,6 @@ Sequence< sal_Int8 > ODataColumn::getImplementationId() throw (RuntimeException)
return pId->getImplementationId();
}
-//------------------------------------------------------------------------------
Any SAL_CALL ODataColumn::queryInterface( const Type & _rType ) throw (RuntimeException)
{
Any aReturn = OResultColumn::queryInterface(_rType);
@@ -125,13 +105,11 @@ Any SAL_CALL ODataColumn::queryInterface( const Type & _rType ) throw (RuntimeEx
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString ODataColumn::getImplementationName( ) throw(RuntimeException)
{
- return rtl::OUString::createFromAscii("com.sun.star.sdb.ODataColumn");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ODataColumn"));
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > ODataColumn::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 3 );
@@ -142,7 +120,6 @@ Sequence< ::rtl::OUString > ODataColumn::getSupportedServiceNames( ) throw (Run
}
// OComponentHelper
-//------------------------------------------------------------------------------
void ODataColumn::disposing()
{
OResultColumn::disposing();
@@ -152,16 +129,14 @@ void ODataColumn::disposing()
}
// ::com::sun::star::sdb::XColumn
-//------------------------------------------------------------------------------
sal_Bool ODataColumn::wasNull(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(!m_xRow.is());
-
+
return m_xRow->wasNull();
}
-//------------------------------------------------------------------------------
rtl::OUString ODataColumn::getString(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -170,7 +145,6 @@ rtl::OUString ODataColumn::getString(void) throw( SQLException, RuntimeException
return m_xRow->getString(m_nPos);
}
-//------------------------------------------------------------------------------
sal_Bool ODataColumn::getBoolean(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -179,7 +153,6 @@ sal_Bool ODataColumn::getBoolean(void) throw( SQLException, RuntimeException )
return m_xRow->getBoolean(m_nPos);
}
-//------------------------------------------------------------------------------
sal_Int8 ODataColumn::getByte(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -188,7 +161,6 @@ sal_Int8 ODataColumn::getByte(void) throw( SQLException, RuntimeException )
return m_xRow->getByte(m_nPos);
}
-//------------------------------------------------------------------------------
sal_Int16 ODataColumn::getShort(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -197,7 +169,6 @@ sal_Int16 ODataColumn::getShort(void) throw( SQLException, RuntimeException )
return m_xRow->getShort(m_nPos);
}
-//------------------------------------------------------------------------------
sal_Int32 ODataColumn::getInt(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -206,7 +177,6 @@ sal_Int32 ODataColumn::getInt(void) throw( SQLException, RuntimeException )
return m_xRow->getInt(m_nPos);
}
-//------------------------------------------------------------------------------
sal_Int64 ODataColumn::getLong(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -215,7 +185,6 @@ sal_Int64 ODataColumn::getLong(void) throw( SQLException, RuntimeException )
return m_xRow->getLong(m_nPos);
}
-//------------------------------------------------------------------------------
float ODataColumn::getFloat(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -223,7 +192,7 @@ float ODataColumn::getFloat(void) throw( SQLException, RuntimeException )
return m_xRow->getFloat(m_nPos);
}
-//------------------------------------------------------------------------------
+
double ODataColumn::getDouble(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -232,7 +201,6 @@ double ODataColumn::getDouble(void) throw( SQLException, RuntimeException )
return m_xRow->getDouble(m_nPos);
}
-//------------------------------------------------------------------------------
Sequence< sal_Int8 > ODataColumn::getBytes(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -240,7 +208,7 @@ Sequence< sal_Int8 > ODataColumn::getBytes(void) throw( SQLException, RuntimeExc
return m_xRow->getBytes(m_nPos);
}
-//------------------------------------------------------------------------------
+
com::sun::star::util::Date ODataColumn::getDate(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -249,7 +217,6 @@ com::sun::star::util::Date ODataColumn::getDate(void) throw( SQLException, Runti
return m_xRow->getDate(m_nPos);
}
-//------------------------------------------------------------------------------
com::sun::star::util::Time ODataColumn::getTime(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -257,7 +224,7 @@ com::sun::star::util::Time ODataColumn::getTime(void) throw( SQLException, Runti
return m_xRow->getTime(m_nPos);
}
-//------------------------------------------------------------------------------
+
com::sun::star::util::DateTime ODataColumn::getTimestamp(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -266,7 +233,6 @@ com::sun::star::util::DateTime ODataColumn::getTimestamp(void) throw( SQLExcepti
return m_xRow->getTimestamp(m_nPos);
}
-//------------------------------------------------------------------------------
Reference< ::com::sun::star::io::XInputStream > ODataColumn::getBinaryStream(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -275,7 +241,6 @@ Reference< ::com::sun::star::io::XInputStream > ODataColumn::getBinaryStream(vo
return m_xRow->getBinaryStream(m_nPos);
}
-//------------------------------------------------------------------------------
Reference< ::com::sun::star::io::XInputStream > ODataColumn::getCharacterStream(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -284,7 +249,6 @@ Reference< ::com::sun::star::io::XInputStream > ODataColumn::getCharacterStream
return m_xRow->getCharacterStream(m_nPos);
}
-//------------------------------------------------------------------------------
Any ODataColumn::getObject(const Reference< ::com::sun::star::container::XNameAccess > & typeMap) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -293,7 +257,6 @@ Any ODataColumn::getObject(const Reference< ::com::sun::star::container::XNameAc
return m_xRow->getObject(m_nPos, typeMap);
}
-//------------------------------------------------------------------------------
Reference< XRef > ODataColumn::getRef(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -302,7 +265,6 @@ Reference< XRef > ODataColumn::getRef(void) throw( SQLException, RuntimeExcepti
return m_xRow->getRef(m_nPos);
}
-//------------------------------------------------------------------------------
Reference< XBlob > ODataColumn::getBlob(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -311,7 +273,6 @@ Reference< XBlob > ODataColumn::getBlob(void) throw( SQLException, RuntimeExcep
return m_xRow->getBlob(m_nPos);
}
-//------------------------------------------------------------------------------
Reference< XClob > ODataColumn::getClob(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -320,7 +281,6 @@ Reference< XClob > ODataColumn::getClob(void) throw( SQLException, RuntimeExcep
return m_xRow->getClob(m_nPos);
}
-//------------------------------------------------------------------------------
Reference< XArray > ODataColumn::getArray(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -330,7 +290,6 @@ Reference< XArray > ODataColumn::getArray(void) throw( SQLException, RuntimeExc
}
// ::com::sun::star::sdb::XColumnUpdate
-//------------------------------------------------------------------------------
void ODataColumn::updateNull(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -339,7 +298,6 @@ void ODataColumn::updateNull(void) throw( SQLException, RuntimeException )
m_xRowUpdate->updateNull(m_nPos);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateBoolean(sal_Bool x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -348,7 +306,6 @@ void ODataColumn::updateBoolean(sal_Bool x) throw( SQLException, RuntimeExceptio
m_xRowUpdate->updateBoolean(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateByte(sal_Int8 x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -357,7 +314,6 @@ void ODataColumn::updateByte(sal_Int8 x) throw( SQLException, RuntimeException )
m_xRowUpdate->updateByte(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateShort(sal_Int16 x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -366,7 +322,6 @@ void ODataColumn::updateShort(sal_Int16 x) throw( SQLException, RuntimeException
m_xRowUpdate->updateShort(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateInt(sal_Int32 x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -375,7 +330,6 @@ void ODataColumn::updateInt(sal_Int32 x) throw( SQLException, RuntimeException )
m_xRowUpdate->updateInt(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateLong(sal_Int64 x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -384,7 +338,6 @@ void ODataColumn::updateLong(sal_Int64 x) throw( SQLException, RuntimeException
m_xRowUpdate->updateLong(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateFloat(float x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -393,7 +346,6 @@ void ODataColumn::updateFloat(float x) throw( SQLException, RuntimeException )
m_xRowUpdate->updateFloat(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateDouble(double x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -402,7 +354,6 @@ void ODataColumn::updateDouble(double x) throw( SQLException, RuntimeException )
m_xRowUpdate->updateDouble(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateString(const rtl::OUString& x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -411,7 +362,6 @@ void ODataColumn::updateString(const rtl::OUString& x) throw( SQLException, Runt
m_xRowUpdate->updateString(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateBytes(const Sequence< sal_Int8 >& x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -420,7 +370,6 @@ void ODataColumn::updateBytes(const Sequence< sal_Int8 >& x) throw( SQLException
m_xRowUpdate->updateBytes(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateDate(const com::sun::star::util::Date& x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -429,7 +378,6 @@ void ODataColumn::updateDate(const com::sun::star::util::Date& x) throw( SQLExce
m_xRowUpdate->updateDate(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateTime(const ::com::sun::star::util::Time& x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -438,7 +386,6 @@ void ODataColumn::updateTime(const ::com::sun::star::util::Time& x) throw( SQLEx
m_xRowUpdate->updateTime(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateTimestamp(const ::com::sun::star::util::DateTime& x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -447,7 +394,6 @@ void ODataColumn::updateTimestamp(const ::com::sun::star::util::DateTime& x) thr
m_xRowUpdate->updateTimestamp(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateCharacterStream(const Reference< ::com::sun::star::io::XInputStream > & x, sal_Int32 length) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -456,7 +402,6 @@ void ODataColumn::updateCharacterStream(const Reference< ::com::sun::star::io::X
m_xRowUpdate->updateCharacterStream(m_nPos, x, length);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateBinaryStream(const Reference< ::com::sun::star::io::XInputStream > & x, sal_Int32 length) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -465,7 +410,6 @@ void ODataColumn::updateBinaryStream(const Reference< ::com::sun::star::io::XInp
m_xRowUpdate->updateBinaryStream(m_nPos, x, length);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateNumericObject(const Any& x, sal_Int32 scale) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -474,12 +418,11 @@ void ODataColumn::updateNumericObject(const Any& x, sal_Int32 scale) throw( SQLE
m_xRowUpdate->updateNumericObject(m_nPos, x, scale);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateObject(const Any& x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
::connectivity::checkDisposed(!m_xRowUpdate.is());
-
+
m_xRowUpdate->updateObject(m_nPos, x);
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/datacolumn.hxx b/dbaccess/source/core/api/datacolumn.hxx
index c55c9e77c..40a0a047a 100644
--- a/dbaccess/source/core/api/datacolumn.hxx
+++ b/dbaccess/source/core/api/datacolumn.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,24 +29,12 @@
#ifndef _DBACORE_DATACOLUMN_HXX_
#define _DBACORE_DATACOLUMN_HXX_
-#ifndef _COM_SUN_STAR_SDBC_XROWUPDATE_HPP_
#include <com/sun/star/sdbc/XRowUpdate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATA_HDL_
#include <com/sun/star/sdbc/XResultSetMetaData.hdl>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XCOLUMN_HPP_
#include <com/sun/star/sdb/XColumn.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XCOLUMNUPDATE_HPP_
#include <com/sun/star/sdb/XColumnUpdate.hpp>
-#endif
-#ifndef _DBA_COREAPI_RESULTCOLUMN_HXX_
#include <resultcolumn.hxx>
-#endif
namespace dbaccess
{
//************************************************************
@@ -127,3 +116,4 @@ namespace dbaccess
}
#endif // _DBACORE_RESULTCOLUMN_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/datasettings.cxx b/dbaccess/source/core/api/datasettings.cxx
index e2d766645..085f99ecf 100644
--- a/dbaccess/source/core/api/datasettings.cxx
+++ b/dbaccess/source/core/api/datasettings.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,43 +29,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_CORE_DATASETTINGS_HXX_
#include "datasettings.hxx"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
#include <comphelper/property.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _COM_SUN_STAR_AWT_FONTWEIGHT_HPP_
#include <com/sun/star/awt/FontWeight.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_FONTEMPHASISMARK_HPP_
#include <com/sun/star/awt/FontEmphasisMark.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_FONTRELIEF_HPP_
#include <com/sun/star/awt/FontRelief.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_FONTWIDTH_HPP_
#include <com/sun/star/awt/FontWidth.hpp>
-#endif
using namespace ::com::sun::star::uno;
@@ -74,13 +51,11 @@ using namespace ::com::sun::star::beans;
using namespace ::comphelper;
using namespace ::cppu;
-//........................................................................
namespace dbaccess
{
//==========================================================================
//= ODataSettings
//==========================================================================
-//--------------------------------------------------------------------------
void ODataSettings::registerPropertiesFor(ODataSettings_Base* _pItem)
{
if ( m_bQuery )
@@ -136,7 +111,6 @@ void ODataSettings::registerPropertiesFor(ODataSettings_Base* _pItem)
registerProperty(PROPERTY_FONTTYPE, PROPERTY_ID_FONTTYPE, PropertyAttribute::BOUND,&_pItem->m_aFont.Type, ::getCppuType(&_pItem->m_aFont.Type));
}
-//--------------------------------------------------------------------------
ODataSettings::ODataSettings(OBroadcastHelper& _rBHelper,sal_Bool _bQuery)
:OPropertyStateContainer(_rBHelper)
,ODataSettings_Base()
@@ -144,7 +118,6 @@ ODataSettings::ODataSettings(OBroadcastHelper& _rBHelper,sal_Bool _bQuery)
{
}
-//--------------------------------------------------------------------------
ODataSettings_Base::ODataSettings_Base()
:m_bApplyFilter(sal_False)
,m_aFont(::comphelper::getDefaultFont())
@@ -153,7 +126,6 @@ ODataSettings_Base::ODataSettings_Base()
{
}
-//--------------------------------------------------------------------------
ODataSettings_Base::ODataSettings_Base(const ODataSettings_Base& _rSource)
:m_sFilter( _rSource.m_sFilter )
,m_sHavingClause( _rSource.m_sHavingClause )
@@ -169,12 +141,10 @@ ODataSettings_Base::ODataSettings_Base(const ODataSettings_Base& _rSource)
{
}
-// -----------------------------------------------------------------------------
ODataSettings_Base::~ODataSettings_Base()
{
}
-// -----------------------------------------------------------------------------
void ODataSettings::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefault ) const
{
static ::com::sun::star::awt::FontDescriptor aFD = ::comphelper::getDefaultFont();
@@ -226,7 +196,7 @@ void ODataSettings::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefau
_rDefault <<= aFD.Weight;
break;
case PROPERTY_ID_FONTSLANT:
- _rDefault <<= aFD.Slant;
+ _rDefault <<= aFD.Slant;
break;
case PROPERTY_ID_FONTUNDERLINE:
_rDefault <<= aFD.Underline;
@@ -248,7 +218,6 @@ void ODataSettings::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefau
break;
}
}
-//........................................................................
-} // namespace dbaccess
-//........................................................................
+} // namespace dbaccess
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx
index 7f1e7a244..c0db66370 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -44,6 +45,7 @@
#include <cppuhelper/typeprovider.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/macros.h>
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdbcx;
@@ -66,7 +68,6 @@ using namespace dbaccess;
//============================================================
IMPLEMENT_FORWARD_XINTERFACE2(OTableColumnDescriptor,OColumn,TXChild)
-//------------------------------------------------------------------------------
void OTableColumnDescriptor::impl_registerProperties()
{
sal_Int32 nDefaultAttr = m_bActAsDescriptor ? 0 : PropertyAttribute::READONLY;
@@ -89,17 +90,14 @@ void OTableColumnDescriptor::impl_registerProperties()
OColumnSettings::registerProperties( *this );
}
-//--------------------------------------------------------------------------
IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnDescriptor )
// ::com::sun::star::lang::XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OTableColumnDescriptor::getImplementationName( ) throw (RuntimeException)
{
- return rtl::OUString::createFromAscii("com.sun.star.sdb.OTableColumnDescriptor");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OTableColumnDescriptor"));
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OTableColumnDescriptor::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
@@ -109,7 +107,6 @@ Sequence< ::rtl::OUString > OTableColumnDescriptor::getSupportedServiceNames( )
}
// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OTableColumnDescriptor::createArrayHelper( ) const
{
Sequence< Property > aProps;
@@ -118,26 +115,23 @@ Sequence< ::rtl::OUString > OTableColumnDescriptor::getSupportedServiceNames( )
}
// cppu::OPropertySetHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OTableColumnDescriptor::getInfoHelper()
{
return *static_cast< ::comphelper::OPropertyArrayUsageHelper< OTableColumnDescriptor >* >(this)->getArrayHelper();
}
-//------------------------------------------------------------------------------
void OTableColumnDescriptor::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception)
{
OColumn::setFastPropertyValue_NoBroadcast( nHandle, rValue );
::dbaccess::notifyDataSourceModified( m_xParent, sal_True );
}
-// -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OTableColumnDescriptor::getParent( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
return m_xParent;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OTableColumnDescriptor::setParent( const Reference< XInterface >& _xParent ) throw (NoSupportException, RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -148,7 +142,6 @@ void SAL_CALL OTableColumnDescriptor::setParent( const Reference< XInterface >&
//============================================================
DBG_NAME(OTableColumn);
-// -------------------------------------------------------------------------
OTableColumn::OTableColumn( const ::rtl::OUString& _rName )
:OTableColumnDescriptor( false /* do not act as descriptor */ )
{
@@ -156,28 +149,23 @@ OTableColumn::OTableColumn( const ::rtl::OUString& _rName )
m_sName = _rName;
}
-// -----------------------------------------------------------------------------
OTableColumn::~OTableColumn()
{
DBG_DTOR(OTableColumn,NULL);
}
-//--------------------------------------------------------------------------
IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumn )
-//------------------------------------------------------------------------------
rtl::OUString OTableColumn::getImplementationName( ) throw (RuntimeException)
{
- return rtl::OUString::createFromAscii("com.sun.star.sdb.OTableColumn");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OTableColumn"));
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& SAL_CALL OTableColumn::getInfoHelper()
{
return *OTableColumn_PBase::getArrayHelper();
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OTableColumn::createArrayHelper( ) const
{
return OTableColumnDescriptor::createArrayHelper();
@@ -188,7 +176,6 @@ rtl::OUString OTableColumn::getImplementationName( ) throw (RuntimeException)
// =========================================================================
DBG_NAME( OQueryColumn );
-// -------------------------------------------------------------------------
OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, const Reference< XConnection >& _rxConnection,const ::rtl::OUString i_sLabel )
:OTableColumnDescriptor( false /* do not act as descriptor */ )
,m_sLabel(i_sLabel)
@@ -210,7 +197,7 @@ OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, co
OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_ISAUTOINCREMENT ) >>= m_bAutoIncrement );
OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_ISCURRENCY ) >>= m_bCurrency );
OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_NAME ) >>= m_sName );
-
+
m_bRowVersion = sal_False;
Reference< XPropertySetInfo > xPSI( _rxParserColumn->getPropertySetInfo(), UNO_SET_THROW );
@@ -230,7 +217,7 @@ OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, co
{ PROPERTY_TABLENAME, PROPERTY_ID_TABLENAME },
{ PROPERTY_REALNAME, PROPERTY_ID_REALNAME }
};
- for ( size_t i=0; i < sizeof( aProps ) / sizeof( aProps[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS( aProps ); ++i )
{
if ( xPSI->hasPropertyByName( aProps[i].sName ) )
setFastPropertyValue_NoBroadcast( aProps[i].nHandle, _rxParserColumn->getPropertyValue( aProps[i].sName ) );
@@ -244,13 +231,11 @@ OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, co
osl_decrementInterlockedCount( &m_refCount );
}
-//--------------------------------------------------------------------------
OQueryColumn::~OQueryColumn()
{
DBG_DTOR( OQueryColumn, NULL );
}
-//--------------------------------------------------------------------------
Reference< XPropertySet > OQueryColumn::impl_determineOriginalTableColumn( const Reference< XConnection >& _rxConnection )
{
OSL_PRECOND( _rxConnection.is(), "OQueryColumn::impl_determineOriginalTableColumn: illegal connection!" );
@@ -295,28 +280,23 @@ Reference< XPropertySet > OQueryColumn::impl_determineOriginalTableColumn( const
return xOriginalTableColumn;
}
-//--------------------------------------------------------------------------
IMPLEMENT_GET_IMPLEMENTATION_ID( OQueryColumn )
-//--------------------------------------------------------------------------
::rtl::OUString SAL_CALL OQueryColumn::getImplementationName( ) throw(RuntimeException)
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.dbaccess.OQueryColumn" ) );
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& SAL_CALL OQueryColumn::getInfoHelper()
{
return *OQueryColumn_PBase::getArrayHelper();
}
-//--------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OQueryColumn::createArrayHelper() const
{
return OTableColumnDescriptor::createArrayHelper();
}
-//--------------------------------------------------------------------------
void SAL_CALL OQueryColumn::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
{
OTableColumnDescriptor::getFastPropertyValue( _rValue, _nHandle );
@@ -353,7 +333,7 @@ void SAL_CALL OQueryColumn::getFastPropertyValue( Any& _rValue, sal_Int32 _nHand
//= OColumnWrapper
//==========================================================================
DBG_NAME(OColumnWrapper);
-//--------------------------------------------------------------------------
+
OColumnWrapper::OColumnWrapper( const Reference< XPropertySet > & rCol, const bool _bNameIsReadOnly )
:OColumn( _bNameIsReadOnly )
,m_xAggregate(rCol)
@@ -374,13 +354,12 @@ OColumnWrapper::OColumnWrapper( const Reference< XPropertySet > & rCol, const bo
m_xAggregate->getPropertyValue(PROPERTY_NAME) >>= m_sName;
}
}
-// -----------------------------------------------------------------------------
+
OColumnWrapper::~OColumnWrapper()
{
DBG_DTOR(OColumnWrapper,NULL);
}
-//------------------------------------------------------------------------------
::rtl::OUString OColumnWrapper::impl_getPropertyNameFromHandle( const sal_Int32 _nHandle ) const
{
::rtl::OUString sPropName;
@@ -390,7 +369,6 @@ OColumnWrapper::~OColumnWrapper()
return sPropName;
}
-//------------------------------------------------------------------------------
void OColumnWrapper::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
// derived classes are free to either use the OPropertyContainer(Helper) mechanisms for properties,
@@ -406,7 +384,6 @@ void OColumnWrapper::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons
}
}
-//------------------------------------------------------------------------------
sal_Bool OColumnWrapper::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle,
const Any& rValue ) throw (IllegalArgumentException)
{
@@ -427,7 +404,6 @@ sal_Bool OColumnWrapper::convertFastPropertyValue( Any & rConvertedValue, Any &
return bModified;
}
-//------------------------------------------------------------------------------
void OColumnWrapper::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception)
{
if ( OColumn::isRegisteredProperty( nHandle ) )
@@ -440,7 +416,6 @@ void OColumnWrapper::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const
}
}
-// -----------------------------------------------------------------------------
sal_Int64 SAL_CALL OColumnWrapper::getSomething( const Sequence< sal_Int8 >& aIdentifier ) throw(RuntimeException)
{
Reference< XUnoTunnel > xTunnel( m_xAggregate, UNO_QUERY);
@@ -452,7 +427,6 @@ sal_Int64 SAL_CALL OColumnWrapper::getSomething( const Sequence< sal_Int8 >& aId
//============================================================
//= OTableColumnDescriptorWrapper
//============================================================
-//--------------------------------------------------------------------------
OTableColumnDescriptorWrapper::OTableColumnDescriptorWrapper( const Reference< XPropertySet >& _rCol, const bool _bPureWrap, const bool _bIsDescriptor )
:OColumnWrapper( _rCol, !_bIsDescriptor )
,m_bPureWrap( _bPureWrap )
@@ -463,17 +437,14 @@ OTableColumnDescriptorWrapper::OTableColumnDescriptorWrapper( const Reference< X
}
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnDescriptorWrapper )
// ::com::sun::star::lang::XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OTableColumnDescriptorWrapper::getImplementationName( ) throw (RuntimeException)
{
- return rtl::OUString::createFromAscii("com.sun.star.sdb.OTableColumnDescriptorWrapper");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OTableColumnDescriptorWrapper"));
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
@@ -483,7 +454,6 @@ Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNa
}
// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OTableColumnDescriptorWrapper::createArrayHelper( sal_Int32 nId ) const
{
const sal_Int32 nHaveAlways = 7;
@@ -499,10 +469,7 @@ Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNa
if ( nId & HAS_AUTOINCREMENT_CREATION )
++nHaveOptionally;
- const sal_Int32 nPropertyCount( nHaveAlways + nHaveOptionally );
- Sequence< Property > aTableDescProperties( nPropertyCount );
- Property* pDesc = aTableDescProperties.getArray();
- sal_Int32 nPos = 0;
+ BEGIN_PROPERTY_SEQUENCE( nHaveAlways + nHaveOptionally )
DECL_PROP0_BOOL( ISAUTOINCREMENT );
DECL_PROP0_BOOL( ISCURRENCY );
@@ -529,12 +496,12 @@ Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNa
DECL_PROP0_BOOL( ISROWVERSION );
}
- OSL_ENSURE( nPos == nPropertyCount, "OTableColumnDescriptorWrapper::createArrayHelper: something went wrong!" );
+ END_PROPERTY_SEQUENCE()
if ( !m_bIsDescriptor )
{
- for ( Property* prop = aTableDescProperties.getArray();
- prop != aTableDescProperties.getArray() + aTableDescProperties.getLength();
+ for ( Property* prop = aDescriptor.getArray();
+ prop != aDescriptor.getArray() + aDescriptor.getLength();
++prop
)
{
@@ -546,18 +513,16 @@ Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNa
Sequence< Property > aBaseProperties;
describeProperties( aBaseProperties );
- Sequence< Property > aAllProperties( ::comphelper::concatSequences( aTableDescProperties, aBaseProperties ) );
+ Sequence< Property > aAllProperties( ::comphelper::concatSequences( aDescriptor, aBaseProperties ) );
return new ::cppu::OPropertyArrayHelper( aAllProperties, sal_False );
}
// cppu::OPropertySetHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OTableColumnDescriptorWrapper::getInfoHelper()
{
return *static_cast< OIdPropertyArrayUsageHelper< OTableColumnDescriptorWrapper >* >(this)->getArrayHelper(m_nColTypeID);
}
-//------------------------------------------------------------------------------
void OTableColumnDescriptorWrapper::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
if ( m_bPureWrap )
@@ -570,7 +535,6 @@ void OTableColumnDescriptorWrapper::getFastPropertyValue( Any& rValue, sal_Int32
}
}
-//------------------------------------------------------------------------------
sal_Bool OTableColumnDescriptorWrapper::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw (IllegalArgumentException)
{
sal_Bool bModified(sal_False);
@@ -595,7 +559,6 @@ sal_Bool OTableColumnDescriptorWrapper::convertFastPropertyValue( Any & rConvert
return bModified;
}
-//------------------------------------------------------------------------------
void OTableColumnDescriptorWrapper::setFastPropertyValue_NoBroadcast(
sal_Int32 nHandle,
const Any& rValue
@@ -615,7 +578,6 @@ void OTableColumnDescriptorWrapper::setFastPropertyValue_NoBroadcast(
//============================================================
//= OTableColumnWrapper
//============================================================
-//--------------------------------------------------------------------------
OTableColumnWrapper::OTableColumnWrapper( const Reference< XPropertySet >& rCol, const Reference< XPropertySet >& _xColDefintion,
const bool _bPureWrap )
:OTableColumnDescriptorWrapper( rCol, _bPureWrap, false )
@@ -635,21 +597,17 @@ OTableColumnWrapper::OTableColumnWrapper( const Reference< XPropertySet >& rCol,
osl_decrementInterlockedCount( &m_refCount );
}
-//--------------------------------------------------------------------------
OTableColumnWrapper::~OTableColumnWrapper()
{
}
-//--------------------------------------------------------------------------
IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnWrapper )
-//------------------------------------------------------------------------------
rtl::OUString OTableColumnWrapper::getImplementationName( ) throw (RuntimeException)
{
- return rtl::OUString::createFromAscii( "com.sun.star.sdb.OTableColumnWrapper" );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OTableColumnWrapper" ));
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OTableColumnWrapper::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
@@ -658,16 +616,14 @@ Sequence< ::rtl::OUString > OTableColumnWrapper::getSupportedServiceNames( ) th
return aSNS;
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OTableColumnWrapper::getInfoHelper()
{
return *static_cast< OIdPropertyArrayUsageHelper< OTableColumnWrapper >* >(this)->getArrayHelper(m_nColTypeID);
}
// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OTableColumnWrapper::createArrayHelper( sal_Int32 nId ) const
{
return OTableColumnDescriptorWrapper::createArrayHelper( nId );
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/makefile.mk b/dbaccess/source/core/api/makefile.mk
deleted file mode 100644
index 9a4dc9d8e..000000000
--- a/dbaccess/source/core/api/makefile.mk
+++ /dev/null
@@ -1,82 +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=api
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/dba.pmk
-
-# --- Files -------------------------------------
-SLOFILES= \
- $(SLO)$/querydescriptor.obj \
- $(SLO)$/FilteredContainer.obj \
- $(SLO)$/TableDeco.obj \
- $(SLO)$/RowSetCacheIterator.obj \
- $(SLO)$/RowSet.obj \
- $(SLO)$/column.obj \
- $(SLO)$/RowSetBase.obj \
- $(SLO)$/CRowSetDataColumn.obj \
- $(SLO)$/CRowSetColumn.obj \
- $(SLO)$/querycomposer.obj \
- $(SLO)$/CIndexes.obj \
- $(SLO)$/BookmarkSet.obj \
- $(SLO)$/KeySet.obj \
- $(SLO)$/StaticSet.obj \
- $(SLO)$/CacheSet.obj \
- $(SLO)$/RowSetCache.obj \
- $(SLO)$/definitioncolumn.obj \
- $(SLO)$/resultcolumn.obj \
- $(SLO)$/datacolumn.obj \
- $(SLO)$/resultset.obj \
- $(SLO)$/statement.obj \
- $(SLO)$/preparedstatement.obj \
- $(SLO)$/callablestatement.obj \
- $(SLO)$/query.obj \
- $(SLO)$/querycontainer.obj \
- $(SLO)$/table.obj \
- $(SLO)$/viewcontainer.obj \
- $(SLO)$/tablecontainer.obj \
- $(SLO)$/SingleSelectQueryComposer.obj \
- $(SLO)$/HelperCollections.obj \
- $(SLO)$/datasettings.obj \
- $(SLO)$/View.obj \
- $(SLO)$/WrappedResultSet.obj \
- $(SLO)$/OptimisticSet.obj \
- $(SLO)$/PrivateRow.obj \
- $(SLO)$/columnsettings.obj
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/dbaccess/source/core/api/preparedstatement.cxx b/dbaccess/source/core/api/preparedstatement.cxx
index 8237df8de..bca0ffa9b 100644
--- a/dbaccess/source/core/api/preparedstatement.cxx
+++ b/dbaccess/source/core/api/preparedstatement.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -54,7 +55,6 @@ using namespace dbaccess;
DBG_NAME(OPreparedStatement)
-//--------------------------------------------------------------------------
OPreparedStatement::OPreparedStatement(const Reference< XConnection > & _xConn,
const Reference< XInterface > & _xStatement)
:OStatementBase(_xConn, _xStatement)
@@ -66,7 +66,6 @@ OPreparedStatement::OPreparedStatement(const Reference< XConnection > & _xConn,
m_pColumns = new OColumns(*this, m_aMutex, xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers(),::std::vector< ::rtl::OUString>(), NULL,NULL);
}
-//--------------------------------------------------------------------------
OPreparedStatement::~OPreparedStatement()
{
m_pColumns->acquire();
@@ -77,7 +76,6 @@ OPreparedStatement::~OPreparedStatement()
}
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > OPreparedStatement::getTypes() throw (RuntimeException)
{
OTypeCollection aTypes(::getCppuType( (const Reference< XServiceInfo > *)0 ),
@@ -90,7 +88,6 @@ Sequence< Type > OPreparedStatement::getTypes() throw (RuntimeException)
return aTypes.getTypes();
}
-//--------------------------------------------------------------------------
Sequence< sal_Int8 > OPreparedStatement::getImplementationId() throw (RuntimeException)
{
static OImplementationId * pId = 0;
@@ -107,7 +104,6 @@ Sequence< sal_Int8 > OPreparedStatement::getImplementationId() throw (RuntimeExc
}
// com::sun::star::uno::XInterface
-//--------------------------------------------------------------------------
Any OPreparedStatement::queryInterface( const Type & rType ) throw (RuntimeException)
{
Any aIface = OStatementBase::queryInterface( rType );
@@ -124,32 +120,27 @@ Any OPreparedStatement::queryInterface( const Type & rType ) throw (RuntimeExcep
return aIface;
}
-//--------------------------------------------------------------------------
void OPreparedStatement::acquire() throw ()
{
OStatementBase::acquire();
}
-//--------------------------------------------------------------------------
void OPreparedStatement::release() throw ()
{
OStatementBase::release();
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OPreparedStatement::getImplementationName( ) throw(RuntimeException)
{
- return rtl::OUString::createFromAscii("com.sun.star.sdb.OPreparedStatement");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OPreparedStatement"));
}
-//------------------------------------------------------------------------------
sal_Bool OPreparedStatement::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OPreparedStatement::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
@@ -159,7 +150,6 @@ Sequence< ::rtl::OUString > OPreparedStatement::getSupportedServiceNames( ) thr
}
// OComponentHelper
-//------------------------------------------------------------------------------
void OPreparedStatement::disposing()
{
{
@@ -171,7 +161,6 @@ void OPreparedStatement::disposing()
}
// ::com::sun::star::sdbcx::XColumnsSupplier
-//------------------------------------------------------------------------------
Reference< ::com::sun::star::container::XNameAccess > OPreparedStatement::getColumns(void) throw( RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -206,7 +195,6 @@ Reference< ::com::sun::star::container::XNameAccess > OPreparedStatement::getCol
}
// XResultSetMetaDataSupplier
-//------------------------------------------------------------------------------
Reference< XResultSetMetaData > OPreparedStatement::getMetaData(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -215,7 +203,6 @@ Reference< XResultSetMetaData > OPreparedStatement::getMetaData(void) throw( SQL
}
// XPreparedStatement
-//------------------------------------------------------------------------------
Reference< XResultSet > OPreparedStatement::executeQuery() throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -235,7 +222,6 @@ Reference< XResultSet > OPreparedStatement::executeQuery() throw( SQLException,
return xResultSet;
}
-//------------------------------------------------------------------------------
sal_Int32 OPreparedStatement::executeUpdate() throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -246,7 +232,6 @@ sal_Int32 OPreparedStatement::executeUpdate() throw( SQLException, RuntimeExcept
return Reference< XPreparedStatement >( m_xAggregateAsSet, UNO_QUERY_THROW )->executeUpdate();
}
-//------------------------------------------------------------------------------
sal_Bool OPreparedStatement::execute() throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -257,14 +242,12 @@ sal_Bool OPreparedStatement::execute() throw( SQLException, RuntimeException )
return Reference< XPreparedStatement >( m_xAggregateAsSet, UNO_QUERY_THROW )->execute();
}
-//------------------------------------------------------------------------------
Reference< XConnection > OPreparedStatement::getConnection(void) throw( SQLException, RuntimeException )
{
return Reference< XConnection > (m_xParent, UNO_QUERY);
}
// XParameters
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 sqlType ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -273,7 +256,6 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 s
m_xAggregateAsParameters->setNull(parameterIndex, sqlType);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -282,7 +264,6 @@ void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_I
m_xAggregateAsParameters->setObjectNull(parameterIndex, sqlType, typeName);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -291,7 +272,6 @@ void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool
m_xAggregateAsParameters->setBoolean(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -300,7 +280,6 @@ void SAL_CALL OPreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x
m_xAggregateAsParameters->setByte(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16 x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -309,7 +288,6 @@ void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16
m_xAggregateAsParameters->setShort(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -318,7 +296,6 @@ void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x
m_xAggregateAsParameters->setInt(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -327,7 +304,6 @@ void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 x
m_xAggregateAsParameters->setLong(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -336,7 +312,6 @@ void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x )
m_xAggregateAsParameters->setFloat(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -345,7 +320,6 @@ void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x
m_xAggregateAsParameters->setDouble(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const ::rtl::OUString& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -354,7 +328,6 @@ void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const ::r
m_xAggregateAsParameters->setString(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -363,7 +336,6 @@ void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequ
m_xAggregateAsParameters->setBytes(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const ::com::sun::star::util::Date& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -372,7 +344,6 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const ::com
m_xAggregateAsParameters->setDate(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const ::com::sun::star::util::Time& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -381,7 +352,6 @@ void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const ::com
m_xAggregateAsParameters->setTime(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const ::com::sun::star::util::DateTime& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -390,7 +360,6 @@ void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const
m_xAggregateAsParameters->setTimestamp(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -399,7 +368,6 @@ void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, con
m_xAggregateAsParameters->setBinaryStream(parameterIndex, x, length);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -408,7 +376,6 @@ void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex,
m_xAggregateAsParameters->setCharacterStream(parameterIndex, x, length);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -417,7 +384,6 @@ void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any
m_xAggregateAsParameters->setObject(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 targetSqlType, sal_Int32 scale ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -426,7 +392,6 @@ void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, c
m_xAggregateAsParameters->setObjectWithInfo(parameterIndex, x, targetSqlType, scale);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Reference< XRef >& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -435,7 +400,6 @@ void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Refere
m_xAggregateAsParameters->setRef(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Reference< XBlob >& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -444,7 +408,6 @@ void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Refer
m_xAggregateAsParameters->setBlob(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Reference< XClob >& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -453,7 +416,6 @@ void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Refer
m_xAggregateAsParameters->setClob(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Reference< XArray >& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -462,7 +424,6 @@ void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Refe
m_xAggregateAsParameters->setArray(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::clearParameters( ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -470,4 +431,4 @@ void SAL_CALL OPreparedStatement::clearParameters( ) throw(SQLException, Runtim
m_xAggregateAsParameters->clearParameters();
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx
index bbd5f0a00..7ff064df8 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,83 +29,38 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_COREAPI_QUERY_HXX_
#include "query.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef DBTOOLS_WARNINGSCONTAINER_HXX
#include <connectivity/warningscontainer.hxx>
-#endif
-#ifndef DBA_HELPERCOLLECTIONS_HXX
#include "HelperCollections.hxx"
-#endif
-#ifndef _DBA_CORE_RESOURCE_HXX_
#include "core_resource.hxx"
-#endif
-#ifndef _DBA_CORE_RESOURCE_HRC_
#include "core_resource.hrc"
-#endif
-#ifndef _CPPUHELPER_QUERYINTERFACE_HXX_
#include <cppuhelper/queryinterface.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _COMPHELPER_PROPERTY_AGGREGATION_HXX_
+#include <osl/diagnose.h>
#include <comphelper/propagg.hxx>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSER_HPP_
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#endif
/** === end UNO includes === **/
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
#include <comphelper/property.hxx>
-#endif
-#ifndef UNOTOOLS_INC_SHAREDUNOCOMPONENT_HXX
#include <unotools/sharedunocomponent.hxx>
-#endif
-#ifndef _DBACORE_DEFINITIONCOLUMN_HXX_
#include "definitioncolumn.hxx"
-#endif
#include <functional>
-#ifndef DBACORE_SDBCORETOOLS_HXX
#include "sdbcoretools.hxx"
-#endif
-#ifndef DBACCESS_CORE_API_QUERYCOMPOSER_HXX
#include "querycomposer.hxx"
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef DBA_CONTAINERMEDIATOR_HXX
#include "ContainerMediator.hxx"
-#endif
using namespace dbaccess;
using namespace ::com::sun::star::uno;
@@ -120,16 +76,14 @@ using namespace ::osl;
using namespace ::cppu;
using namespace ::utl;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OQuery
//==========================================================================
DBG_NAME(OQuery)
-//--------------------------------------------------------------------------
+
OQuery::OQuery( const Reference< XPropertySet >& _rxCommandDefinition
,const Reference< XConnection >& _rxConn
,const Reference< XMultiServiceFactory >& _xORB)
@@ -148,7 +102,7 @@ OQuery::OQuery( const Reference< XPropertySet >& _rxCommandDefinition
ODataSettings::registerPropertiesFor(this);
osl_incrementInterlockedCount(&m_refCount);
- DBG_ASSERT(m_xCommandDefinition.is(), "OQuery::OQuery : invalid CommandDefinition object !");
+ OSL_ENSURE(m_xCommandDefinition.is(), "OQuery::OQuery : invalid CommandDefinition object !");
if ( m_xCommandDefinition.is() )
{
try
@@ -157,27 +111,26 @@ OQuery::OQuery( const Reference< XPropertySet >& _rxCommandDefinition
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "OQueryDescriptor_Base::OQueryDescriptor_Base: caught an exception!");
+ OSL_FAIL("OQueryDescriptor_Base::OQueryDescriptor_Base: caught an exception!");
}
m_xCommandDefinition->addPropertyChangeListener(::rtl::OUString(), this);
// m_xCommandDefinition->addPropertyChangeListener(PROPERTY_NAME, this);
m_xCommandPropInfo = m_xCommandDefinition->getPropertySetInfo();
}
- DBG_ASSERT(m_xConnection.is(), "OQuery::OQuery : invalid connection !");
+ OSL_ENSURE(m_xConnection.is(), "OQuery::OQuery : invalid connection !");
osl_decrementInterlockedCount(&m_refCount);
}
-//--------------------------------------------------------------------------
OQuery::~OQuery()
{
DBG_DTOR(OQuery, NULL);
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_IMPLEMENTATION_ID(OQuery);
IMPLEMENT_GETTYPES3(OQuery,OQueryDescriptor_Base,ODataSettings,OContentHelper);
IMPLEMENT_FORWARD_XINTERFACE3( OQuery,OContentHelper,OQueryDescriptor_Base,ODataSettings)
-//--------------------------------------------------------------------------
+
void OQuery::rebuildColumns()
{
OSL_PRECOND( getColumnCount() == 0, "OQuery::rebuildColumns: column container should be empty!" );
@@ -225,7 +178,7 @@ void OQuery::rebuildColumns()
}
Reference< XDatabaseMetaData > xDBMeta( m_xConnection->getMetaData(), UNO_QUERY_THROW );
- ::vos::ORef< OSQLColumns > aParseColumns(
+ ::rtl::Reference< OSQLColumns > aParseColumns(
::connectivity::parse::OParseColumn::createColumnsForResultSet( xResultSetMeta, xDBMeta,xColumnDefinitions ) );
xColumns = OPrivateColumns::createWithIntrinsicNames(
aParseColumns, xDBMeta->supportsMixedCaseQuotedIdentifiers(), *this, m_aMutex );
@@ -277,18 +230,16 @@ void OQuery::rebuildColumns()
}
// XServiceInfo
-//--------------------------------------------------------------------------
IMPLEMENT_SERVICE_INFO3(OQuery, "com.sun.star.sdb.dbaccess.OQuery", SERVICE_SDB_DATASETTINGS, SERVICE_SDB_QUERY, SERVICE_SDB_QUERYDEFINITION)
// ::com::sun::star::beans::XPropertyChangeListener
-//--------------------------------------------------------------------------
void SAL_CALL OQuery::propertyChange( const PropertyChangeEvent& _rSource ) throw(RuntimeException)
{
sal_Int32 nOwnHandle = -1;
{
MutexGuard aGuard(m_aMutex);
- DBG_ASSERT(_rSource.Source.get() == Reference< XInterface >(m_xCommandDefinition, UNO_QUERY).get(),
+ OSL_ENSURE(_rSource.Source.get() == Reference< XInterface >(m_xCommandDefinition, UNO_QUERY).get(),
"OQuery::propertyChange : where did this call come from ?");
if (m_eDoingCurrently == SETTING_PROPERTIES)
@@ -307,20 +258,19 @@ void SAL_CALL OQuery::propertyChange( const PropertyChangeEvent& _rSource ) thro
}
else
{
- DBG_ERROR("OQuery::propertyChange : my CommandDefinition has more properties than I do !");
+ OSL_FAIL("OQuery::propertyChange : my CommandDefinition has more properties than I do !");
}
}
fire(&nOwnHandle, &_rSource.NewValue, &_rSource.OldValue, 1, sal_False);
}
-//--------------------------------------------------------------------------
void SAL_CALL OQuery::disposing( const EventObject& _rSource ) throw (RuntimeException)
{
MutexGuard aGuard(m_aMutex);
(void)_rSource;
- DBG_ASSERT(_rSource.Source.get() == Reference< XInterface >(m_xCommandDefinition, UNO_QUERY).get(),
+ OSL_ENSURE(_rSource.Source.get() == Reference< XInterface >(m_xCommandDefinition, UNO_QUERY).get(),
"OQuery::disposing : where did this call come from ?");
m_xCommandDefinition->removePropertyChangeListener(::rtl::OUString(), this);
@@ -328,14 +278,12 @@ void SAL_CALL OQuery::disposing( const EventObject& _rSource ) throw (RuntimeExc
}
// XDataDescriptorFactory
-//--------------------------------------------------------------------------
Reference< XPropertySet > SAL_CALL OQuery::createDataDescriptor( ) throw(RuntimeException)
{
return new OQueryDescriptor(*this);
}
// pseudo-XComponent
-//--------------------------------------------------------------------------
void SAL_CALL OQuery::disposing()
{
MutexGuard aGuard(m_aMutex);
@@ -349,41 +297,36 @@ void SAL_CALL OQuery::disposing()
m_pWarnings = NULL;
}
-//--------------------------------------------------------------------------
void OQuery::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) throw (Exception)
{
ODataSettings::setFastPropertyValue_NoBroadcast(_nHandle, _rValue);
::rtl::OUString sAggPropName;
sal_Int16 nAttr = 0;
- if (getInfoHelper().fillPropertyMembersByHandle(&sAggPropName,&nAttr,_nHandle) &&
+ if (getInfoHelper().fillPropertyMembersByHandle(&sAggPropName,&nAttr,_nHandle) &&
m_xCommandPropInfo.is() &&
m_xCommandPropInfo->hasPropertyByName(sAggPropName))
{ // the base class holds the property values itself, but we have to forward this to our CommandDefinition
m_eDoingCurrently = SETTING_PROPERTIES;
- OAutoActionReset aActionResetter(this);
+ OAutoActionReset aAutoReset(this);
m_xCommandDefinition->setPropertyValue(sAggPropName, _rValue);
if ( PROPERTY_ID_COMMAND == _nHandle )
// the columns are out of date if we are based on a new statement ....
- // 90573 - 16.08.2001 - frank.schoenheit@sun.com
setColumnsOutOfDate();
}
}
-//--------------------------------------------------------------------------
Reference< XPropertySetInfo > SAL_CALL OQuery::getPropertySetInfo( ) throw(RuntimeException)
{
return createPropertySetInfo( getInfoHelper() ) ;
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OQuery::getInfoHelper()
{
return *getArrayHelper();
}
-//--------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OQuery::createArrayHelper( ) const
{
Sequence< Property > aProps;
@@ -391,12 +334,12 @@ Reference< XPropertySetInfo > SAL_CALL OQuery::getPropertySetInfo( ) throw(Runti
describeProperties(aProps);
return new ::cppu::OPropertyArrayHelper(aProps);
}
-// -----------------------------------------------------------------------------
+
OColumn* OQuery::createColumn(const ::rtl::OUString& /*_rName*/) const
{
return NULL;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OQuery::rename( const ::rtl::OUString& newName ) throw (SQLException, ElementExistException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -405,7 +348,7 @@ void SAL_CALL OQuery::rename( const ::rtl::OUString& newName ) throw (SQLExcepti
if(xRename.is())
xRename->rename(newName);
}
-// -----------------------------------------------------------------------------
+
void OQuery::registerProperties()
{
// the properties which OCommandBase supplies (it has no own registration, as it's not derived from
@@ -432,14 +375,10 @@ void OQuery::registerProperties()
&m_aLayoutInformation, ::getCppuType(&m_aLayoutInformation));
}
-// -----------------------------------------------------------------------------
::rtl::OUString OQuery::determineContentType() const
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.org.openoffice.DatabaseQuery" ) );
}
-// -----------------------------------------------------------------------------
-//........................................................................
} // namespace dbaccess
-//........................................................................
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/query.hxx b/dbaccess/source/core/api/query.hxx
index d04f78276..ca5eeb64e 100644
--- a/dbaccess/source/core/api/query.hxx
+++ b/dbaccess/source/core/api/query.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,27 +29,13 @@
#ifndef _DBA_COREAPI_QUERY_HXX_
#define _DBA_COREAPI_QUERY_HXX_
-#ifndef _DBA_COREAPI_QUERYDESCRIPTOR_HXX_
#include "querydescriptor.hxx"
-#endif
-#ifndef _CPPUHELPER_IMPLBASE3_HXX_
#include <cppuhelper/implbase3.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XRENAME_HPP_
#include <com/sun/star/sdbcx/XRename.hpp>
-#endif
-#ifndef DBA_CONTENTHELPER_HXX
#include "ContentHelper.hxx"
-#endif
#include <map>
@@ -83,7 +70,7 @@ class OQuery :public OContentHelper
friend struct TRelease;
public:
- typedef ::std::map< ::rtl::OUString,OColumn*,::comphelper::UStringMixLess> TNameColumnMap;
+ typedef ::std::map< ::rtl::OUString,OColumn*,::comphelper::UStringMixLess> TNameColumnMap;
protected:
// TNameColumnMap m_aColumnMap; // contains all columnnames to columns
@@ -184,3 +171,4 @@ private:
#endif // _DBA_COREAPI_QUERY_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/querycomposer.cxx b/dbaccess/source/core/api/querycomposer.cxx
index fab4af44c..9bf2e3400 100644
--- a/dbaccess/source/core/api/querycomposer.cxx
+++ b/dbaccess/source/core/api/querycomposer.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,76 +29,30 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
#include <com/sun/star/util/XNumberFormatter.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNSEARCH_HPP_
#include <com/sun/star/sdbc/ColumnSearch.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATA_HPP_
#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_SERVICENOTREGISTEREDEXCEPTION_HPP_
#include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UNO_XAGGREGATION_HPP_
#include <com/sun/star/uno/XAggregation.hpp>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
#include <comphelper/processfactory.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _UTL_CONFIGMGR_HXX_
#include <unotools/configmgr.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _COM_SUN_STAR_I18N_XLOCALEDATA_HPP_
#include <com/sun/star/i18n/XLocaleData.hpp>
-#endif
-#ifndef INCLUDED_SVTOOLS_SYSLOCALE_HXX
#include <unotools/syslocale.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
#include <com/sun/star/container/XChild.hpp>
-#endif
#include <com/sun/star/sdb/SQLFilterOperator.hpp>
-#ifndef DBACCESS_CORE_API_QUERYCOMPOSER_HXX
#include "querycomposer.hxx"
-#endif
-#ifndef DBA_HELPERCOLLECTIONS_HXX
#include "HelperCollections.hxx"
-#endif
-#ifndef DBACCESS_SOURCE_CORE_INC_COMPOSERTOOLS_HXX
#include "composertools.hxx"
-#endif
#include <algorithm>
#include <rtl/logfile.hxx>
@@ -120,7 +75,7 @@ using namespace ::utl;
DBG_NAME(OQueryComposer)
-// -------------------------------------------------------------------------
+
OQueryComposer::OQueryComposer(const Reference< XConnection>& _xConnection)
: OSubComponent(m_aMutex,_xConnection)
{
@@ -132,26 +87,26 @@ OQueryComposer::OQueryComposer(const Reference< XConnection>& _xConnection)
m_xComposer.set( xFac->createInstance( SERVICE_NAME_SINGLESELECTQUERYCOMPOSER ), UNO_QUERY_THROW );
m_xComposerHelper.set( xFac->createInstance( SERVICE_NAME_SINGLESELECTQUERYCOMPOSER ), UNO_QUERY_THROW );
}
-// -------------------------------------------------------------------------
+
OQueryComposer::~OQueryComposer()
{
DBG_DTOR(OQueryComposer,NULL);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OQueryComposer::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::disposing" );
::comphelper::disposeComponent(m_xComposerHelper);
::comphelper::disposeComponent(m_xComposer);
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::lang::XTypeProvider
Sequence< Type > SAL_CALL OQueryComposer::getTypes() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getTypes" );
return ::comphelper::concatSequences(OSubComponent::getTypes(),OQueryComposer_BASE::getTypes());
}
-// -------------------------------------------------------------------------
+
Sequence< sal_Int8 > SAL_CALL OQueryComposer::getImplementationId() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getImplementationId" );
@@ -167,7 +122,7 @@ Sequence< sal_Int8 > SAL_CALL OQueryComposer::getImplementationId() throw (Runti
}
return pId->getImplementationId();
}
-// -------------------------------------------------------------------------
+
// com::sun::star::lang::XUnoTunnel
sal_Int64 SAL_CALL OQueryComposer::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
@@ -177,7 +132,7 @@ sal_Int64 SAL_CALL OQueryComposer::getSomething( const Sequence< sal_Int8 >& rId
return 0;
}
-// -------------------------------------------------------------------------
+
Any SAL_CALL OQueryComposer::queryInterface( const Type & rType ) throw(RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::queryInterface" );
@@ -186,21 +141,20 @@ Any SAL_CALL OQueryComposer::queryInterface( const Type & rType ) throw(RuntimeE
aRet = OQueryComposer_BASE::queryInterface(rType);
return aRet;
}
-// -------------------------------------------------------------------------
+
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OQueryComposer::getImplementationName( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getImplementationName" );
return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.dbaccess.OQueryComposer"));
}
-//------------------------------------------------------------------------------
+
sal_Bool OQueryComposer::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::supportsService" );
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > OQueryComposer::getSupportedServiceNames( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getSupportedServiceNames" );
@@ -208,7 +162,7 @@ Sequence< ::rtl::OUString > OQueryComposer::getSupportedServiceNames( ) throw (
aSNS[0] = SERVICE_SDB_SQLQUERYCOMPOSER;
return aSNS;
}
-// -------------------------------------------------------------------------
+
// XSQLQueryComposer
::rtl::OUString SAL_CALL OQueryComposer::getQuery( ) throw(RuntimeException)
{
@@ -222,7 +176,7 @@ Sequence< ::rtl::OUString > OQueryComposer::getSupportedServiceNames( ) throw (
xProp->getPropertyValue(PROPERTY_ORIGINAL) >>= sQuery;
return sQuery;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OQueryComposer::setQuery( const ::rtl::OUString& command ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::setQuery" );
@@ -234,7 +188,7 @@ void SAL_CALL OQueryComposer::setQuery( const ::rtl::OUString& command ) throw(S
m_sOrgFilter = m_xComposer->getFilter();
m_sOrgOrder = m_xComposer->getOrder();
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OQueryComposer::getComposedQuery( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getComposedQuery" );
@@ -244,7 +198,7 @@ void SAL_CALL OQueryComposer::setQuery( const ::rtl::OUString& command ) throw(S
return m_xComposer->getQuery();
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OQueryComposer::getFilter( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getFilter" );
@@ -254,7 +208,7 @@ void SAL_CALL OQueryComposer::setQuery( const ::rtl::OUString& command ) throw(S
aFilterCreator = ::std::for_each(m_aFilters.begin(),m_aFilters.end(),aFilterCreator);
return aFilterCreator.getComposedAndClear();
}
-// -------------------------------------------------------------------------
+
Sequence< Sequence< PropertyValue > > SAL_CALL OQueryComposer::getStructuredFilter( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getStructuredFilter" );
@@ -263,7 +217,7 @@ Sequence< Sequence< PropertyValue > > SAL_CALL OQueryComposer::getStructuredFilt
MutexGuard aGuard(m_aMutex);
return m_xComposer->getStructuredFilter();
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OQueryComposer::getOrder( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getOrder" );
@@ -274,7 +228,7 @@ Sequence< Sequence< PropertyValue > > SAL_CALL OQueryComposer::getStructuredFilt
aOrderCreator = ::std::for_each(m_aOrders.begin(),m_aOrders.end(),aOrderCreator);
return aOrderCreator.getComposedAndClear();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OQueryComposer::appendFilterByColumn( const Reference< XPropertySet >& column ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::appendFilterByColumn" );
@@ -307,7 +261,7 @@ void SAL_CALL OQueryComposer::appendFilterByColumn( const Reference< XPropertySe
setFilter( aFilterCreator.getComposedAndClear() );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OQueryComposer::appendOrderByColumn( const Reference< XPropertySet >& column, sal_Bool ascending ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::appendOrderByColumn" );
@@ -324,7 +278,7 @@ void SAL_CALL OQueryComposer::appendOrderByColumn( const Reference< XPropertySet
setOrder(aOrderCreator.getComposedAndClear());
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OQueryComposer::setFilter( const ::rtl::OUString& filter ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::setFilter" );
@@ -341,7 +295,7 @@ void SAL_CALL OQueryComposer::setFilter( const ::rtl::OUString& filter ) throw(S
m_xComposer->setFilter( aFilterCreator.getComposedAndClear() );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OQueryComposer::setOrder( const ::rtl::OUString& order ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::setOrder" );
@@ -359,7 +313,7 @@ void SAL_CALL OQueryComposer::setOrder( const ::rtl::OUString& order ) throw(SQL
m_xComposer->setOrder(aOrderCreator.getComposedAndClear());
}
-// -------------------------------------------------------------------------
+
// XTablesSupplier
Reference< XNameAccess > SAL_CALL OQueryComposer::getTables( ) throw(RuntimeException)
{
@@ -369,7 +323,7 @@ Reference< XNameAccess > SAL_CALL OQueryComposer::getTables( ) throw(RuntimeExc
::osl::MutexGuard aGuard( m_aMutex );
return Reference<XTablesSupplier>(m_xComposer,UNO_QUERY)->getTables();
}
-// -------------------------------------------------------------------------
+
// XColumnsSupplier
Reference< XNameAccess > SAL_CALL OQueryComposer::getColumns( ) throw(RuntimeException)
{
@@ -379,7 +333,7 @@ Reference< XNameAccess > SAL_CALL OQueryComposer::getColumns( ) throw(RuntimeEx
::osl::MutexGuard aGuard( m_aMutex );
return Reference<XColumnsSupplier>(m_xComposer,UNO_QUERY)->getColumns();
}
-// -------------------------------------------------------------------------
+
Reference< XIndexAccess > SAL_CALL OQueryComposer::getParameters( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getParameters" );
@@ -388,19 +342,14 @@ Reference< XIndexAccess > SAL_CALL OQueryComposer::getParameters( ) throw(Runti
::osl::MutexGuard aGuard( m_aMutex );
return Reference<XParametersSupplier>(m_xComposer,UNO_QUERY)->getParameters();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OQueryComposer::acquire() throw()
{
OSubComponent::acquire();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OQueryComposer::release() throw()
{
OSubComponent::release();
}
-// -----------------------------------------------------------------------------
-
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx
index be485c1f7..fb8b1e045 100644
--- a/dbaccess/source/core/api/querycontainer.cxx
+++ b/dbaccess/source/core/api/querycontainer.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,65 +29,30 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_CORE_QUERYCONTAINER_HXX_
#include "querycontainer.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _DBA_COREAPI_QUERY_HXX_
#include "query.hxx"
-#endif
-#ifndef DBACCESS_OBJECTNAMEAPPROVAL_HXX
#include "objectnameapproval.hxx"
-#endif
-#ifndef DBA_CONTAINERLISTENER_HXX
#include "ContainerListener.hxx"
-#endif
-#ifndef DBACCESS_VETO_HXX
#include "veto.hxx"
-#endif
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
#include <com/sun/star/container/XContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERAPPROVEBROADCASTER_HPP_
#include <com/sun/star/container/XContainerApproveBroadcaster.hpp>
-#endif
/** === end UNO includes === **/
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _COMPHELPER_ENUMHELPER_HXX_
+#include <osl/diagnose.h>
#include <comphelper/enumhelper.hxx>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
#include <comphelper/property.hxx>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
using namespace dbtools;
using namespace ::com::sun::star::uno;
@@ -102,16 +68,14 @@ using namespace ::osl;
using namespace ::comphelper;
using namespace ::cppu;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OQueryContainer
//==========================================================================
DBG_NAME(OQueryContainer)
-//------------------------------------------------------------------------------
+
OQueryContainer::OQueryContainer(
const Reference< XNameContainer >& _rxCommandDefinitions
, const Reference< XConnection >& _rxConn
@@ -128,7 +92,7 @@ OQueryContainer::OQueryContainer(
{
m_pCommandsListener = new OContainerListener( *this, m_aMutex );
m_pCommandsListener->acquire();
-
+
Reference< XContainer > xContainer( m_xCommandDefinitions, UNO_QUERY_THROW );
xContainer->addContainerListener( m_pCommandsListener );
@@ -151,20 +115,17 @@ OQueryContainer::OQueryContainer(
setElementApproval( PContainerApprove( new ObjectNameApproval( _rxConn, ObjectNameApproval::TypeQuery ) ) );
}
-//------------------------------------------------------------------------------
OQueryContainer::~OQueryContainer()
{
DBG_DTOR(OQueryContainer, NULL);
// dispose();
// maybe we're already disposed, but this should be uncritical
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XINTERFACE2( OQueryContainer,ODefinitionContainer,OQueryContainer_Base)
-//------------------------------------------------------------------------------
IMPLEMENT_FORWARD_XTYPEPROVIDER2( OQueryContainer,ODefinitionContainer,OQueryContainer_Base)
-//------------------------------------------------------------------------------
void OQueryContainer::disposing()
{
ODefinitionContainer::disposing();
@@ -190,18 +151,15 @@ void OQueryContainer::disposing()
}
// XServiceInfo
-//------------------------------------------------------------------------------
IMPLEMENT_SERVICE_INFO2(OQueryContainer, "com.sun.star.sdb.dbaccess.OQueryContainer", SERVICE_SDBCX_CONTAINER, SERVICE_SDB_QUERIES)
// XDataDescriptorFactory
-//--------------------------------------------------------------------------
Reference< XPropertySet > SAL_CALL OQueryContainer::createDataDescriptor( ) throw(RuntimeException)
{
return new OQueryDescriptor();
}
// XAppend
-//------------------------------------------------------------------------------
void SAL_CALL OQueryContainer::appendByDescriptor( const Reference< XPropertySet >& _rxDesc ) throw(SQLException, ElementExistException, RuntimeException)
{
ResettableMutexGuard aGuard(m_aMutex);
@@ -242,7 +200,6 @@ void SAL_CALL OQueryContainer::appendByDescriptor( const Reference< XPropertySet
}
// XDrop
-//------------------------------------------------------------------------------
void SAL_CALL OQueryContainer::dropByName( const ::rtl::OUString& _rName ) throw(SQLException, NoSuchElementException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -257,7 +214,6 @@ void SAL_CALL OQueryContainer::dropByName( const ::rtl::OUString& _rName ) throw
m_xCommandDefinitions->removeByName(_rName);
}
-//------------------------------------------------------------------------------
void SAL_CALL OQueryContainer::dropByIndex( sal_Int32 _nIndex ) throw(SQLException, IndexOutOfBoundsException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -274,7 +230,7 @@ void SAL_CALL OQueryContainer::dropByIndex( sal_Int32 _nIndex ) throw(SQLExcepti
dropByName(sName);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OQueryContainer::elementInserted( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException)
{
Reference< XContent > xNewElement;
@@ -286,8 +242,8 @@ void SAL_CALL OQueryContainer::elementInserted( const ::com::sun::star::containe
// nothing to do, we're inserting via an "appendByDescriptor"
return;
- DBG_ASSERT(sElementName.getLength(), "OQueryContainer::elementInserted : invalid name !");
- DBG_ASSERT(m_aDocumentMap.find(sElementName) == m_aDocumentMap.end(), "OQueryContainer::elementInserted : oops .... we're inconsistent with our master container !");
+ OSL_ENSURE(sElementName.getLength(), "OQueryContainer::elementInserted : invalid name !");
+ OSL_ENSURE(m_aDocumentMap.find(sElementName) == m_aDocumentMap.end(), "OQueryContainer::elementInserted : oops .... we're inconsistent with our master container !");
if (!sElementName.getLength() || hasByName(sElementName))
return;
@@ -297,21 +253,19 @@ void SAL_CALL OQueryContainer::elementInserted( const ::com::sun::star::containe
insertByName(sElementName,makeAny(xNewElement));
}
-//------------------------------------------------------------------------------
void SAL_CALL OQueryContainer::elementRemoved( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException)
{
::rtl::OUString sAccessor;
_rEvent.Accessor >>= sAccessor;
{
- DBG_ASSERT(sAccessor.getLength(), "OQueryContainer::elementRemoved : invalid name !");
- DBG_ASSERT(m_aDocumentMap.find(sAccessor) != m_aDocumentMap.end(), "OQueryContainer::elementRemoved : oops .... we're inconsistent with our master container !");
+ OSL_ENSURE(sAccessor.getLength(), "OQueryContainer::elementRemoved : invalid name !");
+ OSL_ENSURE(m_aDocumentMap.find(sAccessor) != m_aDocumentMap.end(), "OQueryContainer::elementRemoved : oops .... we're inconsistent with our master container !");
if ( !sAccessor.getLength() || !hasByName(sAccessor) )
return;
}
removeByName(sAccessor);
}
-//------------------------------------------------------------------------------
void SAL_CALL OQueryContainer::elementReplaced( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException)
{
Reference< XPropertySet > xReplacedElement;
@@ -321,18 +275,17 @@ void SAL_CALL OQueryContainer::elementReplaced( const ::com::sun::star::containe
{
MutexGuard aGuard(m_aMutex);
- DBG_ASSERT(sAccessor.getLength(), "OQueryContainer::elementReplaced : invalid name !");
- DBG_ASSERT(m_aDocumentMap.find(sAccessor) != m_aDocumentMap.end(), "OQueryContainer::elementReplaced : oops .... we're inconsistent with our master container !");
+ OSL_ENSURE(sAccessor.getLength(), "OQueryContainer::elementReplaced : invalid name !");
+ OSL_ENSURE(m_aDocumentMap.find(sAccessor) != m_aDocumentMap.end(), "OQueryContainer::elementReplaced : oops .... we're inconsistent with our master container !");
if (!sAccessor.getLength() || !hasByName(sAccessor))
return;
-
+
xNewElement = implCreateWrapper(sAccessor);
}
replaceByName(sAccessor,makeAny(xNewElement));
}
-//------------------------------------------------------------------------------
Reference< XVeto > SAL_CALL OQueryContainer::approveInsertElement( const ContainerEvent& Event ) throw (WrappedTargetException, RuntimeException)
{
::rtl::OUString sName;
@@ -351,27 +304,24 @@ Reference< XVeto > SAL_CALL OQueryContainer::approveInsertElement( const Contain
return xReturn;
}
-//------------------------------------------------------------------------------
Reference< XVeto > SAL_CALL OQueryContainer::approveReplaceElement( const ContainerEvent& /*Event*/ ) throw (WrappedTargetException, RuntimeException)
{
return NULL;
}
-//------------------------------------------------------------------------------
Reference< XVeto > SAL_CALL OQueryContainer::approveRemoveElement( const ContainerEvent& /*Event*/ ) throw (WrappedTargetException, RuntimeException)
{
return NULL;
}
-//------------------------------------------------------------------------------
void SAL_CALL OQueryContainer::disposing( const ::com::sun::star::lang::EventObject& _rSource ) throw(::com::sun::star::uno::RuntimeException)
{
if (_rSource.Source.get() == Reference< XInterface >(m_xCommandDefinitions, UNO_QUERY).get())
- { // our "master container" (with the command definitions) is beeing disposed
- DBG_ERROR("OQueryContainer::disposing : nobody should dispose the CommandDefinition container before disposing my connection !");
+ { // our "master container" (with the command definitions) is being disposed
+ OSL_FAIL("OQueryContainer::disposing : nobody should dispose the CommandDefinition container before disposing my connection !");
dispose();
}
- else
+ else
{
Reference< XContent > xSource(_rSource.Source, UNO_QUERY);
// it's one of our documents ....
@@ -389,20 +339,17 @@ void SAL_CALL OQueryContainer::disposing( const ::com::sun::star::lang::EventObj
}
}
-// -----------------------------------------------------------------------------
::rtl::OUString OQueryContainer::determineContentType() const
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.org.openoffice.DatabaseQueryContainer" ) );
}
-// -----------------------------------------------------------------------------
Reference< XContent > OQueryContainer::implCreateWrapper(const ::rtl::OUString& _rName)
{
Reference< XContent > xObject(m_xCommandDefinitions->getByName(_rName),UNO_QUERY);
return implCreateWrapper(xObject);
}
-//--------------------------------------------------------------------------
Reference< XContent > OQueryContainer::implCreateWrapper(const Reference< XContent >& _rxCommandDesc)
{
Reference<XNameContainer> xContainer(_rxCommandDesc,UNO_QUERY);
@@ -424,12 +371,12 @@ Reference< XContent > OQueryContainer::implCreateWrapper(const Reference< XConte
return xReturn;
}
-//--------------------------------------------------------------------------
+
Reference< XContent > OQueryContainer::createObject( const ::rtl::OUString& _rName)
{
return implCreateWrapper(_rName);
}
-// -----------------------------------------------------------------------------
+
sal_Bool OQueryContainer::checkExistence(const ::rtl::OUString& _rName)
{
sal_Bool bRet = sal_False;
@@ -449,19 +396,19 @@ sal_Bool OQueryContainer::checkExistence(const ::rtl::OUString& _rName)
}
return bRet;
}
-//--------------------------------------------------------------------------
+
sal_Bool SAL_CALL OQueryContainer::hasElements( ) throw (RuntimeException)
{
MutexGuard aGuard(m_aMutex);
return m_xCommandDefinitions->hasElements();
}
-// -----------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OQueryContainer::getCount( ) throw(RuntimeException)
{
MutexGuard aGuard(m_aMutex);
return Reference<XIndexAccess>(m_xCommandDefinitions,UNO_QUERY)->getCount();
}
-// -----------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL OQueryContainer::getElementNames( ) throw(RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -469,7 +416,5 @@ Sequence< ::rtl::OUString > SAL_CALL OQueryContainer::getElementNames( ) throw(
return m_xCommandDefinitions->getElementNames();
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx
index f22f406b6..1f5e69a8c 100644
--- a/dbaccess/source/core/api/querydescriptor.cxx
+++ b/dbaccess/source/core/api/querydescriptor.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,33 +29,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_COREAPI_QUERYDESCRIPTOR_HXX_
#include "querydescriptor.hxx"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
#include <comphelper/property.hxx>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _DBACORE_DEFINITIONCOLUMN_HXX_
#include "definitioncolumn.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::awt;
@@ -66,17 +49,15 @@ using namespace ::comphelper;
using namespace ::osl;
using namespace ::cppu;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OQueryDescriptor
//==========================================================================
DBG_NAME(OQueryDescriptor)
-//--------------------------------------------------------------------------
-OQueryDescriptor::OQueryDescriptor()
+
+OQueryDescriptor::OQueryDescriptor()
:OQueryDescriptor_Base(m_aMutex,*this)
,ODataSettings(m_aBHelper,sal_True)
{
@@ -85,7 +66,6 @@ OQueryDescriptor::OQueryDescriptor()
ODataSettings::registerPropertiesFor(this);
}
-//--------------------------------------------------------------------------
OQueryDescriptor::OQueryDescriptor(const OQueryDescriptor_Base& _rSource)
:OQueryDescriptor_Base(_rSource,*this)
,ODataSettings(m_aBHelper,sal_True)
@@ -94,15 +74,15 @@ OQueryDescriptor::OQueryDescriptor(const OQueryDescriptor_Base& _rSource)
registerProperties();
ODataSettings::registerPropertiesFor(this);
}
-// -----------------------------------------------------------------------------
+
OQueryDescriptor::~OQueryDescriptor()
{
DBG_DTOR(OQueryDescriptor,NULL);
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_TYPEPROVIDER2(OQueryDescriptor,OQueryDescriptor_Base,ODataSettings);
IMPLEMENT_FORWARD_XINTERFACE3( OQueryDescriptor,OWeakObject,OQueryDescriptor_Base,ODataSettings)
-//--------------------------------------------------------------------------
+
void OQueryDescriptor::registerProperties()
{
// the properties which OCommandBase supplies (it has no own registration, as it's not derived from
@@ -128,19 +108,17 @@ void OQueryDescriptor::registerProperties()
registerProperty(PROPERTY_LAYOUTINFORMATION, PROPERTY_ID_LAYOUTINFORMATION, PropertyAttribute::BOUND,
&m_aLayoutInformation, ::getCppuType(&m_aLayoutInformation));
}
-// -----------------------------------------------------------------------------
-//--------------------------------------------------------------------------
+
Reference< XPropertySetInfo > SAL_CALL OQueryDescriptor::getPropertySetInfo( ) throw(RuntimeException)
{
return createPropertySetInfo( getInfoHelper() ) ;
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OQueryDescriptor::getInfoHelper()
{
return *getArrayHelper();
}
-//--------------------------------------------------------------------------
+
::cppu::IPropertyArrayHelper* OQueryDescriptor::createArrayHelper( ) const
{
Sequence< Property > aProps;
@@ -148,9 +126,8 @@ Reference< XPropertySetInfo > SAL_CALL OQueryDescriptor::getPropertySetInfo( )
return new ::cppu::OPropertyArrayHelper(aProps);
}
-// -----------------------------------------------------------------------------
DBG_NAME(OQueryDescriptor_Base);
-//--------------------------------------------------------------------------
+
OQueryDescriptor_Base::OQueryDescriptor_Base(::osl::Mutex& _rMutex,::cppu::OWeakObject& _rMySelf)
:m_bColumnsOutOfDate(sal_True)
,m_rMutex(_rMutex)
@@ -158,7 +135,7 @@ OQueryDescriptor_Base::OQueryDescriptor_Base(::osl::Mutex& _rMutex,::cppu::OWeak
DBG_CTOR(OQueryDescriptor_Base,NULL);
m_pColumns = new OColumns(_rMySelf, m_rMutex, sal_True,::std::vector< ::rtl::OUString>(), this,this);
}
-//--------------------------------------------------------------------------
+
OQueryDescriptor_Base::OQueryDescriptor_Base(const OQueryDescriptor_Base& _rSource,::cppu::OWeakObject& _rMySelf)
:m_bColumnsOutOfDate(sal_True)
,m_rMutex(_rSource.m_rMutex)
@@ -174,7 +151,6 @@ OQueryDescriptor_Base::OQueryDescriptor_Base(const OQueryDescriptor_Base& _rSour
m_aLayoutInformation = _rSource.m_aLayoutInformation;
}
-//--------------------------------------------------------------------------
OQueryDescriptor_Base::~OQueryDescriptor_Base()
{
m_pColumns->acquire();
@@ -183,7 +159,7 @@ OQueryDescriptor_Base::~OQueryDescriptor_Base()
DBG_DTOR(OQueryDescriptor_Base,NULL);
}
-// -----------------------------------------------------------------------------
+
sal_Int64 SAL_CALL OQueryDescriptor_Base::getSomething( const Sequence< sal_Int8 >& _rIdentifier ) throw(RuntimeException)
{
if (_rIdentifier.getLength() != 16)
@@ -194,9 +170,9 @@ sal_Int64 SAL_CALL OQueryDescriptor_Base::getSomething( const Sequence< sal_Int8
return 0;
}
-//--------------------------------------------------------------------------
+
IMPLEMENT_IMPLEMENTATION_ID(OQueryDescriptor_Base)
-//--------------------------------------------------------------------------
+
void OQueryDescriptor_Base::setColumnsOutOfDate( sal_Bool _bOutOfDate )
{
m_bColumnsOutOfDate = _bOutOfDate;
@@ -204,13 +180,11 @@ void OQueryDescriptor_Base::setColumnsOutOfDate( sal_Bool _bOutOfDate )
m_pColumns->setInitialized();
}
-//--------------------------------------------------------------------------
void OQueryDescriptor_Base::implAppendColumn( const ::rtl::OUString& _rName, OColumn* _pColumn )
{
m_pColumns->append( _rName, _pColumn );
}
-//--------------------------------------------------------------------------
void OQueryDescriptor_Base::clearColumns( )
{
m_pColumns->clearColumns();
@@ -218,7 +192,6 @@ void OQueryDescriptor_Base::clearColumns( )
setColumnsOutOfDate();
}
-//--------------------------------------------------------------------------
Reference< XNameAccess > SAL_CALL OQueryDescriptor_Base::getColumns( ) throw (RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -245,23 +218,20 @@ Reference< XNameAccess > SAL_CALL OQueryDescriptor_Base::getColumns( ) throw (Ru
throw;
}
}
-
+
return m_pColumns;
}
-//--------------------------------------------------------------------------
::rtl::OUString SAL_CALL OQueryDescriptor_Base::getImplementationName( ) throw(RuntimeException)
{
- return ::rtl::OUString::createFromAscii("com.sun.star.sdb.OQueryDescriptor");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OQueryDescriptor"));
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OQueryDescriptor_Base::supportsService( const ::rtl::OUString& _rServiceName ) throw(RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL OQueryDescriptor_Base::getSupportedServiceNames( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aSupported(2);
@@ -269,37 +239,32 @@ Sequence< ::rtl::OUString > SAL_CALL OQueryDescriptor_Base::getSupportedServiceN
aSupported.getArray()[1] = SERVICE_SDB_QUERYDESCRIPTOR;
return aSupported;
}
-//--------------------------------------------------------------------------
+
void OQueryDescriptor_Base::disposeColumns()
{
m_pColumns->disposing();
}
-// -----------------------------------------------------------------------------
void OQueryDescriptor_Base::columnAppended( const Reference< XPropertySet >& /*_rxSourceDescriptor*/ )
{
// not interested in
}
-// -----------------------------------------------------------------------------
void OQueryDescriptor_Base::columnDropped(const ::rtl::OUString& /*_sName*/)
{
// not interested in
}
-// -----------------------------------------------------------------------------
Reference< XPropertySet > OQueryDescriptor_Base::createColumnDescriptor()
{
- OSL_ENSURE( false, "OQueryDescriptor_Base::createColumnDescriptor: called why?" );
+ OSL_FAIL( "OQueryDescriptor_Base::createColumnDescriptor: called why?" );
return NULL;
}
-// -----------------------------------------------------------------------------
void OQueryDescriptor_Base::rebuildColumns( )
{
}
-// -----------------------------------------------------------------------------
// IRefreshableColumns
void OQueryDescriptor_Base::refreshColumns()
{
@@ -309,15 +274,12 @@ void OQueryDescriptor_Base::refreshColumns()
rebuildColumns();
}
-//------------------------------------------------------------------------------
OColumn* OQueryDescriptor_Base::createColumn( const ::rtl::OUString& /*_rName*/ ) const
{
// creating a column/descriptor for a query/descriptor does not make sense at all
return NULL;
}
-// -----------------------------------------------------------------------------
-//........................................................................
-} // namespace dbaccess
-//........................................................................
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/querydescriptor.hxx b/dbaccess/source/core/api/querydescriptor.hxx
index 61395e59e..58349c909 100644
--- a/dbaccess/source/core/api/querydescriptor.hxx
+++ b/dbaccess/source/core/api/querydescriptor.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,44 +29,20 @@
#ifndef _DBA_COREAPI_QUERYDESCRIPTOR_HXX_
#define _DBA_COREAPI_QUERYDESCRIPTOR_HXX_
-#ifndef _CPPUHELPER_IMPLBASE3_HXX_
#include <cppuhelper/implbase3.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
#include <comphelper/proparrhlp.hxx>
-#endif
-#ifndef _OSL_MUTEX_HXX_
#include <osl/mutex.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _DBA_COREAPI_COLUMN_HXX_
#include "column.hxx"
-#endif
-#ifndef _DBA_CORE_DATASETTINGS_HXX_
#include "datasettings.hxx"
-#endif
-#ifndef _DBA_CORE_COMMANDBASE_HXX_
#include "commandbase.hxx"
-#endif
-#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
#include <comphelper/broadcasthelper.hxx>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
//........................................................................
namespace dbaccess
@@ -181,3 +158,4 @@ public:
#endif // _DBA_COREAPI_QUERYDESCRIPTOR_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/resultcolumn.cxx b/dbaccess/source/core/api/resultcolumn.cxx
index 27532a3f2..208942e10 100644
--- a/dbaccess/source/core/api/resultcolumn.cxx
+++ b/dbaccess/source/core/api/resultcolumn.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,45 +28,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBACORE_RESULTCOLUMN_HXX_
#include "resultcolumn.hxx"
-#endif
-#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
-#ifndef _OSL_THREAD_H_
#include <osl/thread.h>
-#endif
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::beans;
@@ -78,7 +53,7 @@ using namespace ::cppu;
using namespace dbaccess;
DBG_NAME(OResultColumn)
-//--------------------------------------------------------------------------
+
OResultColumn::OResultColumn( const Reference < XResultSetMetaData >& _xMetaData, sal_Int32 _nPos,
const Reference< XDatabaseMetaData >& _rxDBMeta )
:OColumn( true )
@@ -88,7 +63,7 @@ OResultColumn::OResultColumn( const Reference < XResultSetMetaData >& _xMetaData
{
DBG_CTOR(OResultColumn,NULL);
}
-// -----------------------------------------------------------------------------
+
void OResultColumn::impl_determineIsRowVersion_nothrow()
{
if ( m_aIsRowVersion.hasValue() )
@@ -98,7 +73,7 @@ void OResultColumn::impl_determineIsRowVersion_nothrow()
OSL_ENSURE( m_xDBMetaData.is(), "OResultColumn::impl_determineIsRowVersion_nothrow: no DBMetaData!" );
if ( !m_xDBMetaData.is() )
return;
-
+
try
{
::rtl::OUString sCatalog, sSchema, sTable, sColumnName;
@@ -133,13 +108,13 @@ void OResultColumn::impl_determineIsRowVersion_nothrow()
DBG_UNHANDLED_EXCEPTION();
}
}
-// -----------------------------------------------------------------------------
+
OResultColumn::~OResultColumn()
{
DBG_DTOR(OResultColumn,NULL);
}
+
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< sal_Int8 > OResultColumn::getImplementationId() throw (RuntimeException)
{
static OImplementationId * pId = 0;
@@ -156,13 +131,11 @@ Sequence< sal_Int8 > OResultColumn::getImplementationId() throw (RuntimeExceptio
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OResultColumn::getImplementationName( ) throw(RuntimeException)
{
- return rtl::OUString::createFromAscii("com.sun.star.sdb.OResultColumn");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OResultColumn"));
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OResultColumn::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
@@ -172,7 +145,6 @@ Sequence< ::rtl::OUString > OResultColumn::getSupportedServiceNames( ) throw (R
}
// OComponentHelper
-//------------------------------------------------------------------------------
void OResultColumn::disposing()
{
OColumn::disposing();
@@ -182,7 +154,6 @@ void OResultColumn::disposing()
}
// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OResultColumn::createArrayHelper( ) const
{
BEGIN_PROPERTY_HELPER(21)
@@ -211,13 +182,11 @@ void OResultColumn::disposing()
}
// cppu::OPropertySetHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OResultColumn::getInfoHelper()
{
return *static_cast< ::comphelper::OPropertyArrayUsageHelper< OResultColumn >* >(this)->getArrayHelper();
}
-//------------------------------------------------------------------------------
namespace
{
template< typename TYPE >
@@ -229,7 +198,6 @@ namespace
}
}
-//------------------------------------------------------------------------------
void OResultColumn::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
try
@@ -304,7 +272,7 @@ void OResultColumn::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
rValue <<= m_xMetaData->getColumnTypeName(m_nPos);
break;
default:
- OSL_ENSURE( false, "OResultColumn::getFastPropertyValue: unknown property handle!" );
+ OSL_FAIL( "OResultColumn::getFastPropertyValue: unknown property handle!" );
break;
}
}
@@ -354,4 +322,4 @@ void OResultColumn::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
}
}
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/resultcolumn.hxx b/dbaccess/source/core/api/resultcolumn.hxx
index 76f856615..789a26f1c 100644
--- a/dbaccess/source/core/api/resultcolumn.hxx
+++ b/dbaccess/source/core/api/resultcolumn.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,12 +29,8 @@
#ifndef _DBACORE_RESULTCOLUMN_HXX_
#define _DBACORE_RESULTCOLUMN_HXX_
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATA_HDL_
#include <com/sun/star/sdbc/XResultSetMetaData.hdl>
-#endif
-#ifndef _DBA_COREAPI_COLUMN_HXX_
#include <column.hxx>
-#endif
#include <boost/optional.hpp>
namespace dbaccess
{
@@ -99,3 +96,4 @@ namespace dbaccess
}
#endif // _DBACORE_RESULTCOLUMN_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx
index 05aa785e2..38051bbdb 100644
--- a/dbaccess/source/core/api/resultset.cxx
+++ b/dbaccess/source/core/api/resultset.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,63 +28,28 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_COREAPI_RESULTSET_HXX_
#include <resultset.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_RESULTSETTYPE_HPP_
#include <com/sun/star/sdbc/ResultSetType.hpp>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
#include <comphelper/property.hxx>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX //autogen
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _DBA_COREAPI_DATACOLUMN_HXX_
#include <datacolumn.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
-#ifndef _OSL_THREAD_H_
#include <osl/thread.h>
-#endif
#include <rtl/logfile.hxx>
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdbcx;
-//using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -95,7 +61,6 @@ using namespace dbtools;
DBG_NAME(OResultSet)
-//--------------------------------------------------------------------------
OResultSet::OResultSet(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& _xResultSet,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xStatement,
sal_Bool _bCaseSensitive)
@@ -139,7 +104,6 @@ OResultSet::OResultSet(const ::com::sun::star::uno::Reference< ::com::sun::star:
}
}
-//--------------------------------------------------------------------------
OResultSet::~OResultSet()
{
m_pColumns->acquire();
@@ -150,7 +114,6 @@ OResultSet::~OResultSet()
}
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > OResultSet::getTypes() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getTypes" );
@@ -160,7 +123,6 @@ Sequence< Type > OResultSet::getTypes() throw (RuntimeException)
return aTypes.getTypes();
}
-//--------------------------------------------------------------------------
Sequence< sal_Int8 > OResultSet::getImplementationId() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getImplementationId" );
@@ -178,7 +140,6 @@ Sequence< sal_Int8 > OResultSet::getImplementationId() throw (RuntimeException)
}
// com::sun::star::uno::XInterface
-//--------------------------------------------------------------------------
Any OResultSet::queryInterface( const Type & rType ) throw (RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::queryInterface" );
@@ -191,13 +152,11 @@ Any OResultSet::queryInterface( const Type & rType ) throw (RuntimeException)
return aIface;
}
-//--------------------------------------------------------------------------
void OResultSet::acquire() throw ()
{
OResultSetBase::acquire();
}
-//--------------------------------------------------------------------------
void OResultSet::release() throw ()
{
OResultSetBase::release();
@@ -205,7 +164,6 @@ void OResultSet::release() throw ()
// OResultSetBase
-//------------------------------------------------------------------------------
void OResultSet::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::disposing" );
@@ -227,7 +185,6 @@ void OResultSet::disposing()
}
// XCloseable
-//------------------------------------------------------------------------------
void OResultSet::close(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::close" );
@@ -239,21 +196,18 @@ void OResultSet::close(void) throw( SQLException, RuntimeException )
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OResultSet::getImplementationName( ) throw(RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getImplementationName" );
- return rtl::OUString::createFromAscii("com.sun.star.sdb.OResultSet");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OResultSet"));
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::supportsService" );
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OResultSet::getSupportedServiceNames( ) throw (RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getSupportedServiceNames" );
@@ -264,7 +218,6 @@ Sequence< ::rtl::OUString > OResultSet::getSupportedServiceNames( ) throw (Runt
}
// com::sun::star::beans::XPropertySet
-//------------------------------------------------------------------------------
Reference< XPropertySetInfo > OResultSet::getPropertySetInfo() throw (RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getPropertySetInfo" );
@@ -272,7 +225,6 @@ Reference< XPropertySetInfo > OResultSet::getPropertySetInfo() throw (RuntimeExc
}
// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OResultSet::createArrayHelper( ) const
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::createArrayHelper" );
@@ -287,14 +239,12 @@ Reference< XPropertySetInfo > OResultSet::getPropertySetInfo() throw (RuntimeExc
}
// cppu::OPropertySetHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OResultSet::getInfoHelper()
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getInfoHelper" );
return *getArrayHelper();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::convertFastPropertyValue(Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw( IllegalArgumentException )
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::convertFastPropertyValue" );
@@ -304,7 +254,6 @@ sal_Bool OResultSet::convertFastPropertyValue(Any & rConvertedValue, Any & rOldV
return sal_True;
}
-//------------------------------------------------------------------------------
void OResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::setFastPropertyValue_NoBroadcast" );
@@ -319,11 +268,10 @@ void OResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any&
xSet->setPropertyValue(PROPERTY_FETCHSIZE, rValue);
break;
default:
- DBG_ERROR("unknown Property");
+ OSL_FAIL("unknown Property");
}
}
-//------------------------------------------------------------------------------
void OResultSet::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getFastPropertyValue" );
@@ -350,7 +298,6 @@ void OResultSet::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
}
// XWarningsSupplier
-//------------------------------------------------------------------------------
Any OResultSet::getWarnings(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getWarnings" );
@@ -359,7 +306,6 @@ Any OResultSet::getWarnings(void) throw( SQLException, RuntimeException )
return m_aWarnings.getWarnings();
}
-//------------------------------------------------------------------------------
void OResultSet::clearWarnings(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::clearWarnings" );
@@ -369,7 +315,6 @@ void OResultSet::clearWarnings(void) throw( SQLException, RuntimeException )
}
// ::com::sun::star::sdbc::XResultSetMetaDataSupplier
-//------------------------------------------------------------------------------
Reference< XResultSetMetaData > OResultSet::getMetaData(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getMetaData" );
@@ -380,7 +325,6 @@ Reference< XResultSetMetaData > OResultSet::getMetaData(void) throw( SQLExceptio
}
// ::com::sun::star::sdbc::XColumnLocate
-//------------------------------------------------------------------------------
sal_Int32 OResultSet::findColumn(const rtl::OUString& columnName) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::findColumn" );
@@ -390,7 +334,6 @@ sal_Int32 OResultSet::findColumn(const rtl::OUString& columnName) throw( SQLExce
return Reference< XColumnLocate >(m_xDelegatorResultSet, UNO_QUERY)->findColumn(columnName);
}
-//------------------------------------------------------------------------------
namespace
{
static Reference< XDatabaseMetaData > lcl_getDBMetaDataFromStatement_nothrow( const Reference< XInterface >& _rxStatement )
@@ -415,8 +358,8 @@ namespace
return xDBMetaData;
}
}
+
// ::com::sun::star::sdbcx::XColumnsSupplier
-//------------------------------------------------------------------------------
Reference< ::com::sun::star::container::XNameAccess > OResultSet::getColumns(void) throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getColumns" );
@@ -488,7 +431,6 @@ Reference< ::com::sun::star::container::XNameAccess > OResultSet::getColumns(voi
}
// ::com::sun::star::sdbc::XRow
-//------------------------------------------------------------------------------
sal_Bool OResultSet::wasNull(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::wasNull" );
@@ -497,7 +439,7 @@ sal_Bool OResultSet::wasNull(void) throw( SQLException, RuntimeException )
return m_xDelegatorRow->wasNull();
}
-//------------------------------------------------------------------------------
+
rtl::OUString OResultSet::getString(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getString" );
@@ -506,7 +448,7 @@ rtl::OUString OResultSet::getString(sal_Int32 columnIndex) throw( SQLException,
return m_xDelegatorRow->getString(columnIndex);
}
-//------------------------------------------------------------------------------
+
sal_Bool OResultSet::getBoolean(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getBoolean" );
@@ -515,7 +457,7 @@ sal_Bool OResultSet::getBoolean(sal_Int32 columnIndex) throw( SQLException, Runt
return m_xDelegatorRow->getBoolean(columnIndex);
}
-//------------------------------------------------------------------------------
+
sal_Int8 OResultSet::getByte(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getByte" );
@@ -524,7 +466,7 @@ sal_Int8 OResultSet::getByte(sal_Int32 columnIndex) throw( SQLException, Runtime
return m_xDelegatorRow->getByte(columnIndex);
}
-//------------------------------------------------------------------------------
+
sal_Int16 OResultSet::getShort(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getShort" );
@@ -533,7 +475,7 @@ sal_Int16 OResultSet::getShort(sal_Int32 columnIndex) throw( SQLException, Runti
return m_xDelegatorRow->getShort(columnIndex);
}
-//------------------------------------------------------------------------------
+
sal_Int32 OResultSet::getInt(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getInt" );
@@ -542,7 +484,7 @@ sal_Int32 OResultSet::getInt(sal_Int32 columnIndex) throw( SQLException, Runtime
return m_xDelegatorRow->getInt(columnIndex);
}
-//------------------------------------------------------------------------------
+
sal_Int64 OResultSet::getLong(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getLong" );
@@ -551,7 +493,7 @@ sal_Int64 OResultSet::getLong(sal_Int32 columnIndex) throw( SQLException, Runtim
return m_xDelegatorRow->getLong(columnIndex);
}
-//------------------------------------------------------------------------------
+
float OResultSet::getFloat(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getFloat" );
@@ -560,7 +502,7 @@ float OResultSet::getFloat(sal_Int32 columnIndex) throw( SQLException, RuntimeEx
return m_xDelegatorRow->getFloat(columnIndex);
}
-//------------------------------------------------------------------------------
+
double OResultSet::getDouble(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getDouble" );
@@ -569,7 +511,7 @@ double OResultSet::getDouble(sal_Int32 columnIndex) throw( SQLException, Runtime
return m_xDelegatorRow->getDouble(columnIndex);
}
-//------------------------------------------------------------------------------
+
Sequence< sal_Int8 > OResultSet::getBytes(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getBytes" );
@@ -578,7 +520,7 @@ Sequence< sal_Int8 > OResultSet::getBytes(sal_Int32 columnIndex) throw( SQLExcep
return m_xDelegatorRow->getBytes(columnIndex);
}
-//------------------------------------------------------------------------------
+
::com::sun::star::util::Date OResultSet::getDate(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getDate" );
@@ -587,7 +529,7 @@ Sequence< sal_Int8 > OResultSet::getBytes(sal_Int32 columnIndex) throw( SQLExcep
return m_xDelegatorRow->getDate(columnIndex);
}
-//------------------------------------------------------------------------------
+
::com::sun::star::util::Time OResultSet::getTime(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getTime" );
@@ -596,7 +538,7 @@ Sequence< sal_Int8 > OResultSet::getBytes(sal_Int32 columnIndex) throw( SQLExcep
return m_xDelegatorRow->getTime(columnIndex);
}
-//------------------------------------------------------------------------------
+
::com::sun::star::util::DateTime OResultSet::getTimestamp(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getTimestamp" );
@@ -605,7 +547,7 @@ Sequence< sal_Int8 > OResultSet::getBytes(sal_Int32 columnIndex) throw( SQLExcep
return m_xDelegatorRow->getTimestamp(columnIndex);
}
-//------------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > OResultSet::getBinaryStream(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getBinaryStream" );
@@ -614,7 +556,7 @@ Reference< ::com::sun::star::io::XInputStream > OResultSet::getBinaryStream(sal
return m_xDelegatorRow->getBinaryStream(columnIndex);
}
-//------------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > OResultSet::getCharacterStream(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getCharacterStream" );
@@ -623,7 +565,7 @@ Reference< ::com::sun::star::io::XInputStream > OResultSet::getCharacterStream(
return m_xDelegatorRow->getCharacterStream(columnIndex);
}
-//------------------------------------------------------------------------------
+
Any OResultSet::getObject(sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess > & typeMap) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getObject" );
@@ -632,7 +574,7 @@ Any OResultSet::getObject(sal_Int32 columnIndex, const Reference< ::com::sun::st
return m_xDelegatorRow->getObject(columnIndex, typeMap);
}
-//------------------------------------------------------------------------------
+
Reference< XRef > OResultSet::getRef(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getRef" );
@@ -641,7 +583,7 @@ Reference< XRef > OResultSet::getRef(sal_Int32 columnIndex) throw( SQLException
return m_xDelegatorRow->getRef(columnIndex);
}
-//------------------------------------------------------------------------------
+
Reference< XBlob > OResultSet::getBlob(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getBlob" );
@@ -650,7 +592,7 @@ Reference< XBlob > OResultSet::getBlob(sal_Int32 columnIndex) throw( SQLExcepti
return m_xDelegatorRow->getBlob(columnIndex);
}
-//------------------------------------------------------------------------------
+
Reference< XClob > OResultSet::getClob(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getClob" );
@@ -659,7 +601,7 @@ Reference< XClob > OResultSet::getClob(sal_Int32 columnIndex) throw( SQLExcepti
return m_xDelegatorRow->getClob(columnIndex);
}
-//------------------------------------------------------------------------------
+
Reference< XArray > OResultSet::getArray(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getArray" );
@@ -670,7 +612,6 @@ Reference< XArray > OResultSet::getArray(sal_Int32 columnIndex) throw( SQLExcep
}
// ::com::sun::star::sdbc::XRowUpdate
-//------------------------------------------------------------------------------
void OResultSet::updateNull(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateNull" );
@@ -682,7 +623,6 @@ void OResultSet::updateNull(sal_Int32 columnIndex) throw( SQLException, RuntimeE
m_xDelegatorRowUpdate->updateNull(columnIndex);
}
-//------------------------------------------------------------------------------
void OResultSet::updateBoolean(sal_Int32 columnIndex, sal_Bool x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateBoolean" );
@@ -693,7 +633,7 @@ void OResultSet::updateBoolean(sal_Int32 columnIndex, sal_Bool x) throw( SQLExce
m_xDelegatorRowUpdate->updateBoolean(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateByte(sal_Int32 columnIndex, sal_Int8 x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateByte" );
@@ -704,7 +644,7 @@ void OResultSet::updateByte(sal_Int32 columnIndex, sal_Int8 x) throw( SQLExcepti
m_xDelegatorRowUpdate->updateByte(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateShort(sal_Int32 columnIndex, sal_Int16 x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateShort" );
@@ -715,7 +655,7 @@ void OResultSet::updateShort(sal_Int32 columnIndex, sal_Int16 x) throw( SQLExcep
m_xDelegatorRowUpdate->updateShort(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateInt(sal_Int32 columnIndex, sal_Int32 x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateInt" );
@@ -726,7 +666,7 @@ void OResultSet::updateInt(sal_Int32 columnIndex, sal_Int32 x) throw( SQLExcepti
m_xDelegatorRowUpdate->updateInt(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateLong(sal_Int32 columnIndex, sal_Int64 x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateLong" );
@@ -737,7 +677,7 @@ void OResultSet::updateLong(sal_Int32 columnIndex, sal_Int64 x) throw( SQLExcept
m_xDelegatorRowUpdate->updateLong(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateFloat(sal_Int32 columnIndex, float x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateFloat" );
@@ -748,7 +688,7 @@ void OResultSet::updateFloat(sal_Int32 columnIndex, float x) throw( SQLException
m_xDelegatorRowUpdate->updateFloat(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateDouble(sal_Int32 columnIndex, double x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateDouble" );
@@ -759,7 +699,7 @@ void OResultSet::updateDouble(sal_Int32 columnIndex, double x) throw( SQLExcepti
m_xDelegatorRowUpdate->updateDouble(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateString(sal_Int32 columnIndex, const rtl::OUString& x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateString" );
@@ -770,7 +710,7 @@ void OResultSet::updateString(sal_Int32 columnIndex, const rtl::OUString& x) thr
m_xDelegatorRowUpdate->updateString(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateBytes(sal_Int32 columnIndex, const Sequence< sal_Int8 >& x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateBytes" );
@@ -781,7 +721,7 @@ void OResultSet::updateBytes(sal_Int32 columnIndex, const Sequence< sal_Int8 >&
m_xDelegatorRowUpdate->updateBytes(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateDate(sal_Int32 columnIndex, const ::com::sun::star::util::Date& x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateDate" );
@@ -792,7 +732,7 @@ void OResultSet::updateDate(sal_Int32 columnIndex, const ::com::sun::star::util:
m_xDelegatorRowUpdate->updateDate(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateTime(sal_Int32 columnIndex, const ::com::sun::star::util::Time& x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateTime" );
@@ -803,7 +743,7 @@ void OResultSet::updateTime(sal_Int32 columnIndex, const ::com::sun::star::util:
m_xDelegatorRowUpdate->updateTime(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateTimestamp(sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateTimestamp" );
@@ -814,7 +754,7 @@ void OResultSet::updateTimestamp(sal_Int32 columnIndex, const ::com::sun::star::
m_xDelegatorRowUpdate->updateTimestamp(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateBinaryStream(sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream > & x, sal_Int32 length) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateBinaryStream" );
@@ -825,7 +765,7 @@ void OResultSet::updateBinaryStream(sal_Int32 columnIndex, const Reference< ::co
m_xDelegatorRowUpdate->updateBinaryStream(columnIndex, x, length);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateCharacterStream(sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream > & x, sal_Int32 length) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateCharacterStream" );
@@ -836,7 +776,7 @@ void OResultSet::updateCharacterStream(sal_Int32 columnIndex, const Reference< :
m_xDelegatorRowUpdate->updateCharacterStream(columnIndex, x, length);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateNumericObject(sal_Int32 columnIndex, const Any& x, sal_Int32 scale) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateNumericObject" );
@@ -848,7 +788,6 @@ void OResultSet::updateNumericObject(sal_Int32 columnIndex, const Any& x, sal_In
m_xDelegatorRowUpdate->updateNumericObject(columnIndex, x, scale);
}
-//------------------------------------------------------------------------------
void OResultSet::updateObject(sal_Int32 columnIndex, const Any& x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateObject" );
@@ -861,7 +800,6 @@ void OResultSet::updateObject(sal_Int32 columnIndex, const Any& x) throw( SQLExc
}
// ::com::sun::star::sdbc::XResultSet
-//------------------------------------------------------------------------------
sal_Bool OResultSet::next(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::next" );
@@ -871,7 +809,6 @@ sal_Bool OResultSet::next(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->next();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::isBeforeFirst(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::isBeforeFirst" );
@@ -881,7 +818,6 @@ sal_Bool OResultSet::isBeforeFirst(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->isBeforeFirst();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::isAfterLast(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::isAfterLast" );
@@ -891,7 +827,6 @@ sal_Bool OResultSet::isAfterLast(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->isAfterLast();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::isFirst(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::isFirst" );
@@ -901,7 +836,6 @@ sal_Bool OResultSet::isFirst(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->isFirst();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::isLast(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::isLast" );
@@ -911,7 +845,6 @@ sal_Bool OResultSet::isLast(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->isLast();
}
-//------------------------------------------------------------------------------
void OResultSet::beforeFirst(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::beforeFirst" );
@@ -921,7 +854,6 @@ void OResultSet::beforeFirst(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSet->beforeFirst();
}
-//------------------------------------------------------------------------------
void OResultSet::afterLast(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::afterLast" );
@@ -931,7 +863,6 @@ void OResultSet::afterLast(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSet->afterLast();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::first(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::first" );
@@ -941,7 +872,6 @@ sal_Bool OResultSet::first(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->first();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::last(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::last" );
@@ -951,7 +881,6 @@ sal_Bool OResultSet::last(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->last();
}
-//------------------------------------------------------------------------------
sal_Int32 OResultSet::getRow(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getRow" );
@@ -961,7 +890,6 @@ sal_Int32 OResultSet::getRow(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->getRow();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::absolute(sal_Int32 row) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::absolute" );
@@ -971,7 +899,6 @@ sal_Bool OResultSet::absolute(sal_Int32 row) throw( SQLException, RuntimeExcepti
return m_xDelegatorResultSet->absolute(row);
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::relative(sal_Int32 rows) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::relative" );
@@ -981,7 +908,6 @@ sal_Bool OResultSet::relative(sal_Int32 rows) throw( SQLException, RuntimeExcept
return m_xDelegatorResultSet->relative(rows);
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::previous(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::previous" );
@@ -991,7 +917,6 @@ sal_Bool OResultSet::previous(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->previous();
}
-//------------------------------------------------------------------------------
void OResultSet::refreshRow(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::refreshRow" );
@@ -1001,7 +926,6 @@ void OResultSet::refreshRow(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSet->refreshRow();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::rowUpdated(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::rowUpdated" );
@@ -1011,7 +935,6 @@ sal_Bool OResultSet::rowUpdated(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->rowUpdated();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::rowInserted(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::rowInserted" );
@@ -1021,7 +944,6 @@ sal_Bool OResultSet::rowInserted(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->rowInserted();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::rowDeleted(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::rowDeleted" );
@@ -1031,7 +953,6 @@ sal_Bool OResultSet::rowDeleted(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->rowDeleted();
}
-//------------------------------------------------------------------------------
Reference< XInterface > OResultSet::getStatement(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getStatement" );
@@ -1042,7 +963,6 @@ Reference< XInterface > OResultSet::getStatement(void) throw( SQLException, Runt
}
// ::com::sun::star::sdbcx::XRowLocate
-//------------------------------------------------------------------------------
Any OResultSet::getBookmark(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getBookmark" );
@@ -1054,7 +974,6 @@ Any OResultSet::getBookmark(void) throw( SQLException, RuntimeException )
return Reference< XRowLocate >(m_xDelegatorResultSet, UNO_QUERY)->getBookmark();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::moveToBookmark(const Any& bookmark) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::moveToBookmark" );
@@ -1066,19 +985,17 @@ sal_Bool OResultSet::moveToBookmark(const Any& bookmark) throw( SQLException, Ru
return Reference< XRowLocate >(m_xDelegatorResultSet, UNO_QUERY)->moveToBookmark(bookmark);
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::moveRelativeToBookmark(const Any& bookmark, sal_Int32 rows) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::moveRelativeToBookmark" );
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(OResultSetBase::rBHelper.bDisposed);
-
+
checkBookmarkable();
return Reference< XRowLocate >(m_xDelegatorResultSet, UNO_QUERY)->moveRelativeToBookmark(bookmark, rows);
}
-//------------------------------------------------------------------------------
sal_Int32 OResultSet::compareBookmarks(const Any& _first, const Any& _second) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::compareBookmarks" );
@@ -1090,7 +1007,6 @@ sal_Int32 OResultSet::compareBookmarks(const Any& _first, const Any& _second) th
return Reference< XRowLocate >(m_xDelegatorResultSet, UNO_QUERY)->compareBookmarks(_first, _second);
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::hasOrderedBookmarks(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::hasOrderedBookmarks" );
@@ -1102,7 +1018,6 @@ sal_Bool OResultSet::hasOrderedBookmarks(void) throw( SQLException, RuntimeExcep
return Reference< XRowLocate >(m_xDelegatorResultSet, UNO_QUERY)->hasOrderedBookmarks();
}
-//------------------------------------------------------------------------------
sal_Int32 OResultSet::hashBookmark(const Any& bookmark) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::hashBookmark" );
@@ -1115,7 +1030,6 @@ sal_Int32 OResultSet::hashBookmark(const Any& bookmark) throw( SQLException, Run
}
// ::com::sun::star::sdbc::XResultSetUpdate
-//------------------------------------------------------------------------------
void OResultSet::insertRow(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::insertRow" );
@@ -1127,7 +1041,6 @@ void OResultSet::insertRow(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSetUpdate->insertRow();
}
-//------------------------------------------------------------------------------
void OResultSet::updateRow(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateRow" );
@@ -1139,7 +1052,6 @@ void OResultSet::updateRow(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSetUpdate->updateRow();
}
-//------------------------------------------------------------------------------
void OResultSet::deleteRow(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::deleteRow" );
@@ -1151,7 +1063,6 @@ void OResultSet::deleteRow(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSetUpdate->deleteRow();
}
-//------------------------------------------------------------------------------
void OResultSet::cancelRowUpdates(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::cancelRowUpdates" );
@@ -1163,7 +1074,6 @@ void OResultSet::cancelRowUpdates(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSetUpdate->cancelRowUpdates();
}
-//------------------------------------------------------------------------------
void OResultSet::moveToInsertRow(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::moveToInsertRow" );
@@ -1175,7 +1085,6 @@ void OResultSet::moveToInsertRow(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSetUpdate->moveToInsertRow();
}
-//------------------------------------------------------------------------------
void OResultSet::moveToCurrentRow(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::moveToCurrentRow" );
@@ -1187,7 +1096,6 @@ void OResultSet::moveToCurrentRow(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSetUpdate->moveToCurrentRow();
}
-// -----------------------------------------------------------------------------
void OResultSet::checkReadOnly() const
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::checkReadOnly" );
@@ -1197,12 +1105,10 @@ void OResultSet::checkReadOnly() const
throwSQLException( "The result set is read-only.", SQL_GENERAL_ERROR, *const_cast< OResultSet* >( this ) );
}
-// -----------------------------------------------------------------------------
void OResultSet::checkBookmarkable() const
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::checkBookmarkable" );
if ( !m_bIsBookmarkable )
throwSQLException( "The result set does not have bookmark support.", SQL_GENERAL_ERROR, *const_cast< OResultSet* >( this ) );
}
-// -----------------------------------------------------------------------------
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/resultset.hxx b/dbaccess/source/core/api/resultset.hxx
index f95e5c2be..9bca1b5c5 100644
--- a/dbaccess/source/core/api/resultset.hxx
+++ b/dbaccess/source/core/api/resultset.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,68 +28,28 @@
#ifndef _DBA_COREAPI_RESULTSET_HXX_
#define _DBA_COREAPI_RESULTSET_HXX_
-#ifndef _DBA_COREAPI_COLUMN_HXX_
#include "column.hxx"
-#endif
-#ifndef DBTOOLS_WARNINGSCONTAINER_HXX
#include <connectivity/warningscontainer.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XSTATEMENT_HPP_
#include <com/sun/star/sdbc/XStatement.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCLOSEABLE_HPP_
#include <com/sun/star/sdbc/XCloseable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XWARNINGSSUPPLIER_HPP_
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_
#include <com/sun/star/sdbc/XResultSet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCOLUMNLOCATE_HPP_
#include <com/sun/star/sdbc/XColumnLocate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XROWLOCATE_HPP_
#include <com/sun/star/sdbcx/XRowLocate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROWUPDATE_HPP_
#include <com/sun/star/sdbc/XRowUpdate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETUPDATE_HPP_
#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_RESULTSETCONCURRENCY_HPP_
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
-#endif
-#ifndef _CPPUHELPER_PROPSHLP_HXX
#include <cppuhelper/propshlp.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
#include <comphelper/proparrhlp.hxx>
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef _CPPUHELPER_COMPBASE11_HXX_
#include <cppuhelper/compbase11.hxx>
-#endif
-#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
#include <comphelper/broadcasthelper.hxx>
-#endif
namespace dbaccess
{
@@ -276,3 +237,4 @@ namespace dbaccess
}
#endif // _DBA_COREAPI_RESULTSET_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/statement.cxx b/dbaccess/source/core/api/statement.cxx
index 58d6962c3..e0dfc1ea8 100644
--- a/dbaccess/source/core/api/statement.cxx
+++ b/dbaccess/source/core/api/statement.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,42 +28,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_COREAPI_STATEMENT_HXX_
#include <statement.hxx>
-#endif
-#ifndef _DBA_COREAPI_RESULTSET_HXX_
#include <resultset.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
#include <comphelper/property.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX //autogen
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
#include <rtl/logfile.hxx>
using namespace ::com::sun::star::sdb;
@@ -77,7 +54,6 @@ using namespace dbtools;
DBG_NAME(OStatementBase)
-//--------------------------------------------------------------------------
OStatementBase::OStatementBase(const Reference< XConnection > & _xConn,
const Reference< XInterface > & _xStatement)
:OSubComponent(m_aMutex, _xConn)
@@ -93,14 +69,12 @@ OStatementBase::OStatementBase(const Reference< XConnection > & _xConn,
m_xAggregateAsCancellable = Reference< ::com::sun::star::util::XCancellable > (m_xAggregateAsSet, UNO_QUERY);
}
-//--------------------------------------------------------------------------
OStatementBase::~OStatementBase()
{
DBG_DTOR(OStatementBase, NULL);
}
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > OStatementBase::getTypes() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getTypes" );
@@ -121,7 +95,6 @@ Sequence< Type > OStatementBase::getTypes() throw (RuntimeException)
}
// com::sun::star::uno::XInterface
-//--------------------------------------------------------------------------
Any OStatementBase::queryInterface( const Type & rType ) throw (RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::queryInterface" );
@@ -140,7 +113,7 @@ Any OStatementBase::queryInterface( const Type & rType ) throw (RuntimeException
Reference< XGeneratedResultSet > xGRes(m_xAggregateAsSet, UNO_QUERY);
if ( ::getCppuType( (const Reference< XGeneratedResultSet > *)0 ) == rType && xGRes.is() )
aIface = ::cppu::queryInterface(rType,static_cast< XGeneratedResultSet * >( this ));
- } // if ( !aIface.hasValue() )
+ }
if ( !aIface.hasValue() )
{
Reference< XPreparedBatchExecution > xGRes(m_xAggregateAsSet, UNO_QUERY);
@@ -151,19 +124,16 @@ Any OStatementBase::queryInterface( const Type & rType ) throw (RuntimeException
return aIface;
}
-//--------------------------------------------------------------------------
void OStatementBase::acquire() throw ()
{
OSubComponent::acquire();
}
-//--------------------------------------------------------------------------
void OStatementBase::release() throw ()
{
OSubComponent::release();
}
-//------------------------------------------------------------------------------
void OStatementBase::disposeResultSet()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::disposeResultSet" );
@@ -175,7 +145,6 @@ void OStatementBase::disposeResultSet()
}
// OComponentHelper
-//------------------------------------------------------------------------------
void OStatementBase::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::disposing" );
@@ -209,7 +178,6 @@ void OStatementBase::disposing()
}
// XCloseable
-//------------------------------------------------------------------------------
void OStatementBase::close(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::close" );
@@ -221,7 +189,6 @@ void OStatementBase::close(void) throw( SQLException, RuntimeException )
}
// OPropertySetHelper
-//------------------------------------------------------------------------------
Reference< XPropertySetInfo > OStatementBase::getPropertySetInfo() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getPropertySetInfo" );
@@ -229,7 +196,6 @@ Reference< XPropertySetInfo > OStatementBase::getPropertySetInfo() throw (Runtim
}
// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OStatementBase::createArrayHelper( ) const
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::createArrayHelper" );
@@ -248,14 +214,12 @@ Reference< XPropertySetInfo > OStatementBase::getPropertySetInfo() throw (Runtim
}
// cppu::OPropertySetHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OStatementBase::getInfoHelper()
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getInfoHelper" );
return *getArrayHelper();
}
-//------------------------------------------------------------------------------
sal_Bool OStatementBase::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw( IllegalArgumentException )
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::convertFastPropertyValue" );
@@ -291,7 +255,6 @@ sal_Bool OStatementBase::convertFastPropertyValue( Any & rConvertedValue, Any &
return bModified;
}
-//------------------------------------------------------------------------------
void OStatementBase::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::setFastPropertyValue_NoBroadcast" );
@@ -322,7 +285,6 @@ void OStatementBase::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const
}
}
-//------------------------------------------------------------------------------
void OStatementBase::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getFastPropertyValue" );
@@ -350,7 +312,6 @@ void OStatementBase::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons
}
// XWarningsSupplier
-//------------------------------------------------------------------------------
Any OStatementBase::getWarnings(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getWarnings" );
@@ -360,7 +321,6 @@ Any OStatementBase::getWarnings(void) throw( SQLException, RuntimeException )
return Reference< XWarningsSupplier >(m_xAggregateAsSet, UNO_QUERY)->getWarnings();
}
-//------------------------------------------------------------------------------
void OStatementBase::clearWarnings(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::clearWarnings" );
@@ -371,7 +331,6 @@ void OStatementBase::clearWarnings(void) throw( SQLException, RuntimeException )
}
// ::com::sun::star::util::XCancellable
-//------------------------------------------------------------------------------
void OStatementBase::cancel(void) throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::cancel" );
@@ -383,7 +342,6 @@ void OStatementBase::cancel(void) throw( RuntimeException )
}
// XMultipleResults
-//------------------------------------------------------------------------------
Reference< XResultSet > SAL_CALL OStatementBase::getResultSet( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getResultSet" );
@@ -398,7 +356,6 @@ Reference< XResultSet > SAL_CALL OStatementBase::getResultSet( ) throw(SQLExcep
return Reference< XMultipleResults >(m_xAggregateAsSet, UNO_QUERY)->getResultSet();
}
-//------------------------------------------------------------------------------
sal_Int32 SAL_CALL OStatementBase::getUpdateCount( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getUpdateCount" );
@@ -413,7 +370,6 @@ sal_Int32 SAL_CALL OStatementBase::getUpdateCount( ) throw(SQLException, Runtim
return Reference< XMultipleResults >(m_xAggregateAsSet, UNO_QUERY)->getUpdateCount();
}
-//------------------------------------------------------------------------------
sal_Bool SAL_CALL OStatementBase::getMoreResults( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getMoreResults" );
@@ -433,7 +389,6 @@ sal_Bool SAL_CALL OStatementBase::getMoreResults( ) throw(SQLException, Runtime
}
// XPreparedBatchExecution
-//------------------------------------------------------------------------------
void SAL_CALL OStatementBase::addBatch( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::addBatch" );
@@ -448,7 +403,6 @@ void SAL_CALL OStatementBase::addBatch( ) throw(SQLException, RuntimeException)
Reference< XPreparedBatchExecution >(m_xAggregateAsSet, UNO_QUERY)->addBatch();
}
-//------------------------------------------------------------------------------
void SAL_CALL OStatementBase::clearBatch( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::clearBatch" );
@@ -463,7 +417,6 @@ void SAL_CALL OStatementBase::clearBatch( ) throw(SQLException, RuntimeExceptio
Reference< XPreparedBatchExecution >(m_xAggregateAsSet, UNO_QUERY)->clearBatch();
}
-//------------------------------------------------------------------------------
Sequence< sal_Int32 > SAL_CALL OStatementBase::executeBatch( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::executeBatch" );
@@ -480,7 +433,7 @@ Sequence< sal_Int32 > SAL_CALL OStatementBase::executeBatch( ) throw(SQLExcepti
return Reference< XPreparedBatchExecution >(m_xAggregateAsSet, UNO_QUERY)->executeBatch();
}
-// -----------------------------------------------------------------------------
+
Reference< XResultSet > SAL_CALL OStatementBase::getGeneratedValues( ) throw (SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getGeneratedValues" );
@@ -496,7 +449,6 @@ Reference< XResultSet > SAL_CALL OStatementBase::getGeneratedValues( ) throw (S
//************************************************************
// OStatement
//************************************************************
-//------------------------------------------------------------------------------
OStatement::OStatement( const Reference< XConnection >& _xConn, const Reference< XInterface > & _xStatement )
:OStatementBase( _xConn, _xStatement )
,m_bAttemptedComposerCreation( false )
@@ -505,26 +457,22 @@ OStatement::OStatement( const Reference< XConnection >& _xConn, const Reference<
m_xAggregateStatement.set( _xStatement, UNO_QUERY_THROW );
}
-//------------------------------------------------------------------------------
IMPLEMENT_FORWARD_XINTERFACE2( OStatement, OStatementBase, OStatement_IFACE );
IMPLEMENT_FORWARD_XTYPEPROVIDER2( OStatement, OStatementBase, OStatement_IFACE );
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OStatement::getImplementationName( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::getImplementationName" );
- return rtl::OUString::createFromAscii("com.sun.star.sdb.OStatement");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OStatement"));
}
-//------------------------------------------------------------------------------
sal_Bool OStatement::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::supportsService" );
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OStatement::getSupportedServiceNames( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::getSupportedServiceNames" );
@@ -534,7 +482,6 @@ Sequence< ::rtl::OUString > OStatement::getSupportedServiceNames( ) throw (Runt
}
// XStatement
-//------------------------------------------------------------------------------
Reference< XResultSet > OStatement::executeQuery( const rtl::OUString& _rSQL ) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::executeQuery" );
@@ -562,7 +509,6 @@ Reference< XResultSet > OStatement::executeQuery( const rtl::OUString& _rSQL ) t
return xResultSet;
}
-//------------------------------------------------------------------------------
sal_Int32 OStatement::executeUpdate( const rtl::OUString& _rSQL ) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::executeUpdate" );
@@ -575,7 +521,6 @@ sal_Int32 OStatement::executeUpdate( const rtl::OUString& _rSQL ) throw( SQLExce
return m_xAggregateStatement->executeUpdate( sSQL );
}
-//------------------------------------------------------------------------------
sal_Bool OStatement::execute( const rtl::OUString& _rSQL ) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::execute" );
@@ -587,7 +532,7 @@ sal_Bool OStatement::execute( const rtl::OUString& _rSQL ) throw( SQLException,
::rtl::OUString sSQL( impl_doEscapeProcessing_nothrow( _rSQL ) );
return m_xAggregateStatement->execute( sSQL );
}
-//------------------------------------------------------------------------------
+
void OStatement::addBatch( const rtl::OUString& _rSQL ) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::execute" );
@@ -602,7 +547,7 @@ void OStatement::addBatch( const rtl::OUString& _rSQL ) throw( SQLException, Run
::rtl::OUString sSQL( impl_doEscapeProcessing_nothrow( _rSQL ) );
Reference< XBatchExecution >(m_xAggregateAsSet, UNO_QUERY)->addBatch( sSQL );
}
-//------------------------------------------------------------------------------
+
void OStatement::clearBatch( ) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::execute" );
@@ -615,7 +560,7 @@ void OStatement::clearBatch( ) throw( SQLException, RuntimeException )
Reference< XBatchExecution >(m_xAggregateAsSet, UNO_QUERY)->clearBatch();
}
-//------------------------------------------------------------------------------
+
Sequence< sal_Int32 > OStatement::executeBatch( ) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::execute" );
@@ -628,14 +573,13 @@ Sequence< sal_Int32 > OStatement::executeBatch( ) throw( SQLException, RuntimeEx
return Reference< XBatchExecution >(m_xAggregateAsSet, UNO_QUERY)->executeBatch( );
}
-//------------------------------------------------------------------------------
+
Reference< XConnection > OStatement::getConnection(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::getConnection" );
return Reference< XConnection >( m_xParent, UNO_QUERY );
}
-// -----------------------------------------------------------------------------
void SAL_CALL OStatement::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::disposing" );
@@ -644,7 +588,6 @@ void SAL_CALL OStatement::disposing()
m_xAggregateStatement.clear();
}
-// -----------------------------------------------------------------------------
::rtl::OUString OStatement::impl_doEscapeProcessing_nothrow( const ::rtl::OUString& _rSQL ) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::impl_doEscapeProcessing_nothrow" );
@@ -658,7 +601,7 @@ void SAL_CALL OStatement::disposing()
bool bParseable = false;
try { m_xComposer->setQuery( _rSQL ); bParseable = true; }
catch( const SQLException& ) { }
-
+
if ( !bParseable )
// if we cannot parse it, silently accept this. The driver is probably able to cope with it then
return _rSQL;
@@ -674,7 +617,6 @@ void SAL_CALL OStatement::disposing()
return _rSQL;
}
-// -----------------------------------------------------------------------------
bool OStatement::impl_ensureComposer_nothrow() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::impl_ensureComposer_nothrow" );
@@ -694,3 +636,5 @@ bool OStatement::impl_ensureComposer_nothrow() const
return m_xComposer.is();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx
index ec6c8e97b..bb369a3f7 100644
--- a/dbaccess/source/core/api/table.cxx
+++ b/dbaccess/source/core/api/table.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -36,12 +37,12 @@
#include "CIndexes.hxx"
#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/enumhelper.hxx>
#include <comphelper/container.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/types.hxx>
-//#include <comphelper/extract.hxx>
#include <com/sun/star/util/XRefreshListener.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
@@ -76,13 +77,13 @@ typedef ::std::map <sal_Int32, OTableColumn*, std::less <sal_Int32> > OColMap;
//= ODBTable
//==========================================================================
DBG_NAME(ODBTable)
-//--------------------------------------------------------------------------
+
ODBTable::ODBTable(connectivity::sdbcx::OCollection* _pTables
,const Reference< XConnection >& _rxConn
,const ::rtl::OUString& _rCatalog
- ,const ::rtl::OUString& _rSchema
+ ,const ::rtl::OUString& _rSchema
,const ::rtl::OUString& _rName
- ,const ::rtl::OUString& _rType
+ ,const ::rtl::OUString& _rType
,const ::rtl::OUString& _rDesc
,const Reference< XNameAccess >& _xColumnDefinitions) throw(SQLException)
:OTable_Base(_pTables,_rxConn,_rxConn->getMetaData().is() && _rxConn->getMetaData()->supportsMixedCaseQuotedIdentifiers(), _rName, _rType, _rDesc, _rSchema, _rCatalog )
@@ -91,32 +92,31 @@ ODBTable::ODBTable(connectivity::sdbcx::OCollection* _pTables
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::ODBTable" );
DBG_CTOR(ODBTable, NULL);
- DBG_ASSERT(getMetaData().is(), "ODBTable::ODBTable : invalid conn !");
- DBG_ASSERT(_rName.getLength(), "ODBTable::ODBTable : name !");
+ OSL_ENSURE(getMetaData().is(), "ODBTable::ODBTable : invalid conn !");
+ OSL_ENSURE(_rName.getLength(), "ODBTable::ODBTable : name !");
// TODO : think about collecting the privileges here, as we can't ensure that in getFastPropertyValue, where
// we do this at the moment, the statement needed can be supplied by the connection (for example the SQL-Server
// ODBC driver does not allow more than one statement per connection, and in getFastPropertyValue it's more
// likely that it's already used up than it's here.)
}
-// -----------------------------------------------------------------------------
+
ODBTable::ODBTable(connectivity::sdbcx::OCollection* _pTables
,const Reference< XConnection >& _rxConn)
- throw(SQLException)
+ throw(SQLException)
:OTable_Base(_pTables,_rxConn, _rxConn->getMetaData().is() && _rxConn->getMetaData()->supportsMixedCaseQuotedIdentifiers())
,m_nPrivileges(-1)
{
DBG_CTOR(ODBTable, NULL);
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::ODBTable" );
}
-// -------------------------------------------------------------------------
+
ODBTable::~ODBTable()
{
DBG_DTOR(ODBTable, NULL);
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_FORWARD_REFCOUNT(ODBTable,OTable_Base)
-//--------------------------------------------------------------------------
OColumn* ODBTable::createColumn(const ::rtl::OUString& _rName) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::createColumn" );
@@ -140,13 +140,13 @@ OColumn* ODBTable::createColumn(const ::rtl::OUString& _rName) const
return pReturn;
}
-// -----------------------------------------------------------------------------
+
void ODBTable::columnAppended( const Reference< XPropertySet >& /*_rxSourceDescriptor*/ )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::columnAppended" );
// not interested in
}
-// -----------------------------------------------------------------------------
+
void ODBTable::columnDropped(const ::rtl::OUString& _sName)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::columnDropped" );
@@ -156,7 +156,7 @@ void ODBTable::columnDropped(const ::rtl::OUString& _sName)
xDrop->dropByName(_sName);
}
}
-//--------------------------------------------------------------------------
+
Sequence< sal_Int8 > ODBTable::getImplementationId() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::getImplementationId" );
@@ -174,7 +174,6 @@ Sequence< sal_Int8 > ODBTable::getImplementationId() throw (RuntimeException)
}
// OComponentHelper
-//------------------------------------------------------------------------------
void SAL_CALL ODBTable::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::disposing" );
@@ -185,7 +184,6 @@ void SAL_CALL ODBTable::disposing()
m_pColumnMediator = NULL;
}
-//------------------------------------------------------------------------------
void ODBTable::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::getFastPropertyValue" );
@@ -196,12 +194,12 @@ void ODBTable::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const
OTable_Base::getFastPropertyValue(_rValue, _nHandle);
}
-// -------------------------------------------------------------------------
+
void ODBTable::construct()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::construct" );
::osl::MutexGuard aGuard(m_aMutex);
-
+
// we don't collect the privileges here, this is potentially expensive. Instead we determine them on request.
// (see getFastPropertyValue)
m_nPrivileges = -1;
@@ -228,10 +226,10 @@ void ODBTable::construct()
registerProperty(PROPERTY_PRIVILEGES, PROPERTY_ID_PRIVILEGES, PropertyAttribute::BOUND | PropertyAttribute::READONLY,
&m_nPrivileges, ::getCppuType(static_cast<sal_Int32*>(NULL)));
-
+
registerMayBeVoidProperty(PROPERTY_TEXTLINECOLOR, PROPERTY_ID_TEXTLINECOLOR, PropertyAttribute::BOUND | PropertyAttribute::MAYBEVOID,
&m_aTextLineColor, ::getCppuType(static_cast<sal_Int32*>(NULL)));
-
+
registerProperty(PROPERTY_TEXTEMPHASIS, PROPERTY_ID_TEXTEMPHASIS, PropertyAttribute::BOUND,
&m_nFontEmphasis, ::getCppuType(&m_nFontEmphasis));
@@ -257,7 +255,7 @@ void ODBTable::construct()
refreshColumns();
}
-// -----------------------------------------------------------------------------
+
::cppu::IPropertyArrayHelper* ODBTable::createArrayHelper( sal_Int32 _nId) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::createArrayHelper" );
@@ -279,18 +277,18 @@ void ODBTable::construct()
pIter->Attributes = PropertyAttribute::READONLY;
}
}
-
- return new ::cppu::OPropertyArrayHelper(aProps);
+
+ return new ::cppu::OPropertyArrayHelper(aProps);
}
-// -----------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper & SAL_CALL ODBTable::getInfoHelper()
-{
+
+::cppu::IPropertyArrayHelper & SAL_CALL ODBTable::getInfoHelper()
+{
return *ODBTable_PROP::getArrayHelper(isNew() ? 1 : 0);
}
-// -------------------------------------------------------------------------
+
// XServiceInfo
IMPLEMENT_SERVICE_INFO1(ODBTable, "com.sun.star.sdb.dbaccess.ODBTable", SERVICE_SDBCX_TABLE)
-// -------------------------------------------------------------------------
+
Any SAL_CALL ODBTable::queryInterface( const Type & rType ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::getInfoHelper" );
@@ -300,7 +298,7 @@ Any SAL_CALL ODBTable::queryInterface( const Type & rType ) throw(RuntimeExcepti
return Any();
return OTable_Base::queryInterface( rType);
}
-// -------------------------------------------------------------------------
+
Sequence< Type > SAL_CALL ODBTable::getTypes( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::getTypes" );
@@ -309,7 +307,7 @@ Sequence< Type > SAL_CALL ODBTable::getTypes( ) throw(RuntimeException)
Sequence< Type > aTypes(OTable_Base::getTypes());
::std::vector<Type> aOwnTypes;
- aOwnTypes.reserve(aTypes.getLength());
+ aOwnTypes.reserve(aTypes.getLength());
const Type* pIter = aTypes.getConstArray();
const Type* pEnd = pIter + aTypes.getLength();
@@ -318,12 +316,12 @@ Sequence< Type > SAL_CALL ODBTable::getTypes( ) throw(RuntimeException)
if( (*pIter != aRenameType || getRenameService().is()) && (*pIter != aAlterType || getAlterService().is()))
aOwnTypes.push_back(*pIter);
}
-
+
Type* pTypes = aOwnTypes.empty() ? 0 : &aOwnTypes[0];
return Sequence< Type >(pTypes, aOwnTypes.size());
}
+
// XRename,
-//------------------------------------------------------------------------------
void SAL_CALL ODBTable::rename( const ::rtl::OUString& _rNewName ) throw(SQLException, ElementExistException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::rename" );
@@ -338,7 +336,6 @@ void SAL_CALL ODBTable::rename( const ::rtl::OUString& _rNewName ) throw(SQLExce
}
// XAlterTable,
-//------------------------------------------------------------------------------
void SAL_CALL ODBTable::alterColumnByName( const ::rtl::OUString& _rName, const Reference< XPropertySet >& _rxDescriptor ) throw(SQLException, NoSuchElementException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::alterColumnByName" );
@@ -354,7 +351,7 @@ void SAL_CALL ODBTable::alterColumnByName( const ::rtl::OUString& _rName, const
getAlterService()->alterColumnByName(xTable,_rName,_rxDescriptor);
m_pColumns->refresh();
}
-// -----------------------------------------------------------------------------
+
sal_Int64 SAL_CALL ODBTable::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::getSomething" );
@@ -366,7 +363,7 @@ sal_Int64 SAL_CALL ODBTable::getSomething( const Sequence< sal_Int8 >& rId ) thr
return nRet;
}
-// -----------------------------------------------------------------------------
+
Sequence< sal_Int8 > ODBTable::getUnoTunnelImplementationId()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::getUnoTunnelImplementationId" );
@@ -382,13 +379,13 @@ Sequence< sal_Int8 > ODBTable::getUnoTunnelImplementationId()
}
return pId->getImplementationId();
}
-// -----------------------------------------------------------------------------
+
Reference< XPropertySet > ODBTable::createColumnDescriptor()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::createColumnDescriptor" );
return new OTableColumnDescriptor( true );
}
-// -----------------------------------------------------------------------------
+
sdbcx::OCollection* ODBTable::createColumns(const TStringVector& _rNames)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::createColumns" );
@@ -402,16 +399,16 @@ sdbcx::OCollection* ODBTable::createColumns(const TStringVector& _rNames)
pCol->setMediator( m_pColumnMediator.get() );
return pCol;
}
-// -----------------------------------------------------------------------------
+
sdbcx::OCollection* ODBTable::createKeys(const TStringVector& _rNames)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::createKeys" );
return new connectivity::OKeysHelper(this,m_aMutex,_rNames);
}
-// -----------------------------------------------------------------------------
+
sdbcx::OCollection* ODBTable::createIndexes(const TStringVector& _rNames)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::createIndexes" );
return new OIndexes(this,m_aMutex,_rNames,NULL);
}
-// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx
index c8a047ac1..b946c2202 100644
--- a/dbaccess/source/core/api/tablecontainer.cxx
+++ b/dbaccess/source/core/api/tablecontainer.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -60,12 +61,8 @@
#include "objectnameapproval.hxx"
#include <tools/string.hxx>
#include <rtl/logfile.hxx>
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
using namespace dbaccess;
using namespace dbtools;
@@ -99,9 +96,9 @@ namespace
if ( aState != PropertyState_DEFAULT_VALUE )
break;
}
- catch(Exception)
+ catch(const Exception&)
{
- OSL_ENSURE( 0, "lcl_isPropertySetDefaulted: Exception caught!" );
+ OSL_FAIL( "lcl_isPropertySetDefaulted: Exception caught!" );
}
}
return ( pIter == pEnd );
@@ -113,8 +110,8 @@ namespace
//= OTableContainer
//==========================================================================
DBG_NAME(OTableContainer)
-//------------------------------------------------------------------------------
-OTableContainer::OTableContainer(::cppu::OWeakObject& _rParent,
+
+OTableContainer::OTableContainer(::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,
const Reference< XConnection >& _xCon,
sal_Bool _bCase,
@@ -126,19 +123,16 @@ OTableContainer::OTableContainer(::cppu::OWeakObject& _rParent,
,m_xTableDefinitions(_xTableDefinitions)
,m_pTableMediator( NULL )
,m_bInDrop(sal_False)
-{
+{
DBG_CTOR(OTableContainer, NULL);
}
-//------------------------------------------------------------------------------
OTableContainer::~OTableContainer()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::OTableContainer" );
- // dispose();
DBG_DTOR(OTableContainer, NULL);
}
-// -----------------------------------------------------------------------------
void OTableContainer::removeMasterContainerListener()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::removeMasterContainerListener" );
@@ -153,19 +147,15 @@ void OTableContainer::removeMasterContainerListener()
}
}
-// -----------------------------------------------------------------------------
::rtl::OUString OTableContainer::getTableTypeRestriction() const
{
// no restriction at all (other than the ones provided externally)
return ::rtl::OUString();
}
-// -----------------------------------------------------------------------------
// XServiceInfo
-//------------------------------------------------------------------------------
IMPLEMENT_SERVICE_INFO2(OTableContainer, "com.sun.star.sdb.dbaccess.OTableContainer", SERVICE_SDBCX_CONTAINER, SERVICE_SDBCX_TABLES)
-// -----------------------------------------------------------------------------
namespace
{
void lcl_createDefintionObject(const ::rtl::OUString& _rName
@@ -192,12 +182,12 @@ void lcl_createDefintionObject(const ::rtl::OUString& _rName
}
Reference<XColumnsSupplier> xColumnsSupplier(_xTableDefinition,UNO_QUERY);
if ( xColumnsSupplier.is() )
- _xColumnDefinitions = xColumnsSupplier->getColumns();
+ _xColumnDefinitions = xColumnsSupplier->getColumns();
}
}
-// -------------------------------------------------------------------------
+
}
-// -------------------------------------------------------------------------
+
connectivity::sdbcx::ObjectType OTableContainer::createObject(const ::rtl::OUString& _rName)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::createObject" );
@@ -211,7 +201,7 @@ connectivity::sdbcx::ObjectType OTableContainer::createObject(const ::rtl::OUStr
Reference<XPropertySet> xTableDefinition;
Reference<XNameAccess> xColumnDefinitions;
lcl_createDefintionObject(_rName,m_xTableDefinitions,xTableDefinition,xColumnDefinitions,sal_False);
-
+
if ( xSup.is() )
{
ODBTableDecorator* pTable = new ODBTableDecorator( m_xConnection, xSup, ::dbtools::getNumberFormats( m_xConnection ) ,xColumnDefinitions);
@@ -223,8 +213,8 @@ connectivity::sdbcx::ObjectType OTableContainer::createObject(const ::rtl::OUStr
::rtl::OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(m_xMetaData,
_rName,
- sCatalog,
- sSchema,
+ sCatalog,
+ sSchema,
sTable,
::dbtools::eInDataManipulation);
Any aCatalog;
@@ -266,17 +256,17 @@ connectivity::sdbcx::ObjectType OTableContainer::createObject(const ::rtl::OUStr
if ( m_pTableMediator.is() )
m_pTableMediator->notifyElementCreated(_rName,xDest);
}
-
+
return xRet;
}
-// -----------------------------------------------------------------------------
+
Reference< XPropertySet > OTableContainer::createDescriptor()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::createDescriptor" );
Reference< XPropertySet > xRet;
- // frist we have to look if the master tables does support this
- // and if then create a table object as well with the master tables
+ // first we have to look if the master tables support this
+ // and if so then create a table object as well with the master tables
Reference<XColumnsSupplier > xMasterColumnsSup;
Reference<XDataDescriptorFactory> xDataFactory(m_xMasterContainer,UNO_QUERY);
if ( xDataFactory.is() && m_xMetaData.is() )
@@ -294,7 +284,7 @@ Reference< XPropertySet > OTableContainer::createDescriptor()
}
return xRet;
}
-// -----------------------------------------------------------------------------
+
// XAppend
ObjectType OTableContainer::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
@@ -335,7 +325,7 @@ ObjectType OTableContainer::appendObject( const ::rtl::OUString& _rForName, cons
}
}
}
- catch(Exception&)
+ catch(const Exception&)
{
throw;
}
@@ -376,13 +366,13 @@ ObjectType OTableContainer::appendObject( const ::rtl::OUString& _rForName, cons
, ::rtl::OUString(PROPERTY_ROW_HEIGHT), ::rtl::OUString(PROPERTY_TEXTCOLOR)
, ::rtl::OUString(PROPERTY_TEXTLINECOLOR), ::rtl::OUString(PROPERTY_TEXTEMPHASIS)
, ::rtl::OUString(PROPERTY_TEXTRELIEF) };
- Sequence< ::rtl::OUString> aNames(s_pTableProps,sizeof(s_pTableProps)/sizeof(s_pTableProps[0]));
+ Sequence< ::rtl::OUString> aNames(s_pTableProps,SAL_N_ELEMENTS(s_pTableProps));
if ( bModified || !lcl_isPropertySetDefaulted(aNames,xTableDefinition) )
::dbaccess::notifyDataSourceModified(m_xTableDefinitions,sal_True);
return createObject( _rForName );
}
-// -------------------------------------------------------------------------
+
// XDrop
void OTableContainer::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
{
@@ -417,9 +407,8 @@ void OTableContainer::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElement
if(!sComposedName.getLength())
::dbtools::throwFunctionSequenceException(static_cast<XTypeProvider*>(static_cast<OFilteredContainer*>(this)));
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP ");
-
- // #104282# OJ
+ ::rtl::OUString aSql(RTL_CONSTASCII_USTRINGPARAM("DROP "));
+
if ( bIsView ) // here we have a view
aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW "));
else
@@ -441,14 +430,14 @@ void OTableContainer::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElement
m_xTableDefinitions->removeByName(_sElementName);
}
}
- catch(Exception&)
+ catch(const Exception&)
{
m_bInDrop = sal_False;
throw;
}
m_bInDrop = sal_False;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OTableContainer::elementInserted( const ContainerEvent& Event ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::elementInserted" );
@@ -467,12 +456,12 @@ void SAL_CALL OTableContainer::elementInserted( const ContainerEvent& Event ) th
}
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OTableContainer::elementRemoved( const ContainerEvent& /*Event*/ ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::elementRemoved" );
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OTableContainer::elementReplaced( const ContainerEvent& Event ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::elementReplaced" );
@@ -481,26 +470,25 @@ void SAL_CALL OTableContainer::elementReplaced( const ContainerEvent& Event ) th
::rtl::OUString sOldComposedName,sNewComposedName;
Event.ReplacedElement >>= sOldComposedName;
Event.Accessor >>= sNewComposedName;
-
+
renameObject(sOldComposedName,sNewComposedName);
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OTableContainer::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::disposing" );
OFilteredContainer::disposing();
- // say our listeners goobye
+ // say goodbye to our listeners
m_xTableDefinitions = NULL;
m_pTableMediator = NULL;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OTableContainer::disposing( const ::com::sun::star::lang::EventObject& /*Source*/ ) throw (::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::disposing" );
}
-// -----------------------------------------------------------------------------
void OTableContainer::addMasterContainerListener()
{
try
@@ -513,4 +501,4 @@ void OTableContainer::addMasterContainerListener()
DBG_UNHANDLED_EXCEPTION();
}
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/viewcontainer.cxx b/dbaccess/source/core/api/viewcontainer.cxx
index 42412aa2e..3a2d9659b 100644
--- a/dbaccess/source/core/api/viewcontainer.cxx
+++ b/dbaccess/source/core/api/viewcontainer.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -72,7 +73,7 @@ using namespace ::connectivity::sdbcx;
//= OViewContainer
//==========================================================================
DBG_NAME(OViewContainer)
-//------------------------------------------------------------------------------
+
OViewContainer::OViewContainer(::cppu::OWeakObject& _rParent
,::osl::Mutex& _rMutex
,const Reference< XConnection >& _xCon
@@ -86,17 +87,14 @@ OViewContainer::OViewContainer(::cppu::OWeakObject& _rParent
DBG_CTOR(OViewContainer, NULL);
}
-//------------------------------------------------------------------------------
OViewContainer::~OViewContainer()
{
- // dispose();
DBG_DTOR(OViewContainer, NULL);
}
-//------------------------------------------------------------------------------
+
// XServiceInfo
-//------------------------------------------------------------------------------
IMPLEMENT_SERVICE_INFO2(OViewContainer, "com.sun.star.sdb.dbaccess.OViewContainer", SERVICE_SDBCX_CONTAINER, SERVICE_SDBCX_TABLES)
-// -----------------------------------------------------------------------------
+
ObjectType OViewContainer::createObject(const ::rtl::OUString& _rName)
{
ObjectType xProp;
@@ -108,8 +106,8 @@ ObjectType OViewContainer::createObject(const ::rtl::OUString& _rName)
::rtl::OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(m_xMetaData,
_rName,
- sCatalog,
- sSchema,
+ sCatalog,
+ sSchema,
sTable,
::dbtools::eInDataManipulation);
return new View(m_xConnection,
@@ -122,12 +120,12 @@ ObjectType OViewContainer::createObject(const ::rtl::OUString& _rName)
return xProp;
}
-// -----------------------------------------------------------------------------
+
Reference< XPropertySet > OViewContainer::createDescriptor()
{
Reference< XPropertySet > xRet;
- // frist we have to look if the master tables does support this
- // and if then create a table object as well with the master tables
+ // first we have to look if the master tables support this
+ // and if so then create a table object as well with the master tables
Reference<XColumnsSupplier > xMasterColumnsSup;
Reference<XDataDescriptorFactory> xDataFactory(m_xMasterContainer,UNO_QUERY);
if(xDataFactory.is())
@@ -137,7 +135,7 @@ Reference< XPropertySet > OViewContainer::createDescriptor()
return xRet;
}
-// -----------------------------------------------------------------------------
+
// XAppend
ObjectType OViewContainer::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
@@ -181,7 +179,7 @@ ObjectType OViewContainer::appendObject( const ::rtl::OUString& _rForName, const
return createObject( _rForName );
}
-// -------------------------------------------------------------------------
+
// XDrop
void OViewContainer::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
{
@@ -207,7 +205,7 @@ void OViewContainer::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementN
if(!sComposedName.getLength())
::dbtools::throwFunctionSequenceException(static_cast<XTypeProvider*>(static_cast<OFilteredContainer*>(this)));
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP VIEW ");
+ ::rtl::OUString aSql(RTL_CONSTASCII_USTRINGPARAM("DROP VIEW "));
aSql += sComposedName;
Reference<XConnection> xCon = m_xConnection;
OSL_ENSURE(xCon.is(),"Connection is null!");
@@ -221,7 +219,7 @@ void OViewContainer::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementN
}
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OViewContainer::elementInserted( const ContainerEvent& Event ) throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_rMutex);
@@ -238,7 +236,7 @@ void SAL_CALL OViewContainer::elementInserted( const ContainerEvent& Event ) thr
insertElement(sName,createObject(sName));
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OViewContainer::elementRemoved( const ContainerEvent& Event ) throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_rMutex);
@@ -258,17 +256,19 @@ void SAL_CALL OViewContainer::elementRemoved( const ContainerEvent& Event ) thro
m_bInElementRemoved = false;
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OViewContainer::disposing( const ::com::sun::star::lang::EventObject& /*Source*/ ) throw (RuntimeException)
{
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OViewContainer::elementReplaced( const ContainerEvent& /*Event*/ ) throw (RuntimeException)
{
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OViewContainer::getTableTypeRestriction() const
{
// no restriction at all (other than the ones provided externally)
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VIEW" ) );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
index ec71f05ac..255330b59 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,35 +29,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBA_COREDATAACESS_COMPONENTDEFINITION_HXX
#include "ComponentDefinition.hxx"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
#include "module_dba.hxx"
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
+#include <osl/diagnose.h>
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
#include <comphelper/property.hxx>
-#endif
-#ifndef _DBACORE_DEFINITIONCOLUMN_HXX_
#include "definitioncolumn.hxx"
-#endif
#include <cppuhelper/implbase1.hxx>
#include <comphelper/componentcontext.hxx>
@@ -75,10 +59,9 @@ extern "C" void SAL_CALL createRegistryInfo_OComponentDefinition()
static ::dba::OAutoRegistration< ::dbaccess::OComponentDefinition > aAutoRegistration;
}
-//........................................................................
namespace dbaccess
{
-//........................................................................
+
/// helper class for column property change events which holds the OComponentDefinition weak
typedef ::cppu::WeakImplHelper1 < XPropertyChangeListener > TColumnPropertyListener_BASE;
class OColumnPropertyListener : public TColumnPropertyListener_BASE
@@ -103,22 +86,22 @@ public:
}
void clear() { m_pComponent = NULL; }
};
-DBG_NAME(OComponentDefinition_Impl)
+DBG_NAME(OComponentDefinition_Impl)
OComponentDefinition_Impl::OComponentDefinition_Impl()
{
DBG_CTOR(OComponentDefinition_Impl,NULL);
}
-// -----------------------------------------------------------------------------
+
OComponentDefinition_Impl::~OComponentDefinition_Impl()
{
- DBG_DTOR(OComponentDefinition_Impl,NULL);
+ DBG_DTOR(OComponentDefinition_Impl,NULL);
}
//==========================================================================
//= OComponentDefinition
//==========================================================================
-//--------------------------------------------------------------------------
+
DBG_NAME(OComponentDefinition)
-//--------------------------------------------------------------------------
+
void OComponentDefinition::registerProperties()
{
m_xColumnPropertyListener = ::comphelper::ImplementationReference<OColumnPropertyListener,XPropertyChangeListener>(new OColumnPropertyListener(this));
@@ -138,7 +121,6 @@ void OComponentDefinition::registerProperties()
}
}
-//--------------------------------------------------------------------------
OComponentDefinition::OComponentDefinition(const Reference< XMultiServiceFactory >& _xORB
,const Reference< XInterface >& _xParentContainer
,const TContentPtr& _pImpl
@@ -150,13 +132,13 @@ OComponentDefinition::OComponentDefinition(const Reference< XMultiServiceFactory
DBG_CTOR(OComponentDefinition, NULL);
registerProperties();
}
-//--------------------------------------------------------------------------
+
OComponentDefinition::~OComponentDefinition()
{
DBG_DTOR(OComponentDefinition, NULL);
}
-//--------------------------------------------------------------------------
+
OComponentDefinition::OComponentDefinition( const Reference< XInterface >& _rxContainer
,const ::rtl::OUString& _rElementName
,const Reference< XMultiServiceFactory >& _xORB
@@ -170,47 +152,43 @@ OComponentDefinition::OComponentDefinition( const Reference< XInterface >& _rxCo
registerProperties();
m_pImpl->m_aProps.aTitle = _rElementName;
- DBG_ASSERT(m_pImpl->m_aProps.aTitle.getLength() != 0, "OComponentDefinition::OComponentDefinition : invalid name !");
+ OSL_ENSURE(m_pImpl->m_aProps.aTitle.getLength() != 0, "OComponentDefinition::OComponentDefinition : invalid name !");
}
-//--------------------------------------------------------------------------
IMPLEMENT_IMPLEMENTATION_ID(OComponentDefinition);
IMPLEMENT_GETTYPES3(OComponentDefinition,ODataSettings,OContentHelper,OComponentDefinition_BASE);
IMPLEMENT_FORWARD_XINTERFACE3( OComponentDefinition,OContentHelper,ODataSettings,OComponentDefinition_BASE)
-//--------------------------------------------------------------------------
+
::rtl::OUString OComponentDefinition::getImplementationName_static( ) throw(RuntimeException)
{
return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.dba.OComponentDefinition"));
}
-//--------------------------------------------------------------------------
::rtl::OUString SAL_CALL OComponentDefinition::getImplementationName( ) throw(RuntimeException)
{
return getImplementationName_static();
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > OComponentDefinition::getSupportedServiceNames_static( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aServices(2);
aServices.getArray()[0] = SERVICE_SDB_TABLEDEFINITION;
aServices.getArray()[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.Content"));
-
+
return aServices;
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL OComponentDefinition::getSupportedServiceNames( ) throw(RuntimeException)
{
return getSupportedServiceNames_static();
}
-//------------------------------------------------------------------------------
+
Reference< XInterface > OComponentDefinition::Create( const Reference< XComponentContext >& _rxContext )
{
::comphelper::ComponentContext aContext( _rxContext );
return *(new OComponentDefinition( aContext.getLegacyServiceFactory(), NULL, TContentPtr( new OComponentDefinition_Impl ) ) );
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OComponentDefinition::disposing()
{
OContentHelper::disposing();
@@ -219,26 +197,25 @@ void SAL_CALL OComponentDefinition::disposing()
m_xColumnPropertyListener->clear();
m_xColumnPropertyListener.dispose();
}
-// -----------------------------------------------------------------------------
+
IPropertyArrayHelper& OComponentDefinition::getInfoHelper()
{
return *getArrayHelper();
}
-//--------------------------------------------------------------------------
+
IPropertyArrayHelper* OComponentDefinition::createArrayHelper( ) const
{
Sequence< Property > aProps;
describeProperties(aProps);
return new OPropertyArrayHelper(aProps);
}
-//--------------------------------------------------------------------------
+
Reference< XPropertySetInfo > SAL_CALL OComponentDefinition::getPropertySetInfo( ) throw(RuntimeException)
{
Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
return xInfo;
}
-// -----------------------------------------------------------------------------
::rtl::OUString OComponentDefinition::determineContentType() const
{
return m_bTable
@@ -246,7 +223,6 @@ Reference< XPropertySetInfo > SAL_CALL OComponentDefinition::getPropertySetInfo(
: ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.org.openoffice.DatabaseCommandDefinition" ) );
}
-// -----------------------------------------------------------------------------
Reference< XNameAccess> OComponentDefinition::getColumns() throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -269,7 +245,7 @@ Reference< XNameAccess> OComponentDefinition::getColumns() throw (RuntimeExcepti
}
return m_pColumns.get();
}
-// -----------------------------------------------------------------------------
+
OColumn* OComponentDefinition::createColumn(const ::rtl::OUString& _rName) const
{
const OComponentDefinition_Impl& rDefinition( getDefinition() );
@@ -277,30 +253,30 @@ OColumn* OComponentDefinition::createColumn(const ::rtl::OUString& _rName) const
if ( aFind != rDefinition.end() )
{
aFind->second->addPropertyChangeListener(::rtl::OUString(),m_xColumnPropertyListener.getRef());
- return new OTableColumnWrapper( aFind->second, aFind->second, true );
+ return new OTableColumnWrapper( aFind->second, aFind->second, true );
}
- OSL_ENSURE( false, "OComponentDefinition::createColumn: is this a valid case?" );
+ OSL_FAIL( "OComponentDefinition::createColumn: is this a valid case?" );
// This here is the last place creating a OTableColumn, and somehow /me thinks it is not needed ...
return new OTableColumn( _rName );
}
-// -----------------------------------------------------------------------------
+
Reference< XPropertySet > OComponentDefinition::createColumnDescriptor()
{
return new OTableColumnDescriptor( true );
}
-// -----------------------------------------------------------------------------
+
void OComponentDefinition::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)
{
ODataSettings::setFastPropertyValue_NoBroadcast(nHandle,rValue);
notifyDataSourceModified();
}
-// -----------------------------------------------------------------------------
-void OComponentDefinition::columnDropped(const ::rtl::OUString& _sName)
+
+void OComponentDefinition::columnDropped(const ::rtl::OUString& _sName)
{
getDefinition().erase( _sName );
notifyDataSourceModified();
}
-// -----------------------------------------------------------------------------
+
void OComponentDefinition::columnAppended( const Reference< XPropertySet >& _rxSourceDescriptor )
{
::rtl::OUString sName;
@@ -322,7 +298,5 @@ void OComponentDefinition::columnAppended( const Reference< XPropertySet >& _rxS
notifyDataSourceModified();
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.hxx b/dbaccess/source/core/dataaccess/ComponentDefinition.hxx
index 3a535c5c0..6da15cd19 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.hxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,45 +29,19 @@
#ifndef DBA_COREDATAACESS_COMPONENTDEFINITION_HXX
#define DBA_COREDATAACESS_COMPONENTDEFINITION_HXX
-#ifndef _DBA_CORE_COMMANDBASE_HXX_
#include "commandbase.hxx"
-#endif
-#ifndef _COMPHELPER_PROPERTYCONTAINER_HXX_
#include <comphelper/propertycontainer.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XRENAME_HPP_
#include <com/sun/star/sdbcx/XRename.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
#include <comphelper/proparrhlp.hxx>
-#endif
-#ifndef _DBA_CORE_DATASETTINGS_HXX_
#include "datasettings.hxx"
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_
#include <com/sun/star/uno/XComponentContext.hpp>
-#endif
-#ifndef DBA_CONTENTHELPER_HXX
#include "ContentHelper.hxx"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _DBA_COREAPI_COLUMN_HXX_
#include <column.hxx>
-#endif
#include <comphelper/implementationreference.hxx>
#include <memory>
@@ -125,14 +100,14 @@ class OComponentDefinition :public OContentHelper
,public ::comphelper::OPropertyArrayUsageHelper< OComponentDefinition >
{
OComponentDefinition();
-
+
protected:
::std::auto_ptr< OColumns > m_pColumns;
- ::comphelper::ImplementationReference< OColumnPropertyListener,::com::sun::star::beans::XPropertyChangeListener>
+ ::comphelper::ImplementationReference< OColumnPropertyListener,::com::sun::star::beans::XPropertyChangeListener>
m_xColumnPropertyListener;
sal_Bool m_bTable;
- virtual ~OComponentDefinition();
+ virtual ~OComponentDefinition();
virtual void SAL_CALL disposing();
@@ -205,3 +180,5 @@ private:
//........................................................................
#endif // DBA_COREDATAACESS_COMPONENTDEFINITION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index 6f2e24aec..e05c1c472 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,54 +28,22 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBA_CONTENTHELPER_HXX
#include "ContentHelper.hxx"
-#endif
-#ifndef _UCBHELPER_CANCELCOMMANDEXECUTION_HXX_
#include <ucbhelper/cancelcommandexecution.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
#include <comphelper/property.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UCB_UNSUPPORTEDCOMMANDEXCEPTION_HPP_
#include <com/sun/star/ucb/UnsupportedCommandException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HPP_
#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_ILLEGALACCESSEXCEPTION_HPP_
#include <com/sun/star/lang/IllegalAccessException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_XOUTPUTSTREAM_HPP_
#include <com/sun/star/io/XOutputStream.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_XACTIVEDATASINK_HPP_
#include <com/sun/star/io/XActiveDataSink.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _UCBHELPER_PROPERTYVALUESET_HXX
#include <ucbhelper/propertyvalueset.hxx>
-#endif
-#ifndef _UCBHELPER_CONTENTIDENTIFIER_HXX
#include <ucbhelper/contentidentifier.hxx>
-#endif
-#ifndef DBA_UCPRESULTSET_HXX
#include "myucp_resultset.hxx"
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef DBACORE_SDBCORETOOLS_HXX
#include "sdbcoretools.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
namespace dbaccess
@@ -91,18 +60,16 @@ using namespace ::com::sun::star::container;
using namespace ::comphelper;
using namespace ::cppu;
-// -----------------------------------------------------------------------------
DBG_NAME(OContentHelper_Impl)
OContentHelper_Impl::OContentHelper_Impl()
{
- DBG_CTOR(OContentHelper_Impl,NULL);
+ DBG_CTOR(OContentHelper_Impl,NULL);
}
-// -----------------------------------------------------------------------------
+
OContentHelper_Impl::~OContentHelper_Impl()
{
- DBG_DTOR(OContentHelper_Impl,NULL);
+ DBG_DTOR(OContentHelper_Impl,NULL);
}
-// -----------------------------------------------------------------------------
OContentHelper::OContentHelper(const Reference< XMultiServiceFactory >& _xORB
,const Reference< XInterface >& _xParentContainer
@@ -117,21 +84,21 @@ OContentHelper::OContentHelper(const Reference< XMultiServiceFactory >& _xORB
,m_nCommandId(0)
{
}
-//--------------------------------------------------------------------------
+
void SAL_CALL OContentHelper::disposing()
{
::osl::MutexGuard aGuard(m_aMutex);
- // say our listeners goobye
+ // say goodbye to our listeners
EventObject aEvt(*this);
m_aContentListeners.disposeAndClear(aEvt);
m_xParentContainer = NULL;
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_SERVICE_INFO1(OContentHelper,"com.sun.star.comp.sdb.Content","com.sun.star.ucb.Content");
IMPLEMENT_IMPLEMENTATION_ID(OContentHelper)
-// -----------------------------------------------------------------------------
+
// XContent
Reference< XContentIdentifier > SAL_CALL OContentHelper::getIdentifier( ) throw (RuntimeException)
{
@@ -141,7 +108,7 @@ Reference< XContentIdentifier > SAL_CALL OContentHelper::getIdentifier( ) throw
aIdentifier.append( impl_getHierarchicalName( true ) );
return new ::ucbhelper::ContentIdentifier( m_aContext.getLegacyServiceFactory(), aIdentifier.makeStringAndClear() );
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OContentHelper::impl_getHierarchicalName( bool _includingRootContainer ) const
{
::rtl::OUStringBuffer aHierarchicalName( m_pImpl->m_aProps.aTitle );
@@ -168,7 +135,6 @@ Reference< XContentIdentifier > SAL_CALL OContentHelper::getIdentifier( ) throw
return sHierarchicalName;
}
-// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL OContentHelper::getContentType() throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -180,21 +146,20 @@ Reference< XContentIdentifier > SAL_CALL OContentHelper::getIdentifier( ) throw
return *m_pImpl->m_aProps.aContentType;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OContentHelper::addContentEventListener( const Reference< XContentEventListener >& _rxListener ) throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
if ( _rxListener.is() )
m_aContentListeners.addInterface(_rxListener);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OContentHelper::removeContentEventListener( const Reference< XContentEventListener >& _rxListener ) throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
if (_rxListener.is())
m_aContentListeners.removeInterface(_rxListener);
}
-// -----------------------------------------------------------------------------
// XCommandProcessor
sal_Int32 SAL_CALL OContentHelper::createCommandIdentifier( ) throw (RuntimeException)
@@ -203,7 +168,7 @@ sal_Int32 SAL_CALL OContentHelper::createCommandIdentifier( ) throw (RuntimeExc
// Just increase counter on every call to generate an identifier.
return ++m_nCommandId;
}
-// -----------------------------------------------------------------------------
+
Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*CommandId*/, const Reference< XCommandEnvironment >& Environment ) throw (Exception, CommandAbortedException, RuntimeException)
{
Any aRet;
@@ -216,7 +181,7 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma
Sequence< Property > Properties;
if ( !( aCommand.Argument >>= Properties ) )
{
- OSL_ENSURE( sal_False, "Wrong argument type!" );
+ OSL_FAIL( "Wrong argument type!" );
ucbhelper::cancelCommandExecution(
makeAny( IllegalArgumentException(
rtl::OUString(),
@@ -236,7 +201,7 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma
Sequence< PropertyValue > aProperties;
if ( !( aCommand.Argument >>= aProperties ) )
{
- OSL_ENSURE( sal_False, "Wrong argument type!" );
+ OSL_FAIL( "Wrong argument type!" );
ucbhelper::cancelCommandExecution(
makeAny( IllegalArgumentException(
rtl::OUString(),
@@ -248,7 +213,7 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma
if ( !aProperties.getLength() )
{
- OSL_ENSURE( sal_False, "No properties!" );
+ OSL_FAIL( "No properties!" );
ucbhelper::cancelCommandExecution(
makeAny( IllegalArgumentException(
rtl::OUString(),
@@ -277,7 +242,7 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma
// Unsupported command
//////////////////////////////////////////////////////////////////
- OSL_ENSURE( sal_False, "Content::execute - unsupported command!" );
+ OSL_FAIL( "Content::execute - unsupported command!" );
ucbhelper::cancelCommandExecution(
makeAny( UnsupportedCommandException(
@@ -289,11 +254,10 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma
return aRet;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OContentHelper::abort( sal_Int32 /*CommandId*/ ) throw (RuntimeException)
{
}
-// -----------------------------------------------------------------------------
// XPropertiesChangeNotifier
void SAL_CALL OContentHelper::addPropertiesChangeListener( const Sequence< ::rtl::OUString >& PropertyNames, const Reference< XPropertiesChangeListener >& Listener ) throw (RuntimeException)
@@ -317,7 +281,7 @@ void SAL_CALL OContentHelper::addPropertiesChangeListener( const Sequence< ::rtl
}
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OContentHelper::removePropertiesChangeListener( const Sequence< ::rtl::OUString >& PropertyNames, const Reference< XPropertiesChangeListener >& Listener ) throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -339,19 +303,18 @@ void SAL_CALL OContentHelper::removePropertiesChangeListener( const Sequence< ::
}
}
}
-// -----------------------------------------------------------------------------
// XPropertyContainer
-void SAL_CALL OContentHelper::addProperty( const ::rtl::OUString& /*Name*/, sal_Int16 /*Attributes*/, const Any& /*DefaultValue*/ ) throw (PropertyExistException, IllegalTypeException, IllegalArgumentException, RuntimeException)
+void SAL_CALL OContentHelper::addProperty( const ::rtl::OUString& /*Name*/, sal_Int16 /*Attributes*/, const Any& /*DefaultValue*/ ) throw (PropertyExistException, IllegalTypeException, IllegalArgumentException, RuntimeException)
{
- DBG_ERROR( "OContentHelper::addProperty: not implemented!" );
+ OSL_FAIL( "OContentHelper::addProperty: not implemented!" );
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OContentHelper::removeProperty( const ::rtl::OUString& /*Name*/ ) throw (UnknownPropertyException, NotRemoveableException, RuntimeException)
{
- DBG_ERROR( "OContentHelper::removeProperty: not implemented!" );
+ OSL_FAIL( "OContentHelper::removeProperty: not implemented!" );
}
-// -----------------------------------------------------------------------------
+
// XInitialization
void SAL_CALL OContentHelper::initialize( const Sequence< Any >& _aArguments ) throw(Exception, RuntimeException)
{
@@ -361,7 +324,7 @@ void SAL_CALL OContentHelper::initialize( const Sequence< Any >& _aArguments ) t
for(;pBegin != pEnd;++pBegin)
{
*pBegin >>= aValue;
- if ( aValue.Name.equalsAscii("Parent") )
+ if ( aValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Parent")) )
{
m_xParentContainer.set(aValue.Value,UNO_QUERY);
}
@@ -375,7 +338,7 @@ void SAL_CALL OContentHelper::initialize( const Sequence< Any >& _aArguments ) t
}
}
}
-// -----------------------------------------------------------------------------
+
Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue >& rValues,const Reference< XCommandEnvironment >& /*xEnv*/ )
{
osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex );
@@ -400,24 +363,27 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue
{
// Read-only property!
aRet[ n ] <<= IllegalAccessException(
- rtl::OUString::createFromAscii(
- "Property is read-only!" ),
+ ::rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("Property is read-only!")
+ ),
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) )
{
// Read-only property!
aRet[ n ] <<= IllegalAccessException(
- rtl::OUString::createFromAscii(
- "Property is read-only!" ),
+ ::rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("Property is read-only!")
+ ),
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) ) )
{
// Read-only property!
aRet[ n ] <<= IllegalAccessException(
- rtl::OUString::createFromAscii(
- "Property is read-only!" ),
+ ::rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("Property is read-only!")
+ ),
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) )
@@ -441,7 +407,7 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OContentHelper::setPropertyValues('Title'): caught an exception while renaming!" );
+ OSL_FAIL( "OContentHelper::setPropertyValues('Title'): caught an exception while renaming!" );
}
}
else
@@ -452,33 +418,25 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue
else
{
aRet[ n ] <<= IllegalTypeException(
- rtl::OUString::createFromAscii(
- "Property value has wrong type!" ),
+ ::rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("Property value has wrong type!")
+ ),
static_cast< cppu::OWeakObject * >( this ) );
}
}
- // @@@ Process other properties supported directly.
-#if 0
- else if ( rValue.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "xxxxxx" ) ) )
- {
- }
-#endif
else
{
aRet[ n ] <<= Exception(
- rtl::OUString::createFromAscii(
- "No property set for storing the value!" ),
+ ::rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("No property set for storing the value!")
+ ),
static_cast< cppu::OWeakObject * >( this ) );
}
}
if ( nChanged > 0 )
{
- // @@@ Save changes.
-// storeData();
-
notifyDataSourceModified();
aGuard.clear();
aChanges.realloc( nChanged );
@@ -487,7 +445,7 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue
return aRet;
}
-// -----------------------------------------------------------------------------
+
//=========================================================================
// static
Reference< XRow > OContentHelper::getPropertyValues( const Sequence< Property >& rProperties)
@@ -524,41 +482,33 @@ Reference< XRow > OContentHelper::getPropertyValues( const Sequence< Property >&
}
else
xRow->appendVoid(rProp);
-
- // @@@ Process other properties supported directly.
-#if 0
- else if ( rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "xxxxxx" ) ) )
- {
- }
-#endif
}
}
else
{
// Append all Core Properties.
xRow->appendString (
- Property( rtl::OUString::createFromAscii( "ContentType" ),
+ Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")),
-1,
getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
PropertyAttribute::BOUND
| PropertyAttribute::READONLY ),
getContentType() );
xRow->appendString (
- Property( rtl::OUString::createFromAscii( "Title" ),
+ Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title" )),
-1,
getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
PropertyAttribute::BOUND ),
m_pImpl->m_aProps.aTitle );
xRow->appendBoolean(
- Property( rtl::OUString::createFromAscii( "IsDocument" ),
+ Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")),
-1,
getCppuBooleanType(),
PropertyAttribute::BOUND
| PropertyAttribute::READONLY ),
m_pImpl->m_aProps.bIsDocument );
xRow->appendBoolean(
- Property( rtl::OUString::createFromAscii( "IsFolder" ),
+ Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")),
-1,
getCppuBooleanType(),
PropertyAttribute::BOUND
@@ -570,8 +520,7 @@ Reference< XRow > OContentHelper::getPropertyValues( const Sequence< Property >&
return Reference< XRow >( xRow.get() );
}
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
+
void OContentHelper::notifyPropertiesChange( const Sequence< PropertyChangeEvent >& evt ) const
{
@@ -595,7 +544,6 @@ void OContentHelper::notifyPropertiesChange( const Sequence< PropertyChangeEvent
typedef Sequence< PropertyChangeEvent > PropertyEventSequence;
typedef ::std::map< XPropertiesChangeListener*, PropertyEventSequence* > PropertiesEventListenerMap;
PropertiesEventListenerMap aListeners;
-
const PropertyChangeEvent* propertyChangeEvent = evt.getConstArray();
@@ -649,9 +597,8 @@ void OContentHelper::notifyPropertiesChange( const Sequence< PropertyChangeEvent
}
}
}
-// -----------------------------------------------------------------------------
+
// com::sun::star::lang::XUnoTunnel
-//------------------------------------------------------------------
sal_Int64 OContentHelper::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException)
{
if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
@@ -660,7 +607,6 @@ sal_Int64 OContentHelper::getSomething( const Sequence< sal_Int8 > & rId ) throw
return 0;
}
-// -----------------------------------------------------------------------------
OContentHelper* OContentHelper::getImplementation( const Reference< XInterface >& _rxComponent )
{
OContentHelper* pContent( NULL );
@@ -672,20 +618,18 @@ OContentHelper* OContentHelper::getImplementation( const Reference< XInterface >
return pContent;
}
-// -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OContentHelper::getParent( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
return m_xParentContainer;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OContentHelper::setParent( const Reference< XInterface >& _xParent ) throw (NoSupportException, RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
m_xParentContainer = _xParent;
}
-// -----------------------------------------------------------------------------
void OContentHelper::impl_rename_throw(const ::rtl::OUString& _sNewName,bool _bNotify )
{
osl::ClearableGuard< osl::Mutex > aGuard(m_aMutex);
@@ -701,9 +645,9 @@ void OContentHelper::impl_rename_throw(const ::rtl::OUString& _sNewName,bool _bN
aChanges[0].PropertyHandle = PROPERTY_ID_NAME;
aChanges[0].OldValue <<= m_pImpl->m_aProps.aTitle;
aChanges[0].NewValue <<= _sNewName;
-
+
aGuard.clear();
-
+
m_pImpl->m_aProps.aTitle = _sNewName;
if ( _bNotify )
notifyPropertiesChange( aChanges );
@@ -714,49 +658,18 @@ void OContentHelper::impl_rename_throw(const ::rtl::OUString& _sNewName,bool _bN
throw ElementExistException(_sNewName,*this);
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OContentHelper::rename( const ::rtl::OUString& newName ) throw (SQLException, ElementExistException, RuntimeException)
{
-
+
impl_rename_throw(newName);
- //Reference<XNameContainer> xNameCont(m_xParentContainer,UNO_QUERY);
- //if ( xNameCont.is() )
- //{
- // if ( xNameCont->hasByName(newName) )
- // throw ElementExistException(newName,*this);
-
- // try
- // {
- // if ( xNameCont->hasByName(m_pImpl->m_aProps.aTitle) )
- // xNameCont->removeByName(m_pImpl->m_aProps.aTitle);
-
- // m_pImpl->m_aProps.aTitle = newName;
- // xNameCont->insertByName(m_pImpl->m_aProps.aTitle,makeAny(Reference<XContent>(*this,UNO_QUERY)));
- // notifyDataSourceModified();
- // }
- // catch(IllegalArgumentException)
- // {
- // throw SQLException();
- // }
- // catch(NoSuchElementException)
- // {
- // throw SQLException();
- // }
- // catch(WrappedTargetException)
- // {
- // throw SQLException();
- // }
- //}
- //else
- // m_pImpl->m_aProps.aTitle = newName;
-
+
}
-// -----------------------------------------------------------------------------
+
void OContentHelper::notifyDataSourceModified()
{
::dbaccess::notifyDataSourceModified(m_xParentContainer,sal_True);
}
-//........................................................................
-} // namespace dbaccess
-//........................................................................
+} // namespace dbaccess
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 941653923..c9987df95 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -63,6 +64,7 @@
#include <sfx2/signaturestate.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <tools/errcode.hxx>
#include <tools/urlobj.hxx>
#include <unotools/sharedunocomponent.hxx>
@@ -89,38 +91,31 @@ using namespace ::com::sun::star::reflection;
using namespace ::com::sun::star::script;
using namespace ::cppu;
using namespace ::osl;
-using namespace ::vos;
using namespace ::dbtools;
using namespace ::comphelper;
namespace css = ::com::sun::star;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//============================================================
//= VosMutexFacade
//============================================================
-//------------------------------------------------------------------------
VosMutexFacade::VosMutexFacade( ::osl::Mutex& _rMutex )
:m_rMutex( _rMutex )
{
}
-//------------------------------------------------------------------------
void SAL_CALL VosMutexFacade::acquire()
{
m_rMutex.acquire();
}
-//------------------------------------------------------------------------
sal_Bool SAL_CALL VosMutexFacade::tryToAcquire()
{
return m_rMutex.tryToAcquire();
}
-//------------------------------------------------------------------------
void SAL_CALL VosMutexFacade::release()
{
m_rMutex.release();
@@ -200,7 +195,6 @@ private:
};
-//--------------------------------------------------------------------------
void DocumentStorageAccess::dispose()
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -227,7 +221,6 @@ void DocumentStorageAccess::dispose()
m_pModelImplementation = NULL;
}
-//--------------------------------------------------------------------------
Reference< XStorage > DocumentStorageAccess::impl_openSubStorage_nothrow( const ::rtl::OUString& _rStorageName, sal_Int32 _nDesiredMode )
{
OSL_ENSURE( _rStorageName.getLength(),"ODatabaseModelImpl::impl_openSubStorage_nothrow: Invalid storage name!" );
@@ -261,7 +254,6 @@ Reference< XStorage > DocumentStorageAccess::impl_openSubStorage_nothrow( const
return xStorage;
}
-//--------------------------------------------------------------------------
void DocumentStorageAccess::disposeStorages()
{
m_bDisposingSubStorages = true;
@@ -286,7 +278,6 @@ void DocumentStorageAccess::disposeStorages()
m_bDisposingSubStorages = false;
}
-//--------------------------------------------------------------------------
void DocumentStorageAccess::commitStorages() SAL_THROW(( IOException, RuntimeException ))
{
try
@@ -306,7 +297,6 @@ void DocumentStorageAccess::commitStorages() SAL_THROW(( IOException, RuntimeExc
}
}
-//--------------------------------------------------------------------------
bool DocumentStorageAccess::commitEmbeddedStorage( bool _bPreventRootCommits )
{
if ( _bPreventRootCommits )
@@ -331,7 +321,6 @@ bool DocumentStorageAccess::commitEmbeddedStorage( bool _bPreventRootCommits )
}
-//--------------------------------------------------------------------------
Reference< XStorage > SAL_CALL DocumentStorageAccess::getDocumentSubStorage( const ::rtl::OUString& aStorageName, ::sal_Int32 _nDesiredMode ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -345,7 +334,6 @@ Reference< XStorage > SAL_CALL DocumentStorageAccess::getDocumentSubStorage( con
return pos->second;
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL DocumentStorageAccess::getDocumentSubStoragesNames( ) throw (IOException, RuntimeException)
{
Reference< XStorage > xRootStor( m_pModelImplementation->getRootStorage() );
@@ -366,13 +354,11 @@ Sequence< ::rtl::OUString > SAL_CALL DocumentStorageAccess::getDocumentSubStorag
: Sequence< ::rtl::OUString >( &aNames[0], aNames.size() );
}
-//--------------------------------------------------------------------------
void SAL_CALL DocumentStorageAccess::preCommit( const css::lang::EventObject& /*aEvent*/ ) throw (Exception, RuntimeException)
{
// not interested in
}
-//--------------------------------------------------------------------------
void SAL_CALL DocumentStorageAccess::commited( const css::lang::EventObject& aEvent ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -396,19 +382,16 @@ void SAL_CALL DocumentStorageAccess::commited( const css::lang::EventObject& aEv
}
}
-//--------------------------------------------------------------------------
void SAL_CALL DocumentStorageAccess::preRevert( const css::lang::EventObject& /*aEvent*/ ) throw (Exception, RuntimeException)
{
// not interested in
}
-//--------------------------------------------------------------------------
void SAL_CALL DocumentStorageAccess::reverted( const css::lang::EventObject& /*aEvent*/ ) throw (RuntimeException)
{
// not interested in
}
-//--------------------------------------------------------------------------
void SAL_CALL DocumentStorageAccess::disposing( const css::lang::EventObject& Source ) throw ( RuntimeException )
{
OSL_ENSURE( Reference< XStorage >( Source.Source, UNO_QUERY ).is(), "DocumentStorageAccess::disposing: No storage? What's this?" );
@@ -431,7 +414,7 @@ void SAL_CALL DocumentStorageAccess::disposing( const css::lang::EventObject& So
//= ODatabaseModelImpl
//============================================================
DBG_NAME(ODatabaseModelImpl)
-//--------------------------------------------------------------------------
+
ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XMultiServiceFactory >& _rxFactory, ODatabaseContext& _rDBContext )
:m_xModel()
,m_xDataSource()
@@ -458,13 +441,12 @@ ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XMultiServiceFactory >&
{
// some kind of default
DBG_CTOR(ODatabaseModelImpl,NULL);
- m_sConnectURL = ::rtl::OUString::createFromAscii("jdbc:");
+ m_sConnectURL = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("jdbc:"));
m_aTableFilter.realloc(1);
- m_aTableFilter[0] = ::rtl::OUString::createFromAscii("%");
+ m_aTableFilter[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%"));
impl_construct_nothrow();
}
-//--------------------------------------------------------------------------
ODatabaseModelImpl::ODatabaseModelImpl(
const ::rtl::OUString& _rRegistrationName,
const Reference< XMultiServiceFactory >& _rxFactory,
@@ -498,13 +480,11 @@ ODatabaseModelImpl::ODatabaseModelImpl(
impl_construct_nothrow();
}
-//--------------------------------------------------------------------------
ODatabaseModelImpl::~ODatabaseModelImpl()
{
DBG_DTOR(ODatabaseModelImpl,NULL);
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::impl_construct_nothrow()
{
// create the property bag to hold the settings (also known as "Info" property)
@@ -565,10 +545,8 @@ void ODatabaseModelImpl::impl_construct_nothrow()
m_pDBContext->appendAtTerminateListener(*this);
}
-// -----------------------------------------------------------------------------
namespace
{
- // .........................................................................
::rtl::OUString lcl_getContainerStorageName_throw( ODatabaseModelImpl::ObjectType _eType )
{
const sal_Char* pAsciiName( NULL );
@@ -584,7 +562,6 @@ namespace
return ::rtl::OUString::createFromAscii( pAsciiName );
}
- // .........................................................................
bool lcl_hasObjectWithMacros_throw( const ODefinitionContainer_Impl& _rObjectDefinitions, const Reference< XStorage >& _rxContainerStorage )
{
bool bSomeDocHasMacros = false;
@@ -613,7 +590,6 @@ namespace
return bSomeDocHasMacros;
}
- // .........................................................................
bool lcl_hasObjectsWithMacros_nothrow( ODatabaseModelImpl& _rModel, const ODatabaseModelImpl::ObjectType _eType )
{
bool bSomeDocHasMacros = false;
@@ -647,7 +623,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
bool ODatabaseModelImpl::objectHasMacros( const Reference< XStorage >& _rxContainerStorage, const ::rtl::OUString& _rPersistentName )
{
OSL_PRECOND( _rxContainerStorage.is(), "ODatabaseModelImpl::objectHasMacros: this will crash!" );
@@ -670,7 +645,6 @@ bool ODatabaseModelImpl::objectHasMacros( const Reference< XStorage >& _rxContai
return bHasMacros;
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::reset()
{
m_bReadOnly = sal_False;
@@ -684,7 +658,7 @@ void ODatabaseModelImpl::reset()
m_pStorageAccess = NULL;
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseModelImpl::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(RuntimeException)
{
Reference<XConnection> xCon(Source.Source,UNO_QUERY);
@@ -707,10 +681,10 @@ void SAL_CALL ODatabaseModelImpl::disposing( const ::com::sun::star::lang::Event
}
else
{
- OSL_ENSURE( false, "ODatabaseModelImpl::disposing: where does this come from?" );
+ OSL_FAIL( "ODatabaseModelImpl::disposing: where does this come from?" );
}
}
-//------------------------------------------------------------------------------
+
void ODatabaseModelImpl::clearConnections()
{
OWeakConnectionArray aConnections;
@@ -737,7 +711,7 @@ void ODatabaseModelImpl::clearConnections()
m_pSharedConnectionManager = NULL;
m_xSharedConnectionManager = NULL;
}
-//------------------------------------------------------------------------------
+
void ODatabaseModelImpl::dispose()
{
// dispose the data source and the model
@@ -792,7 +766,7 @@ void ODatabaseModelImpl::dispose()
m_pStorageAccess = NULL;
}
}
-// -----------------------------------------------------------------------------
+
const Reference< XNumberFormatsSupplier > & ODatabaseModelImpl::getNumberFormatsSupplier()
{
if (!m_xNumberFormatsSupplier.is())
@@ -804,19 +778,17 @@ const Reference< XNumberFormatsSupplier > & ODatabaseModelImpl::getNumberFormats
m_xNumberFormatsSupplier.set(
m_aContext.createComponentWithArguments( "com.sun.star.util.NumberFormatsSupplier", aArguments ), UNO_QUERY_THROW );
- DBG_ASSERT(m_xNumberFormatsSupplier.is(), "ODatabaseModelImpl::getNumberFormatsSupplier : could not instantiate the formats supplier !");
+ OSL_ENSURE(m_xNumberFormatsSupplier.is(), "ODatabaseModelImpl::getNumberFormatsSupplier : could not instantiate the formats supplier !");
}
return m_xNumberFormatsSupplier;
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::setDocFileLocation( const ::rtl::OUString& i_rLoadedFrom )
{
ENSURE_OR_THROW( i_rLoadedFrom.getLength(), "invalid URL" );
m_sDocFileLocation = i_rLoadedFrom;
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::setResource( const ::rtl::OUString& i_rDocumentURL, const Sequence< PropertyValue >& _rArgs )
{
ENSURE_OR_THROW( i_rDocumentURL.getLength(), "invalid URL" );
@@ -841,7 +813,6 @@ void ODatabaseModelImpl::setResource( const ::rtl::OUString& i_rDocumentURL, con
impl_switchToLogicalURL( i_rDocumentURL );
}
-// -----------------------------------------------------------------------------
::comphelper::NamedValueCollection ODatabaseModelImpl::stripLoadArguments( const ::comphelper::NamedValueCollection& _rArguments )
{
OSL_ENSURE( !_rArguments.has( "Model" ), "ODatabaseModelImpl::stripLoadArguments: this is suspicious (1)!" );
@@ -853,18 +824,16 @@ void ODatabaseModelImpl::setResource( const ::rtl::OUString& i_rDocumentURL, con
return aMutableArgs;
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::disposeStorages() SAL_THROW(())
{
getDocumentStorageAccess()->disposeStorages();
}
-// -----------------------------------------------------------------------------
Reference< XSingleServiceFactory > ODatabaseModelImpl::createStorageFactory() const
{
return Reference< XSingleServiceFactory >( m_aContext.createComponent( "com.sun.star.embed.StorageFactory" ), UNO_QUERY_THROW );
}
-// -----------------------------------------------------------------------------
+
void ODatabaseModelImpl::commitRootStorage()
{
Reference< XStorage > xStorage( getOrCreateRootStorage() );
@@ -875,7 +844,7 @@ void ODatabaseModelImpl::commitRootStorage()
OSL_ENSURE( bSuccess || !xStorage.is(),
"ODatabaseModelImpl::commitRootStorage: could commit the storage!" );
}
-// -----------------------------------------------------------------------------
+
Reference< XStorage > ODatabaseModelImpl::getOrCreateRootStorage()
{
if ( !m_xDocumentStorage.is() )
@@ -924,7 +893,7 @@ Reference< XStorage > ODatabaseModelImpl::getOrCreateRootStorage()
}
return m_xDocumentStorage.getTyped();
}
-// -----------------------------------------------------------------------------
+
DocumentStorageAccess* ODatabaseModelImpl::getDocumentStorageAccess()
{
if ( !m_pStorageAccess )
@@ -935,7 +904,6 @@ DocumentStorageAccess* ODatabaseModelImpl::getDocumentStorageAccess()
return m_pStorageAccess;
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::modelIsDisposing( const bool _wasInitialized, ResetModelAccess )
{
m_xModel = Reference< XModel >();
@@ -949,19 +917,16 @@ void ODatabaseModelImpl::modelIsDisposing( const bool _wasInitialized, ResetMode
m_bDocumentInitialized = _wasInitialized;
}
-// -----------------------------------------------------------------------------
Reference< XDocumentSubStorageSupplier > ODatabaseModelImpl::getDocumentSubStorageSupplier()
{
return getDocumentStorageAccess();
}
-// -----------------------------------------------------------------------------
bool ODatabaseModelImpl::commitEmbeddedStorage( bool _bPreventRootCommits )
{
return getDocumentStorageAccess()->commitEmbeddedStorage( _bPreventRootCommits );
}
-// -----------------------------------------------------------------------------
bool ODatabaseModelImpl::commitStorageIfWriteable_ignoreErrors( const Reference< XStorage >& _rxStorage ) SAL_THROW(())
{
bool bSuccess = false;
@@ -975,7 +940,7 @@ bool ODatabaseModelImpl::commitStorageIfWriteable_ignoreErrors( const Reference<
}
return bSuccess;
}
-// -----------------------------------------------------------------------------
+
void ODatabaseModelImpl::setModified( sal_Bool _bModified )
{
if ( isModifyLocked() )
@@ -995,7 +960,6 @@ void ODatabaseModelImpl::setModified( sal_Bool _bModified )
}
}
-// -----------------------------------------------------------------------------
Reference<XDataSource> ODatabaseModelImpl::getOrCreateDataSource()
{
Reference<XDataSource> xDs = m_xDataSource;
@@ -1006,12 +970,12 @@ Reference<XDataSource> ODatabaseModelImpl::getOrCreateDataSource()
}
return xDs;
}
-// -----------------------------------------------------------------------------
+
Reference< XModel> ODatabaseModelImpl::getModel_noCreate() const
{
return m_xModel;
}
-// -----------------------------------------------------------------------------
+
Reference< XModel > ODatabaseModelImpl::createNewModel_deliverOwnership( bool _bInitialize )
{
Reference< XModel > xModel( m_xModel );
@@ -1041,7 +1005,7 @@ Reference< XModel > ODatabaseModelImpl::createNewModel_deliverOwnership( bool _b
// However, in case that the document is implicitly created by asking the data source for the document,
// then nobody would call the doc's attachResource. So, we do it here, to ensure it's in a proper
// state, fires all events, and so on.
- // #i105505# / 2009-10-02 / frank.schoenheit@sun.com
+ // #i105505#
xModel->attachResource( xModel->getURL(), m_aMediaDescriptor.getPropertyValues() );
}
@@ -1061,12 +1025,12 @@ Reference< XModel > ODatabaseModelImpl::createNewModel_deliverOwnership( bool _b
}
return xModel;
}
-// -----------------------------------------------------------------------------
+
oslInterlockedCount SAL_CALL ODatabaseModelImpl::acquire()
{
return osl_incrementInterlockedCount(&m_refCount);
}
-// -----------------------------------------------------------------------------
+
oslInterlockedCount SAL_CALL ODatabaseModelImpl::release()
{
if ( osl_decrementInterlockedCount(&m_refCount) == 0 )
@@ -1081,19 +1045,17 @@ oslInterlockedCount SAL_CALL ODatabaseModelImpl::release()
}
return m_refCount;
}
-// -----------------------------------------------------------------------------
+
void ODatabaseModelImpl::commitStorages() SAL_THROW(( IOException, RuntimeException ))
{
getDocumentStorageAccess()->commitStorages();
}
-// -----------------------------------------------------------------------------
Reference< XStorage > ODatabaseModelImpl::getStorage( const ObjectType _eType, const sal_Int32 _nDesiredMode )
{
return getDocumentStorageAccess()->getDocumentSubStorage( getObjectContainerStorageName( _eType ), _nDesiredMode );
}
-// -----------------------------------------------------------------------------
const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings()
{
static const AsciiPropertyValue aKnownSettings[] =
@@ -1167,13 +1129,12 @@ const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings()
AsciiPropertyValue( "Reports", makeAny( ::rtl::OUString() ) ),
AsciiPropertyValue( "KeyAlterationServiceName", makeAny( ::rtl::OUString() ) ),
AsciiPropertyValue( "IndexAlterationServiceName", makeAny( ::rtl::OUString() ) ),
-
+
AsciiPropertyValue()
};
return aKnownSettings;
}
-// -----------------------------------------------------------------------------
TContentPtr& ODatabaseModelImpl::getObjectContainer( ObjectType _eType )
{
OSL_PRECOND( _eType >= E_FORM && _eType <= E_TABLE, "ODatabaseModelImpl::getObjectContainer: illegal index!" );
@@ -1188,20 +1149,17 @@ TContentPtr& ODatabaseModelImpl::getObjectContainer( ObjectType _eType )
return rContentPtr;
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::revokeDataSource() const
{
if ( m_pDBContext && m_sDocumentURL.getLength() )
m_pDBContext->revokeDatabaseDocument( *this );
}
-// -----------------------------------------------------------------------------
bool ODatabaseModelImpl::adjustMacroMode_AutoReject()
{
return m_aMacroMode.adjustMacroMode( NULL );
}
-// -----------------------------------------------------------------------------
bool ODatabaseModelImpl::checkMacrosOnLoading()
{
Reference< XInteractionHandler > xInteraction;
@@ -1209,13 +1167,11 @@ bool ODatabaseModelImpl::checkMacrosOnLoading()
return m_aMacroMode.checkMacrosOnLoading( xInteraction );
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::resetMacroExecutionMode()
{
m_aMacroMode = ::sfx2::DocumentMacroMode( *this );
}
-// -----------------------------------------------------------------------------
Reference< XStorageBasedLibraryContainer > ODatabaseModelImpl::getLibraryContainer( bool _bScript )
{
Reference< XStorageBasedLibraryContainer >& rxContainer( _bScript ? m_xBasicLibraries : m_xDialogLibraries );
@@ -1251,7 +1207,6 @@ Reference< XStorageBasedLibraryContainer > ODatabaseModelImpl::getLibraryContain
return rxContainer;
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::storeLibraryContainersTo( const Reference< XStorage >& _rxToRootStorage )
{
if ( m_xBasicLibraries.is() )
@@ -1261,7 +1216,6 @@ void ODatabaseModelImpl::storeLibraryContainersTo( const Reference< XStorage >&
m_xDialogLibraries->storeLibrariesToStorage( _rxToRootStorage );
}
-// -----------------------------------------------------------------------------
Reference< XStorage > ODatabaseModelImpl::switchToStorage( const Reference< XStorage >& _rxNewRootStorage )
{
if ( !_rxNewRootStorage.is() )
@@ -1270,12 +1224,11 @@ Reference< XStorage > ODatabaseModelImpl::switchToStorage( const Reference< XSto
return impl_switchToStorage_throw( _rxNewRootStorage );
}
-// -----------------------------------------------------------------------------
namespace
{
void lcl_modifyListening( ::sfx2::IModifiableDocument& _rDocument,
const Reference< XStorage >& _rxStorage, ::rtl::Reference< ::sfx2::DocumentStorageModifyListener >& _inout_rListener,
- ::vos::IMutex& _rMutex, bool _bListen )
+ ::osl::SolarMutex& _rMutex, bool _bListen )
{
Reference< XModifiable > xModify( _rxStorage, UNO_QUERY );
OSL_ENSURE( xModify.is() || !_rxStorage.is(), "lcl_modifyListening: storage can't notify us!" );
@@ -1299,7 +1252,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
namespace
{
static void lcl_rebaseScriptStorage_throw( const Reference< XStorageBasedLibraryContainer >& _rxContainer,
@@ -1315,7 +1267,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
Reference< XStorage > ODatabaseModelImpl::impl_switchToStorage_throw( const Reference< XStorage >& _rxNewRootStorage )
{
// stop listening for modifications at the old storage
@@ -1337,7 +1288,6 @@ Reference< XStorage > ODatabaseModelImpl::impl_switchToStorage_throw( const Refe
return m_xDocumentStorage.getTyped();
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::impl_switchToLogicalURL( const ::rtl::OUString& i_rDocumentURL )
{
if ( i_rDocumentURL == m_sDocumentURL )
@@ -1374,13 +1324,11 @@ void ODatabaseModelImpl::impl_switchToLogicalURL( const ::rtl::OUString& i_rDocu
}
}
-// -----------------------------------------------------------------------------
::rtl::OUString ODatabaseModelImpl::getObjectContainerStorageName( const ObjectType _eType )
{
return lcl_getContainerStorageName_throw( _eType );
}
-// -----------------------------------------------------------------------------
sal_Int16 ODatabaseModelImpl::getCurrentMacroExecMode() const
{
sal_Int16 nCurrentMode = MacroExecMode::NEVER_EXECUTE;
@@ -1395,14 +1343,12 @@ sal_Int16 ODatabaseModelImpl::getCurrentMacroExecMode() const
return nCurrentMode;
}
-// -----------------------------------------------------------------------------
sal_Bool ODatabaseModelImpl::setCurrentMacroExecMode( sal_uInt16 nMacroMode )
{
m_aMediaDescriptor.put( "MacroExecutionMode", nMacroMode );
return sal_True;
}
-// -----------------------------------------------------------------------------
::rtl::OUString ODatabaseModelImpl::getDocumentLocation() const
{
return getURL();
@@ -1414,7 +1360,6 @@ sal_Bool ODatabaseModelImpl::setCurrentMacroExecMode( sal_uInt16 nMacroMode )
// this folder is considered to be secure. So, the document URL needs to be used to decide about the security.
}
-// -----------------------------------------------------------------------------
Reference< XStorage > ODatabaseModelImpl::getZipStorageToSign()
{
// we do not support signing the scripting storages, so we're allowed to
@@ -1422,7 +1367,6 @@ Reference< XStorage > ODatabaseModelImpl::getZipStorageToSign()
return Reference< XStorage >();
}
-// -----------------------------------------------------------------------------
ODatabaseModelImpl::EmbeddedMacros ODatabaseModelImpl::determineEmbeddedMacros()
{
if ( !m_aEmbeddedMacros )
@@ -1445,58 +1389,48 @@ ODatabaseModelImpl::EmbeddedMacros ODatabaseModelImpl::determineEmbeddedMacros()
return *m_aEmbeddedMacros;
}
-// -----------------------------------------------------------------------------
sal_Bool ODatabaseModelImpl::documentStorageHasMacros() const
{
const_cast< ODatabaseModelImpl* >( this )->determineEmbeddedMacros();
return ( *m_aEmbeddedMacros != eNoMacros );
}
-// -----------------------------------------------------------------------------
Reference< XEmbeddedScripts > ODatabaseModelImpl::getEmbeddedDocumentScripts() const
{
return Reference< XEmbeddedScripts >( getModel_noCreate(), UNO_QUERY );
}
-// -----------------------------------------------------------------------------
sal_Int16 ODatabaseModelImpl::getScriptingSignatureState()
{
// no support for signatures at the moment
return SIGNATURESTATE_NOSIGNATURES;
}
-// -----------------------------------------------------------------------------
sal_Bool ODatabaseModelImpl::hasTrustedScriptingSignature( sal_Bool /*bAllowUIToAddAuthor*/ )
{
// no support for signatures at the moment
return sal_False;
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::showBrokenSignatureWarning( const Reference< XInteractionHandler >& /*_rxInteraction*/ ) const
{
- OSL_ENSURE( false, "ODatabaseModelImpl::showBrokenSignatureWarning: signatures can't be broken - we do not support them!" );
+ OSL_FAIL( "ODatabaseModelImpl::showBrokenSignatureWarning: signatures can't be broken - we do not support them!" );
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::storageIsModified()
{
setModified( sal_True );
}
-// -----------------------------------------------------------------------------
ModelDependentComponent::ModelDependentComponent( const ::rtl::Reference< ODatabaseModelImpl >& _model )
:m_pImpl( _model )
,m_aMutex( _model->getSharedMutex() )
{
}
-// -----------------------------------------------------------------------------
ModelDependentComponent::~ModelDependentComponent()
{
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx
index 36fdc427e..78247ea9c 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.hxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -80,7 +81,8 @@
#include <sfx2/docstoragemodifylistener.hxx>
#include <tools/string.hxx>
#include <unotools/sharedunocomponent.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
+#include <rtl/ref.hxx>
#include <memory>
@@ -139,7 +141,7 @@ class OSharedConnectionManager;
//============================================================
/** a class which provides an IMutex interface to an OSL-based mutex
*/
-class VosMutexFacade : public ::vos::IMutex
+class VosMutexFacade : public ::osl::SolarMutex
{
public:
/** beware of life time: the mutex you pass here must live as least as long
@@ -148,7 +150,7 @@ public:
VosMutexFacade( ::osl::Mutex& _rMutex );
// IMutex
- virtual void SAL_CALL acquire();
+ virtual void SAL_CALL acquire();
virtual sal_Bool SAL_CALL tryToAcquire();
virtual void SAL_CALL release();
@@ -479,7 +481,7 @@ public:
if any of the invoked operations does so
*/
::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >
- switchToStorage(
+ switchToStorage(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _rxNewRootStorage
);
@@ -562,7 +564,7 @@ public:
{
return getMutex();
}
- inline ::rtl::Reference< ODatabaseModelImpl > getImpl( GuardAccess )
+ inline ::rtl::Reference< ODatabaseModelImpl > getImpl( GuardAccess ) const
{
return m_pImpl;
}
@@ -571,7 +573,7 @@ public:
inline void checkDisposed() const
{
if ( !m_pImpl.is() )
- throw ::com::sun::star::lang::DisposedException( ::rtl::OUString::createFromAscii( "Component is already disposed." ), getThis() );
+ throw ::com::sun::star::lang::DisposedException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Component is already disposed.")), getThis() );
}
inline void lockModify()
@@ -639,3 +641,4 @@ public:
#endif // _DBA_COREDATAACCESS_DATALINK_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/SharedConnection.cxx b/dbaccess/source/core/dataaccess/SharedConnection.cxx
index e29377636..7f2cad014 100644
--- a/dbaccess/source/core/dataaccess/SharedConnection.cxx
+++ b/dbaccess/source/core/dataaccess/SharedConnection.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,12 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBA_CORE_SHARED_CONNECTION_HXX
#include "SharedConnection.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
namespace dbaccess
@@ -41,148 +38,132 @@ namespace dbaccess
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
-// using namespace ::com::sun::star::reflection;
using namespace connectivity;
DBG_NAME(OSharedConnection)
OSharedConnection::OSharedConnection(Reference< XAggregation >& _rxProxyConnection)
: OSharedConnection_BASE(m_aMutex)
{
- DBG_CTOR(OSharedConnection,NULL);
+ DBG_CTOR(OSharedConnection,NULL);
setDelegation(_rxProxyConnection,m_refCount);
}
-// -----------------------------------------------------------------------------
+
OSharedConnection::~OSharedConnection()
{
- DBG_DTOR(OSharedConnection,NULL);
+ DBG_DTOR(OSharedConnection,NULL);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OSharedConnection::disposing(void)
{
OSharedConnection_BASE::disposing();
OConnectionWrapper::disposing();
}
-// -----------------------------------------------------------------------------
+
Reference< XStatement > SAL_CALL OSharedConnection::createStatement( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->createStatement();
}
-// --------------------------------------------------------------------------------
+
Reference< XPreparedStatement > SAL_CALL OSharedConnection::prepareStatement( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->prepareStatement(sql);
}
-// --------------------------------------------------------------------------------
+
Reference< XPreparedStatement > SAL_CALL OSharedConnection::prepareCall( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->prepareCall(sql);
}
-// --------------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OSharedConnection::nativeSQL( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->nativeSQL(sql);
}
-// --------------------------------------------------------------------------------
+
sal_Bool SAL_CALL OSharedConnection::getAutoCommit( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->getAutoCommit();
}
-// --------------------------------------------------------------------------------
+
void SAL_CALL OSharedConnection::commit( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
m_xConnection->commit();
}
-// --------------------------------------------------------------------------------
+
void SAL_CALL OSharedConnection::rollback( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
m_xConnection->rollback();
}
-// --------------------------------------------------------------------------------
+
sal_Bool SAL_CALL OSharedConnection::isClosed( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
if ( !m_xConnection.is() )
return sal_True;
-
+
return m_xConnection->isClosed();
}
-// --------------------------------------------------------------------------------
+
Reference< XDatabaseMetaData > SAL_CALL OSharedConnection::getMetaData( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
+
return m_xConnection->getMetaData();
}
-// --------------------------------------------------------------------------------
+
sal_Bool SAL_CALL OSharedConnection::isReadOnly( ) throw(SQLException, RuntimeException)
-{
+{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->isReadOnly();
}
-// --------------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OSharedConnection::getCatalog( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->getCatalog();
}
-// --------------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OSharedConnection::getTransactionIsolation( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->getTransactionIsolation();
}
-// --------------------------------------------------------------------------------
+
Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OSharedConnection::getTypeMap( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->getTypeMap();
}
-// -----------------------------------------------------------------------------
-//........................................................................
} // namespace dbaccess
-//........................................................................
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/SharedConnection.hxx b/dbaccess/source/core/dataaccess/SharedConnection.hxx
index 2eec3b7bb..4d21609d8 100644
--- a/dbaccess/source/core/dataaccess/SharedConnection.hxx
+++ b/dbaccess/source/core/dataaccess/SharedConnection.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,48 +28,20 @@
#ifndef DBA_CORE_SHARED_CONNECTION_HXX
#define DBA_CORE_SHARED_CONNECTION_HXX
-#ifndef _CONNECTIVITY_CONNECTIONWRAPPER_HXX_
#include "connectivity/ConnectionWrapper.hxx"
-#endif
-#ifndef _CPPUHELPER_COMPONENT_HXX_
#include <cppuhelper/component.hxx>
-#endif
-#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
#include <connectivity/CommonTools.hxx>
-#endif
-#ifndef _CPPUHELPER_COMPBASE1_HXX_
#include <cppuhelper/compbase1.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XWARNINGSSUPPLIER_HPP_
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_SQLWARNING_HPP_
#include <com/sun/star/sdbc/SQLWarning.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSERFACTORY_HPP_
#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XCOMMANDPREPARATION_HPP_
#include <com/sun/star/sdb/XCommandPreparation.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XVIEWSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XQUERIESSUPPLIER_HPP_
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
namespace dbaccess
@@ -99,10 +72,10 @@ namespace dbaccess
virtual void SAL_CALL release() throw() { OSharedConnection_BASE::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException)
{
- return ::comphelper::concatSequences(
- OSharedConnection_BASE::getTypes(),
+ return ::comphelper::concatSequences(
+ OSharedConnection_BASE::getTypes(),
OSharedConnection_BASE2::getTypes()
- );
+ );
}
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& _rType ) throw (::com::sun::star::uno::RuntimeException)
@@ -112,21 +85,20 @@ namespace dbaccess
aReturn = OSharedConnection_BASE2::queryInterface(_rType);
return aReturn;
}
- // --------------------------------------------------------------------------------
+
// XCloseable
virtual void SAL_CALL close( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
{
::osl::MutexGuard aGuard( m_aMutex );
::connectivity::checkDisposed(rBHelper.bDisposed);
-
}
dispose();
}
// XConnection
virtual void SAL_CALL setAutoCommit( sal_Bool /*autoCommit*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
+ {
throw ::com::sun::star::sdbc::SQLException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("This call is not allowed when sharing connections.")),*this,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S10000")),0,::com::sun::star::uno::Any());
}
virtual void SAL_CALL setReadOnly( sal_Bool /*readOnly*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
@@ -160,10 +132,13 @@ namespace dbaccess
virtual sal_Int32 SAL_CALL getTransactionIsolation( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTypeMap( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
};
-
-//........................................................................
+
+#ifdef IMPLEMENT_GET_IMPLEMENTATION_ID
+ IMPLEMENT_GET_IMPLEMENTATION_ID( OSharedConnection );
+#endif
+
} // namespace dbaccess
-//........................................................................
-#endif // DBA_CORE_SHARED_CONNECTION_HXX
+#endif // DBA_CORE_SHARED_CONNECTION_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
index e68794789..9038df36c 100644
--- a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,40 +29,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_CORE_BOOKMARKCONTAINER_HXX_
#include "bookmarkcontainer.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _DBA_CORE_RESOURCE_HXX_
#include "core_resource.hxx"
-#endif
-#ifndef _DBA_CORE_RESOURCE_HRC_
#include "core_resource.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
+#include <osl/diagnose.h>
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _COMPHELPER_ENUMHELPER_HXX_
#include <comphelper/enumhelper.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_
#include <com/sun/star/lang/XComponent.hpp>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -71,16 +51,14 @@ using namespace ::osl;
using namespace ::comphelper;
using namespace ::cppu;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OBookmarkContainer
//==========================================================================
DBG_NAME(OBookmarkContainer)
-//--------------------------------------------------------------------------
+
OBookmarkContainer::OBookmarkContainer(OWeakObject& _rParent, Mutex& _rMutex)
:m_rParent(_rParent)
,m_aContainerListeners(_rMutex)
@@ -89,12 +67,11 @@ OBookmarkContainer::OBookmarkContainer(OWeakObject& _rParent, Mutex& _rMutex)
DBG_CTOR(OBookmarkContainer, NULL);
}
-//--------------------------------------------------------------------------
void OBookmarkContainer::dispose()
{
MutexGuard aGuard(m_rMutex);
- // say our listeners goobye
+ // say goodbye to our listeners
EventObject aEvt(*this);
m_aContainerListeners.disposeAndClear(aEvt);
@@ -103,32 +80,27 @@ void OBookmarkContainer::dispose()
m_aBookmarks.clear();
}
-//--------------------------------------------------------------------------
void SAL_CALL OBookmarkContainer::acquire( ) throw()
{
m_rParent.acquire();
}
-//--------------------------------------------------------------------------
void SAL_CALL OBookmarkContainer::release( ) throw()
{
m_rParent.release();
}
-//--------------------------------------------------------------------------
OBookmarkContainer::~OBookmarkContainer()
{
DBG_DTOR(OBookmarkContainer, NULL);
}
// XServiceInfo
-//--------------------------------------------------------------------------
::rtl::OUString SAL_CALL OBookmarkContainer::getImplementationName( ) throw(RuntimeException)
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.dba.OBookmarkContainer");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.dba.OBookmarkContainer"));
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OBookmarkContainer::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -136,16 +108,14 @@ sal_Bool SAL_CALL OBookmarkContainer::supportsService( const ::rtl::OUString& _r
return findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL OBookmarkContainer::getSupportedServiceNames( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aReturn(1);
- aReturn.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.DefinitionContainer");
+ aReturn.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.DefinitionContainer"));
return aReturn;
}
// XNameContainer
-//--------------------------------------------------------------------------
void SAL_CALL OBookmarkContainer::insertByName( const ::rtl::OUString& _rName, const Any& aElement ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -175,7 +145,6 @@ void SAL_CALL OBookmarkContainer::insertByName( const ::rtl::OUString& _rName, c
}
}
-//--------------------------------------------------------------------------
void SAL_CALL OBookmarkContainer::removeByName( const ::rtl::OUString& _rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{
::rtl::OUString sOldBookmark;
@@ -208,7 +177,6 @@ void SAL_CALL OBookmarkContainer::removeByName( const ::rtl::OUString& _rName )
}
// XNameReplace
-//--------------------------------------------------------------------------
void SAL_CALL OBookmarkContainer::replaceByName( const ::rtl::OUString& _rName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
{
ClearableMutexGuard aGuard(m_rMutex);
@@ -244,7 +212,6 @@ void SAL_CALL OBookmarkContainer::replaceByName( const ::rtl::OUString& _rName,
}
}
-//--------------------------------------------------------------------------
void SAL_CALL OBookmarkContainer::addContainerListener( const Reference< XContainerListener >& _rxListener ) throw(RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -252,7 +219,6 @@ void SAL_CALL OBookmarkContainer::addContainerListener( const Reference< XContai
m_aContainerListeners.addInterface(_rxListener);
}
-//--------------------------------------------------------------------------
void SAL_CALL OBookmarkContainer::removeContainerListener( const Reference< XContainerListener >& _rxListener ) throw(RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -261,7 +227,6 @@ void SAL_CALL OBookmarkContainer::removeContainerListener( const Reference< XCon
}
// XElementAccess
-//--------------------------------------------------------------------------
Type SAL_CALL OBookmarkContainer::getElementType( ) throw (RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -269,7 +234,6 @@ Type SAL_CALL OBookmarkContainer::getElementType( ) throw (RuntimeException)
return ::getCppuType( static_cast< ::rtl::OUString* >(NULL) );
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OBookmarkContainer::hasElements( ) throw (RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -278,7 +242,6 @@ sal_Bool SAL_CALL OBookmarkContainer::hasElements( ) throw (RuntimeException)
}
// XEnumerationAccess
-//--------------------------------------------------------------------------
Reference< XEnumeration > SAL_CALL OBookmarkContainer::createEnumeration( ) throw(RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -286,7 +249,6 @@ Reference< XEnumeration > SAL_CALL OBookmarkContainer::createEnumeration( ) thr
return new ::comphelper::OEnumerationByIndex(static_cast<XIndexAccess*>(this));
}
-//--------------------------------------------------------------------------
// XIndexAccess
sal_Int32 SAL_CALL OBookmarkContainer::getCount( ) throw(RuntimeException)
{
@@ -295,7 +257,6 @@ sal_Int32 SAL_CALL OBookmarkContainer::getCount( ) throw(RuntimeException)
return m_aBookmarks.size();
}
-//--------------------------------------------------------------------------
Any SAL_CALL OBookmarkContainer::getByIndex( sal_Int32 _nIndex ) throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -307,7 +268,6 @@ Any SAL_CALL OBookmarkContainer::getByIndex( sal_Int32 _nIndex ) throw(IndexOutO
return makeAny(m_aBookmarksIndexed[_nIndex]->second);
}
-//--------------------------------------------------------------------------
Any SAL_CALL OBookmarkContainer::getByName( const ::rtl::OUString& _rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -319,7 +279,6 @@ Any SAL_CALL OBookmarkContainer::getByName( const ::rtl::OUString& _rName ) thro
return makeAny(m_aBookmarks[_rName]);
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL OBookmarkContainer::getElementNames( ) throw(RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -339,7 +298,6 @@ Sequence< ::rtl::OUString > SAL_CALL OBookmarkContainer::getElementNames( ) thr
return aNames;
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OBookmarkContainer::hasByName( const ::rtl::OUString& _rName ) throw(RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -348,7 +306,6 @@ sal_Bool SAL_CALL OBookmarkContainer::hasByName( const ::rtl::OUString& _rName )
return checkExistence(_rName);
}
-//--------------------------------------------------------------------------
void OBookmarkContainer::implRemove(const ::rtl::OUString& _rName)
{
MutexGuard aGuard(m_rMutex);
@@ -373,7 +330,7 @@ void OBookmarkContainer::implRemove(const ::rtl::OUString& _rName)
if (m_aBookmarks.end() == aMapPos)
{
- DBG_ERROR("OBookmarkContainer::implRemove: inconsistence!");
+ OSL_FAIL("OBookmarkContainer::implRemove: inconsistence!");
return;
}
@@ -381,7 +338,6 @@ void OBookmarkContainer::implRemove(const ::rtl::OUString& _rName)
m_aBookmarks.erase(aMapPos);
}
-//--------------------------------------------------------------------------
void OBookmarkContainer::implAppend(const ::rtl::OUString& _rName, const ::rtl::OUString& _rDocumentLocation)
{
MutexGuard aGuard(m_rMutex);
@@ -390,32 +346,27 @@ void OBookmarkContainer::implAppend(const ::rtl::OUString& _rName, const ::rtl::
m_aBookmarksIndexed.push_back(m_aBookmarks.insert( MapString2String::value_type(_rName,_rDocumentLocation)).first);
}
-//--------------------------------------------------------------------------
void OBookmarkContainer::implReplace(const ::rtl::OUString& _rName, const ::rtl::OUString& _rNewLink)
{
MutexGuard aGuard(m_rMutex);
- DBG_ASSERT(checkExistence(_rName), "OBookmarkContainer::implReplace : invalid name !");
+ OSL_ENSURE(checkExistence(_rName), "OBookmarkContainer::implReplace : invalid name !");
m_aBookmarks[_rName] = _rNewLink;
}
-//--------------------------------------------------------------------------
void OBookmarkContainer::checkValid(sal_Bool /*_bIntendWriteAccess*/) const throw (RuntimeException, DisposedException)
{
}
-//--------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OBookmarkContainer::getParent( ) throw (RuntimeException)
{
return m_rParent;
}
-//--------------------------------------------------------------------------
void SAL_CALL OBookmarkContainer::setParent( const Reference< XInterface >& /*Parent*/ ) throw (NoSupportException, RuntimeException)
{
throw NoSupportException();
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx
index 04a446f22..648d5654d 100644
--- a/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx
+++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,50 +29,22 @@
#ifndef _DBA_CORE_BOOKMARKCONTAINER_HXX_
#define _DBA_CORE_BOOKMARKCONTAINER_HXX_
-#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
#include <cppuhelper/interfacecontainer.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE6_HXX_
#include <cppuhelper/implbase6.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _OSL_MUTEX_HXX_
#include <osl/mutex.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
#include <com/sun/star/container/XChild.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
#include <com/sun/star/container/XContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_
#include <com/sun/star/container/XEnumerationAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
#include <com/sun/star/container/XIndexAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
-#endif
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OBookmarkContainer - base class of collections of database definition
@@ -94,7 +67,7 @@ protected:
DECLARE_STL_VECTOR(MapString2StringIterator, MapIteratorVector);
MapString2String m_aBookmarks; // the bookmarks itself
- MapIteratorVector m_aBookmarksIndexed; // for index access to the
+ MapIteratorVector m_aBookmarksIndexed; // for index access to the
protected:
::cppu::OWeakObject& m_rParent; // for the ref counting
@@ -194,15 +167,13 @@ protected:
};
-//--------------------------------------------------------------------------
inline sal_Bool OBookmarkContainer::checkExistence(const ::rtl::OUString& _rName)
{
return m_aBookmarks.find(_rName) != m_aBookmarks.end();
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_CORE_BOOKMARKCONTAINER_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/commandcontainer.cxx b/dbaccess/source/core/dataaccess/commandcontainer.cxx
index fab4ec682..3394cd0f0 100644
--- a/dbaccess/source/core/dataaccess/commandcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/commandcontainer.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,19 +29,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_COREDATAACCESS_COMMANDCONTAINER_HXX_
#include "commandcontainer.hxx"
-#endif
-#ifndef _DBA_COREDATAACESS_COMMANDDEFINITION_HXX_
#include "commanddefinition.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -51,35 +44,33 @@ using namespace ::osl;
using namespace ::comphelper;
using namespace ::cppu;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OCommandContainer
//==========================================================================
DBG_NAME(OCommandContainer)
-//--------------------------------------------------------------------------
+
OCommandContainer::OCommandContainer( const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
,const Reference< XInterface >& _xParentContainer
,const TContentPtr& _pImpl
,sal_Bool _bTables
- )
+ )
:ODefinitionContainer(_xORB,_xParentContainer,_pImpl,!_bTables)
,m_bTables(_bTables)
{
DBG_CTOR(OCommandContainer, NULL);
}
-//--------------------------------------------------------------------------
+
OCommandContainer::~OCommandContainer()
{
DBG_DTOR(OCommandContainer, NULL);
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XINTERFACE2( OCommandContainer,ODefinitionContainer,OCommandContainer_BASE)
IMPLEMENT_TYPEPROVIDER2(OCommandContainer,ODefinitionContainer,OCommandContainer_BASE);
-//--------------------------------------------------------------------------
+
Reference< XContent > OCommandContainer::createObject( const ::rtl::OUString& _rName)
{
const ODefinitionContainer_Impl& rDefinitions( getDefinitions() );
@@ -91,25 +82,20 @@ Reference< XContent > OCommandContainer::createObject( const ::rtl::OUString& _r
return new OCommandDefinition( *this, _rName, m_aContext.getLegacyServiceFactory(), pElementContent );
}
-// -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OCommandContainer::createInstanceWithArguments(const Sequence< Any >& /*aArguments*/ ) throw (Exception, RuntimeException)
{
return createInstance( );
}
-// -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OCommandContainer::createInstance( ) throw (Exception, RuntimeException)
{
return m_aContext.createComponent( (::rtl::OUString)( m_bTables ? SERVICE_SDB_TABLEDEFINITION : SERVICE_SDB_COMMAND_DEFINITION ) );
}
-// -----------------------------------------------------------------------------
::rtl::OUString OCommandContainer::determineContentType() const
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.org.openoffice.DatabaseCommandDefinitionContainer" ) );
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/commandcontainer.hxx b/dbaccess/source/core/dataaccess/commandcontainer.hxx
index 69f50ce43..a425d7795 100644
--- a/dbaccess/source/core/dataaccess/commandcontainer.hxx
+++ b/dbaccess/source/core/dataaccess/commandcontainer.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,22 +29,14 @@
#ifndef _DBA_COREDATAACCESS_COMMANDCONTAINER_HXX_
#define _DBA_COREDATAACCESS_COMMANDCONTAINER_HXX_
-#ifndef _DBA_CORE_DEFINITIONCONTAINER_HXX_
#include "definitioncontainer.hxx"
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OCommandContainer
//==========================================================================
@@ -84,10 +77,9 @@ protected:
virtual ::rtl::OUString determineContentType() const;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
-#endif // _DBA_COREDATAACCESS_COMMANDCONTAINER_HXX_
+#endif // _DBA_COREDATAACCESS_COMMANDCONTAINER_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/commanddefinition.cxx b/dbaccess/source/core/dataaccess/commanddefinition.cxx
index ec3729ce6..eda4a6335 100644
--- a/dbaccess/source/core/dataaccess/commanddefinition.cxx
+++ b/dbaccess/source/core/dataaccess/commanddefinition.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -49,10 +50,8 @@ using namespace ::osl;
using namespace ::comphelper;
using namespace ::cppu;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OCommandDefinition
@@ -62,9 +61,8 @@ extern "C" void SAL_CALL createRegistryInfo_OCommandDefinition()
static ::dba::OAutoRegistration< OCommandDefinition > aAutoRegistration;
}
-//--------------------------------------------------------------------------
DBG_NAME(OCommandDefinition)
-//--------------------------------------------------------------------------
+
void OCommandDefinition::registerProperties()
{
OCommandDefinition_Impl& rCommandDefinition( getCommandDefinition() );
@@ -86,22 +84,20 @@ void OCommandDefinition::registerProperties()
&rCommandDefinition.m_aLayoutInformation, ::getCppuType(&rCommandDefinition.m_aLayoutInformation));
}
-//--------------------------------------------------------------------------
OCommandDefinition::OCommandDefinition(const Reference< XMultiServiceFactory >& _xORB
,const Reference< XInterface >& _rxContainer
- ,const TContentPtr& _pImpl)
+ ,const TContentPtr& _pImpl)
:OComponentDefinition(_xORB,_rxContainer,_pImpl,sal_False)
{
DBG_CTOR(OCommandDefinition, NULL);
registerProperties();
}
-//--------------------------------------------------------------------------
+
OCommandDefinition::~OCommandDefinition()
{
DBG_DTOR(OCommandDefinition, NULL);
}
-//--------------------------------------------------------------------------
OCommandDefinition::OCommandDefinition( const Reference< XInterface >& _rxContainer
,const ::rtl::OUString& _rElementName
,const Reference< XMultiServiceFactory >& _xORB
@@ -112,24 +108,21 @@ OCommandDefinition::OCommandDefinition( const Reference< XInterface >& _rxContai
registerProperties();
}
-//--------------------------------------------------------------------------
IMPLEMENT_IMPLEMENTATION_ID(OCommandDefinition);
IMPLEMENT_GETTYPES2(OCommandDefinition,OCommandDefinition_Base,OComponentDefinition);
IMPLEMENT_FORWARD_XINTERFACE2( OCommandDefinition,OComponentDefinition,OCommandDefinition_Base)
IMPLEMENT_PROPERTYCONTAINER_DEFAULTS2(OCommandDefinition,OCommandDefinition_PROP)
-//--------------------------------------------------------------------------
+
::rtl::OUString OCommandDefinition::getImplementationName_static( ) throw(RuntimeException)
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.dba.OCommandDefinition");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.dba.OCommandDefinition"));
}
-//--------------------------------------------------------------------------
::rtl::OUString SAL_CALL OCommandDefinition::getImplementationName( ) throw(RuntimeException)
{
return getImplementationName_static();
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > OCommandDefinition::getSupportedServiceNames_static( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aServices(3);
@@ -139,20 +132,17 @@ Sequence< ::rtl::OUString > OCommandDefinition::getSupportedServiceNames_static(
return aServices;
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL OCommandDefinition::getSupportedServiceNames( ) throw(RuntimeException)
{
return getSupportedServiceNames_static();
}
-//------------------------------------------------------------------------------
Reference< XInterface > OCommandDefinition::Create(const Reference< XComponentContext >& _rxContext)
{
::comphelper::ComponentContext aContext( _rxContext );
return *(new OCommandDefinition( aContext.getLegacyServiceFactory(), NULL, TContentPtr( new OCommandDefinition_Impl ) ) );
}
-// -----------------------------------------------------------------------------
void SAL_CALL OCommandDefinition::rename( const ::rtl::OUString& newName ) throw (SQLException, ElementExistException, RuntimeException)
{
try
@@ -172,8 +162,6 @@ void SAL_CALL OCommandDefinition::rename( const ::rtl::OUString& newName ) throw
throw ElementExistException(newName,*this);
}
}
-// -----------------------------------------------------------------------------
-//........................................................................
-} // namespace dbaccess
-//........................................................................
+} // namespace dbaccess
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/commanddefinition.hxx b/dbaccess/source/core/dataaccess/commanddefinition.hxx
index 27dd4bb86..b823c08f8 100644
--- a/dbaccess/source/core/dataaccess/commanddefinition.hxx
+++ b/dbaccess/source/core/dataaccess/commanddefinition.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,39 +29,17 @@
#ifndef _DBA_COREDATAACESS_COMMANDDEFINITION_HXX_
#define _DBA_COREDATAACESS_COMMANDDEFINITION_HXX_
-#ifndef _DBA_CORE_COMMANDBASE_HXX_
#include "commandbase.hxx"
-#endif
-#ifndef _COMPHELPER_PROPERTYCONTAINER_HXX_
#include <comphelper/propertycontainer.hxx>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XRENAME_HPP_
#include <com/sun/star/sdbcx/XRename.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
#include <comphelper/proparrhlp.hxx>
-#endif
-#ifndef _DBA_CORE_DATASETTINGS_HXX_
#include "datasettings.hxx"
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef DBA_CONTENTHELPER_HXX
#include "ContentHelper.hxx"
-#endif
-#ifndef DBA_COREDATAACESS_COMPONENTDEFINITION_HXX
#include "ComponentDefinition.hxx"
-#endif
//........................................................................
@@ -81,8 +60,7 @@ typedef ::cppu::ImplHelper1 < ::com::sun::star::sdbcx::XRename
> OCommandDefinition_Base;
class OCommandDefinition;
typedef ::comphelper::OPropertyArrayUsageHelper< OCommandDefinition >
- OCommandDefinition_PROP;
-
+ OCommandDefinition_PROP;
class OCommandDefinition :public OComponentDefinition
,public OCommandDefinition_Base
@@ -142,3 +120,4 @@ private:
#endif // _DBA_COREDATAACESS_COMMANDDEFINITION_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index dbca855b1..243b7adfe 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -53,6 +54,7 @@
#include <connectivity/dbexception.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <comphelper/extract.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/sequence.hxx>
@@ -80,30 +82,23 @@ using ::com::sun::star::sdb::tools::XTableName;
using ::com::sun::star::sdb::tools::XObjectNames;
using ::com::sun::star::sdb::tools::XDataSourceMetaData;
-//........................................................................
namespace dbaccess
{
-//........................................................................
-#ifdef IMPLEMENT_GET_IMPLEMENTATION_ID
- IMPLEMENT_GET_IMPLEMENTATION_ID( OSharedConnection );
-#endif
//==========================================================================
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OConnection::getImplementationName( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getImplementationName" );
- return rtl::OUString::createFromAscii("com.sun.star.comp.dbaccess.Connection");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.dbaccess.Connection"));
}
-//------------------------------------------------------------------------------
+
sal_Bool OConnection::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::supportsService" );
return findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OConnection::getSupportedServiceNames( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getSupportedServiceNames" );
@@ -120,7 +115,6 @@ Sequence< ::rtl::OUString > OConnection::getSupportedServiceNames( ) throw (Run
}
// XCloseable
-//------------------------------------------------------------------------------
void OConnection::close(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::close" );
@@ -128,7 +122,6 @@ void OConnection::close(void) throw( SQLException, RuntimeException )
dispose();
}
-//------------------------------------------------------------------------------
sal_Bool OConnection::isClosed(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::isClosed" );
@@ -137,7 +130,6 @@ sal_Bool OConnection::isClosed(void) throw( SQLException, RuntimeException )
}
// XConnection
-//------------------------------------------------------------------------------
Reference< XStatement > OConnection::createStatement(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::createStatement" );
@@ -153,7 +145,6 @@ Reference< XStatement > OConnection::createStatement(void) throw( SQLException,
}
return xStatement;
}
-//------------------------------------------------------------------------------
Reference< XPreparedStatement > OConnection::prepareStatement(const rtl::OUString& sql) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::prepareStatement" );
@@ -171,7 +162,6 @@ Reference< XPreparedStatement > OConnection::prepareStatement(const rtl::OUStri
return xStatement;
}
-//------------------------------------------------------------------------------
Reference< XPreparedStatement > OConnection::prepareCall(const rtl::OUString& sql) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::prepareCall" );
@@ -188,7 +178,6 @@ Reference< XPreparedStatement > OConnection::prepareCall(const rtl::OUString& s
return xStatement;
}
-//------------------------------------------------------------------------------
rtl::OUString OConnection::nativeSQL(const rtl::OUString& sql) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::nativeSQL" );
@@ -197,7 +186,6 @@ rtl::OUString OConnection::nativeSQL(const rtl::OUString& sql) throw( SQLExcepti
return m_xMasterConnection->nativeSQL(sql);
}
-//------------------------------------------------------------------------------
void OConnection::setAutoCommit(sal_Bool autoCommit) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::setAutoCommit" );
@@ -206,7 +194,6 @@ void OConnection::setAutoCommit(sal_Bool autoCommit) throw( SQLException, Runtim
m_xMasterConnection->setAutoCommit(autoCommit);
}
-//------------------------------------------------------------------------------
sal_Bool OConnection::getAutoCommit(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getAutoCommit" );
@@ -215,7 +202,6 @@ sal_Bool OConnection::getAutoCommit(void) throw( SQLException, RuntimeException
return m_xMasterConnection->getAutoCommit();
}
-//------------------------------------------------------------------------------
void OConnection::commit(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::commit" );
@@ -224,7 +210,6 @@ void OConnection::commit(void) throw( SQLException, RuntimeException )
m_xMasterConnection->commit();
}
-//------------------------------------------------------------------------------
void OConnection::rollback(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::rollback" );
@@ -233,7 +218,6 @@ void OConnection::rollback(void) throw( SQLException, RuntimeException )
m_xMasterConnection->rollback();
}
-//------------------------------------------------------------------------------
Reference< XDatabaseMetaData > OConnection::getMetaData(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getMetaData" );
@@ -242,7 +226,6 @@ Reference< XDatabaseMetaData > OConnection::getMetaData(void) throw( SQLExcepti
return m_xMasterConnection->getMetaData();
}
-//------------------------------------------------------------------------------
void OConnection::setReadOnly(sal_Bool readOnly) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::setReadOnly" );
@@ -251,7 +234,6 @@ void OConnection::setReadOnly(sal_Bool readOnly) throw( SQLException, RuntimeExc
m_xMasterConnection->setReadOnly(readOnly);
}
-//------------------------------------------------------------------------------
sal_Bool OConnection::isReadOnly(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::isReadOnly" );
@@ -260,7 +242,6 @@ sal_Bool OConnection::isReadOnly(void) throw( SQLException, RuntimeException )
return m_xMasterConnection->isReadOnly();
}
-//------------------------------------------------------------------------------
void OConnection::setCatalog(const rtl::OUString& catalog) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::setCatalog" );
@@ -269,7 +250,6 @@ void OConnection::setCatalog(const rtl::OUString& catalog) throw( SQLException,
m_xMasterConnection->setCatalog(catalog);
}
-//------------------------------------------------------------------------------
rtl::OUString OConnection::getCatalog(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getCatalog" );
@@ -278,7 +258,6 @@ rtl::OUString OConnection::getCatalog(void) throw( SQLException, RuntimeExceptio
return m_xMasterConnection->getCatalog();
}
-//------------------------------------------------------------------------------
void OConnection::setTransactionIsolation(sal_Int32 level) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::setTransactionIsolation" );
@@ -287,7 +266,6 @@ void OConnection::setTransactionIsolation(sal_Int32 level) throw( SQLException,
m_xMasterConnection->setTransactionIsolation(level);
}
-//------------------------------------------------------------------------------
sal_Int32 OConnection::getTransactionIsolation(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getTransactionIsolation" );
@@ -296,7 +274,6 @@ sal_Int32 OConnection::getTransactionIsolation(void) throw( SQLException, Runtim
return m_xMasterConnection->getTransactionIsolation();
}
-//------------------------------------------------------------------------------
Reference< XNameAccess > OConnection::getTypeMap(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getTypeMap" );
@@ -305,7 +282,6 @@ Reference< XNameAccess > OConnection::getTypeMap(void) throw( SQLException, Run
return m_xMasterConnection->getTypeMap();
}
-//------------------------------------------------------------------------------
void OConnection::setTypeMap(const Reference< XNameAccess > & typeMap) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::setTypeMap" );
@@ -317,7 +293,7 @@ void OConnection::setTypeMap(const Reference< XNameAccess > & typeMap) throw( SQ
//= OConnection
//==========================================================================
DBG_NAME(OConnection)
-//--------------------------------------------------------------------------
+
OConnection::OConnection(ODatabaseSource& _rDB
, Reference< XConnection >& _rxMaster
, const Reference< XMultiServiceFactory >& _rxORB)
@@ -347,7 +323,7 @@ OConnection::OConnection(ODatabaseSource& _rDB
_rxORB->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.ProxyFactory"))),UNO_QUERY);
Reference<XAggregation> xAgg = xProxyFactory->createProxy(_rxMaster.get());
setDelegation(xAgg,m_refCount);
- DBG_ASSERT(m_xConnection.is(), "OConnection::OConnection : invalid master connection !");
+ OSL_ENSURE(m_xConnection.is(), "OConnection::OConnection : invalid master connection !");
}
catch(const Exception&)
{
@@ -367,7 +343,7 @@ OConnection::OConnection(ODatabaseSource& _rDB
xMeta = getMetaData();
bCase = xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers();
}
- catch(SQLException&)
+ catch(const SQLException&)
{
}
Reference< XNameContainer > xTableDefinitions(_rDB.getTables(),UNO_QUERY);
@@ -418,7 +394,6 @@ OConnection::OConnection(ODatabaseSource& _rDB
osl_decrementInterlockedCount( &m_refCount );
}
-//--------------------------------------------------------------------------
OConnection::~OConnection()
{
delete m_pTables;
@@ -426,9 +401,7 @@ OConnection::~OConnection()
DBG_DTOR(OConnection,NULL);
}
-
// XWarningsSupplier
-//--------------------------------------------------------------------------
Any SAL_CALL OConnection::getWarnings() throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getWarnings" );
@@ -437,7 +410,6 @@ Any SAL_CALL OConnection::getWarnings() throw(SQLException, RuntimeException)
return m_aWarnings.getWarnings();
}
-//--------------------------------------------------------------------------
void SAL_CALL OConnection::clearWarnings( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::clearWarnings" );
@@ -446,7 +418,6 @@ void SAL_CALL OConnection::clearWarnings( ) throw(SQLException, RuntimeExceptio
m_aWarnings.clearWarnings();
}
-//--------------------------------------------------------------------------
namespace
{
struct CompareTypeByName : public ::std::binary_function< Type, Type, bool >
@@ -464,8 +435,8 @@ namespace
::std::insert_iterator< TypeBag >( _out_rTypes, _out_rTypes.begin() ) );
}
}
+
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > OConnection::getTypes() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getTypes" );
@@ -487,7 +458,6 @@ Sequence< Type > OConnection::getTypes() throw (RuntimeException)
return aSupportedTypes;
}
-//--------------------------------------------------------------------------
Sequence< sal_Int8 > OConnection::getImplementationId() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getImplementationId" );
@@ -495,7 +465,6 @@ Sequence< sal_Int8 > OConnection::getImplementationId() throw (RuntimeException)
}
// com::sun::star::uno::XInterface
-//--------------------------------------------------------------------------
Any OConnection::queryInterface( const Type & rType ) throw (RuntimeException)
{
if ( !m_bSupportsViews && rType.equals( XViewsSupplier::static_type() ) )
@@ -514,24 +483,19 @@ Any OConnection::queryInterface( const Type & rType ) throw (RuntimeException)
return aReturn;
}
-//--------------------------------------------------------------------------
void OConnection::acquire() throw ()
{
// include this one when you want to see who calls it (call graph)
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::acquire" );
OSubComponent::acquire();
}
-//--------------------------------------------------------------------------
void OConnection::release() throw ()
{
// include this one when you want to see who calls it (call graph)
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::release" );
OSubComponent::release();
}
// OSubComponent
-//------------------------------------------------------------------------------
void OConnection::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::disposing" );
@@ -570,14 +534,13 @@ void OConnection::disposing()
if (m_xMasterConnection.is())
m_xMasterConnection->close();
}
- catch(Exception)
+ catch(const Exception&)
{
}
m_xMasterConnection = NULL;
}
// XChild
-//------------------------------------------------------------------------------
Reference< XInterface > OConnection::getParent(void) throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getParent" );
@@ -586,7 +549,6 @@ Reference< XInterface > OConnection::getParent(void) throw( RuntimeException )
return m_xParent;
}
-//------------------------------------------------------------------------------
void OConnection::setParent(const Reference< XInterface > & /*Parent*/) throw( NoSupportException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::setParent" );
@@ -594,7 +556,6 @@ void OConnection::setParent(const Reference< XInterface > & /*Parent*/) throw( N
}
// XSQLQueryComposerFactory
-//------------------------------------------------------------------------------
Reference< XSQLQueryComposer > OConnection::createQueryComposer(void) throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::createQueryComposer" );
@@ -606,7 +567,7 @@ Reference< XSQLQueryComposer > OConnection::createQueryComposer(void) throw( Ru
m_aComposers.push_back(WeakReferenceHelper(xComposer));
return xComposer;
}
-// -----------------------------------------------------------------------------
+
void OConnection::impl_fillTableFilter()
{
Reference<XPropertySet> xProp(getParent(),UNO_QUERY);
@@ -617,7 +578,6 @@ void OConnection::impl_fillTableFilter()
}
}
-// -----------------------------------------------------------------------------
void OConnection::refresh(const Reference< XNameAccess >& _rToBeRefreshed)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::refresh" );
@@ -654,10 +614,8 @@ void OConnection::refresh(const Reference< XNameAccess >& _rToBeRefreshed)
}
}
}
-// -----------------------------------------------------------------------------
// XTablesSupplier
-//------------------------------------------------------------------------------
Reference< XNameAccess > OConnection::getTables() throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getTables" );
@@ -668,7 +626,7 @@ Reference< XNameAccess > OConnection::getTables() throw( RuntimeException )
return m_pTables;
}
-// -----------------------------------------------------------------------------
+
Reference< XNameAccess > SAL_CALL OConnection::getViews( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getViews" );
@@ -680,7 +638,6 @@ Reference< XNameAccess > SAL_CALL OConnection::getViews( ) throw(RuntimeExcepti
return m_pViews;
}
// XQueriesSupplier
-//------------------------------------------------------------------------------
Reference< XNameAccess > OConnection::getQueries(void) throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getQueries" );
@@ -691,7 +648,6 @@ Reference< XNameAccess > OConnection::getQueries(void) throw( RuntimeException
}
// ::com::sun::star::sdb::XCommandPreparation
-//------------------------------------------------------------------------------
Reference< XPreparedStatement > SAL_CALL OConnection::prepareCommand( const ::rtl::OUString& command, sal_Int32 commandType ) throw(::com::sun::star::sdbc::SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::prepareCommand" );
@@ -723,13 +679,13 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareCommand( const ::r
// TODO EscapeProcessing
return prepareStatement(aStatement);
}
-// -----------------------------------------------------------------------------
+
Reference< XInterface > SAL_CALL OConnection::createInstance( const ::rtl::OUString& _sServiceSpecifier ) throw (Exception, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::createInstance" );
Reference< XServiceInfo > xRet;
if ( ( SERVICE_NAME_SINGLESELECTQUERYCOMPOSER == _sServiceSpecifier )
- || ( _sServiceSpecifier.equalsAscii( "com.sun.star.sdb.SingleSelectQueryAnalyzer" ) )
+ || ( _sServiceSpecifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.SingleSelectQueryAnalyzer" ) ) )
)
{
xRet = new OSingleSelectQueryComposer( getTables(),this, m_aContext );
@@ -752,13 +708,13 @@ Reference< XInterface > SAL_CALL OConnection::createInstance( const ::rtl::OUStr
}
return Reference< XInterface >(xRet,UNO_QUERY);
}
-// -----------------------------------------------------------------------------
+
Reference< XInterface > SAL_CALL OConnection::createInstanceWithArguments( const ::rtl::OUString& _sServiceSpecifier, const Sequence< Any >& /*Arguments*/ ) throw (Exception, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::createInstanceWithArguments" );
return createInstance(_sServiceSpecifier);
}
-// -----------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL OConnection::getAvailableServiceNames( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getAvailableServiceNames" );
@@ -766,7 +722,7 @@ Sequence< ::rtl::OUString > SAL_CALL OConnection::getAvailableServiceNames( ) t
aRet[0] = SERVICE_NAME_SINGLESELECTQUERYCOMPOSER;
return aRet;
}
-// -----------------------------------------------------------------------------
+
Reference< XTablesSupplier > OConnection::getMasterTables()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getMasterTables" );
@@ -779,13 +735,13 @@ Reference< XTablesSupplier > OConnection::getMasterTables()
if ( xMeta.is() )
m_xMasterTables = ::dbtools::getDataDefinitionByURLAndConnection( xMeta->getURL(), m_xMasterConnection, m_aContext.getLegacyServiceFactory() );
}
- catch(SQLException&)
+ catch(const SQLException&)
{
}
}
return m_xMasterTables;
}
-// -----------------------------------------------------------------------------
+
// XUsersSupplier
Reference< XNameAccess > SAL_CALL OConnection::getUsers( ) throw(RuntimeException)
{
@@ -796,7 +752,7 @@ Reference< XNameAccess > SAL_CALL OConnection::getUsers( ) throw(RuntimeExcepti
Reference<XUsersSupplier> xUsr(getMasterTables(),UNO_QUERY);
return xUsr.is() ? xUsr->getUsers() : Reference< XNameAccess >();
}
-// -----------------------------------------------------------------------------
+
// XGroupsSupplier
Reference< XNameAccess > SAL_CALL OConnection::getGroups( ) throw(RuntimeException)
{
@@ -807,7 +763,6 @@ Reference< XNameAccess > SAL_CALL OConnection::getGroups( ) throw(RuntimeExcept
return xGrp.is() ? xGrp->getGroups() : Reference< XNameAccess >();
}
-// -----------------------------------------------------------------------------
void OConnection::impl_loadConnectionTools_throw()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::impl_loadConnectionTools_throw" );
@@ -818,7 +773,6 @@ void OConnection::impl_loadConnectionTools_throw()
throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "service not registered: com.sun.star.sdb.tools.ConnectionTools" ) ), *this );
}
-// -----------------------------------------------------------------------------
Reference< XTableName > SAL_CALL OConnection::createTableName( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::createTableName" );
@@ -829,7 +783,6 @@ Reference< XTableName > SAL_CALL OConnection::createTableName( ) throw (Runtime
return m_xConnectionTools->createTableName();
}
-// -----------------------------------------------------------------------------
Reference< XObjectNames > SAL_CALL OConnection::getObjectNames( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getObjectNames" );
@@ -840,7 +793,6 @@ Reference< XObjectNames > SAL_CALL OConnection::getObjectNames( ) throw (Runtim
return m_xConnectionTools->getObjectNames();
}
-// -----------------------------------------------------------------------------
Reference< XDataSourceMetaData > SAL_CALL OConnection::getDataSourceMetaData( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getDataSourceMetaData" );
@@ -850,7 +802,7 @@ Reference< XDataSourceMetaData > SAL_CALL OConnection::getDataSourceMetaData( )
return m_xConnectionTools->getDataSourceMetaData();
}
-// -----------------------------------------------------------------------------
+
Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnection::getFieldsByCommandDescriptor( ::sal_Int32 commandType, const ::rtl::OUString& command, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& keepFieldsAlive ) throw (::com::sun::star::sdbc::SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getFieldsByCommandDescriptor" );
@@ -860,7 +812,7 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnection::getF
return m_xConnectionTools->getFieldsByCommandDescriptor(commandType,command,keepFieldsAlive);
}
-//--------------------------------------------------------------------
+
Reference< XSingleSelectQueryComposer > SAL_CALL OConnection::getComposer( ::sal_Int32 commandType, const ::rtl::OUString& command ) throw (::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getComposer" );
@@ -871,7 +823,6 @@ Reference< XSingleSelectQueryComposer > SAL_CALL OConnection::getComposer( ::sal
return m_xConnectionTools->getComposer(commandType,command);
}
-// -----------------------------------------------------------------------------
void OConnection::impl_checkTableQueryNames_nothrow()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::impl_checkTableQueryNames_nothrow" );
@@ -907,7 +858,6 @@ void OConnection::impl_checkTableQueryNames_nothrow()
}
}
-// -----------------------------------------------------------------------------
Reference< XGraphic > SAL_CALL OConnection::getTableIcon( const ::rtl::OUString& _TableName, ::sal_Int32 _ColorMode ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getTableIcon" );
@@ -925,7 +875,6 @@ Reference< XGraphic > SAL_CALL OConnection::getTableIcon( const ::rtl::OUString&
return xReturn;
}
-// -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OConnection::getTableEditor( const Reference< XDatabaseDocumentUI >& _DocumentUI, const ::rtl::OUString& _TableName ) throw (IllegalArgumentException, WrappedTargetException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getTableEditor" );
@@ -943,8 +892,5 @@ Reference< XInterface > SAL_CALL OConnection::getTableEditor( const Reference< X
return xReturn;
}
-
-//........................................................................
} // namespace dbaccess
-//........................................................................
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/connection.hxx b/dbaccess/source/core/dataaccess/connection.hxx
index 321c4ae63..2918d4f74 100644
--- a/dbaccess/source/core/dataaccess/connection.hxx
+++ b/dbaccess/source/core/dataaccess/connection.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -167,7 +168,7 @@ public:
virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
-// XConnection
+// XConnection
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement > SAL_CALL createStatement( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > SAL_CALL prepareStatement( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > SAL_CALL prepareCall( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
@@ -250,3 +251,4 @@ private:
#endif // _DBA_CORE_CONNECTION_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
index c8f9cf383..0a5432f79 100644
--- a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
+++ b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -144,7 +145,6 @@ namespace dbaccess
#define REGISTER_PROPERTY( propname, member ) \
registerProperty( PROPERTY_##propname, PROPERTY_ID_##propname, PropertyAttribute::BOUND, &member, ::getCppuType( &member ) )
- //--------------------------------------------------------------------
DataAccessDescriptor::DataAccessDescriptor( const ::comphelper::ComponentContext& _rContext )
:DataAccessDescriptor_MutexBase()
,DataAccessDescriptor_TypeBase()
@@ -187,24 +187,19 @@ namespace dbaccess
REGISTER_PROPERTY( COLUMN, m_xColumn );
}
- //--------------------------------------------------------------------
DataAccessDescriptor::~DataAccessDescriptor()
{
}
- //--------------------------------------------------------------------
IMPLEMENT_FORWARD_XINTERFACE2( DataAccessDescriptor, DataAccessDescriptor_TypeBase, DataAccessDescriptor_PropertyBase );
- //--------------------------------------------------------------------
IMPLEMENT_FORWARD_XTYPEPROVIDER2( DataAccessDescriptor, DataAccessDescriptor_TypeBase, DataAccessDescriptor_PropertyBase );
- //--------------------------------------------------------------------
::rtl::OUString SAL_CALL DataAccessDescriptor::getImplementationName() throw (RuntimeException)
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.dba.DataAccessDescriptor" ) );
}
- //--------------------------------------------------------------------
::sal_Bool SAL_CALL DataAccessDescriptor::supportsService( const ::rtl::OUString& rServiceName ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aServices( getSupportedServiceNames() );
@@ -213,7 +208,6 @@ namespace dbaccess
return ::std::find( pStart, pEnd, rServiceName ) != pEnd;
}
- //--------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL DataAccessDescriptor::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aServices(1);
@@ -221,20 +215,17 @@ namespace dbaccess
return aServices;
}
- //-------------------------------------------------------------------------
Reference< XPropertySetInfo > SAL_CALL DataAccessDescriptor::getPropertySetInfo() throw(RuntimeException)
{
Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
return xInfo;
}
- //-------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& DataAccessDescriptor::getInfoHelper()
{
return *getArrayHelper();
}
- //------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* DataAccessDescriptor::createArrayHelper( ) const
{
Sequence< Property > aProps;
@@ -273,24 +264,20 @@ namespace dbaccess
::comphelper::ComponentContext m_aContext;
};
- //--------------------------------------------------------------------
DataAccessDescriptorFactory::DataAccessDescriptorFactory( const Reference< XComponentContext >& _rxContext )
:m_aContext( _rxContext )
{
}
- //--------------------------------------------------------------------
DataAccessDescriptorFactory::~DataAccessDescriptorFactory()
{
}
- //--------------------------------------------------------------------
::rtl::OUString DataAccessDescriptorFactory::getSingletonName_static()
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.DataAccessDescriptorFactory" ) );
}
- //--------------------------------------------------------------------
Sequence< ::rtl::OUString > DataAccessDescriptorFactory::getSupportedServiceNames_static() throw( RuntimeException )
{
Sequence< ::rtl::OUString > aServices(1);
@@ -298,25 +285,21 @@ namespace dbaccess
return aServices;
}
- //--------------------------------------------------------------------
::rtl::OUString DataAccessDescriptorFactory::getImplementationName_static() throw( RuntimeException )
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.dba.DataAccessDescriptorFactory" ) );
}
- //--------------------------------------------------------------------
Reference< XInterface > DataAccessDescriptorFactory::Create( const Reference< XComponentContext >& _rxContext )
{
return *( new DataAccessDescriptorFactory( _rxContext ) );
}
- //--------------------------------------------------------------------
::rtl::OUString SAL_CALL DataAccessDescriptorFactory::getImplementationName() throw (RuntimeException)
{
return getImplementationName_static();
}
- //--------------------------------------------------------------------
::sal_Bool SAL_CALL DataAccessDescriptorFactory::supportsService( const ::rtl::OUString& rServiceName ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aServices( getSupportedServiceNames_static() );
@@ -325,24 +308,21 @@ namespace dbaccess
return ::std::find( pStart, pEnd, rServiceName ) != pEnd;
}
- //--------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL DataAccessDescriptorFactory::getSupportedServiceNames( ) throw (RuntimeException)
{
return getSupportedServiceNames_static();
}
- //--------------------------------------------------------------------
Reference< XPropertySet > SAL_CALL DataAccessDescriptorFactory::createDataAccessDescriptor( ) throw (RuntimeException)
{
return new DataAccessDescriptor( m_aContext );
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
-//--------------------------------------------------------------------------
extern "C" void SAL_CALL createRegistryInfo_DataAccessDescriptorFactory()
{
static ::dba::OSingletonRegistration< ::dbaccess::DataAccessDescriptorFactory > aAutoRegistration;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index e584553e6..87a2b444d 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -100,19 +101,10 @@ using ::com::sun::star::ucb::InteractiveIOException;
using ::com::sun::star::ucb::IOErrorCode_NOT_EXISTING;
using ::com::sun::star::ucb::IOErrorCode_NOT_EXISTING_PATH;
-//==========================================================================
-
-extern "C" void SAL_CALL createRegistryInfo_ODatabaseContext()
-{
- static ::dba::OLegacySingletonRegistration< ::dbaccess::ODatabaseContext > aODatabaseContext_AutoRegistration;
-}
-//........................................................................
namespace dbaccess
{
-//........................................................................
- // .............................................................................
typedef ::cppu::WeakImplHelper1 < XTerminateListener
> DatabaseDocumentLoader_Base;
class DatabaseDocumentLoader : public DatabaseDocumentLoader_Base
@@ -138,7 +130,6 @@ namespace dbaccess
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
};
- // .............................................................................
DatabaseDocumentLoader::DatabaseDocumentLoader( const comphelper::ComponentContext& _aContext )
{
acquire();
@@ -164,7 +155,7 @@ namespace dbaccess
{
Reference<util::XCloseable> xCloseable(xModel,UNO_QUERY_THROW);
xCloseable->close(sal_False);
- } // if ( !xModel->getControllers()->hasMoreElements() )
+ }
}
catch(const CloseVetoException&)
{
@@ -172,25 +163,24 @@ namespace dbaccess
}
}
};
- // .............................................................................
+
void SAL_CALL DatabaseDocumentLoader::queryTermination( const lang::EventObject& /*Event*/ ) throw (TerminationVetoException, RuntimeException)
{
::std::list< const ODatabaseModelImpl* > aCopy(m_aDatabaseDocuments);
::std::for_each(aCopy.begin(),aCopy.end(),TerminateFunctor());
}
- // .............................................................................
void SAL_CALL DatabaseDocumentLoader::notifyTermination( const lang::EventObject& /*Event*/ ) throw (RuntimeException)
{
}
- // .............................................................................
+
void SAL_CALL DatabaseDocumentLoader::disposing( const lang::EventObject& /*Source*/ ) throw (RuntimeException)
{
}
//= ODatabaseContext
//==========================================================================
-//--------------------------------------------------------------------------
+
ODatabaseContext::ODatabaseContext( const Reference< XComponentContext >& _rxContext )
:DatabaseAccessContext_Base(m_aMutex)
,m_aContext( _rxContext )
@@ -209,7 +199,6 @@ ODatabaseContext::ODatabaseContext( const Reference< XComponentContext >& _rxCon
osl_decrementInterlockedCount( &m_refCount );
}
-//--------------------------------------------------------------------------
ODatabaseContext::~ODatabaseContext()
{
::basic::BasicManagerRepository::revokeCreationListener( *this );
@@ -222,20 +211,17 @@ ODatabaseContext::~ODatabaseContext()
}
// Helper
-//------------------------------------------------------------------------------
rtl::OUString ODatabaseContext::getImplementationName_static() throw( RuntimeException )
{
return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.dba.ODatabaseContext"));
}
-//------------------------------------------------------------------------------
Reference< XInterface > ODatabaseContext::Create(const Reference< XComponentContext >& _rxContext)
{
return *( new ODatabaseContext( _rxContext ) );
}
-//------------------------------------------------------------------------------
Sequence< rtl::OUString > ODatabaseContext::getSupportedServiceNames_static(void) throw( RuntimeException )
{
Sequence< ::rtl::OUString > aSNS( 1 );
@@ -244,25 +230,21 @@ Sequence< rtl::OUString > ODatabaseContext::getSupportedServiceNames_static(void
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString ODatabaseContext::getImplementationName( ) throw(RuntimeException)
{
return getImplementationName_static();
}
-//------------------------------------------------------------------------------
sal_Bool ODatabaseContext::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > ODatabaseContext::getSupportedServiceNames( ) throw (RuntimeException)
{
return getSupportedServiceNames_static();
}
-//--------------------------------------------------------------------------
Reference< XInterface > ODatabaseContext::impl_createNewDataSource()
{
::rtl::Reference<ODatabaseModelImpl> pImpl( new ODatabaseModelImpl( m_aContext.getLegacyServiceFactory(), *this ) );
@@ -271,7 +253,6 @@ Reference< XInterface > ODatabaseContext::impl_createNewDataSource()
return xDataSource.get();
}
-//--------------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODatabaseContext::createInstance( ) throw (Exception, RuntimeException)
{
// for convenience of the API user, we ensure the document is fully initialized (effectively: XLoadable::initNew
@@ -279,7 +260,6 @@ Reference< XInterface > SAL_CALL ODatabaseContext::createInstance( ) throw (Exc
return impl_createNewDataSource();
}
-//--------------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODatabaseContext::createInstanceWithArguments( const Sequence< Any >& _rArguments ) throw (Exception, RuntimeException)
{
::comphelper::NamedValueCollection aArgs( _rArguments );
@@ -294,8 +274,8 @@ Reference< XInterface > SAL_CALL ODatabaseContext::createInstanceWithArguments(
return xDataSource;
}
+
// DatabaseAccessContext_Base
-//------------------------------------------------------------------------------
void ODatabaseContext::disposing()
{
// notify our listener
@@ -315,7 +295,6 @@ void ODatabaseContext::disposing()
}
// XNamingService
-//------------------------------------------------------------------------------
Reference< XInterface > ODatabaseContext::getRegisteredObject(const rtl::OUString& _rName) throw( Exception, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -334,7 +313,7 @@ Reference< XInterface > ODatabaseContext::getRegisteredObject(const rtl::OUStri
return loadObjectFromURL( _rName, sURL );
}
-// -----------------------------------------------------------------------------
+
Reference< XInterface > ODatabaseContext::loadObjectFromURL(const ::rtl::OUString& _rName,const ::rtl::OUString& _sURL)
{
INetURLObject aURL( _sURL );
@@ -399,17 +378,17 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const ::rtl::OUStrin
return pModelImpl->getOrCreateDataSource().get();
}
-// -----------------------------------------------------------------------------
+
void ODatabaseContext::appendAtTerminateListener(const ODatabaseModelImpl& _rDataSourceModel)
{
m_pDatabaseDocumentLoader->append(_rDataSourceModel);
}
-// -----------------------------------------------------------------------------
+
void ODatabaseContext::removeFromTerminateListener(const ODatabaseModelImpl& _rDataSourceModel)
{
m_pDatabaseDocumentLoader->remove(_rDataSourceModel);
}
-// -----------------------------------------------------------------------------
+
void ODatabaseContext::setTransientProperties(const ::rtl::OUString& _sURL, ODatabaseModelImpl& _rDataSourceModel )
{
if ( m_aDatasourceProperties.end() == m_aDatasourceProperties.find(_sURL) )
@@ -423,7 +402,7 @@ void ODatabaseContext::setTransientProperties(const ::rtl::OUString& _sURL, ODat
const PropertyValue* pPropsEnd = rSessionPersistentProps.getConstArray() + rSessionPersistentProps.getLength();
for ( ; pProp != pPropsEnd; ++pProp )
{
- if ( pProp->Name.equalsAscii( "AuthFailedPassword" ) )
+ if ( pProp->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "AuthFailedPassword" ) ) )
{
OSL_VERIFY( pProp->Value >>= sAuthFailedPassword );
}
@@ -441,7 +420,6 @@ void ODatabaseContext::setTransientProperties(const ::rtl::OUString& _sURL, ODat
}
}
-//------------------------------------------------------------------------------
void ODatabaseContext::registerObject(const rtl::OUString& _rName, const Reference< XInterface > & _rxObject) throw( Exception, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -468,7 +446,6 @@ void ODatabaseContext::registerObject(const rtl::OUString& _rName, const Referen
m_aContainerListeners.notifyEach( &XContainerListener::elementInserted, aEvent );
}
-//------------------------------------------------------------------------------
void ODatabaseContext::storeTransientProperties( ODatabaseModelImpl& _rModelImpl)
{
Reference< XPropertySet > xSource( _rModelImpl.getOrCreateDataSource(), UNO_QUERY );
@@ -505,7 +482,7 @@ void ODatabaseContext::storeTransientProperties( ODatabaseModelImpl& _rModelImpl
}
// additionally, remember the "failed password", which is not available as property
- // #i86178# / 2008-02-19 / frank.schoenheit@sun.com
+ // #i86178#
aRememberProps.put( "AuthFailedPassword", _rModelImpl.m_sFailedPassword );
::rtl::OUString sDocumentURL( _rModelImpl.getURL() );
@@ -515,7 +492,7 @@ void ODatabaseContext::storeTransientProperties( ODatabaseModelImpl& _rModelImpl
}
else if ( m_aDatabaseObjects.find( _rModelImpl.m_sName ) != m_aDatabaseObjects.end() )
{
- OSL_ENSURE( false, "ODatabaseContext::storeTransientProperties: a database document register by name? This shouldn't happen anymore!" );
+ OSL_FAIL( "ODatabaseContext::storeTransientProperties: a database document register by name? This shouldn't happen anymore!" );
// all the code should have been changed so that registration is by URL only
m_aDatasourceProperties[ _rModelImpl.m_sName ] = aRememberProps.getPropertyValues();
}
@@ -526,19 +503,16 @@ void ODatabaseContext::storeTransientProperties( ODatabaseModelImpl& _rModelImpl
}
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseContext::addContainerListener( const Reference< XContainerListener >& _rxListener ) throw(RuntimeException)
{
m_aContainerListeners.addInterface(_rxListener);
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseContext::removeContainerListener( const Reference< XContainerListener >& _rxListener ) throw(RuntimeException)
{
m_aContainerListeners.removeInterface(_rxListener);
}
-//------------------------------------------------------------------------------
void ODatabaseContext::revokeObject(const rtl::OUString& _rName) throw( Exception, RuntimeException )
{
ClearableMutexGuard aGuard(m_aMutex);
@@ -565,68 +539,57 @@ void ODatabaseContext::revokeObject(const rtl::OUString& _rName) throw( Exceptio
m_aContainerListeners.notifyEach( &XContainerListener::elementRemoved, aEvent );
}
-//------------------------------------------------------------------------------
::sal_Bool SAL_CALL ODatabaseContext::hasRegisteredDatabase( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, RuntimeException)
{
return m_xDatabaseRegistrations->hasRegisteredDatabase( _Name );
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL ODatabaseContext::getRegistrationNames() throw (RuntimeException)
{
return m_xDatabaseRegistrations->getRegistrationNames();
}
-//------------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODatabaseContext::getDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
{
return m_xDatabaseRegistrations->getDatabaseLocation( _Name );
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseContext::registerDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _Location ) throw (IllegalArgumentException, ElementExistException, RuntimeException)
{
m_xDatabaseRegistrations->registerDatabaseLocation( _Name, _Location );
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseContext::revokeDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException)
{
m_xDatabaseRegistrations->revokeDatabaseLocation( _Name );
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseContext::changeDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _NewLocation ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException)
{
m_xDatabaseRegistrations->changeDatabaseLocation( _Name, _NewLocation );
}
-//------------------------------------------------------------------------------
::sal_Bool SAL_CALL ODatabaseContext::isDatabaseRegistrationReadOnly( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
{
return m_xDatabaseRegistrations->isDatabaseRegistrationReadOnly( _Name );
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseContext::addDatabaseRegistrationsListener( const Reference< XDatabaseRegistrationsListener >& _Listener ) throw (RuntimeException)
{
m_xDatabaseRegistrations->addDatabaseRegistrationsListener( _Listener );
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseContext::removeDatabaseRegistrationsListener( const Reference< XDatabaseRegistrationsListener >& _Listener ) throw (RuntimeException)
{
m_xDatabaseRegistrations->removeDatabaseRegistrationsListener( _Listener );
}
// ::com::sun::star::container::XElementAccess
-//------------------------------------------------------------------------------
Type ODatabaseContext::getElementType( ) throw(RuntimeException)
{
return::getCppuType(static_cast<Reference<XDataSource>*>(NULL));
}
-//------------------------------------------------------------------------------
sal_Bool ODatabaseContext::hasElements(void) throw( RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -636,7 +599,6 @@ sal_Bool ODatabaseContext::hasElements(void) throw( RuntimeException )
}
// ::com::sun::star::container::XEnumerationAccess
-//------------------------------------------------------------------------------
Reference< ::com::sun::star::container::XEnumeration > ODatabaseContext::createEnumeration(void) throw( RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -644,7 +606,6 @@ Reference< ::com::sun::star::container::XEnumeration > ODatabaseContext::create
}
// ::com::sun::star::container::XNameAccess
-//------------------------------------------------------------------------------
Any ODatabaseContext::getByName(const rtl::OUString& _rName) throw( NoSuchElementException,
WrappedTargetException, RuntimeException )
{
@@ -695,7 +656,6 @@ Any ODatabaseContext::getByName(const rtl::OUString& _rName) throw( NoSuchElemen
}
}
-//------------------------------------------------------------------------------
Sequence< rtl::OUString > ODatabaseContext::getElementNames(void) throw( RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -704,7 +664,6 @@ Sequence< rtl::OUString > ODatabaseContext::getElementNames(void) throw( Runtime
return getRegistrationNames();
}
-//------------------------------------------------------------------------------
sal_Bool ODatabaseContext::hasByName(const rtl::OUString& _rName) throw( RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -713,7 +672,6 @@ sal_Bool ODatabaseContext::hasByName(const rtl::OUString& _rName) throw( Runtime
return hasRegisteredDatabase( _rName );
}
-// -----------------------------------------------------------------------------
Reference< XInterface > ODatabaseContext::getObject( const ::rtl::OUString& _rURL )
{
ObjectCacheIterator aFind = m_aDatabaseObjects.find( _rURL );
@@ -722,7 +680,7 @@ Reference< XInterface > ODatabaseContext::getObject( const ::rtl::OUString& _rUR
xExistent = aFind->second->getOrCreateDataSource();
return xExistent;
}
-// -----------------------------------------------------------------------------
+
void ODatabaseContext::registerDatabaseDocument( ODatabaseModelImpl& _rModelImpl )
{
::rtl::OUString sURL( _rModelImpl.getURL() );
@@ -735,9 +693,9 @@ void ODatabaseContext::registerDatabaseDocument( ODatabaseModelImpl& _rModelImpl
setTransientProperties( sURL, _rModelImpl );
}
else
- OSL_ENSURE( false, "ODatabaseContext::registerDatabaseDocument: already have an object registered for this URL!" );
+ OSL_FAIL( "ODatabaseContext::registerDatabaseDocument: already have an object registered for this URL!" );
}
-// -----------------------------------------------------------------------------
+
void ODatabaseContext::revokeDatabaseDocument( const ODatabaseModelImpl& _rModelImpl )
{
::rtl::OUString sURL( _rModelImpl.getURL() );
@@ -746,7 +704,7 @@ void ODatabaseContext::revokeDatabaseDocument( const ODatabaseModelImpl& _rModel
#endif
m_aDatabaseObjects.erase( sURL );
}
-// -----------------------------------------------------------------------------
+
void ODatabaseContext::databaseDocumentURLChange( const ::rtl::OUString& _rOldURL, const ::rtl::OUString& _rNewURL )
{
#if OSL_DEBUG_LEVEL > 1
@@ -762,7 +720,7 @@ void ODatabaseContext::databaseDocumentURLChange( const ::rtl::OUString& _rOldUR
m_aDatabaseObjects[ _rNewURL ] = oldPos->second;
m_aDatabaseObjects.erase( oldPos );
}
-// -----------------------------------------------------------------------------
+
sal_Int64 SAL_CALL ODatabaseContext::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
@@ -770,7 +728,7 @@ sal_Int64 SAL_CALL ODatabaseContext::getSomething( const Sequence< sal_Int8 >& r
return 0;
}
-// -----------------------------------------------------------------------------
+
Sequence< sal_Int8 > ODatabaseContext::getUnoTunnelImplementationId()
{
static ::cppu::OImplementationId * pId = 0;
@@ -786,7 +744,6 @@ Sequence< sal_Int8 > ODatabaseContext::getUnoTunnelImplementationId()
return pId->getImplementationId();
}
-// -----------------------------------------------------------------------------
void ODatabaseContext::onBasicManagerCreated( const Reference< XModel >& _rxForDocument, BasicManager& _rBasicManager )
{
// if it's a database document ...
@@ -804,6 +761,5 @@ void ODatabaseContext::onBasicManagerCreated( const Reference< XModel >& _rxForD
_rBasicManager.SetGlobalUNOConstant( "ThisDatabaseDocument", makeAny( xDatabaseDocument ) );
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/databasecontext.hxx b/dbaccess/source/core/dataaccess/databasecontext.hxx
index 072299c76..71d5fb4eb 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.hxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -91,7 +92,6 @@ private:
/** loads the given object from the given URL
@throws WrappedTargetException
if an error occurs accessing the URL via the UCB
-
*/
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > loadObjectFromURL(const ::rtl::OUString& _rName,const ::rtl::OUString& _sURL);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getObject( const ::rtl::OUString& _rURL );
@@ -211,3 +211,4 @@ private:
#endif // _DBA_COREDATAACCESS_DATABASECONTEXT_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index d748154d8..16e5c062e 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -84,6 +85,7 @@
#include <unotools/saveopt.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <tools/errcode.hxx>
#include <tools/urlobj.hxx>
@@ -95,8 +97,6 @@
#define MAP_LEN(x) x, sizeof(x) - 1
-#define MAP_LEN(x) x, sizeof(x) - 1
-
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::frame;
@@ -121,15 +121,13 @@ using ::com::sun::star::awt::XWindow;
using ::com::sun::star::ucb::XContent;
using ::com::sun::star::sdb::application::XDatabaseDocumentUI;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//============================================================
//= ViewMonitor
//============================================================
-//--------------------------------------------------------------------------
+
bool ViewMonitor::onControllerConnected( const Reference< XController >& _rxController )
{
bool bFirstControllerEver = ( m_bEverHadController == false );
@@ -141,7 +139,6 @@ bool ViewMonitor::onControllerConnected( const Reference< XController >& _rxCont
return bFirstControllerEver;
}
-//--------------------------------------------------------------------------
bool ViewMonitor::onSetCurrentController( const Reference< XController >& _rxController )
{
// we interpret this as "loading the document (including UI) is finished",
@@ -160,13 +157,12 @@ bool ViewMonitor::onSetCurrentController( const Reference< XController >& _rxCon
//= ODatabaseDocument
//============================================================
DBG_NAME(ODatabaseDocument)
-//--------------------------------------------------------------------------
+
extern "C" void SAL_CALL createRegistryInfo_ODatabaseDocument()
{
static ::dba::OAutoRegistration< ODatabaseDocument > aAutoRegistration;
}
-//--------------------------------------------------------------------------
ODatabaseDocument::ODatabaseDocument(const ::rtl::Reference<ODatabaseModelImpl>& _pImpl )
:ModelDependentComponent( _pImpl )
,ODatabaseDocument_OfficeDocument( getMutex() )
@@ -210,13 +206,12 @@ ODatabaseDocument::ODatabaseDocument(const ::rtl::Reference<ODatabaseModelImpl>&
{
// if the previous incarnation of the DatabaseDocument already had an URL, then creating this incarnation
// here is effectively loading the document.
- // #i105505# / 2009-10-01 / frank.schoenheit@sun.com
+ // #i105505#
m_aViewMonitor.onLoadedDocument();
}
}
}
-//--------------------------------------------------------------------------
ODatabaseDocument::~ODatabaseDocument()
{
OSL_TRACE( "DD: dtor: %p: %p", this, m_pImpl.get() );
@@ -229,7 +224,7 @@ ODatabaseDocument::~ODatabaseDocument()
delete m_pEventContainer, m_pEventContainer = NULL;
}
-// -----------------------------------------------------------------------------
+
Any SAL_CALL ODatabaseDocument::queryInterface( const Type& _rType ) throw (RuntimeException)
{
// strip XEmbeddedScripts and XScriptInvocationContext if we have any form/report
@@ -247,18 +242,17 @@ Any SAL_CALL ODatabaseDocument::queryInterface( const Type& _rType ) throw (Runt
aReturn = ODatabaseDocument_Title::queryInterface(_rType);
return aReturn;
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseDocument::acquire( ) throw ()
{
ODatabaseDocument_OfficeDocument::acquire();
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::release( ) throw ()
{
ODatabaseDocument_OfficeDocument::release();
}
-//------------------------------------------------------------------------------
+
Sequence< Type > SAL_CALL ODatabaseDocument::getTypes( ) throw (RuntimeException)
{
Sequence< Type > aTypes = ::comphelper::concatSequences(
@@ -299,7 +293,7 @@ Sequence< Type > SAL_CALL ODatabaseDocument::getTypes( ) throw (RuntimeException
return aTypes;
}
-//------------------------------------------------------------------------------
+
Sequence< sal_Int8 > SAL_CALL ODatabaseDocument::getImplementationId( ) throw (RuntimeException)
{
static ::cppu::OImplementationId * pId = 0;
@@ -315,19 +309,15 @@ Sequence< sal_Int8 > SAL_CALL ODatabaseDocument::getImplementationId( ) throw (
return pId->getImplementationId();
}
-// -----------------------------------------------------------------------------
// local functions
-// -----------------------------------------------------------------------------
namespace
{
- // -----------------------------------------------------------------------------
Reference< XStatusIndicator > lcl_extractStatusIndicator( const ::comphelper::NamedValueCollection& _rArguments )
{
Reference< XStatusIndicator > xStatusIndicator;
return _rArguments.getOrDefault( "StatusIndicator", xStatusIndicator );
}
- // -----------------------------------------------------------------------------
static void lcl_triggerStatusIndicator_throw( const ::comphelper::NamedValueCollection& _rArguments, DocumentGuard& _rGuard, const bool _bStart )
{
Reference< XStatusIndicator > xStatusIndicator( lcl_extractStatusIndicator( _rArguments ) );
@@ -350,7 +340,6 @@ namespace
// note that |reset| can throw a DisposedException
}
- // -----------------------------------------------------------------------------
static void lcl_extractStatusIndicator( const ::comphelper::NamedValueCollection& _rArguments, Sequence< Any >& _rCallArgs )
{
Reference< XStatusIndicator > xStatusIndicator( lcl_extractStatusIndicator( _rArguments ) );
@@ -362,7 +351,6 @@ namespace
_rCallArgs[ nLength ] <<= xStatusIndicator;
}
- // -----------------------------------------------------------------------------
static void lcl_extractAndStartStatusIndicator( const ::comphelper::NamedValueCollection& _rArguments, Reference< XStatusIndicator >& _rxStatusIndicator,
Sequence< Any >& _rCallArgs )
{
@@ -384,7 +372,6 @@ namespace
}
}
- // -----------------------------------------------------------------------------
static Sequence< PropertyValue > lcl_appendFileNameToDescriptor( const ::comphelper::NamedValueCollection& _rDescriptor, const ::rtl::OUString _rURL )
{
::comphelper::NamedValueCollection aMutableDescriptor( _rDescriptor );
@@ -397,7 +384,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_setInitialized()
{
m_eInitState = Initialized;
@@ -406,7 +392,6 @@ void ODatabaseDocument::impl_setInitialized()
m_aEventNotifier.onDocumentInitialized();
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_reset_nothrow()
{
try
@@ -431,7 +416,6 @@ void ODatabaseDocument::impl_reset_nothrow()
m_pImpl->m_bDocumentReadOnly = sal_False;
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_import_nolck_throw( const ::comphelper::ComponentContext _rContext, const Reference< XInterface >& _rxTargetComponent,
const ::comphelper::NamedValueCollection& _rResource )
{
@@ -469,7 +453,6 @@ void ODatabaseDocument::impl_import_nolck_throw( const ::comphelper::ComponentCo
xStatusIndicator->end();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::initNew( ) throw (DoubleInitializationException, IOException, Exception, RuntimeException)
{
// SYNCHRONIZED ->
@@ -504,7 +487,6 @@ void SAL_CALL ODatabaseDocument::initNew( ) throw (DoubleInitializationExceptio
impl_notifyStorageChange_nolck_nothrow( xTempStor );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::load( const Sequence< PropertyValue >& _Arguments ) throw (DoubleInitializationException, IOException, Exception, RuntimeException)
{
// SYNCHRONIZED ->
@@ -550,10 +532,8 @@ void SAL_CALL ODatabaseDocument::load( const Sequence< PropertyValue >& _Argumen
// <- SYNCHRONIZED
}
-// -----------------------------------------------------------------------------
namespace
{
- // .........................................................................
bool lcl_hasAnyModifiedSubComponent_throw( const Reference< XController >& i_rController )
{
Reference< XDatabaseDocumentUI > xDatabaseUI( i_rController, UNO_QUERY_THROW );
@@ -574,14 +554,13 @@ namespace
// TODO: clarify: anything else to care for? Both the sub componbents with and without model
// should support the XModifiable interface, so I think nothing more is needed here.
- OSL_ENSURE( false, "lcl_hasAnyModifiedSubComponent_throw: anything left to do here?" );
+ OSL_FAIL( "lcl_hasAnyModifiedSubComponent_throw: anything left to do here?" );
}
return isAnyModified;
}
}
-// -----------------------------------------------------------------------------
::sal_Bool SAL_CALL ODatabaseDocument::wasModifiedSinceLastSave() throw ( RuntimeException )
{
DocumentGuard aGuard( *this );
@@ -620,7 +599,6 @@ namespace
return sal_False;
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::storeToRecoveryFile( const ::rtl::OUString& i_TargetLocation, const Sequence< PropertyValue >& i_MediaDescriptor ) throw ( RuntimeException, IOException, WrappedTargetException )
{
DocumentGuard aGuard( *this );
@@ -657,7 +635,6 @@ void SAL_CALL ODatabaseDocument::storeToRecoveryFile( const ::rtl::OUString& i_T
}
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::recoverFromFile( const ::rtl::OUString& i_SourceLocation, const ::rtl::OUString& i_SalvagedFile, const Sequence< PropertyValue >& i_MediaDescriptor ) throw ( RuntimeException, IOException, WrappedTargetException )
{
DocumentGuard aGuard( *this, DocumentGuard::InitMethod );
@@ -706,7 +683,6 @@ void SAL_CALL ODatabaseDocument::recoverFromFile( const ::rtl::OUString& i_Sourc
}
}
-// -----------------------------------------------------------------------------
// XModel
sal_Bool SAL_CALL ODatabaseDocument::attachResource( const ::rtl::OUString& _rURL, const Sequence< PropertyValue >& _rArguments ) throw (RuntimeException)
{
@@ -714,7 +690,6 @@ sal_Bool SAL_CALL ODatabaseDocument::attachResource( const ::rtl::OUString& _rUR
return impl_attachResource( _rURL, _rArguments, aGuard );
}
-// -----------------------------------------------------------------------------
sal_Bool ODatabaseDocument::impl_attachResource( const ::rtl::OUString& i_rLogicalDocumentURL,
const Sequence< PropertyValue >& i_rMediaDescriptor, DocumentGuard& _rDocGuard )
{
@@ -756,21 +731,18 @@ sal_Bool ODatabaseDocument::impl_attachResource( const ::rtl::OUString& i_rLogic
return sal_True;
}
-// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODatabaseDocument::getURL( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
return m_pImpl->getURL();
}
-// -----------------------------------------------------------------------------
Sequence< PropertyValue > SAL_CALL ODatabaseDocument::getArgs( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
return m_pImpl->getMediaDescriptor().getPropertyValues();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::connectController( const Reference< XController >& _xController ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -797,7 +769,6 @@ void SAL_CALL ODatabaseDocument::connectController( const Reference< XController
m_pImpl->checkMacrosOnLoading();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::disconnectController( const Reference< XController >& _xController ) throw (RuntimeException)
{
bool bNotifyViewClosed = false;
@@ -830,7 +801,7 @@ void SAL_CALL ODatabaseDocument::disconnectController( const Reference< XControl
if ( bLastControllerGone && !bIsClosing )
{
// if this was the last view, close the document as a whole
- // #i51157# / 2006-03-16 / frank.schoenheit@sun.com
+ // #i51157#
try
{
close( sal_True );
@@ -842,7 +813,6 @@ void SAL_CALL ODatabaseDocument::disconnectController( const Reference< XControl
}
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::lockControllers( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -850,7 +820,6 @@ void SAL_CALL ODatabaseDocument::lockControllers( ) throw (RuntimeException)
++m_pImpl->m_nControllerLockCount;
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::unlockControllers( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -858,7 +827,6 @@ void SAL_CALL ODatabaseDocument::unlockControllers( ) throw (RuntimeException)
--m_pImpl->m_nControllerLockCount;
}
-// -----------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseDocument::hasControllersLocked( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -866,7 +834,6 @@ sal_Bool SAL_CALL ODatabaseDocument::hasControllersLocked( ) throw (RuntimeExce
return m_pImpl->m_nControllerLockCount != 0;
}
-// -----------------------------------------------------------------------------
Reference< XController > SAL_CALL ODatabaseDocument::getCurrentController() throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -874,7 +841,6 @@ Reference< XController > SAL_CALL ODatabaseDocument::getCurrentController() thro
return m_xCurrentController.is() ? m_xCurrentController : ( m_aControllers.empty() ? Reference< XController >() : *m_aControllers.begin() );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::setCurrentController( const Reference< XController >& _xController ) throw (NoSuchElementException, RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -904,7 +870,6 @@ void SAL_CALL ODatabaseDocument::setCurrentController( const Reference< XControl
}
}
-// -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODatabaseDocument::getCurrentSelection( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -916,14 +881,13 @@ Reference< XInterface > SAL_CALL ODatabaseDocument::getCurrentSelection( ) thro
return xRet;
}
-// -----------------------------------------------------------------------------
// XStorable
sal_Bool SAL_CALL ODatabaseDocument::hasLocation( ) throw (RuntimeException)
{
return getLocation().getLength() > 0;
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL ODatabaseDocument::getLocation( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
@@ -931,13 +895,13 @@ sal_Bool SAL_CALL ODatabaseDocument::hasLocation( ) throw (RuntimeException)
// both XStorable::getLocation and XModel::getURL have to return the URL of the document, *not*
// the location of the file which the docunment was possibly recovered from (which would be getDocFileLocation)
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseDocument::isReadonly( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
return m_pImpl->m_bDocumentReadOnly;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseDocument::store( ) throw (IOException, RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -975,7 +939,6 @@ void SAL_CALL ODatabaseDocument::store( ) throw (IOException, RuntimeException)
}
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_throwIOExceptionCausedBySave_throw( const Any& i_rError, const ::rtl::OUString& i_rTargetURL ) const
{
::rtl::OUString sErrorMessage = extractExceptionMessage( m_pImpl->m_aContext, i_rError );
@@ -987,7 +950,6 @@ void ODatabaseDocument::impl_throwIOExceptionCausedBySave_throw( const Any& i_rE
throw IOException( sErrorMessage, *const_cast< ODatabaseDocument* >( this ) );
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_storeAs_throw( const ::rtl::OUString& _rURL, const ::comphelper::NamedValueCollection& _rArguments,
const StoreType _eType, DocumentGuard& _rGuard ) throw ( IOException, RuntimeException )
{
@@ -1090,11 +1052,10 @@ void ODatabaseDocument::impl_storeAs_throw( const ::rtl::OUString& _rURL, const
impl_notifyStorageChange_nolck_nothrow( xNewRootStorage );
}
-// -----------------------------------------------------------------------------
Reference< XStorage > ODatabaseDocument::impl_createStorageFor_throw( const ::rtl::OUString& _rURL ) const
{
Reference < ::com::sun::star::ucb::XSimpleFileAccess > xTempAccess;
- m_pImpl->m_aContext.createComponent( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ,xTempAccess);
+ m_pImpl->m_aContext.createComponent( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")) ,xTempAccess);
Reference< io::XStream > xStream = xTempAccess->openFileReadWrite( _rURL );
Reference< io::XTruncate > xTruncate(xStream,UNO_QUERY);
if ( xTruncate.is() )
@@ -1109,7 +1070,6 @@ Reference< XStorage > ODatabaseDocument::impl_createStorageFor_throw( const ::rt
return Reference< XStorage >( xStorageFactory->createInstanceWithArguments( aParam ), UNO_QUERY_THROW );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::storeAsURL( const ::rtl::OUString& _rURL, const Sequence< PropertyValue >& _rArguments ) throw (IOException, RuntimeException)
{
// SYNCHRONIZED ->
@@ -1158,7 +1118,6 @@ void SAL_CALL ODatabaseDocument::storeAsURL( const ::rtl::OUString& _rURL, const
m_aEventNotifier.notifyDocumentEvent( "OnCreate" );
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_storeToStorage_throw( const Reference< XStorage >& _rxTargetStorage, const Sequence< PropertyValue >& _rMediaDescriptor,
DocumentGuard& _rDocGuard ) const
{
@@ -1199,7 +1158,6 @@ void ODatabaseDocument::impl_storeToStorage_throw( const Reference< XStorage >&
}
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::storeToURL( const ::rtl::OUString& _rURL, const Sequence< PropertyValue >& _rArguments ) throw (IOException, RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -1241,7 +1199,6 @@ void SAL_CALL ODatabaseDocument::storeToURL( const ::rtl::OUString& _rURL, const
m_aEventNotifier.notifyDocumentEventAsync( "OnSaveToDone", NULL, makeAny( _rURL ) );
}
-// -----------------------------------------------------------------------------
// XModifyBroadcaster
void SAL_CALL ODatabaseDocument::addModifyListener( const Reference< XModifyListener >& _xListener ) throw (RuntimeException)
{
@@ -1249,14 +1206,12 @@ void SAL_CALL ODatabaseDocument::addModifyListener( const Reference< XModifyList
m_aModifyListeners.addInterface(_xListener);
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::removeModifyListener( const Reference< XModifyListener >& _xListener ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
m_aModifyListeners.removeInterface(_xListener);
}
-// -----------------------------------------------------------------------------
// XModifiable
sal_Bool SAL_CALL ODatabaseDocument::isModified( ) throw (RuntimeException)
{
@@ -1265,7 +1220,6 @@ sal_Bool SAL_CALL ODatabaseDocument::isModified( ) throw (RuntimeException)
return m_pImpl->m_bModified;
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::setModified( sal_Bool _bModified ) throw (PropertyVetoException, RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
@@ -1276,7 +1230,6 @@ void SAL_CALL ODatabaseDocument::setModified( sal_Bool _bModified ) throw (Prope
// a proper "modified" flag
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_setModified_nothrow( sal_Bool _bModified, DocumentGuard& _rGuard )
{
// SYNCHRONIZED ->
@@ -1297,32 +1250,27 @@ void ODatabaseDocument::impl_setModified_nothrow( sal_Bool _bModified, DocumentG
}
}
-// -----------------------------------------------------------------------------
// ::com::sun::star::document::XEventBroadcaster
void SAL_CALL ODatabaseDocument::addEventListener(const uno::Reference< document::XEventListener >& _Listener ) throw (uno::RuntimeException)
{
m_aEventNotifier.addLegacyEventListener( _Listener );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::removeEventListener( const uno::Reference< document::XEventListener >& _Listener ) throw (uno::RuntimeException)
{
m_aEventNotifier.removeLegacyEventListener( _Listener );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::addDocumentEventListener( const Reference< XDocumentEventListener >& _Listener ) throw (RuntimeException)
{
m_aEventNotifier.addDocumentEventListener( _Listener );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::removeDocumentEventListener( const Reference< XDocumentEventListener >& _Listener ) throw (RuntimeException)
{
m_aEventNotifier.removeDocumentEventListener( _Listener );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::notifyDocumentEvent( const ::rtl::OUString& _EventName, const Reference< XController2 >& _ViewController, const Any& _Supplement ) throw (IllegalArgumentException, NoSupportException, RuntimeException)
{
if ( !_EventName.getLength() )
@@ -1342,33 +1290,29 @@ void SAL_CALL ODatabaseDocument::notifyDocumentEvent( const ::rtl::OUString& _Ev
m_aEventNotifier.notifyDocumentEvent( _EventName, _ViewController, _Supplement );
}
-// -----------------------------------------------------------------------------
Sequence< PropertyValue > SAL_CALL ODatabaseDocument::getPrinter( ) throw (RuntimeException)
{
- DBG_ERROR( "ODatabaseDocument::getPrinter: not supported!" );
+ OSL_FAIL( "ODatabaseDocument::getPrinter: not supported!" );
return Sequence< PropertyValue >();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::setPrinter( const Sequence< PropertyValue >& /*aPrinter*/ ) throw (IllegalArgumentException, RuntimeException)
{
- DBG_ERROR( "ODatabaseDocument::setPrinter: not supported!" );
+ OSL_FAIL( "ODatabaseDocument::setPrinter: not supported!" );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::print( const Sequence< PropertyValue >& /*xOptions*/ ) throw (IllegalArgumentException, RuntimeException)
{
- DBG_ERROR( "ODatabaseDocument::print: not supported!" );
+ OSL_FAIL( "ODatabaseDocument::print: not supported!" );
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_reparent_nothrow( const WeakReference< XNameAccess >& _rxContainer )
{
Reference< XChild > xChild( _rxContainer.get(), UNO_QUERY );
if ( xChild.is() )
xChild->setParent( *this );
}
-// -----------------------------------------------------------------------------
+
void ODatabaseDocument::clearObjectContainer( WeakReference< XNameAccess >& _rxContainer)
{
Reference< XNameAccess > xContainer = _rxContainer;
@@ -1379,7 +1323,7 @@ void ODatabaseDocument::clearObjectContainer( WeakReference< XNameAccess >& _rxC
xChild->setParent( NULL );
_rxContainer = Reference< XNameAccess >();
}
-// -----------------------------------------------------------------------------
+
Reference< XNameAccess > ODatabaseDocument::impl_getDocumentContainer_throw( ODatabaseModelImpl::ObjectType _eType )
{
if ( ( _eType != ODatabaseModelImpl::E_FORM ) && ( _eType != ODatabaseModelImpl::E_REPORT ) )
@@ -1415,7 +1359,6 @@ Reference< XNameAccess > ODatabaseDocument::impl_getDocumentContainer_throw( ODa
return xContainer;
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_closeControllerFrames_nolck_throw( sal_Bool _bDeliverOwnership )
{
Controllers aCopy = m_aControllers;
@@ -1440,7 +1383,6 @@ void ODatabaseDocument::impl_closeControllerFrames_nolck_throw( sal_Bool _bDeliv
}
}
-// -----------------------------------------------------------------------------
struct DisposeControllerFrame : public ::std::unary_function< Reference< XController >, void >
{
void operator()( const Reference< XController >& _rxController ) const
@@ -1460,7 +1402,6 @@ struct DisposeControllerFrame : public ::std::unary_function< Reference< XContro
};
};
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_disposeControllerFrames_nothrow()
{
Controllers aCopy;
@@ -1468,7 +1409,6 @@ void ODatabaseDocument::impl_disposeControllerFrames_nothrow()
::std::for_each( aCopy.begin(), aCopy.end(), DisposeControllerFrame() );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::close( sal_Bool _bDeliverOwnership ) throw (CloseVetoException, RuntimeException)
{
// nearly everything below can/must be done without our mutex locked, the below is just for
@@ -1508,32 +1448,31 @@ void SAL_CALL ODatabaseDocument::close( sal_Bool _bDeliverOwnership ) throw (Clo
m_bClosing = false;
// <- SYNCHRONIZED
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseDocument::addCloseListener( const Reference< ::com::sun::star::util::XCloseListener >& Listener ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
m_aCloseListener.addInterface(Listener);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseDocument::removeCloseListener( const Reference< ::com::sun::star::util::XCloseListener >& Listener ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
m_aCloseListener.removeInterface(Listener);
}
-// -----------------------------------------------------------------------------
+
Reference< XNameAccess > SAL_CALL ODatabaseDocument::getFormDocuments( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
return impl_getDocumentContainer_throw( ODatabaseModelImpl::E_FORM );
}
-// -----------------------------------------------------------------------------
+
Reference< XNameAccess > SAL_CALL ODatabaseDocument::getReportDocuments( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
return impl_getDocumentContainer_throw( ODatabaseModelImpl::E_REPORT );
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::WriteThroughComponent( const Reference< XComponent >& xComponent, const sal_Char* pStreamName,
const sal_Char* pServiceName, const Sequence< Any >& _rArguments, const Sequence< PropertyValue >& rMediaDesc,
const Reference<XStorage>& _xStorageToSaveTo ) const
@@ -1602,7 +1541,6 @@ void ODatabaseDocument::WriteThroughComponent( const Reference< XOutputStream >&
xFilter->filter( rMediaDesc );
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _rxTargetStorage, const ::comphelper::NamedValueCollection& _rMediaDescriptor ) const
{
// extract status indicator
@@ -1637,7 +1575,7 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r
{
xInfoSet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Version" )), uno::makeAny( aVersion ) );
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
}
}
@@ -1665,7 +1603,6 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r
m_pImpl->storeLibraryContainersTo( _rxTargetStorage );
}
-// -----------------------------------------------------------------------------
Reference< XUIConfigurationManager > SAL_CALL ODatabaseDocument::getUIConfigurationManager( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -1703,7 +1640,7 @@ Reference< XUIConfigurationManager > SAL_CALL ODatabaseDocument::getUIConfigurat
return m_xUIConfigurationManager;
}
-// -----------------------------------------------------------------------------
+
Reference< XStorage > SAL_CALL ODatabaseDocument::getDocumentSubStorage( const ::rtl::OUString& aStorageName, sal_Int32 nMode ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -1711,14 +1648,13 @@ Reference< XStorage > SAL_CALL ODatabaseDocument::getDocumentSubStorage( const :
Reference< XDocumentSubStorageSupplier > xStorageAccess( m_pImpl->getDocumentSubStorageSupplier() );
return xStorageAccess->getDocumentSubStorage( aStorageName, nMode );
}
-// -----------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL ODatabaseDocument::getDocumentSubStoragesNames( ) throw (::com::sun::star::io::IOException, RuntimeException)
{
Reference< XDocumentSubStorageSupplier > xStorageAccess( m_pImpl->getDocumentSubStorageSupplier() );
return xStorageAccess->getDocumentSubStoragesNames();
}
-//------------------------------------------------------------------------------
void ODatabaseDocument::impl_notifyStorageChange_nolck_nothrow( const Reference< XStorage >& _rxNewRootStorage )
{
Reference< XInterface > xMe( *const_cast< ODatabaseDocument* >( this ) );
@@ -1727,14 +1663,13 @@ void ODatabaseDocument::impl_notifyStorageChange_nolck_nothrow( const Reference<
boost::bind( &XStorageChangeListener::notifyStorageChange, _1, boost::cref( xMe ), boost::cref( _rxNewRootStorage ) ) );
}
-//------------------------------------------------------------------------------
void ODatabaseDocument::disposing()
{
OSL_TRACE( "DD: disp: %p: %p", this, m_pImpl.get() );
if ( !m_pImpl.is() )
{
// this means that we're already disposed
- DBG_ASSERT( ODatabaseDocument_OfficeDocument::rBHelper.bDisposed, "ODatabaseDocument::disposing: no impl anymore, but not yet disposed!" );
+ OSL_ENSURE( ODatabaseDocument_OfficeDocument::rBHelper.bDisposed, "ODatabaseDocument::disposing: no impl anymore, but not yet disposed!" );
return;
}
@@ -1760,7 +1695,7 @@ void ODatabaseDocument::disposing()
// SYNCHRONIZED ->
::osl::ClearableMutexGuard aGuard( m_aMutex );
- DBG_ASSERT( m_aControllers.empty(), "ODatabaseDocument::disposing: there still are controllers!" );
+ OSL_ENSURE( m_aControllers.empty(), "ODatabaseDocument::disposing: there still are controllers!" );
// normally, nobody should explicitly dispose, but only XCloseable::close the document. And upon
// closing, our controllers are closed, too
@@ -1775,7 +1710,7 @@ void ODatabaseDocument::disposing()
// the security warning, again.
m_pImpl->resetMacroExecutionMode();
- // similar argueing for our ViewMonitor
+ // similar arguing for our ViewMonitor
m_aViewMonitor.reset();
// tell our Impl to forget us
@@ -1783,7 +1718,7 @@ void ODatabaseDocument::disposing()
// now, at the latest, the controller array should be empty. Controllers are
// expected to listen for our disposal, and disconnect then
- DBG_ASSERT( m_aControllers.empty(), "ODatabaseDocument::disposing: there still are controllers!" );
+ OSL_ENSURE( m_aControllers.empty(), "ODatabaseDocument::disposing: there still are controllers!" );
impl_disposeControllerFrames_nothrow();
aKeepAlive.push_back( m_xModuleManager );
@@ -1799,42 +1734,39 @@ void ODatabaseDocument::disposing()
aKeepAlive.clear();
}
-// -----------------------------------------------------------------------------
+
// XComponent
void SAL_CALL ODatabaseDocument::dispose( ) throw (RuntimeException)
{
::cppu::WeakComponentImplHelperBase::dispose();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseDocument::addEventListener( const Reference< lang::XEventListener >& _xListener ) throw (RuntimeException)
{
::cppu::WeakComponentImplHelperBase::addEventListener( _xListener );
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseDocument::removeEventListener( const Reference< lang::XEventListener >& _xListener ) throw (RuntimeException)
{
::cppu::WeakComponentImplHelperBase::removeEventListener( _xListener );
}
+
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString ODatabaseDocument::getImplementationName( ) throw(RuntimeException)
{
return getImplementationName_static();
}
-//------------------------------------------------------------------------------
rtl::OUString ODatabaseDocument::getImplementationName_static( ) throw(RuntimeException)
{
- return rtl::OUString::createFromAscii("com.sun.star.comp.dba.ODatabaseDocument");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.dba.ODatabaseDocument"));
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > ODatabaseDocument::getSupportedServiceNames( ) throw (RuntimeException)
{
return getSupportedServiceNames_static();
}
-//------------------------------------------------------------------------------
Reference< XInterface > ODatabaseDocument::Create( const Reference< XComponentContext >& _rxContext )
{
::comphelper::ComponentContext aContext( _rxContext );
@@ -1846,7 +1778,6 @@ Reference< XInterface > ODatabaseDocument::Create( const Reference< XComponentCo
return xModel.get();
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > ODatabaseDocument::getSupportedServiceNames_static( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
@@ -1855,19 +1786,17 @@ Sequence< ::rtl::OUString > ODatabaseDocument::getSupportedServiceNames_static(
return aSNS;
}
-//------------------------------------------------------------------------------
sal_Bool ODatabaseDocument::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-// -----------------------------------------------------------------------------
+
Reference< XDataSource > SAL_CALL ODatabaseDocument::getDataSource() throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
return m_pImpl->getOrCreateDataSource();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::loadFromStorage( const Reference< XStorage >& /*xStorage*/, const Sequence< PropertyValue >& /*aMediaDescriptor*/ ) throw (IllegalArgumentException, DoubleInitializationException, IOException, Exception, RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -1878,14 +1807,12 @@ void SAL_CALL ODatabaseDocument::loadFromStorage( const Reference< XStorage >& /
);
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::storeToStorage( const Reference< XStorage >& _rxStorage, const Sequence< PropertyValue >& _rMediaDescriptor ) throw (IllegalArgumentException, IOException, Exception, RuntimeException)
{
DocumentGuard aGuard( *this );
impl_storeToStorage_throw( _rxStorage, _rMediaDescriptor, aGuard );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::switchToStorage( const Reference< XStorage >& _rxNewRootStorage ) throw (IllegalArgumentException, IOException, Exception, RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -1896,56 +1823,48 @@ void SAL_CALL ODatabaseDocument::switchToStorage( const Reference< XStorage >& _
impl_notifyStorageChange_nolck_nothrow( xNewRootStorage );
}
-// -----------------------------------------------------------------------------
Reference< XStorage > SAL_CALL ODatabaseDocument::getDocumentStorage( ) throw (IOException, Exception, RuntimeException)
{
DocumentGuard aGuard( *this );
return m_pImpl->getOrCreateRootStorage();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::addStorageChangeListener( const Reference< XStorageChangeListener >& _Listener ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
m_aStorageListeners.addInterface( _Listener );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::removeStorageChangeListener( const Reference< XStorageChangeListener >& _Listener ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
m_aStorageListeners.addInterface( _Listener );
}
-// -----------------------------------------------------------------------------
Reference< XStorageBasedLibraryContainer > SAL_CALL ODatabaseDocument::getBasicLibraries() throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
return m_pImpl->getLibraryContainer( true );
}
-// -----------------------------------------------------------------------------
Reference< XStorageBasedLibraryContainer > SAL_CALL ODatabaseDocument::getDialogLibraries() throw (RuntimeException)
{
DocumentGuard aGuard( *this );
return m_pImpl->getLibraryContainer( false );
}
-// -----------------------------------------------------------------------------
::sal_Bool SAL_CALL ODatabaseDocument::getAllowMacroExecution() throw (RuntimeException)
{
DocumentGuard aGuard( *this );
return m_pImpl->adjustMacroMode_AutoReject();
}
-// -----------------------------------------------------------------------------
Reference< XEmbeddedScripts > SAL_CALL ODatabaseDocument::getScriptContainer() throw (RuntimeException)
{
DocumentGuard aGuard( *this );
return this;
}
-// -----------------------------------------------------------------------------
Reference< provider::XScriptProvider > SAL_CALL ODatabaseDocument::getScriptProvider( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -1967,26 +1886,23 @@ Reference< provider::XScriptProvider > SAL_CALL ODatabaseDocument::getScriptProv
return xScriptProvider;
}
-// -----------------------------------------------------------------------------
Reference< XNameReplace > SAL_CALL ODatabaseDocument::getEvents( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
return m_pEventContainer;
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(RuntimeException)
{
if ( m_pImpl.is() )
m_pImpl->disposing(Source);
}
-//------------------------------------------------------------------
Reference< XInterface > ODatabaseDocument::getThis() const
{
return *const_cast< ODatabaseDocument* >( this );
}
-// -----------------------------------------------------------------------------
+
struct CreateAny : public ::std::unary_function< Reference<XController>, Any>
{
Any operator() (const Reference<XController>& lhs) const
@@ -2003,14 +1919,14 @@ Reference< XEnumeration > SAL_CALL ODatabaseDocument::getControllers( ) throw (
::std::transform( m_aControllers.begin(), m_aControllers.end(), aController.getArray(), CreateAny() );
return new ::comphelper::OAnyEnumeration(aController);
}
-// -----------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL ODatabaseDocument::getAvailableViewControllerNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aNames(1);
aNames[0] = SERVICE_SDB_APPLICATIONCONTROLLER;
return aNames;
}
-// -----------------------------------------------------------------------------
+
Reference< XController2 > SAL_CALL ODatabaseDocument::createDefaultViewController( const Reference< XFrame >& _Frame ) throw (IllegalArgumentException, Exception, RuntimeException)
{
return createViewController(
@@ -2020,10 +1936,9 @@ Reference< XController2 > SAL_CALL ODatabaseDocument::createDefaultViewControlle
);
}
-// -----------------------------------------------------------------------------
Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( const ::rtl::OUString& _ViewName, const Sequence< PropertyValue >& _Arguments, const Reference< XFrame >& _Frame ) throw (IllegalArgumentException, Exception, RuntimeException)
{
- if ( !_ViewName.equalsAscii( "Default" ) && !_ViewName.equalsAscii( "Preview" ) )
+ if ( !_ViewName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Default" ) ) && !_ViewName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Preview" ) ) )
throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
if ( !_Frame.is() )
throw IllegalArgumentException( ::rtl::OUString(), *this, 3 );
@@ -2037,7 +1952,7 @@ Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( cons
::comphelper::NamedValueCollection aInitArgs( _Arguments );
aInitArgs.put( "Frame", _Frame );
- if ( _ViewName.equalsAscii( "Preview" ) )
+ if ( _ViewName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Preview" ) ) )
aInitArgs.put( "Preview", sal_Bool( sal_True ) );
Reference< XInitialization > xInitController( xController, UNO_QUERY_THROW );
xInitController->initialize( aInitArgs.getWrappedPropertyValues() );
@@ -2045,8 +1960,6 @@ Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( cons
return xController;
}
-// -----------------------------------------------------------------------------
-//=============================================================================
Reference< XTitle > ODatabaseDocument::impl_getTitleHelper_throw()
{
if ( ! m_xTitleHelper.is ())
@@ -2065,7 +1978,6 @@ Reference< XTitle > ODatabaseDocument::impl_getTitleHelper_throw()
return m_xTitleHelper;
}
-//=============================================================================
uno::Reference< frame::XUntitledNumbers > ODatabaseDocument::impl_getUntitledHelper_throw(const uno::Reference< uno::XInterface >& _xComponent)
{
if ( !m_xModuleManager.is() )
@@ -2076,9 +1988,8 @@ uno::Reference< frame::XUntitledNumbers > ODatabaseDocument::impl_getUntitledHel
{
sModuleId = m_xModuleManager->identify( _xComponent );
}
- catch(uno::Exception)
+ catch(const uno::Exception&)
{
- // ni
}
uno::Reference< frame::XUntitledNumbers > xNumberedControllers;
@@ -2090,7 +2001,7 @@ uno::Reference< frame::XUntitledNumbers > ODatabaseDocument::impl_getUntitledHel
xNumberedControllers.set(static_cast< ::cppu::OWeakObject* >(pHelper), uno::UNO_QUERY_THROW);
pHelper->setOwner (xThis);
- //pHelper->setUntitledPrefix (::rtl::OUString::createFromAscii(" : "));
+ //pHelper->setUntitledPrefix (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" : ")));
m_aNumberedControllers.insert(TNumberedController::value_type(sModuleId,xNumberedControllers));
}
@@ -2100,7 +2011,6 @@ uno::Reference< frame::XUntitledNumbers > ODatabaseDocument::impl_getUntitledHel
return xNumberedControllers;
}
-//=============================================================================
// css.frame.XTitle
::rtl::OUString SAL_CALL ODatabaseDocument::getTitle()
throw (uno::RuntimeException)
@@ -2110,7 +2020,6 @@ uno::Reference< frame::XUntitledNumbers > ODatabaseDocument::impl_getUntitledHel
return impl_getTitleHelper_throw()->getTitle();
}
-//=============================================================================
// css.frame.XTitle
void SAL_CALL ODatabaseDocument::setTitle( const ::rtl::OUString& sTitle )
throw (uno::RuntimeException)
@@ -2122,7 +2031,6 @@ void SAL_CALL ODatabaseDocument::setTitle( const ::rtl::OUString& sTitle )
// <- SYNCHRONIZED
}
-//=============================================================================
// css.frame.XTitleChangeBroadcaster
void SAL_CALL ODatabaseDocument::addTitleChangeListener( const uno::Reference< frame::XTitleChangeListener >& xListener )
throw (uno::RuntimeException)
@@ -2134,7 +2042,6 @@ void SAL_CALL ODatabaseDocument::addTitleChangeListener( const uno::Reference< f
xBroadcaster->addTitleChangeListener( xListener );
}
-//=============================================================================
// css.frame.XTitleChangeBroadcaster
void SAL_CALL ODatabaseDocument::removeTitleChangeListener( const uno::Reference< frame::XTitleChangeListener >& xListener )
throw (uno::RuntimeException)
@@ -2146,7 +2053,6 @@ void SAL_CALL ODatabaseDocument::removeTitleChangeListener( const uno::Reference
xBroadcaster->removeTitleChangeListener( xListener );
}
-//=============================================================================
// css.frame.XUntitledNumbers
::sal_Int32 SAL_CALL ODatabaseDocument::leaseNumber( const uno::Reference< uno::XInterface >& xComponent )
throw (lang::IllegalArgumentException,
@@ -2156,7 +2062,6 @@ void SAL_CALL ODatabaseDocument::removeTitleChangeListener( const uno::Reference
return impl_getUntitledHelper_throw(xComponent)->leaseNumber (xComponent);
}
-//=============================================================================
// css.frame.XUntitledNumbers
void SAL_CALL ODatabaseDocument::releaseNumber( ::sal_Int32 nNumber )
throw (lang::IllegalArgumentException,
@@ -2166,7 +2071,6 @@ void SAL_CALL ODatabaseDocument::releaseNumber( ::sal_Int32 nNumber )
impl_getUntitledHelper_throw()->releaseNumber (nNumber);
}
-//=============================================================================
// css.frame.XUntitledNumbers
void SAL_CALL ODatabaseDocument::releaseNumberForComponent( const uno::Reference< uno::XInterface >& xComponent )
throw (lang::IllegalArgumentException,
@@ -2176,16 +2080,11 @@ void SAL_CALL ODatabaseDocument::releaseNumberForComponent( const uno::Reference
impl_getUntitledHelper_throw(xComponent)->releaseNumberForComponent (xComponent);
}
-//=============================================================================
// css.frame.XUntitledNumbers
::rtl::OUString SAL_CALL ODatabaseDocument::getUntitledPrefix() throw (uno::RuntimeException)
{
return ::rtl::OUString();/*RTL_CONSTASCII_USTRINGPARAM(" : "));*/
}
-//------------------------------------------------------------------
-//........................................................................
} // namespace dbaccess
-//........................................................................
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx b/dbaccess/source/core/dataaccess/databasedocument.hxx
index a299d984e..9f5068e72 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.hxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -145,7 +146,7 @@ private:
//============================================================
//= ODatabaseDocument
//============================================================
-typedef ::comphelper::WeakComponentImplHelper17 < ::com::sun::star::frame::XModel2
+typedef ::comphelper::PartialWeakComponentImplHelper17 < ::com::sun::star::frame::XModel2
, ::com::sun::star::util::XModifiable
, ::com::sun::star::frame::XStorable
, ::com::sun::star::document::XEventBroadcaster
@@ -291,7 +292,7 @@ private:
// Do NOT create those documents directly, always use ODatabaseModelImpl::getModel. Reason is that
// ODatabaseDocument requires clear ownership, and in turn lifetime synchronisation with the ModelImpl.
// If you create a ODatabaseDocument directly, you might easily create a leak.
- // #i50905# / 2005-06-20 / frank.schonheit@sun.com
+ // #i50905#
protected:
virtual void SAL_CALL disposing();
@@ -371,12 +372,12 @@ public:
// XEventBroadcaster
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
-
+
// XDocumentEventBroadcaster
virtual void SAL_CALL addDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL notifyDocumentEvent( const ::rtl::OUString& _EventName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& _ViewController, const ::com::sun::star::uno::Any& _Supplement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
-
+
// XPrintable
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getPrinter( ) throw (::com::sun::star::uno::RuntimeException) ;
virtual void SAL_CALL setPrinter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aPrinter ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) ;
@@ -620,7 +621,6 @@ private:
denotes additional document parameters
@param _rDocGuard
is the guard which currently protects the document instance
-
*/
sal_Bool impl_attachResource(
const ::rtl::OUString& i_rLogicalDocumentURL,
@@ -703,7 +703,7 @@ private:
const ODatabaseDocument& m_document;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_COREDATAACCESS_DATABASEDOCUMENT_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.cxx b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
index c6c823373..e2a521b71 100644
--- a/dbaccess/source/core/dataaccess/databaseregistrations.cxx
+++ b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
@@ -1,6 +1,7 @@
+/* -*- 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
@@ -40,11 +41,8 @@
#include <tools/urlobj.hxx>
#include <unotools/confignode.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
-
/** === begin UNO using === **/
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::XInterface;
@@ -67,24 +65,21 @@ namespace dbaccess
using ::com::sun::star::uno::XAggregation;
/** === end UNO using === **/
- //--------------------------------------------------------------------
static const ::rtl::OUString& getConfigurationRootPath()
{
- static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("org.openoffice.Office.DataAccess/RegisteredNames");
+ static ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.DataAccess/RegisteredNames"));
return s_sNodeName;
}
- //--------------------------------------------------------------------
const ::rtl::OUString& getLocationNodeName()
{
- static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii( "Location" );
+ static ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("Location"));
return s_sNodeName;
}
- //--------------------------------------------------------------------
const ::rtl::OUString& getNameNodeName()
{
- static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii( "Name" );
+ static ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("Name"));
return s_sNodeName;
}
@@ -150,7 +145,6 @@ namespace dbaccess
//====================================================================
//= DatabaseRegistrations - implementation
//====================================================================
- //--------------------------------------------------------------------
DatabaseRegistrations::DatabaseRegistrations( const ::comphelper::ComponentContext& _rxContext )
:m_aContext( _rxContext )
,m_aConfigurationRoot()
@@ -160,12 +154,10 @@ namespace dbaccess
m_aContext.getLegacyServiceFactory(), getConfigurationRootPath(), -1, ::utl::OConfigurationTreeRoot::CM_UPDATABLE );
}
- //--------------------------------------------------------------------
DatabaseRegistrations::~DatabaseRegistrations()
{
}
- //--------------------------------------------------------------------
::utl::OConfigurationNode DatabaseRegistrations::impl_getNodeForName_nothrow( const ::rtl::OUString& _rName )
{
Sequence< ::rtl::OUString > aNames( m_aConfigurationRoot.getNodeNames() );
@@ -184,7 +176,6 @@ namespace dbaccess
return ::utl::OConfigurationNode();
}
- //--------------------------------------------------------------------
::utl::OConfigurationNode DatabaseRegistrations::impl_getNodeForName_throw( const ::rtl::OUString& _rName, const bool _bMustExist )
{
::utl::OConfigurationNode aNodeForName( impl_getNodeForName_nothrow( _rName ) );
@@ -210,7 +201,7 @@ namespace dbaccess
::rtl::OUStringBuffer aReset( aNewNodeName );
sNewNodeName = aNewNodeName.makeStringAndClear();
sal_Int32 i=2;
- while ( m_aConfigurationRoot.hasByName( sNewNodeName ) )
+ while ( m_aConfigurationRoot.hasByName( sNewNodeName ) )
{
aNewNodeName = aReset;
aNewNodeName.appendAscii( " " );
@@ -224,7 +215,6 @@ namespace dbaccess
return aNewNode;
}
- //--------------------------------------------------------------------
::utl::OConfigurationNode DatabaseRegistrations::impl_checkValidName_throw( const ::rtl::OUString& _rName, const bool _bMustExist )
{
if ( !m_aConfigurationRoot.isValid() )
@@ -236,7 +226,6 @@ namespace dbaccess
return impl_getNodeForName_throw( _rName, _bMustExist );
}
- //--------------------------------------------------------------------
void DatabaseRegistrations::impl_checkValidLocation_throw( const ::rtl::OUString& _rLocation )
{
if ( !_rLocation.getLength() )
@@ -247,15 +236,13 @@ namespace dbaccess
throw IllegalArgumentException( ::rtl::OUString(), *this, 2 );
}
- //--------------------------------------------------------------------
::sal_Bool SAL_CALL DatabaseRegistrations::hasRegisteredDatabase( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
::utl::OConfigurationNode aNodeForName = impl_getNodeForName_nothrow( _Name );
return aNodeForName.isValid();
}
-
- //------------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL DatabaseRegistrations::getRegistrationNames() throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -273,13 +260,11 @@ namespace dbaccess
{
::utl::OConfigurationNode aRegistrationNode = m_aConfigurationRoot.openNode( *pName );
OSL_VERIFY( aRegistrationNode.getNodeValue( getNameNodeName() ) >>= *pDisplayName );
-
}
return aDisplayNames;
}
- //--------------------------------------------------------------------
::rtl::OUString SAL_CALL DatabaseRegistrations::getDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -292,8 +277,7 @@ namespace dbaccess
return sLocation;
}
-
- //--------------------------------------------------------------------
+
void SAL_CALL DatabaseRegistrations::registerDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _Location ) throw (IllegalArgumentException, ElementExistException, RuntimeException)
{
::osl::ClearableMutexGuard aGuard( m_aMutex );
@@ -311,8 +295,7 @@ namespace dbaccess
aGuard.clear();
m_aRegistrationListeners.notifyEach( &XDatabaseRegistrationsListener::registeredDatabaseLocation, aEvent );
}
-
- //--------------------------------------------------------------------
+
void SAL_CALL DatabaseRegistrations::revokeDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException)
{
::osl::ClearableMutexGuard aGuard( m_aMutex );
@@ -337,8 +320,7 @@ namespace dbaccess
aGuard.clear();
m_aRegistrationListeners.notifyEach( &XDatabaseRegistrationsListener::revokedDatabaseLocation, aEvent );
}
-
- //--------------------------------------------------------------------
+
void SAL_CALL DatabaseRegistrations::changeDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _NewLocation ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException)
{
::osl::ClearableMutexGuard aGuard( m_aMutex );
@@ -364,7 +346,6 @@ namespace dbaccess
m_aRegistrationListeners.notifyEach( &XDatabaseRegistrationsListener::changedDatabaseLocation, aEvent );
}
- //--------------------------------------------------------------------
::sal_Bool SAL_CALL DatabaseRegistrations::isDatabaseRegistrationReadOnly( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -372,14 +353,12 @@ namespace dbaccess
return aDataSourceRegistration.isReadonly();
}
- //--------------------------------------------------------------------
void SAL_CALL DatabaseRegistrations::addDatabaseRegistrationsListener( const Reference< XDatabaseRegistrationsListener >& _Listener ) throw (RuntimeException)
{
if ( _Listener.is() )
m_aRegistrationListeners.addInterface( _Listener );
}
- //--------------------------------------------------------------------
void SAL_CALL DatabaseRegistrations::removeDatabaseRegistrationsListener( const Reference< XDatabaseRegistrationsListener >& _Listener ) throw (RuntimeException)
{
if ( _Listener.is() )
@@ -394,6 +373,5 @@ namespace dbaccess
return new DatabaseRegistrations( _rxContext );
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.hxx b/dbaccess/source/core/dataaccess/databaseregistrations.hxx
index 927f484b7..f3213dba6 100644
--- a/dbaccess/source/core/dataaccess/databaseregistrations.hxx
+++ b/dbaccess/source/core/dataaccess/databaseregistrations.hxx
@@ -1,6 +1,7 @@
+/* -*- 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
@@ -36,16 +37,14 @@ namespace comphelper
class ComponentContext;
}
-//........................................................................
namespace dbaccess
{
-//........................................................................
::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation >
createDataSourceRegistrations( const ::comphelper::ComponentContext& _rxContext );
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // OOO_DATASOURCEREGISTRATIONS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index ee4e187ae..334d97135 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -73,6 +74,7 @@
#include <cppuhelper/typeprovider.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <tools/urlobj.hxx>
#include <typelib/typedescription.hxx>
#include <unotools/confignode.hxx>
@@ -97,15 +99,12 @@ using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::reflection;
using namespace ::cppu;
using namespace ::osl;
-using namespace ::vos;
using namespace ::dbtools;
using namespace ::comphelper;
namespace css = ::com::sun::star;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//============================================================
//= FlushNotificationAdapter
@@ -154,7 +153,7 @@ FlushNotificationAdapter::FlushNotificationAdapter( const Reference< XFlushable
,m_aListener( _rxListener )
{
DBG_CTOR( FlushNotificationAdapter, NULL );
- DBG_ASSERT( _rxBroadcaster.is(), "FlushNotificationAdapter::FlushNotificationAdapter: invalid flushable!" );
+ OSL_ENSURE( _rxBroadcaster.is(), "FlushNotificationAdapter::FlushNotificationAdapter: invalid flushable!" );
osl_incrementInterlockedCount( &m_refCount );
{
@@ -162,7 +161,7 @@ FlushNotificationAdapter::FlushNotificationAdapter( const Reference< XFlushable
_rxBroadcaster->addFlushListener( this );
}
osl_decrementInterlockedCount( &m_refCount );
- DBG_ASSERT( m_refCount == 1, "FlushNotificationAdapter::FlushNotificationAdapter: broadcaster isn't holding by hard ref!?" );
+ OSL_ENSURE( m_refCount == 1, "FlushNotificationAdapter::FlushNotificationAdapter: broadcaster isn't holding by hard ref!?" );
}
//------------------------------------------------------------
@@ -171,7 +170,6 @@ FlushNotificationAdapter::~FlushNotificationAdapter()
DBG_DTOR( FlushNotificationAdapter, NULL );
}
-//--------------------------------------------------------------------
void SAL_CALL FlushNotificationAdapter::impl_dispose( bool _bRevokeListener )
{
Reference< XFlushListener > xKeepAlive( this );
@@ -187,7 +185,6 @@ void SAL_CALL FlushNotificationAdapter::impl_dispose( bool _bRevokeListener )
m_aBroadcaster = Reference< XFlushable >();
}
-//--------------------------------------------------------------------
void SAL_CALL FlushNotificationAdapter::flushed( const EventObject& rEvent ) throw (RuntimeException)
{
Reference< XFlushListener > xListener( m_aListener );
@@ -197,7 +194,6 @@ void SAL_CALL FlushNotificationAdapter::flushed( const EventObject& rEvent ) thr
impl_dispose( true );
}
-//--------------------------------------------------------------------
void SAL_CALL FlushNotificationAdapter::disposing( const EventObject& Source ) throw (RuntimeException)
{
Reference< XFlushListener > xListener( m_aListener );
@@ -207,52 +203,44 @@ void SAL_CALL FlushNotificationAdapter::disposing( const EventObject& Source ) t
impl_dispose( true );
}
-//--------------------------------------------------------------------------
OAuthenticationContinuation::OAuthenticationContinuation()
- :m_bRemberPassword(sal_True), // TODO: a meaningfull default
+ :m_bRemberPassword(sal_True), // TODO: a meaningful default
m_bCanSetUserName(sal_True)
{
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OAuthenticationContinuation::canSetRealm( ) throw(RuntimeException)
{
return sal_False;
}
-//--------------------------------------------------------------------------
void SAL_CALL OAuthenticationContinuation::setRealm( const ::rtl::OUString& /*Realm*/ ) throw(RuntimeException)
{
- DBG_ERROR("OAuthenticationContinuation::setRealm: not supported!");
+ OSL_FAIL("OAuthenticationContinuation::setRealm: not supported!");
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OAuthenticationContinuation::canSetUserName( ) throw(RuntimeException)
{
- // we alwas allow this, even if the database document is read-only. In this case,
+ // we always allow this, even if the database document is read-only. In this case,
// it's simply that the user cannot store the new user name.
return m_bCanSetUserName;
}
-//--------------------------------------------------------------------------
void SAL_CALL OAuthenticationContinuation::setUserName( const ::rtl::OUString& _rUser ) throw(RuntimeException)
{
m_sUser = _rUser;
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OAuthenticationContinuation::canSetPassword( ) throw(RuntimeException)
{
return sal_True;
}
-//--------------------------------------------------------------------------
void SAL_CALL OAuthenticationContinuation::setPassword( const ::rtl::OUString& _rPassword ) throw(RuntimeException)
{
m_sPassword = _rPassword;
}
-//--------------------------------------------------------------------------
Sequence< RememberAuthentication > SAL_CALL OAuthenticationContinuation::getRememberPasswordModes( RememberAuthentication& _reDefault ) throw(RuntimeException)
{
Sequence< RememberAuthentication > aReturn(1);
@@ -260,25 +248,21 @@ Sequence< RememberAuthentication > SAL_CALL OAuthenticationContinuation::getReme
return aReturn;
}
-//--------------------------------------------------------------------------
void SAL_CALL OAuthenticationContinuation::setRememberPassword( RememberAuthentication _eRemember ) throw(RuntimeException)
{
m_bRemberPassword = (RememberAuthentication_NO != _eRemember);
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OAuthenticationContinuation::canSetAccount( ) throw(RuntimeException)
{
return sal_False;
}
-//--------------------------------------------------------------------------
void SAL_CALL OAuthenticationContinuation::setAccount( const ::rtl::OUString& ) throw(RuntimeException)
{
- DBG_ERROR("OAuthenticationContinuation::setAccount: not supported!");
+ OSL_FAIL("OAuthenticationContinuation::setAccount: not supported!");
}
-//--------------------------------------------------------------------------
Sequence< RememberAuthentication > SAL_CALL OAuthenticationContinuation::getRememberAccountModes( RememberAuthentication& _reDefault ) throw(RuntimeException)
{
Sequence < RememberAuthentication > aReturn(1);
@@ -287,10 +271,9 @@ Sequence< RememberAuthentication > SAL_CALL OAuthenticationContinuation::getReme
return aReturn;
}
-//--------------------------------------------------------------------------
void SAL_CALL OAuthenticationContinuation::setRememberAccount( RememberAuthentication /*Remember*/ ) throw(RuntimeException)
{
- DBG_ERROR("OAuthenticationContinuation::setRememberAccount: not supported!");
+ OSL_FAIL("OAuthenticationContinuation::setRememberAccount: not supported!");
}
/** The class OSharedConnectionManager implements a structure to share connections.
@@ -334,7 +317,7 @@ class OSharedConnectionManager : public OConnectionHelper_BASE
typedef ::std::map< Reference< XConnection >,TConnectionMap::iterator> TSharedConnectionMap;// holds the shared connections
::osl::Mutex m_aMutex;
- TConnectionMap m_aConnections; // remeber the master connection in conjunction with the digest
+ TConnectionMap m_aConnections; // remember the master connection in conjunction with the digest
TSharedConnectionMap m_aSharedConnection; // the shared connections with conjunction with an iterator into the connections map
Reference< XProxyFactory > m_xProxyFactory;
@@ -396,14 +379,13 @@ Reference<XConnection> OSharedConnectionManager::getConnection( const rtl::OUStr
aInfoCopy[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TableFilter"));
aInfoCopy[nPos++].Value <<= _pDataSource->m_pImpl->m_aTableFilter;
aInfoCopy[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TableTypeFilter"));
- aInfoCopy[nPos++].Value <<= _pDataSource->m_pImpl->m_aTableTypeFilter; // #22377# OJ
+ aInfoCopy[nPos++].Value <<= _pDataSource->m_pImpl->m_aTableTypeFilter;
::rtl::OUString sUser = user;
::rtl::OUString sPassword = password;
if ((0 == sUser.getLength()) && (0 == sPassword.getLength()) && (0 != _pDataSource->m_pImpl->m_sUser.getLength()))
{ // ease the usage of this method. data source which are intended to have a user automatically
// fill in the user/password combination if the caller of this method does not specify otherwise
- // 86951 - 05/08/2001 - frank.schoenheit@germany.sun.com
sUser = _pDataSource->m_pImpl->m_sUser;
if (0 != _pDataSource->m_pImpl->m_aPassword.getLength())
sPassword = _pDataSource->m_pImpl->m_aPassword;
@@ -439,10 +421,8 @@ void OSharedConnectionManager::addEventListener(const Reference<XConnection>& _r
osl_incrementInterlockedCount(&_rIter->second.nALiveCount);
}
-//----------------------------------------------------------------------
namespace
{
- //------------------------------------------------------------------
Sequence< PropertyValue > lcl_filterDriverProperties( const Reference< XDriver >& _xDriver, const ::rtl::OUString& _sUrl,
const Sequence< PropertyValue >& _rDataSourceSettings, const AsciiPropertyValue* _pKnownSettings )
{
@@ -484,15 +464,13 @@ namespace
}
}
if ( !aRet.empty() )
- return Sequence< PropertyValue >(&(*aRet.begin()),aRet.size());
+ return Sequence< PropertyValue >(&(*aRet.begin()),aRet.size());
}
return Sequence< PropertyValue >();
}
- //------------------------------------------------------------------
typedef ::std::map< ::rtl::OUString, sal_Int32 > PropertyAttributeCache;
- //------------------------------------------------------------------
struct IsDefaultAndNotRemoveable : public ::std::unary_function< PropertyValue, bool >
{
private:
@@ -521,13 +499,12 @@ namespace
//= ODatabaseContext
//============================================================
DBG_NAME(ODatabaseSource)
-//--------------------------------------------------------------------------
+
extern "C" void SAL_CALL createRegistryInfo_ODatabaseSource()
{
static ::dba::OAutoRegistration< ODatabaseSource > aAutoRegistration;
}
-//--------------------------------------------------------------------------
ODatabaseSource::ODatabaseSource(const ::rtl::Reference<ODatabaseModelImpl>& _pImpl)
:ModelDependentComponent( _pImpl )
,ODatabaseSource_Base( getMutex() )
@@ -540,7 +517,6 @@ ODatabaseSource::ODatabaseSource(const ::rtl::Reference<ODatabaseModelImpl>& _pI
OSL_TRACE( "DS: ctor: %p: %p", this, m_pImpl.get() );
}
-//--------------------------------------------------------------------------
ODatabaseSource::~ODatabaseSource()
{
OSL_TRACE( "DS: dtor: %p: %p", this, m_pImpl.get() );
@@ -552,7 +528,6 @@ ODatabaseSource::~ODatabaseSource()
}
}
-//--------------------------------------------------------------------------
void ODatabaseSource::setName( const Reference< XDocumentDataSource >& _rxDocument, const ::rtl::OUString& _rNewName, DBContextAccess )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::setName" );
@@ -564,7 +539,6 @@ void ODatabaseSource::setName( const Reference< XDocumentDataSource >& _rxDocume
}
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > ODatabaseSource::getTypes() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getTypes" );
@@ -578,7 +552,6 @@ Sequence< Type > ODatabaseSource::getTypes() throw (RuntimeException)
);
}
-//--------------------------------------------------------------------------
Sequence< sal_Int8 > ODatabaseSource::getImplementationId() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getImplementationId" );
@@ -596,55 +569,48 @@ Sequence< sal_Int8 > ODatabaseSource::getImplementationId() throw (RuntimeExcept
}
// com::sun::star::uno::XInterface
-//--------------------------------------------------------------------------
Any ODatabaseSource::queryInterface( const Type & rType ) throw (RuntimeException)
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::queryInterface" );
Any aIface = ODatabaseSource_Base::queryInterface( rType );
if ( !aIface.hasValue() )
aIface = ::cppu::OPropertySetHelper::queryInterface( rType );
return aIface;
}
-//--------------------------------------------------------------------------
void ODatabaseSource::acquire() throw ()
{
ODatabaseSource_Base::acquire();
}
-//--------------------------------------------------------------------------
void ODatabaseSource::release() throw ()
{
ODatabaseSource_Base::release();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseSource::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(RuntimeException)
{
if ( m_pImpl.is() )
m_pImpl->disposing(Source);
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString ODatabaseSource::getImplementationName( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getImplementationName" );
return getImplementationName_static();
}
-//------------------------------------------------------------------------------
rtl::OUString ODatabaseSource::getImplementationName_static( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getImplementationName_static" );
- return rtl::OUString::createFromAscii("com.sun.star.comp.dba.ODatabaseSource");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.dba.ODatabaseSource"));
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > ODatabaseSource::getSupportedServiceNames( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getSupportedServiceNames" );
return getSupportedServiceNames_static();
}
-//------------------------------------------------------------------------------
+
Reference< XInterface > ODatabaseSource::Create( const Reference< XComponentContext >& _rxContext )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::Create" );
@@ -653,7 +619,6 @@ Reference< XInterface > ODatabaseSource::Create( const Reference< XComponentCont
return xDBContext->createInstance();
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > ODatabaseSource::getSupportedServiceNames_static( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getSupportedServiceNames_static" );
@@ -663,14 +628,13 @@ Sequence< ::rtl::OUString > ODatabaseSource::getSupportedServiceNames_static( )
return aSNS;
}
-//------------------------------------------------------------------------------
sal_Bool ODatabaseSource::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::supportsService" );
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
+
// OComponentHelper
-//------------------------------------------------------------------------------
void ODatabaseSource::disposing()
{
OSL_TRACE( "DS: disp: %p, %p", this, m_pImpl.get() );
@@ -684,7 +648,7 @@ void ODatabaseSource::disposing()
ODatabaseDocument::clearObjectContainer(m_pImpl->m_xTableDefinitions);
m_pImpl.clear();
}
-//------------------------------------------------------------------------------
+
Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const ::rtl::OUString& _rUid, const ::rtl::OUString& _rPwd)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::buildLowLevelConnection" );
@@ -700,7 +664,6 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const ::rtl::O
if ((0 == sUser.getLength()) && (0 == sPwd.getLength()) && (0 != m_pImpl->m_sUser.getLength()))
{ // ease the usage of this method. data source which are intended to have a user automatically
// fill in the user/password combination if the caller of this method does not specify otherwise
- // 86951 - 05/08/2001 - frank.schoenheit@germany.sun.com
sUser = m_pImpl->m_sUser;
if (0 != m_pImpl->m_aPassword.getLength())
sPwd = m_pImpl->m_aPassword;
@@ -717,13 +680,13 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const ::rtl::O
sal_Int32 nArgPos = 0;
if (sUser.getLength())
{
- aUserPwd[ nArgPos ].Name = ::rtl::OUString::createFromAscii("user");
+ aUserPwd[ nArgPos ].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user"));
aUserPwd[ nArgPos ].Value <<= sUser;
++nArgPos;
}
if (sPwd.getLength())
{
- aUserPwd[ nArgPos ].Name = ::rtl::OUString::createFromAscii("password");
+ aUserPwd[ nArgPos ].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("password"));
aUserPwd[ nArgPos ].Value <<= sPwd;
}
Reference< XDriver > xDriver;
@@ -735,7 +698,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const ::rtl::O
}
catch( const Exception& )
{
- DBG_ERROR( "ODatabaseSource::buildLowLevelConnection: got a strange exception while analyzing the error!" );
+ OSL_FAIL( "ODatabaseSource::buildLowLevelConnection: got a strange exception while analyzing the error!" );
}
if ( !xDriver.is() || !xDriver->acceptsURL( m_pImpl->m_sConnectURL ) )
{
@@ -796,7 +759,6 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const ::rtl::O
}
// OPropertySetHelper
-//------------------------------------------------------------------------------
Reference< XPropertySetInfo > ODatabaseSource::getPropertySetInfo() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getPropertySetInfo" );
@@ -804,7 +766,6 @@ Reference< XPropertySetInfo > ODatabaseSource::getPropertySetInfo() throw (Runt
}
// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* ODatabaseSource::createArrayHelper( ) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::createArrayHelper" );
@@ -826,16 +787,13 @@ Reference< XPropertySetInfo > ODatabaseSource::getPropertySetInfo() throw (Runt
}
// cppu::OPropertySetHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& ODatabaseSource::getInfoHelper()
{
return *getArrayHelper();
}
-//------------------------------------------------------------------------------
sal_Bool ODatabaseSource::convertFastPropertyValue(Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw( IllegalArgumentException )
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::convertFastPropertyValue" );
sal_Bool bModified(sal_False);
if ( m_pImpl.is() )
{
@@ -901,13 +859,12 @@ sal_Bool ODatabaseSource::convertFastPropertyValue(Any & rConvertedValue, Any &
}
break;
default:
- DBG_ERROR( "ODatabaseSource::convertFastPropertyValue: unknown or readonly Property!" );
+ OSL_FAIL( "ODatabaseSource::convertFastPropertyValue: unknown or readonly Property!" );
}
}
return bModified;
}
-//------------------------------------------------------------------------------
namespace
{
struct SelectPropertyName : public ::std::unary_function< PropertyValue, ::rtl::OUString >
@@ -919,9 +876,9 @@ namespace
}
};
- /** sets a new set of property values at a given property bag instance
+ /** sets a new set of property values for a given property bag instance
- The methods takes a property bag, and a sequence of property values to set at this bag.
+ The method takes a property bag, and a sequence of property values to set for this bag.
Upon return, every property which is not part of the given sequence is
<ul><li>removed from the bag, if it's a removeable property</li>
<li><em>or</em>reset to its default value, if it's not a removeable property</li>
@@ -930,7 +887,7 @@ namespace
@param _rxPropertyBag
the property bag to operate on
@param _rAllNewPropertyValues
- the new property values to set at the bag
+ the new property values to set for the bag
*/
void lcl_setPropertyValues_resetOrRemoveOther( const Reference< XPropertyAccess >& _rxPropertyBag, const Sequence< PropertyValue >& _rAllNewPropertyValues )
{
@@ -963,7 +920,7 @@ namespace
continue;
// this property is not to be set, but currently exists in the bag.
- // -> Remove, respectively default, it
+ // -> Remove it, or reset it to the default.
if ( ( pExistentProperty->Attributes & PropertyAttribute::REMOVEABLE ) != 0 )
xPropertyContainer->removeProperty( pExistentProperty->Name );
else
@@ -980,7 +937,6 @@ namespace
}
}
-//------------------------------------------------------------------------------
void ODatabaseSource::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::setFastPropertyValue_NoBroadcast" );
@@ -996,7 +952,7 @@ void ODatabaseSource::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const
break;
case PROPERTY_ID_USER:
rValue >>= m_pImpl->m_sUser;
- // if the user name changed, reset the password
+ // if the user name has changed, reset the password
m_pImpl->m_aPassword = ::rtl::OUString();
break;
case PROPERTY_ID_PASSWORD:
@@ -1026,7 +982,6 @@ void ODatabaseSource::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const
}
}
-//------------------------------------------------------------------------------
void ODatabaseSource::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getFastPropertyValue" );
@@ -1076,7 +1031,7 @@ void ODatabaseSource::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) con
Sequence< PropertyValue > aValues( m_pImpl->m_xSettings->getPropertyValues() );
// transform them so that only property values which fulfill certain
- // criterions survive
+ // criteria survive
Sequence< PropertyValue > aNonDefaultOrUserDefined( aValues.getLength() );
const PropertyValue* pCopyEnd = ::std::remove_copy_if(
aValues.getConstArray(),
@@ -1109,13 +1064,12 @@ void ODatabaseSource::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) con
rValue <<= m_pImpl->m_aLayoutInformation;
break;
default:
- DBG_ERROR("unknown Property");
+ OSL_FAIL("unknown Property");
}
}
}
// XDataSource
-//------------------------------------------------------------------------------
void ODatabaseSource::setLoginTimeout(sal_Int32 seconds) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::setLoginTimeout" );
@@ -1123,7 +1077,6 @@ void ODatabaseSource::setLoginTimeout(sal_Int32 seconds) throw( SQLException, Ru
m_pImpl->m_nLoginTimeout = seconds;
}
-//------------------------------------------------------------------------------
sal_Int32 ODatabaseSource::getLoginTimeout(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getLoginTimeout" );
@@ -1131,33 +1084,31 @@ sal_Int32 ODatabaseSource::getLoginTimeout(void) throw( SQLException, RuntimeExc
return m_pImpl->m_nLoginTimeout;
}
-
// XCompletedConnection
-//------------------------------------------------------------------------------
Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const Reference< XInteractionHandler >& _rxHandler ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::connectWithCompletion" );
return connectWithCompletion(_rxHandler,sal_False);
}
-// -----------------------------------------------------------------------------
+
Reference< XConnection > ODatabaseSource::getConnection(const rtl::OUString& user, const rtl::OUString& password) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getConnection" );
return getConnection(user,password,sal_False);
}
-// -----------------------------------------------------------------------------
+
Reference< XConnection > SAL_CALL ODatabaseSource::getIsolatedConnection( const ::rtl::OUString& user, const ::rtl::OUString& password ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getIsolatedConnection" );
return getConnection(user,password,sal_True);
}
-// -----------------------------------------------------------------------------
+
Reference< XConnection > SAL_CALL ODatabaseSource::getIsolatedConnectionWithCompletion( const Reference< XInteractionHandler >& _rxHandler ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getIsolatedConnectionWithCompletion" );
return connectWithCompletion(_rxHandler,sal_True);
}
-// -----------------------------------------------------------------------------
+
Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const Reference< XInteractionHandler >& _rxHandler,sal_Bool _bIsolated ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::connectWithCompletion" );
@@ -1165,7 +1116,7 @@ Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const
if (!_rxHandler.is())
{
- DBG_ERROR("ODatabaseSource::connectWithCompletion: invalid interaction handler!");
+ OSL_FAIL("ODatabaseSource::connectWithCompletion: invalid interaction handler!");
return getConnection(m_pImpl->m_sUser, m_pImpl->m_aPassword,_bIsolated);
}
@@ -1245,13 +1196,12 @@ Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const
}
}
-// -----------------------------------------------------------------------------
Reference< XConnection > ODatabaseSource::buildIsolatedConnection(const rtl::OUString& user, const rtl::OUString& password)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::buildIsolatedConnection" );
Reference< XConnection > xConn;
Reference< XConnection > xSdbcConn = buildLowLevelConnection(user, password);
- DBG_ASSERT( xSdbcConn.is(), "ODatabaseSource::buildIsolatedConnection: invalid return value of buildLowLevelConnection!" );
+ OSL_ENSURE( xSdbcConn.is(), "ODatabaseSource::buildIsolatedConnection: invalid return value of buildLowLevelConnection!" );
// buildLowLevelConnection is expected to always succeed
if ( xSdbcConn.is() )
{
@@ -1260,7 +1210,7 @@ Reference< XConnection > ODatabaseSource::buildIsolatedConnection(const rtl::OUS
}
return xConn;
}
-//------------------------------------------------------------------------------
+
Reference< XConnection > ODatabaseSource::getConnection(const rtl::OUString& user, const rtl::OUString& password,sal_Bool _bIsolated) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getConnection" );
@@ -1293,7 +1243,6 @@ Reference< XConnection > ODatabaseSource::getConnection(const rtl::OUString& use
return xConn;
}
-//------------------------------------------------------------------------------
Reference< XNameAccess > SAL_CALL ODatabaseSource::getBookmarks( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getBookmarks" );
@@ -1301,7 +1250,6 @@ Reference< XNameAccess > SAL_CALL ODatabaseSource::getBookmarks( ) throw (Runti
return static_cast< XNameContainer* >(&m_aBookmarks);
}
-//------------------------------------------------------------------------------
Reference< XNameAccess > SAL_CALL ODatabaseSource::getQueryDefinitions( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getQueryDefinitions" );
@@ -1332,9 +1280,8 @@ Reference< XNameAccess > SAL_CALL ODatabaseSource::getQueryDefinitions( ) throw(
}
return xContainer;
}
-//------------------------------------------------------------------------------
+
// XTablesSupplier
-//------------------------------------------------------------------------------
Reference< XNameAccess > ODatabaseSource::getTables() throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getTables" );
@@ -1349,7 +1296,7 @@ Reference< XNameAccess > ODatabaseSource::getTables() throw( RuntimeException )
}
return xContainer;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseSource::flush( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::flush" );
@@ -1379,7 +1326,6 @@ void SAL_CALL ODatabaseSource::flush( ) throw (RuntimeException)
}
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseSource::flushed( const EventObject& /*rEvent*/ ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::flushed" );
@@ -1405,7 +1351,7 @@ void SAL_CALL ODatabaseSource::flushed( const EventObject& /*rEvent*/ ) throw (R
// XFlushListener at the embedded connection (which needs to provide the XFlushable functionality).
// Then, when the connection is flushed, we commit both the database storage and our main storage.
//
- // #i55274# / 2005-09-30 / frank.schoenheit@sun.com
+ // #i55274#
OSL_ENSURE( m_pImpl->isEmbeddedDatabase(), "ODatabaseSource::flushed: no embedded database?!" );
sal_Bool bWasModified = m_pImpl->m_bModified;
@@ -1413,19 +1359,18 @@ void SAL_CALL ODatabaseSource::flushed( const EventObject& /*rEvent*/ ) throw (R
m_pImpl->setModified( bWasModified );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseSource::addFlushListener( const Reference< ::com::sun::star::util::XFlushListener >& _xListener ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::addFlushListener" );
m_aFlushListeners.addInterface(_xListener);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseSource::removeFlushListener( const Reference< ::com::sun::star::util::XFlushListener >& _xListener ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::removeFlushListener" );
m_aFlushListeners.removeInterface(_xListener);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseSource::elementInserted( const ContainerEvent& /*Event*/ ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::elementInserted" );
@@ -1433,7 +1378,7 @@ void SAL_CALL ODatabaseSource::elementInserted( const ContainerEvent& /*Event*/
if ( m_pImpl.is() )
m_pImpl->setModified(sal_True);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseSource::elementRemoved( const ContainerEvent& /*Event*/ ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::elementRemoved" );
@@ -1441,7 +1386,7 @@ void SAL_CALL ODatabaseSource::elementRemoved( const ContainerEvent& /*Event*/ )
if ( m_pImpl.is() )
m_pImpl->setModified(sal_True);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseSource::elementReplaced( const ContainerEvent& /*Event*/ ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::elementReplaced" );
@@ -1449,7 +1394,7 @@ void SAL_CALL ODatabaseSource::elementReplaced( const ContainerEvent& /*Event*/
if ( m_pImpl.is() )
m_pImpl->setModified(sal_True);
}
-// -----------------------------------------------------------------------------
+
// XDocumentDataSource
Reference< XOfficeDatabaseDocument > SAL_CALL ODatabaseSource::getDatabaseDocument() throw (RuntimeException)
{
@@ -1462,15 +1407,12 @@ Reference< XOfficeDatabaseDocument > SAL_CALL ODatabaseSource::getDatabaseDocume
return Reference< XOfficeDatabaseDocument >( xModel, UNO_QUERY_THROW );
}
-// -----------------------------------------------------------------------------
+
Reference< XInterface > ODatabaseSource::getThis() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getThis" );
return *const_cast< ODatabaseSource* >( this );
}
-// -----------------------------------------------------------------------------
-//........................................................................
-} // namespace dbaccess
-//........................................................................
-
+} // namespace dbaccess
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/datasource.hxx b/dbaccess/source/core/dataaccess/datasource.hxx
index 6a94fa66d..6bc917510 100644
--- a/dbaccess/source/core/dataaccess/datasource.hxx
+++ b/dbaccess/source/core/dataaccess/datasource.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,107 +29,41 @@
#ifndef _DBA_COREDATAACCESS_DATASOURCE_HXX_
#define _DBA_COREDATAACCESS_DATASOURCE_HXX_
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_
#include <com/sun/star/sdbc/XDataSource.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_
#include <com/sun/star/container/XContainerListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XBOOKMARKSSUPPLIER_HPP_
#include <com/sun/star/sdb/XBookmarksSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XQUERYDEFINITIONSSUPPLIER_HPP_
#include <com/sun/star/sdb/XQueryDefinitionsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XISOLATEDCONNECTION_HPP_
#include <com/sun/star/sdbc/XIsolatedConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
#include <com/sun/star/util/XNumberFormatter.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTLISTENER_HPP_
#include <com/sun/star/document/XEventListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XFLUSHABLE_HPP_
#include <com/sun/star/util/XFlushable.hpp>
-#endif
-#ifndef _CPPUHELPER_PROPSHLP_HXX
#include <cppuhelper/propshlp.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
#include <comphelper/proparrhlp.hxx>
-#endif
-#ifndef _CPPUHELPER_WEAKREF_HXX_
#include <cppuhelper/weakref.hxx>
-#endif
-#ifndef _CPPUHELPER_COMPBASE11_HXX_
#include <cppuhelper/compbase11.hxx>
-#endif
-#ifndef _COM_SUN_STAR_EMBED_XTRANSACTIONLISTENER_HPP_
#include <com/sun/star/embed/XTransactionListener.hpp>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _DBA_CORE_BOOKMARKCONTAINER_HXX_
#include "bookmarkcontainer.hxx"
-#endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
-#endif
-#ifndef _STRING_HXX
+#include <rtl/ref.hxx>
#include <tools/string.hxx>
-#endif
-#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
#include <connectivity/CommonTools.hxx>
-#endif
-#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
#include <comphelper/broadcasthelper.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XCOMPLETEDCONNECTION_HPP_
#include <com/sun/star/sdb/XCompletedConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_EMBED_XSTORAGE_HPP_
#include <com/sun/star/embed/XStorage.hpp>
-#endif
-#ifndef DBA_CONTENTHELPER_HXX
#include "ContentHelper.hxx"
-#endif
-#ifndef _COM_SUN_STAR_DOCUMENT_XSTORAGEBASEDDOCUMENT_HPP_
#include <com/sun/star/document/XStorageBasedDocument.hpp>
-#endif
-#ifndef _COM_SUN_STAR_EMBED_ELEMENTMODES_HPP_
#include <com/sun/star/embed/ElementModes.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XREFRESHABLE_HPP_
#include <com/sun/star/util/XRefreshable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XDOCUMENTDATASOURCE_HPP_
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
-#endif
-#ifndef _DBA_COREDATAACCESS_MODELIMPL_HXX_
#include "ModelImpl.hxx"
-#endif
-//........................................................................
namespace dbaccess
{
-//........................................................................
class OSharedConnectionManager;
class OChildCommitListen_Impl;
@@ -296,10 +231,9 @@ protected:
using ::cppu::OPropertySetHelper::getFastPropertyValue;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_COREDATAACCESS_DATALINK_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index 8613a0849..096caca68 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,55 +29,25 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_CORE_DEFINITIONCONTAINER_HXX_
#include "definitioncontainer.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _DBA_CORE_RESOURCE_HXX_
#include "core_resource.hxx"
-#endif
-#ifndef _DBA_CORE_RESOURCE_HRC_
#include "core_resource.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
+#include <osl/diagnose.h>
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _COMPHELPER_ENUMHELPER_HXX_
#include <comphelper/enumhelper.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_
#include <com/sun/star/lang/XComponent.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_COMMANDINFO_HPP_
#include <com/sun/star/ucb/CommandInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_ERRORCONDITION_HPP_
#include <com/sun/star/sdb/ErrorCondition.hpp>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _UCBHELPER_CONTENTIDENTIFIER_HXX
#include <ucbhelper/contentidentifier.hxx>
-#endif
+#include <o3tl/compat_functional.hxx>
using namespace ::com::sun::star::uno;
@@ -91,15 +62,12 @@ using namespace ::comphelper;
using namespace ::cppu;
using namespace ::com::sun::star::ucb;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= ODefinitionContainer_Impl
//==========================================================================
-//--------------------------------------------------------------------------
void ODefinitionContainer_Impl::erase( TContentPtr _pDefinition )
{
NamedDefinitions::iterator aPos = find( _pDefinition );
@@ -107,28 +75,26 @@ void ODefinitionContainer_Impl::erase( TContentPtr _pDefinition )
m_aDefinitions.erase( aPos );
}
-//--------------------------------------------------------------------------
ODefinitionContainer_Impl::const_iterator ODefinitionContainer_Impl::find( TContentPtr _pDefinition ) const
{
return ::std::find_if(
m_aDefinitions.begin(),
m_aDefinitions.end(),
- ::std::compose1(
+ ::o3tl::compose1(
::std::bind2nd( ::std::equal_to< TContentPtr >(), _pDefinition ),
- ::std::select2nd< NamedDefinitions::value_type >()
+ ::o3tl::select2nd< NamedDefinitions::value_type >()
)
);
}
-//--------------------------------------------------------------------------
ODefinitionContainer_Impl::iterator ODefinitionContainer_Impl::find( TContentPtr _pDefinition )
{
return ::std::find_if(
m_aDefinitions.begin(),
m_aDefinitions.end(),
- ::std::compose1(
+ ::o3tl::compose1(
::std::bind2nd( ::std::equal_to< TContentPtr >(), _pDefinition ),
- ::std::select2nd< NamedDefinitions::value_type >()
+ ::o3tl::select2nd< NamedDefinitions::value_type >()
)
);
}
@@ -137,7 +103,7 @@ ODefinitionContainer_Impl::iterator ODefinitionContainer_Impl::find( TContentPtr
//= ODefinitionContainer
//==========================================================================
DBG_NAME(ODefinitionContainer)
-//--------------------------------------------------------------------------
+
ODefinitionContainer::ODefinitionContainer( const Reference< XMultiServiceFactory >& _xORB
, const Reference< XInterface >& _xParentContainer
, const TContentPtr& _pImpl
@@ -165,14 +131,13 @@ ODefinitionContainer::ODefinitionContainer( const Reference< XMultiServiceFact
DBG_CTOR(ODefinitionContainer, NULL);
}
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::disposing()
{
OContentHelper::disposing();
MutexGuard aGuard(m_aMutex);
- // say our listeners goobye
+ // say goodbye to our listeners
EventObject aEvt(*this);
m_aApproveListeners.disposeAndClear(aEvt);
m_aContainerListeners.disposeAndClear(aEvt);
@@ -197,7 +162,6 @@ void SAL_CALL ODefinitionContainer::disposing()
m_aDocumentMap.clear();
}
-//--------------------------------------------------------------------------
ODefinitionContainer::~ODefinitionContainer()
{
DBG_DTOR(ODefinitionContainer, NULL);
@@ -206,12 +170,11 @@ ODefinitionContainer::~ODefinitionContainer()
IMPLEMENT_FORWARD_XINTERFACE2( ODefinitionContainer,OContentHelper,ODefinitionContainer_Base)
IMPLEMENT_TYPEPROVIDER2(ODefinitionContainer,OContentHelper,ODefinitionContainer_Base);
// XServiceInfo
-//--------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODefinitionContainer::getImplementationName( ) throw(RuntimeException)
{
return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ODefinitionContainer"));
}
-//--------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL ODefinitionContainer::getSupportedServiceNames( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aReturn(2);
@@ -221,7 +184,6 @@ Sequence< ::rtl::OUString > SAL_CALL ODefinitionContainer::getSupportedServiceNa
}
// XNameContainer
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::insertByName( const ::rtl::OUString& _rName, const Any& aElement ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
{
ResettableMutexGuard aGuard(m_aMutex);
@@ -235,7 +197,6 @@ void SAL_CALL ODefinitionContainer::insertByName( const ::rtl::OUString& _rName,
notifyByName( aGuard, _rName, xNewElement, NULL, E_INSERTED, ContainerListemers );
}
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::removeByName( const ::rtl::OUString& _rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{
ResettableMutexGuard aGuard(m_aMutex);
@@ -260,7 +221,6 @@ void SAL_CALL ODefinitionContainer::removeByName( const ::rtl::OUString& _rName
}
// XNameReplace
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::replaceByName( const ::rtl::OUString& _rName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
{
ResettableMutexGuard aGuard(m_aMutex);
@@ -280,7 +240,6 @@ void SAL_CALL ODefinitionContainer::replaceByName( const ::rtl::OUString& _rName
disposeComponent(xOldElement);
}
-// -----------------------------------------------------------------------------
namespace
{
typedef Reference< XVeto > ( SAL_CALL XContainerApproveListener::*ContainerApprovalMethod )( const ContainerEvent& );
@@ -319,7 +278,6 @@ namespace
};
}
-// -----------------------------------------------------------------------------
void ODefinitionContainer::notifyByName( ResettableMutexGuard& _rGuard, const ::rtl::OUString& _rName,
const Reference< XContent >& _xNewElement, const Reference< XContent >& _xOldElement,
ContainerOperation _eOperation, ListenerType _eType )
@@ -362,43 +320,36 @@ void ODefinitionContainer::notifyByName( ResettableMutexGuard& _rGuard, const ::
_rGuard.reset();
}
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::addContainerListener( const Reference< XContainerListener >& _rxListener ) throw(RuntimeException)
{
if (_rxListener.is())
m_aContainerListeners.addInterface(_rxListener);
}
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::removeContainerListener( const Reference< XContainerListener >& _rxListener ) throw(RuntimeException)
{
if (_rxListener.is())
m_aContainerListeners.removeInterface(_rxListener);
}
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::addContainerApproveListener( const Reference< XContainerApproveListener >& _Listener ) throw (RuntimeException)
{
if ( _Listener.is() )
m_aApproveListeners.addInterface( _Listener );
}
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::removeContainerApproveListener( const Reference< XContainerApproveListener >& _Listener ) throw (RuntimeException)
{
if ( _Listener.is() )
m_aApproveListeners.removeInterface( _Listener );
}
-
// XElementAccess
-//--------------------------------------------------------------------------
Type SAL_CALL ODefinitionContainer::getElementType( ) throw (RuntimeException)
{
return ::getCppuType( static_cast< Reference< XContent >* >(NULL) );
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL ODefinitionContainer::hasElements( ) throw (RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -406,14 +357,12 @@ sal_Bool SAL_CALL ODefinitionContainer::hasElements( ) throw (RuntimeException)
}
// XEnumerationAccess
-//--------------------------------------------------------------------------
Reference< XEnumeration > SAL_CALL ODefinitionContainer::createEnumeration( ) throw(RuntimeException)
{
MutexGuard aGuard(m_aMutex);
return new ::comphelper::OEnumerationByIndex(static_cast<XIndexAccess*>(this));
}
-//--------------------------------------------------------------------------
// XIndexAccess
sal_Int32 SAL_CALL ODefinitionContainer::getCount( ) throw(RuntimeException)
{
@@ -421,7 +370,6 @@ sal_Int32 SAL_CALL ODefinitionContainer::getCount( ) throw(RuntimeException)
return m_aDocuments.size();
}
-//--------------------------------------------------------------------------
Any SAL_CALL ODefinitionContainer::getByIndex( sal_Int32 _nIndex ) throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -442,7 +390,6 @@ Any SAL_CALL ODefinitionContainer::getByIndex( sal_Int32 _nIndex ) throw(IndexOu
return makeAny(xProp);
}
-//--------------------------------------------------------------------------
Any SAL_CALL ODefinitionContainer::getByName( const ::rtl::OUString& _rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -450,7 +397,6 @@ Any SAL_CALL ODefinitionContainer::getByName( const ::rtl::OUString& _rName ) th
return makeAny( implGetByName( _rName, sal_True ) );
}
-//--------------------------------------------------------------------------
Reference< XContent > ODefinitionContainer::implGetByName(const ::rtl::OUString& _rName, sal_Bool _bReadIfNeccessary) throw (NoSuchElementException)
{
Documents::iterator aMapPos = m_aDocumentMap.find(_rName);
@@ -472,7 +418,6 @@ Reference< XContent > ODefinitionContainer::implGetByName(const ::rtl::OUString&
return xProp;
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL ODefinitionContainer::getElementNames( ) throw(RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -491,7 +436,6 @@ Sequence< ::rtl::OUString > SAL_CALL ODefinitionContainer::getElementNames( ) t
return aNames;
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL ODefinitionContainer::hasByName( const ::rtl::OUString& _rName ) throw(RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -499,7 +443,6 @@ sal_Bool SAL_CALL ODefinitionContainer::hasByName( const ::rtl::OUString& _rName
return checkExistence(_rName);
}
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::disposing( const EventObject& _rSource ) throw(RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -518,7 +461,6 @@ void SAL_CALL ODefinitionContainer::disposing( const EventObject& _rSource ) thr
}
}
-//--------------------------------------------------------------------------
void ODefinitionContainer::implRemove(const ::rtl::OUString& _rName)
{
// from the object maps
@@ -534,7 +476,6 @@ void ODefinitionContainer::implRemove(const ::rtl::OUString& _rName)
}
}
-//--------------------------------------------------------------------------
namespace
{
bool lcl_ensureName( const Reference< XContent >& _rxContent, const ::rtl::OUString& _rName )
@@ -542,7 +483,6 @@ namespace
if ( !_rxContent.is() )
return true;
- // ..........................................................
// obtain the current name. If it's the same as the new one,
// don't do anything
try
@@ -558,10 +498,9 @@ namespace
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "lcl_ensureName: caught an exception while obtaining the current name!" );
+ OSL_FAIL( "lcl_ensureName: caught an exception while obtaining the current name!" );
}
- // ..........................................................
// set the new name
Reference< XRename > xRename( _rxContent, UNO_QUERY );
OSL_ENSURE( xRename.is(), "lcl_ensureName: invalid content (not renameable)!" );
@@ -574,12 +513,12 @@ namespace
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "lcl_ensureName: caught an exception!" );
+ OSL_FAIL( "lcl_ensureName: caught an exception!" );
}
return false;
}
}
-//--------------------------------------------------------------------------
+
void ODefinitionContainer::implAppend(const ::rtl::OUString& _rName, const Reference< XContent >& _rxNewObject)
{
MutexGuard aGuard(m_aMutex);
@@ -593,11 +532,11 @@ void ODefinitionContainer::implAppend(const ::rtl::OUString& _rName, const Refer
ODefinitionContainer_Impl::const_iterator aFind = rDefinitions.find( _rName );
if ( aFind == rDefinitions.end() )
{
- // ensure that the new object thas the proper name.
+ // ensure that the new object has the proper name.
// Somebody could create an object with name "foo", and insert it as "bar"
// into a container. In this case, we need to ensure that the object name
// is also "bar"
- // #i44786# / 2005-03-11 / frank.schoenheit@sun.com
+ // #i44786#
lcl_ensureName( _rxNewObject, _rName );
::rtl::Reference< OContentHelper > pContent = OContentHelper::getImplementation( _rxNewObject );
@@ -619,14 +558,13 @@ void ODefinitionContainer::implAppend(const ::rtl::OUString& _rName, const Refer
}
catch(Exception&)
{
- DBG_ERROR("ODefinitionContainer::implAppend: caught something !");
+ OSL_FAIL("ODefinitionContainer::implAppend: caught something !");
}
}
-//--------------------------------------------------------------------------
void ODefinitionContainer::implReplace(const ::rtl::OUString& _rName, const Reference< XContent >& _rxNewObject)
{
- DBG_ASSERT(checkExistence(_rName), "ODefinitionContainer::implReplace : invalid name !");
+ OSL_ENSURE(checkExistence(_rName), "ODefinitionContainer::implReplace : invalid name !");
Documents::iterator aFind = m_aDocumentMap.find(_rName);
removeObjectListener(aFind->second);
@@ -634,7 +572,6 @@ void ODefinitionContainer::implReplace(const ::rtl::OUString& _rName, const Refe
addObjectListener(aFind->second);
}
-// -----------------------------------------------------------------------------
void ODefinitionContainer::approveNewObject(const ::rtl::OUString& _sName,const Reference< XContent >& _rxObject) const
{
// check the arguments
@@ -675,7 +612,6 @@ void ODefinitionContainer::approveNewObject(const ::rtl::OUString& _sName,const
*this );
}
-// -----------------------------------------------------------------------------
// XPropertyChangeListener
void SAL_CALL ODefinitionContainer::propertyChange( const PropertyChangeEvent& evt ) throw (RuntimeException)
{
@@ -701,7 +637,7 @@ void SAL_CALL ODefinitionContainer::propertyChange( const PropertyChangeEvent& e
m_bInPropertyChange = sal_False;
}
}
-// -----------------------------------------------------------------------------
+
// XVetoableChangeListener
void SAL_CALL ODefinitionContainer::vetoableChange( const PropertyChangeEvent& aEvent ) throw (PropertyVetoException, RuntimeException)
{
@@ -715,7 +651,7 @@ void SAL_CALL ODefinitionContainer::vetoableChange( const PropertyChangeEvent& a
throw PropertyVetoException();
}
}
-// -----------------------------------------------------------------------------
+
void ODefinitionContainer::addObjectListener(const Reference< XContent >& _xNewObject)
{
OSL_ENSURE(_xNewObject.is(),"ODefinitionContainer::addObjectListener: Object is null!");
@@ -726,7 +662,7 @@ void ODefinitionContainer::addObjectListener(const Reference< XContent >& _xNewO
xProp->addVetoableChangeListener(PROPERTY_NAME, this);
}
}
-// -----------------------------------------------------------------------------
+
void ODefinitionContainer::removeObjectListener(const Reference< XContent >& _xNewObject)
{
Reference<XPropertySet> xProp(_xNewObject,UNO_QUERY);
@@ -736,13 +672,12 @@ void ODefinitionContainer::removeObjectListener(const Reference< XContent >& _xN
xProp->removeVetoableChangeListener(PROPERTY_NAME, this);
}
}
-// -----------------------------------------------------------------------------
+
sal_Bool ODefinitionContainer::checkExistence(const ::rtl::OUString& _rName)
{
return m_aDocumentMap.find(_rName) != m_aDocumentMap.end();
}
-//........................................................................
}
// namespace dbaccess
-//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index 5d20a2885..b3b7c1ab0 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,64 +29,30 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_COREDATAACCESS_DOCUMENTCONTAINER_HXX_
#include "documentcontainer.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _DBA_COREDATAACCESS_DOCUMENTDEFINITION_HXX_
#include "documentdefinition.hxx"
-#endif
-#ifndef _COM_SUN_STAR_UCB_OPENCOMMANDARGUMENT2_HPP_
#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_OPENMODE_HPP_
#include <com/sun/star/ucb/OpenMode.hpp>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef DBA_UCPRESULTSET_HXX
#include "myucp_resultset.hxx"
-#endif
-#ifndef _UCBHELPER_CANCELCOMMANDEXECUTION_HXX_
#include <ucbhelper/cancelcommandexecution.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UCB_UNSUPPORTEDOPENMODEEXCEPTION_HPP_
#include <com/sun/star/ucb/UnsupportedOpenModeException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_INSERTCOMMANDARGUMENT_HPP_
#include <com/sun/star/ucb/InsertCommandArgument.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_ERRORCONDITION_HPP_
#include <com/sun/star/sdb/ErrorCondition.hpp>
-#endif
-#ifndef _DBA_COREDATAACCESS_DATASOURCE_HXX_
#include "datasource.hxx"
-#endif
#include <comphelper/classids.hxx>
-#ifndef _COMPHELPER_MIMECONFIGHELPER_HXX_
#include <comphelper/mimeconfighelper.hxx>
-#endif
-#ifndef INCLUDED_COMPHELPER_STRING_HXX
#include <comphelper/string.hxx>
-#endif
-#ifndef CONNECTIVITY_SQLERROR_HXX
#include <connectivity/sqlerror.hxx>
-#endif
#include "core_resource.hxx"
#include "core_resource.hrc"
#include <comphelper/namedvaluecollection.hxx>
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <comphelper/namedvaluecollection.hxx>
using namespace ::com::sun::star::uno;
@@ -101,13 +68,11 @@ using namespace ::osl;
using namespace ::comphelper;
using namespace ::cppu;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
-//= LocalNameApproval
+//= LocalNameApproval
//==========================================================================
class LocalNameApproval : public IContainerApprove
{
@@ -125,7 +90,6 @@ public:
void SAL_CALL approveElement( const ::rtl::OUString& _rName, const Reference< XInterface >& _rxElement );
};
-//--------------------------------------------------------------------------
void SAL_CALL LocalNameApproval::approveElement( const ::rtl::OUString& _rName, const Reference< XInterface >& /*_rxElement*/ )
{
if ( _rName.indexOf( '/' ) != -1 )
@@ -140,7 +104,7 @@ void SAL_CALL LocalNameApproval::approveElement( const ::rtl::OUString& _rName,
//= ODocumentContainer
//==========================================================================
DBG_NAME(ODocumentContainer)
-//--------------------------------------------------------------------------
+
ODocumentContainer::ODocumentContainer(const Reference< XMultiServiceFactory >& _xORB
,const Reference< XInterface >& _xParentContainer
,const TContentPtr& _pImpl
@@ -157,7 +121,6 @@ ODocumentContainer::ODocumentContainer(const Reference< XMultiServiceFactory >&
setElementApproval( PContainerApprove( new LocalNameApproval ( _xORB ) ) );
}
-//--------------------------------------------------------------------------
ODocumentContainer::~ODocumentContainer()
{
DBG_DTOR(ODocumentContainer, NULL);
@@ -168,7 +131,7 @@ ODocumentContainer::~ODocumentContainer()
dispose();
}
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XINTERFACE3( ODocumentContainer,ODefinitionContainer,ODocumentContainer_Base,OPropertyStateContainer)
IMPLEMENT_TYPEPROVIDER3(ODocumentContainer,ODefinitionContainer,OPropertyStateContainer,ODocumentContainer_Base);
IMPLEMENT_SERVICE_INFO_IMPLNAME(ODocumentContainer, "com.sun.star.comp.dba.ODocumentContainer");
@@ -182,13 +145,11 @@ Sequence< ::rtl::OUString > SAL_CALL ODocumentContainer::getSupportedServiceName
return aSupported;
}
-// -----------------------------------------------------------------------------
::rtl::OUString ODocumentContainer::determineContentType() const
{
return ::rtl::OUString();
}
-//--------------------------------------------------------------------------
Reference< XContent > ODocumentContainer::createObject( const ::rtl::OUString& _rName)
{
const ODefinitionContainer_Impl& rDefinitions( getDefinitions() );
@@ -198,7 +159,7 @@ Reference< XContent > ODocumentContainer::createObject( const ::rtl::OUString& _
return new ODocumentContainer( m_aContext.getLegacyServiceFactory(), *this, aFind->second, m_bFormsContainer );
return new ODocumentDefinition( *this, m_aContext.getLegacyServiceFactory(), aFind->second, m_bFormsContainer );
}
-// -----------------------------------------------------------------------------
+
Reference< XInterface > SAL_CALL ODocumentContainer::createInstance( const ::rtl::OUString& aServiceSpecifier ) throw (Exception, RuntimeException)
{
return createInstanceWithArguments( aServiceSpecifier, Sequence< Any >() );
@@ -217,7 +178,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier, const Sequence< Any >& _aArguments ) throw (Exception, RuntimeException)
{
Reference< XInterface > xRet;
@@ -226,7 +186,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
{
MutexGuard aGuard(m_aMutex);
- // extrat known arguments
+ // extract known arguments
::rtl::OUString sName, sPersistentName, sURL, sMediaType, sDocServiceName;
Reference< XCommandProcessor > xCopyFrom;
Reference< XConnection > xConnection;
@@ -271,7 +231,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
if ( bNew )
{
const static ::rtl::OUString sBaseName(RTL_CONSTASCII_USTRINGPARAM("Obj"));
- // -----------------------------------------------------------------------------
+
sPersistentName = sBaseName;
sPersistentName += ::rtl::OUString::valueOf(sal_Int32(rDefinitions.size() + 1));
Reference<XNameAccess> xElements(getContainerStorage(),UNO_QUERY);
@@ -350,11 +310,9 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
Reference< XCommandProcessor > xCommandProcessor(xContent,UNO_QUERY);
if ( xContent.is() )
{
- xCommandProcessor->execute(aCommand,-1,Reference< XCommandEnvironment >());
+ xCommandProcessor->execute(aCommand,-1,Reference< XCommandEnvironment >());
}
}
-
- // xRet = xContent;
}
else if ( ServiceSpecifier == SERVICE_NAME_FORM_COLLECTION || SERVICE_NAME_REPORT_COLLECTION == ServiceSpecifier )
{
@@ -389,7 +347,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
pElementImpl = aFind->second;
OSL_ENSURE( pElementImpl ," Invalid entry in map!");
xContent = new ODocumentContainer( m_aContext.getLegacyServiceFactory(), *this, pElementImpl, ServiceSpecifier == SERVICE_NAME_FORM_COLLECTION );
-
+
// copy children
if ( xCopyFrom.is() )
{
@@ -425,7 +383,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
{
if ( m_bFormsContainer )
sServiceName = SERVICE_NAME_FORM_COLLECTION;
- else
+ else
sServiceName = SERVICE_NAME_REPORT_COLLECTION;
}
else
@@ -442,7 +400,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
xRet = xContent;
return xRet;
}
-// -----------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL ODocumentContainer::getAvailableServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSe(3);
@@ -451,11 +409,11 @@ Sequence< ::rtl::OUString > SAL_CALL ODocumentContainer::getAvailableServiceName
aSe[2] = SERVICE_NAME_REPORT_COLLECTION;
return aSe;
}
-// -----------------------------------------------------------------------------
+
Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 CommandId, const Reference< XCommandEnvironment >& Environment ) throw (Exception, CommandAbortedException, RuntimeException)
{
Any aRet;
- if ( aCommand.Name.compareToAscii( "open" ) == 0 )
+ if ( aCommand.Name.compareToAscii( "open" ) == 0 )
{
//////////////////////////////////////////////////////////////////
// open command for a folder content
@@ -463,7 +421,7 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com
OpenCommandArgument2 aOpenCommand;
if ( !( aCommand.Argument >>= aOpenCommand ) )
{
- OSL_ENSURE( sal_False, "Wrong argument type!" );
+ OSL_FAIL( "Wrong argument type!" );
ucbhelper::cancelCommandExecution(
makeAny( IllegalArgumentException(
rtl::OUString(),
@@ -509,7 +467,7 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com
InsertCommandArgument arg;
if ( !( aCommand.Argument >>= arg ) )
{
- OSL_ENSURE( sal_False, "Wrong argument type!" );
+ OSL_FAIL( "Wrong argument type!" );
ucbhelper::cancelCommandExecution(
makeAny( IllegalArgumentException(
rtl::OUString(),
@@ -532,11 +490,11 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com
dispose();
}
- else
+ else
aRet = OContentHelper::execute(aCommand,CommandId,Environment);
return aRet;
}
-// -----------------------------------------------------------------------------
+
namespace
{
sal_Bool lcl_queryContent(const ::rtl::OUString& _sName,Reference< XNameContainer >& _xNameContainer,Any& _rRet,::rtl::OUString& _sSimpleName)
@@ -563,19 +521,19 @@ namespace
}
}
if ( nIndex == -1 )
- _sSimpleName = sName; // a content
- else
+ _sSimpleName = sName; // a content
+ else
_xNameContainer.clear(); // a sub folder doesn't exist
return bRet;
}
}
-// -----------------------------------------------------------------------------
+
Reference< XComponent > SAL_CALL ODocumentContainer::loadComponentFromURL( const ::rtl::OUString& _sURL
, const ::rtl::OUString& /*TargetFrameName*/
, sal_Int32 /*SearchFlags*/
, const Sequence< PropertyValue >& Arguments ) throw (IOException, IllegalArgumentException, RuntimeException)
{
- vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ ::SolarMutexGuard aSolarGuard;
MutexGuard aGuard(m_aMutex);
Reference< XComponent > xComp;
@@ -608,18 +566,17 @@ Reference< XComponent > SAL_CALL ODocumentContainer::loadComponentFromURL( const
xComp.set(xContent->execute(aCommand,xContent->createCommandIdentifier(),Reference< XCommandEnvironment >()),UNO_QUERY);
}
}
- catch(NoSuchElementException)
+ catch(const NoSuchElementException&)
{
throw IllegalArgumentException();
}
- catch(WrappedTargetException e)
+ catch(const WrappedTargetException&)
{
- // throw IllegalArgumentException();
throw;
}
return xComp;
}
-// -----------------------------------------------------------------------------
+
Any SAL_CALL ODocumentContainer::getByHierarchicalName( const ::rtl::OUString& _sName ) throw (NoSuchElementException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -630,7 +587,7 @@ Any SAL_CALL ODocumentContainer::getByHierarchicalName( const ::rtl::OUString& _
return aContent;
throw NoSuchElementException(_sName,*this);
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODocumentContainer::hasByHierarchicalName( const ::rtl::OUString& _sName ) throw (RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -639,7 +596,7 @@ sal_Bool SAL_CALL ODocumentContainer::hasByHierarchicalName( const ::rtl::OUStri
::rtl::OUString sName;
return lcl_queryContent(_sName,xNameContainer,aContent,sName);
}
-// -----------------------------------------------------------------------------
+
// XHierarchicalNameContainer
void SAL_CALL ODocumentContainer::insertByHierarchicalName( const ::rtl::OUString& _sName, const Any& _aElement ) throw (IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
{
@@ -653,7 +610,7 @@ void SAL_CALL ODocumentContainer::insertByHierarchicalName( const ::rtl::OUStrin
::rtl::OUString sName;
if ( lcl_queryContent(_sName,xNameContainer,aContent,sName) )
throw ElementExistException(_sName,*this);
-
+
if ( !xNameContainer.is() )
{
::rtl::OUString sMessage( DBA_RES( RID_STR_NO_SUB_FOLDER ) );
@@ -664,7 +621,7 @@ void SAL_CALL ODocumentContainer::insertByHierarchicalName( const ::rtl::OUStrin
xNameContainer->insertByName(sName,_aElement);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODocumentContainer::removeByHierarchicalName( const ::rtl::OUString& _sName ) throw (NoSuchElementException, WrappedTargetException, RuntimeException)
{
if ( !_sName.getLength() )
@@ -679,7 +636,7 @@ void SAL_CALL ODocumentContainer::removeByHierarchicalName( const ::rtl::OUStrin
xNameContainer->removeByName(sName);
}
-// -----------------------------------------------------------------------------
+
// XHierarchicalNameReplace
void SAL_CALL ODocumentContainer::replaceByHierarchicalName( const ::rtl::OUString& _sName, const Any& _aElement ) throw (IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
{
@@ -697,14 +654,12 @@ void SAL_CALL ODocumentContainer::replaceByHierarchicalName( const ::rtl::OUStri
xNameContainer->replaceByName(sName,_aElement);
}
-// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODocumentContainer::getHierarchicalName() throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
return impl_getHierarchicalName( false );
}
-// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODocumentContainer::composeHierarchicalName( const ::rtl::OUString& i_rRelativeName ) throw (IllegalArgumentException, NoSupportException, RuntimeException)
{
::rtl::OUStringBuffer aBuffer;
@@ -714,7 +669,6 @@ void SAL_CALL ODocumentContainer::replaceByHierarchicalName( const ::rtl::OUStri
return aBuffer.makeStringAndClear();
}
-// -----------------------------------------------------------------------------
::rtl::Reference<OContentHelper> ODocumentContainer::getContent(const ::rtl::OUString& _sName) const
{
::rtl::Reference<OContentHelper> pContent = NULL;
@@ -724,17 +678,17 @@ void SAL_CALL ODocumentContainer::replaceByHierarchicalName( const ::rtl::OUStri
if ( xUnoTunnel.is() )
pContent = reinterpret_cast<OContentHelper*>(xUnoTunnel->getSomething(OContentHelper::getUnoTunnelImplementationId()));
}
- catch(Exception)
+ catch(const Exception&)
{
}
return pContent;
}
-// -----------------------------------------------------------------------------
+
void ODocumentContainer::getPropertyDefaultByHandle( sal_Int32 /*_nHandle*/, Any& _rDefault ) const
{
_rDefault.clear();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODocumentContainer::commit( ) throw (::com::sun::star::io::IOException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -750,7 +704,7 @@ void SAL_CALL ODocumentContainer::commit( ) throw (::com::sun::star::io::IOExce
if ( xTrans.is() )
xTrans->commit();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODocumentContainer::revert( ) throw (::com::sun::star::io::IOException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -766,15 +720,14 @@ void SAL_CALL ODocumentContainer::revert( ) throw (::com::sun::star::io::IOExce
if ( xTrans.is() )
xTrans->revert();
}
-// -----------------------------------------------------------------------------
+
Reference< XStorage> ODocumentContainer::getContainerStorage() const
-{
+{
return m_pImpl->m_pDataSource
? m_pImpl->m_pDataSource->getStorage( m_bFormsContainer ? ODatabaseModelImpl::E_FORM : ODatabaseModelImpl::E_REPORT )
: Reference< XStorage>();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODocumentContainer::removeByName( const ::rtl::OUString& _rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{
ResettableMutexGuard aGuard(m_aMutex);
@@ -798,12 +751,9 @@ void SAL_CALL ODocumentContainer::removeByName( const ::rtl::OUString& _rName )
// do the removal
implRemove(_rName);
- // disposeComponent(xContent); // no dispose here, the object may be inserted again under a different name
-
notifyByName( aGuard, _rName, NULL, NULL, E_REMOVED, ContainerListemers );
}
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODocumentContainer::rename( const ::rtl::OUString& newName ) throw (SQLException, ElementExistException, RuntimeException)
{
try
@@ -827,7 +777,5 @@ void SAL_CALL ODocumentContainer::rename( const ::rtl::OUString& newName ) throw
}
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.hxx b/dbaccess/source/core/dataaccess/documentcontainer.hxx
index f401d68b6..ffcdff6c9 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.hxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,41 +29,19 @@
#ifndef _DBA_COREDATAACCESS_DOCUMENTCONTAINER_HXX_
#define _DBA_COREDATAACCESS_DOCUMENTCONTAINER_HXX_
-#ifndef _DBA_CORE_DEFINITIONCONTAINER_HXX_
#include "definitioncontainer.hxx"
-#endif
-#ifndef _CPPUHELPER_IMPLBASE5_HXX_
#include <cppuhelper/implbase5.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
#include <com/sun/star/frame/XComponentLoader.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XHIERARCHICALNAMECONTAINER_HPP_
#include <com/sun/star/container/XHierarchicalNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XHIERARCHICALNAME_HPP_
#include <com/sun/star/container/XHierarchicalName.hpp>
-#endif
-#ifndef _COM_SUN_STAR_EMBED_XTRANSACTEDOBJECT_HPP_
#include <com/sun/star/embed/XTransactedObject.hpp>
-#endif
-#ifndef COMPHELPER_PROPERTYSTATECONTAINER_HXX
#include <comphelper/propertystatecontainer.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
#include <comphelper/proparrhlp.hxx>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-//........................................................................
namespace dbaccess
{
-//........................................................................
typedef ::cppu::ImplHelper5 < ::com::sun::star::frame::XComponentLoader
, ::com::sun::star::lang::XMultiServiceFactory
, ::com::sun::star::container::XHierarchicalNameContainer
@@ -160,9 +139,8 @@ protected:
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_COREDATAACCESS_DOCUMENTCONTAINER_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index ef8fc20ae..48be3e0ba 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,224 +29,84 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_COREDATAACCESS_DOCUMENTDEFINITION_HXX_
#include "documentdefinition.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef DBACORE_SDBCORETOOLS_HXX
#include "sdbcoretools.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
+#include <osl/diagnose.h>
#include <comphelper/property.hxx>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _COMPHELPER_MEDIADESCRIPTOR_HXX_
#include <comphelper/mediadescriptor.hxx>
-#endif
-#ifndef COMPHELPER_NAMEDVALUECOLLECTION_HXX
#include <comphelper/namedvaluecollection.hxx>
-#endif
-#ifndef _COMPHELPER_CLASSIDS_HXX
#include <comphelper/classids.hxx>
-#endif
#include <com/sun/star/frame/XUntitledNumbers.hpp>
-#ifndef _COM_SUN_STAR_AWT_XTOPWINDOW_HPP_
#include <com/sun/star/awt/XTopWindow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_SIZE_HPP_
#include <com/sun/star/awt/Size.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
#include <com/sun/star/frame/XModel.hpp>
-#endif
#include <com/sun/star/frame/XTitle.hpp>
-#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
#include <com/sun/star/frame/XController.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XJOBEXECUTOR_HPP_
#include <com/sun/star/task/XJobExecutor.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTION_HPP_
#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XFRAMESSUPPLIER_HPP_
#include <com/sun/star/frame/XFramesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_INSERTCOMMANDARGUMENT_HPP_
#include <com/sun/star/ucb/InsertCommandArgument.hpp>
-#endif
#include <com/sun/star/report/XReportDefinition.hpp>
#include <com/sun/star/report/XReportEngine.hpp>
-#ifndef _COM_SUN_STAR_UCB_OPENMODE_HPP_
#include <com/sun/star/ucb/OpenMode.hpp>
-#endif
-#ifndef _COM_SUN_STAR_XEMBEDOBJECTFACTORY_HPP_
#include <com/sun/star/embed/XEmbedObjectFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_XEMBEDOBJECTCREATOR_HPP_
#include <com/sun/star/embed/XEmbedObjectCreator.hpp>
-#endif
-#ifndef _COM_SUN_STAR_EMBED_ASPECTS_HPP_
#include <com/sun/star/embed/Aspects.hpp>
-#endif
-#ifndef _UCBHELPER_CANCELCOMMANDEXECUTION_HXX_
#include <ucbhelper/cancelcommandexecution.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UCB_UNSUPPORTEDDATASINKEXCEPTION_HPP_
#include <com/sun/star/ucb/UnsupportedDataSinkException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_UNSUPPORTEDOPENMODEEXCEPTION_HPP_
#include <com/sun/star/ucb/UnsupportedOpenModeException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_ELEMENTMODES_HPP_
#include <com/sun/star/embed/ElementModes.hpp>
-#endif
-#ifndef _COM_SUN_STAR_XEMBEDPERSIST_HPP_
#include <com/sun/star/embed/XEmbedPersist.hpp>
-#endif
-#ifndef _COM_SUN_STAR_EMBEDSTATES_HPP_
#include <com/sun/star/embed/EmbedStates.hpp>
-#endif
-#ifndef _COM_SUN_STAR_XCOMPONENTSUPPLIER_HPP_
#include <com/sun/star/embed/XComponentSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_ENTRYINITMODES_HPP_
#include <com/sun/star/embed/EntryInitModes.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_MISSINGPROPERTIESEXCEPTION_HPP_
#include <com/sun/star/ucb/MissingPropertiesException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_MISSINGINPUTSTREAMEXCEPTION_HPP_
#include <com/sun/star/ucb/MissingInputStreamException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_OPENCOMMANDARGUMENT2_HPP_
#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XCLOSEBROADCASTER_HPP_
#include <com/sun/star/util/XCloseBroadcaster.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XMODULE_HPP_
#include <com/sun/star/frame/XModule.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DATATRANSFER_DATAFLAVOR_HPP_
#include <com/sun/star/datatransfer/DataFlavor.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DATATRANSFER_XTRANSFERABLE_HPP_
#include <com/sun/star/datatransfer/XTransferable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_XTRANSACTEDOBJECT_HPP_
#include <com/sun/star/embed/XTransactedObject.hpp>
-#endif
-#ifndef _COM_SUN_STAR_EMBED_XCOMMONEMBEDPERSIST_HPP_
#include <com/sun/star/embed/XCommonEmbedPersist.hpp>
-#endif
-#ifndef DBA_INTERCEPT_HXX
#include "intercept.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDB_ERRORCONDITION_HPP_
#include <com/sun/star/sdb/ErrorCondition.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XINTERACTIONDOCUMENTSAVE_HPP_
#include <com/sun/star/sdb/XInteractionDocumentSave.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_
#include <com/sun/star/task/XInteractionHandler.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_DOCUMENTSAVEREQUEST_HPP_
#include <com/sun/star/sdb/DocumentSaveRequest.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTPROPERTIESSUPPLIER_HPP_
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DOCUMENT_MACROEXECMODE_HPP_
#include <com/sun/star/document/MacroExecMode.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DRAWING_XDRAWPAGESUPPLIER_HPP_
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXCONTAINER_HPP_
#include <com/sun/star/container/XIndexContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XFORMSSUPPLIER_HPP_
#include <com/sun/star/form/XFormsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XFORM_HPP_
#include <com/sun/star/form/XForm.hpp>
-#endif
-#ifndef _COMPHELPER_INTERACTION_HXX_
#include <comphelper/interaction.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _VOS_MUTEX_HXX_
-#include <vos/mutex.hxx>
-#endif
-#ifndef _COM_SUN_STAR_VIEW_XVIEWSETTINGSSUPPLIER_HPP_
+#include <osl/mutex.hxx>
+#include <sal/macros.h>
#include <com/sun/star/view/XViewSettingsSupplier.hpp>
-#endif
-#ifndef _DBA_CORE_RESOURCE_HXX_
#include "core_resource.hxx"
-#endif
-#ifndef _DBA_CORE_RESOURCE_HRC_
#include "core_resource.hrc"
-#endif
-#ifndef _DBA_COREDATAACCESS_DATASOURCE_HXX_
#include "datasource.hxx"
-#endif
-#ifndef _COM_SUN_STAR_EMBED_XSTATECHANGEBROADCASTER_HPP_
#include <com/sun/star/embed/XStateChangeBroadcaster.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONAPPROVE_HPP_
#include <com/sun/star/task/XInteractionApprove.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONDISAPPROVE_HPP_
#include <com/sun/star/task/XInteractionDisapprove.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XLAYOUTMANAGER_HPP_
#include <com/sun/star/frame/XLayoutManager.hpp>
-#endif
-#ifndef _CPPUHELPER_COMPBASE1_HXX_
#include <cppuhelper/compbase1.hxx>
-#endif
#include <cppuhelper/exc_hlp.hxx>
-#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#endif
-#ifndef _COMPHELPER_SEQUENCEASHASHMAP_HXX_
#include <comphelper/sequenceashashmap.hxx>
-#endif
-#ifndef _COMPHELPER_MIMECONFIGHELPER_HXX_
#include <comphelper/mimeconfighelper.hxx>
-#endif
-#ifndef _COMPHELPER_STORAGEHELPER_HXX
#include <comphelper/storagehelper.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTENTENUMERATIONACCESS_HPP_
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
-#endif
#include <com/sun/star/io/WrongFormatException.hpp>
#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
#include <com/sun/star/sdb/application/DatabaseObject.hpp>
@@ -281,10 +142,9 @@ namespace DatabaseObject = sdb::application::DatabaseObject;
#define DEFAULT_WIDTH 10000
#define DEFAULT_HEIGHT 7500
-//.............................................................................
+
namespace dbaccess
{
-//.............................................................................
typedef ::boost::optional< bool > optional_bool;
@@ -346,7 +206,7 @@ namespace dbaccess
virtual void SAL_CALL stateChanged( const lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (uno::RuntimeException);
virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw (uno::RuntimeException);
};
- //------------------------------------------------------------------
+
void SAL_CALL OEmbedObjectHolder::disposing()
{
if ( m_xBroadCaster.is() )
@@ -354,17 +214,16 @@ namespace dbaccess
m_xBroadCaster = NULL;
m_pDefinition = NULL;
}
- //------------------------------------------------------------------
+
void SAL_CALL OEmbedObjectHolder::changingState( const lang::EventObject& /*aEvent*/, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (embed::WrongStateException, uno::RuntimeException)
{
if ( !m_bInChangingState && nNewState == EmbedStates::RUNNING && nOldState == EmbedStates::ACTIVE && m_pDefinition )
{
m_bInChangingState = true;
- //m_pDefinition->save(sal_False);
m_bInChangingState = false;
}
}
- //------------------------------------------------------------------
+
void SAL_CALL OEmbedObjectHolder::stateChanged( const lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (uno::RuntimeException)
{
if ( !m_bInStateChange && nNewState == EmbedStates::RUNNING && nOldState == EmbedStates::ACTIVE && m_pDefinition )
@@ -379,7 +238,7 @@ namespace dbaccess
m_bInStateChange = false;
}
}
- //------------------------------------------------------------------
+
void SAL_CALL OEmbedObjectHolder::disposing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException)
{
m_xBroadCaster = NULL;
@@ -480,20 +339,19 @@ namespace dbaccess
inline LifetimeCoupler( const Reference< XInterface >& _rxClient, const Reference< XComponent >& _rxActor )
:m_xClient( _rxClient )
{
- DBG_ASSERT( _rxActor.is(), "LifetimeCoupler::LifetimeCoupler: this will crash!" );
+ OSL_ENSURE( _rxActor.is(), "LifetimeCoupler::LifetimeCoupler: this will crash!" );
osl_incrementInterlockedCount( &m_refCount );
{
_rxActor->addEventListener( this );
}
osl_decrementInterlockedCount( &m_refCount );
- DBG_ASSERT( m_refCount, "LifetimeCoupler::LifetimeCoupler: the actor is not holding us by hard ref - this won't work!" );
+ OSL_ENSURE( m_refCount, "LifetimeCoupler::LifetimeCoupler: the actor is not holding us by hard ref - this won't work!" );
}
virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw (RuntimeException);
protected:
};
- //------------------------------------------------------------------
void SAL_CALL LifetimeCoupler::disposing( const css::lang::EventObject& /*Source*/ ) throw (RuntimeException)
{
m_xClient.clear();
@@ -517,14 +375,12 @@ namespace dbaccess
virtual void SAL_CALL setName( const ::rtl::OUString& _sName,const Reference<XContent>& _xParent) throw(RuntimeException);
};
- //------------------------------------------------------------------
void SAL_CALL ODocumentSaveContinuation::setName( const ::rtl::OUString& _sName,const Reference<XContent>& _xParent) throw(RuntimeException)
{
m_sName = _sName;
m_xParentContainer = _xParent;
}
-// -----------------------------------------------------------------------------
::rtl::OUString ODocumentDefinition::GetDocumentServiceFromMediaType( const Reference< XStorage >& _rxContainerStorage,
const ::rtl::OUString& _rEntityName, const ::comphelper::ComponentContext& _rContext,
Sequence< sal_Int8 >& _rClassId )
@@ -534,7 +390,6 @@ namespace dbaccess
_rContext, _rClassId );
}
-// -----------------------------------------------------------------------------
::rtl::OUString ODocumentDefinition::GetDocumentServiceFromMediaType( const ::rtl::OUString& _rMediaType,
const ::comphelper::ComponentContext& _rContext, Sequence< sal_Int8 >& _rClassId )
{
@@ -576,19 +431,18 @@ namespace dbaccess
OSL_ENSURE( aAlternativeClassID == _rClassId, "ODocumentDefinition::GetDocumentServiceFromMediaType: failed, this approach is *not* equivalent (2)!" );
#endif
}
- catch ( Exception& )
+ catch ( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
return sResult;
}
-// -----------------------------------------------------------------------------
+
//==========================================================================
//= ODocumentDefinition
//==========================================================================
DBG_NAME(ODocumentDefinition)
-//--------------------------------------------------------------------------
ODocumentDefinition::ODocumentDefinition( const Reference< XInterface >& _rxContainer, const Reference< XMultiServiceFactory >& _xORB,
const TContentPtr& _pImpl, sal_Bool _bForm )
:OContentHelper(_xORB,_rxContainer,_pImpl)
@@ -604,7 +458,6 @@ ODocumentDefinition::ODocumentDefinition( const Reference< XInterface >& _rxCont
registerProperties();
}
-//--------------------------------------------------------------------------
void ODocumentDefinition::initialLoad( const Sequence< sal_Int8 >& i_rClassID, const Sequence< PropertyValue >& i_rCreationArgs,
const Reference< XConnection >& i_rConnection )
{
@@ -615,7 +468,6 @@ void ODocumentDefinition::initialLoad( const Sequence< sal_Int8 >& i_rClassID, c
loadEmbeddedObject( i_rConnection, i_rClassID, i_rCreationArgs, false, false );
}
-//--------------------------------------------------------------------------
ODocumentDefinition::~ODocumentDefinition()
{
DBG_DTOR(ODocumentDefinition, NULL);
@@ -632,7 +484,7 @@ ODocumentDefinition::~ODocumentDefinition()
m_pInterceptor = NULL;
}
}
-// -----------------------------------------------------------------------------
+
void ODocumentDefinition::closeObject()
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -644,7 +496,7 @@ void ODocumentDefinition::closeObject()
if ( xCloseable.is() )
xCloseable->close(sal_True);
}
- catch(Exception)
+ catch(const Exception&)
{
}
m_xEmbeddedObject = NULL;
@@ -656,7 +508,7 @@ void ODocumentDefinition::closeObject()
}
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODocumentDefinition::disposing()
{
OContentHelper::disposing();
@@ -670,11 +522,11 @@ void SAL_CALL ODocumentDefinition::disposing()
xCloseable->removeCloseListener(this);
}
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_TYPEPROVIDER3(ODocumentDefinition,OContentHelper,OPropertyStateContainer,ODocumentDefinition_Base);
IMPLEMENT_FORWARD_XINTERFACE3( ODocumentDefinition,OContentHelper,OPropertyStateContainer,ODocumentDefinition_Base)
IMPLEMENT_SERVICE_INFO1(ODocumentDefinition,"com.sun.star.comp.dba.ODocumentDefinition",SERVICE_SDB_DOCUMENTDEFINITION)
-//--------------------------------------------------------------------------
+
void ODocumentDefinition::registerProperties()
{
#define REGISTER_PROPERTY( name, location ) \
@@ -689,7 +541,6 @@ void ODocumentDefinition::registerProperties()
REGISTER_PROPERTY ( IS_FORM, m_bForm );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODocumentDefinition::getFastPropertyValue( Any& o_rValue, sal_Int32 i_nHandle ) const
{
if ( i_nHandle == PROPERTY_ID_PERSISTENT_PATH )
@@ -710,21 +561,17 @@ void SAL_CALL ODocumentDefinition::getFastPropertyValue( Any& o_rValue, sal_Int3
OPropertyStateContainer::getFastPropertyValue( o_rValue, i_nHandle );
}
-// -----------------------------------------------------------------------------
Reference< XPropertySetInfo > SAL_CALL ODocumentDefinition::getPropertySetInfo( ) throw(RuntimeException)
{
Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
return xInfo;
}
-//--------------------------------------------------------------------------
IPropertyArrayHelper& ODocumentDefinition::getInfoHelper()
{
return *getArrayHelper();
}
-
-//--------------------------------------------------------------------------
IPropertyArrayHelper* ODocumentDefinition::createArrayHelper( ) const
{
// properties maintained by our base class (see registerProperties)
@@ -741,7 +588,6 @@ IPropertyArrayHelper* ODocumentDefinition::createArrayHelper( ) const
return new OPropertyArrayHelper( ::comphelper::concatSequences( aProps, aManualProps ) );
}
-// -----------------------------------------------------------------------------
class OExecuteImpl
{
sal_Bool& m_rbSet;
@@ -750,7 +596,6 @@ public:
~OExecuteImpl(){ m_rbSet = sal_False; }
};
-// -----------------------------------------------------------------------------
namespace
{
bool lcl_extractOpenMode( const Any& _rValue, sal_Int32& _out_rMode )
@@ -770,7 +615,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
void ODocumentDefinition::impl_removeFrameFromDesktop_throw( const ::comphelper::ComponentContext& _rContxt, const Reference< XFrame >& _rxFrame )
{
Reference< XFramesSupplier > xDesktop( _rContxt.createComponent( (::rtl::OUString)SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW );
@@ -778,7 +622,6 @@ void ODocumentDefinition::impl_removeFrameFromDesktop_throw( const ::comphelper:
xFrames->remove( _rxFrame );
}
-// -----------------------------------------------------------------------------
void ODocumentDefinition::impl_onActivateEmbeddedObject_nothrow( const bool i_bReactivated )
{
try
@@ -815,7 +658,6 @@ void ODocumentDefinition::impl_onActivateEmbeddedObject_nothrow( const bool i_bR
}
}
-// -----------------------------------------------------------------------------
namespace
{
// =========================================================================
@@ -839,9 +681,9 @@ namespace
{
m_aOriginalSize = m_xVisObject->getVisualAreaSize( Aspects::MSOLE_CONTENT );
}
- catch ( Exception& )
+ catch ( const Exception& )
{
- DBG_ERROR( "PreserveVisualAreaSize::PreserveVisualAreaSize: caught an exception!" );
+ OSL_FAIL( "PreserveVisualAreaSize::PreserveVisualAreaSize: caught an exception!" );
}
}
}
@@ -854,9 +696,9 @@ namespace
{
m_xVisObject->setVisualAreaSize( Aspects::MSOLE_CONTENT, m_aOriginalSize );
}
- catch ( Exception& )
+ catch ( const Exception& )
{
- DBG_ERROR( "PreserveVisualAreaSize::~PreserveVisualAreaSize: caught an exception!" );
+ OSL_FAIL( "PreserveVisualAreaSize::~PreserveVisualAreaSize: caught an exception!" );
}
}
}
@@ -875,7 +717,7 @@ namespace
public:
inline LayoutManagerLock( const Reference< XController >& _rxController )
{
- DBG_ASSERT( _rxController.is(), "LayoutManagerLock::LayoutManagerLock: this will crash!" );
+ OSL_ENSURE( _rxController.is(), "LayoutManagerLock::LayoutManagerLock: this will crash!" );
Reference< XFrame > xFrame( _rxController->getFrame() );
try
{
@@ -886,9 +728,9 @@ namespace
m_xLayoutManager->lock();
}
- catch( Exception& )
+ catch( const Exception& )
{
- DBG_ERROR( "LayoutManagerLock::LayoutManagerLock: caught an exception!" );
+ OSL_FAIL( "LayoutManagerLock::LayoutManagerLock: caught an exception!" );
}
}
@@ -900,15 +742,14 @@ namespace
if ( m_xLayoutManager.is() )
m_xLayoutManager->unlock();
}
- catch( Exception& )
+ catch( const Exception& )
{
- DBG_ERROR( "LayoutManagerLock::~LayoutManagerLock: caught an exception!" );
+ OSL_FAIL( "LayoutManagerLock::~LayoutManagerLock: caught an exception!" );
}
}
};
}
-// -----------------------------------------------------------------------------
void ODocumentDefinition::impl_initFormEditView( const Reference< XController >& _rxController )
{
try
@@ -943,7 +784,6 @@ void ODocumentDefinition::impl_initFormEditView( const Reference< XController >&
}
}
-// -----------------------------------------------------------------------------
void ODocumentDefinition::impl_showOrHideComponent_throw( const bool i_bShow )
{
const sal_Int32 nCurrentState = m_xEmbeddedObject.is() ? m_xEmbeddedObject->getCurrentState() : EmbedStates::LOADED;
@@ -976,7 +816,6 @@ void ODocumentDefinition::impl_showOrHideComponent_throw( const bool i_bShow )
}
}
-// -----------------------------------------------------------------------------
Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, const bool _bActivate,
const Reference< XCommandEnvironment >& _rxEnvironment )
{
@@ -1014,7 +853,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
if ( lcl_extractOpenMode( pIter->Value, nOpenMode ) )
continue;
- if ( pIter->Name.equalsAscii( "MacroExecutionMode" ) )
+ if ( pIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MacroExecutionMode" ) ) )
{
sal_Int16 nMacroExecMode( !aDocumentMacroMode ? MacroExecMode::USE_CONFIG : *aDocumentMacroMode );
OSL_VERIFY( pIter->Value >>= nMacroExecMode );
@@ -1035,7 +874,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
// However, it is possible to programmatically load forms/reports, without actually
// loading the database document into a frame. In this case, the user will be asked
// here and now.
- // #i87741# / 2008-05-05 / frank.schoenheit@sun.com
+ // #i87741#
// allow the command arguments to downgrade the macro execution mode, but not to upgrade
// it
@@ -1096,7 +935,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
sal_Int16( nOpenMode ) ) ),
_rxEnvironment );
// Unreachable
- DBG_ERROR( "unreachable" );
+ OSL_FAIL( "unreachable" );
}
OSL_ENSURE( m_pImpl->m_aProps.sPersistentName.getLength(),
@@ -1160,14 +999,13 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
return makeAny( xModel );
}
-// -----------------------------------------------------------------------------
Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 CommandId, const Reference< XCommandEnvironment >& Environment ) throw (Exception, CommandAbortedException, RuntimeException)
{
Any aRet;
- sal_Bool bOpen = aCommand.Name.equalsAscii( "open" );
- sal_Bool bOpenInDesign = aCommand.Name.equalsAscii( "openDesign" );
- sal_Bool bOpenForMail = aCommand.Name.equalsAscii( "openForMail" );
+ sal_Bool bOpen = aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "open" ) );
+ sal_Bool bOpenInDesign = aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "openDesign" ) );
+ sal_Bool bOpenForMail = aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "openForMail" ) );
if ( bOpen || bOpenInDesign || bOpenForMail )
{
// opening the document involves a lot of VCL code, which is not thread-safe, but needs the SolarMutex locked.
@@ -1178,7 +1016,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
// However, we do /not/ have control over the EmbeddedObject implementation, and from a first look, it seems as
// making it release the own mutex before calling SolarMutex-code is ... difficult, at least.
// So, to be on the same side, we lock the SolarMutex here. Yes, it sucks.
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::SolarMutexGuard aSolarGuard;
::osl::ClearableMutexGuard aGuard(m_aMutex);
if ( m_bInExecute )
return aRet;
@@ -1186,12 +1024,11 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
bool bActivateObject = true;
if ( bOpenForMail )
{
- OSL_ENSURE( false, "ODocumentDefinition::execute: 'openForMail' should not be used anymore - use the 'Hidden' parameter instead!" );
+ OSL_FAIL( "ODocumentDefinition::execute: 'openForMail' should not be used anymore - use the 'Hidden' parameter instead!" );
bActivateObject = false;
}
// if the object is already opened, do nothing
- // #i89509# / 2008-05-22 / frank.schoenheit@sun.com
if ( m_xEmbeddedObject.is() )
{
sal_Int32 nCurrentState = m_xEmbeddedObject->getCurrentState();
@@ -1225,7 +1062,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
aCommand.Argument >>= aIni;
if ( aIni.getLength() != 2 )
{
- OSL_ENSURE( sal_False, "Wrong argument type!" );
+ OSL_FAIL( "Wrong argument type!" );
ucbhelper::cancelCommandExecution(
makeAny( IllegalArgumentException(
rtl::OUString(),
@@ -1238,7 +1075,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
::rtl::OUString sPersistentName;
aIni[1] >>= sPersistentName;
Reference< XStorage> xStorage = getContainerStorage();
- // -----------------------------------------------------------------------------
+
xStorage->copyElementTo(m_pImpl->m_aProps.sPersistentName,xDest,sPersistentName);
}
else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "preview" ) ) )
@@ -1251,7 +1088,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
aCommand.Argument >>= aIni;
if ( !aIni.getLength() )
{
- OSL_ENSURE( sal_False, "Wrong argument count!" );
+ OSL_FAIL( "Wrong argument count!" );
ucbhelper::cancelCommandExecution(
makeAny( IllegalArgumentException(
rtl::OUString(),
@@ -1310,7 +1147,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
return aRet;
}
-// -----------------------------------------------------------------------------
+
namespace
{
void lcl_resetChildFormsToEmptyDataSource( const Reference< XIndexAccess>& _rxFormsContainer )
@@ -1362,7 +1199,7 @@ namespace
}
}
-// -----------------------------------------------------------------------------
+
void ODocumentDefinition::onCommandInsert( const ::rtl::OUString& _sURL, const Reference< XCommandEnvironment >& Environment )
throw( Exception )
{
@@ -1371,7 +1208,7 @@ void ODocumentDefinition::onCommandInsert( const ::rtl::OUString& _sURL, const R
// Check, if all required properties were set.
if ( !_sURL.getLength() || m_xEmbeddedObject.is() )
{
- OSL_ENSURE( sal_False, "Content::onCommandInsert - property value missing!" );
+ OSL_FAIL( "Content::onCommandInsert - property value missing!" );
Sequence< rtl::OUString > aProps( 1 );
aProps[ 0 ] = PROPERTY_URL;
@@ -1384,7 +1221,6 @@ void ODocumentDefinition::onCommandInsert( const ::rtl::OUString& _sURL, const R
// Unreachable
}
-
if ( !m_xEmbeddedObject.is() )
{
Reference< XStorage> xStorage = getContainerStorage();
@@ -1402,7 +1238,7 @@ void ODocumentDefinition::onCommandInsert( const ::rtl::OUString& _sURL, const R
,aEmpty),UNO_QUERY);
lcl_resetFormsToEmptyDataSource( m_xEmbeddedObject );
- // #i57669# / 2005-12-01 / frank.schoenheit@sun.com
+ // #i57669#
Reference<XEmbedPersist> xPersist(m_xEmbeddedObject,UNO_QUERY);
if ( xPersist.is() )
@@ -1415,7 +1251,7 @@ void ODocumentDefinition::onCommandInsert( const ::rtl::OUString& _sURL, const R
if ( xCloseable.is() )
xCloseable->close(sal_True);
}
- catch(Exception)
+ catch(const Exception&)
{
}
m_xEmbeddedObject = NULL;
@@ -1423,13 +1259,9 @@ void ODocumentDefinition::onCommandInsert( const ::rtl::OUString& _sURL, const R
}
}
-// @@@
-// storeData();
-
aGuard.clear();
-// inserted();
}
-// -----------------------------------------------------------------------------
+
sal_Bool ODocumentDefinition::save(sal_Bool _bApprove)
{
// default handling: instantiate an interaction handler and let it handle the parameter request
@@ -1439,7 +1271,7 @@ sal_Bool ODocumentDefinition::save(sal_Bool _bApprove)
{
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ ::SolarMutexGuard aSolarGuard;
// the request
Reference<XNameAccess> xName(m_xParentContainer,UNO_QUERY);
@@ -1511,13 +1343,13 @@ sal_Bool ODocumentDefinition::save(sal_Bool _bApprove)
notifyDataSourceModified();
}
}
- catch(Exception&)
+ catch(const Exception&)
{
- OSL_ENSURE(0,"ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!");
+ OSL_FAIL("ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!");
}
return sal_True;
}
-// -----------------------------------------------------------------------------
+
sal_Bool ODocumentDefinition::saveAs()
{
// default handling: instantiate an interaction handler and let it handle the parameter request
@@ -1535,7 +1367,7 @@ sal_Bool ODocumentDefinition::saveAs()
try
{
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ ::SolarMutexGuard aSolarGuard;
// the request
Reference<XNameAccess> xName(m_xParentContainer,UNO_QUERY);
@@ -1575,7 +1407,7 @@ sal_Bool ODocumentDefinition::saveAs()
{
Reference< XStorage> xStorage = getContainerStorage();
const static ::rtl::OUString sBaseName(RTL_CONSTASCII_USTRINGPARAM("Obj"));
- // -----------------------------------------------------------------------------
+
Reference<XNameAccess> xElements(xStorage,UNO_QUERY_THROW);
::rtl::OUString sPersistentName = ::dbtools::createUniqueName(xElements,sBaseName);
xStorage->copyElementTo(m_pImpl->m_aProps.sPersistentName,xStorage,sPersistentName);
@@ -1604,7 +1436,7 @@ sal_Bool ODocumentDefinition::saveAs()
Reference< XNameContainer > xNameContainer( m_xParentContainer, UNO_QUERY_THROW );
xNameContainer->insertByName( sOldName, makeAny( xComponent ) );
}
- catch(Exception&)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -1619,11 +1451,10 @@ sal_Bool ODocumentDefinition::saveAs()
}
}
-
}
- catch(Exception&)
+ catch(const Exception&)
{
- OSL_ENSURE(0,"ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!");
+ OSL_FAIL("ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!");
}
return sal_True;
}
@@ -1655,7 +1486,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
namespace
{
Reference< XFrame > lcl_getDatabaseDocumentFrame( ODatabaseModelImpl& _rImpl )
@@ -1674,26 +1504,23 @@ namespace
}
}
-// -----------------------------------------------------------------------------
sal_Bool ODocumentDefinition::objectSupportsEmbeddedScripts() const
{
bool bAllowDocumentMacros = !m_pImpl->m_pDataSource
|| ( m_pImpl->m_pDataSource->determineEmbeddedMacros() == ODatabaseModelImpl::eSubDocumentMacros );
- // if *any* of the objects of the database document already has macros, we continue to allow it
- // to have them, until the user did a migration.
- // If there are no macros, yet, we don't allow to create them
+ // if *any* of the objects of the database document already has macros, we
+ // continue to allow it to have them, until the user does a migration.
+ // If there are no macros, we don't allow them to be created.
return bAllowDocumentMacros;
}
-// -----------------------------------------------------------------------------
::rtl::OUString ODocumentDefinition::determineContentType() const
{
return lcl_determineContentType_nothrow( getContainerStorage(), m_pImpl->m_aProps.sPersistentName );
}
-// -----------------------------------------------------------------------------
void ODocumentDefinition::separateOpenCommandArguments( const Sequence< PropertyValue >& i_rOpenCommandArguments,
::comphelper::NamedValueCollection& o_rDocumentLoadArgs, ::comphelper::NamedValueCollection& o_rEmbeddedObjectDescriptor )
{
@@ -1703,7 +1530,7 @@ void ODocumentDefinition::separateOpenCommandArguments( const Sequence< Property
{
"RecoveryStorage"
};
- for ( size_t i=0; i < sizeof( pObjectDescriptorArgs ) / sizeof( pObjectDescriptorArgs[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS( pObjectDescriptorArgs ); ++i )
{
if ( aOpenCommandArguments.has( pObjectDescriptorArgs[i] ) )
{
@@ -1715,7 +1542,6 @@ void ODocumentDefinition::separateOpenCommandArguments( const Sequence< Property
o_rDocumentLoadArgs.merge( aOpenCommandArguments, false );
}
-// -----------------------------------------------------------------------------
Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XConnection>& _xConnection, const bool _bSuppressMacros, const bool _bReadOnly,
const Sequence< PropertyValue >& i_rOpenCommandArguments, Sequence< PropertyValue >& _out_rEmbeddedObjectDescriptor )
{
@@ -1799,7 +1625,7 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC
return aMediaDesc.getPropertyValues();
}
-// -----------------------------------------------------------------------------
+
void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_rConnection, const Sequence< sal_Int8 >& _aClassID,
const Sequence< PropertyValue >& i_rOpenCommandArguments, const bool _bSuppressMacros, const bool _bReadOnly )
{
@@ -1825,7 +1651,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_
sDocumentService = GetDocumentServiceFromMediaType( getContentType(), m_aContext, aClassID );
// check if we are not a form and
// the com.sun.star.report.pentaho.SOReportJobFactory is not present.
- if ( !m_bForm && !sDocumentService.equalsAscii("com.sun.star.text.TextDocument"))
+ if ( !m_bForm && !sDocumentService.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextDocument")))
{
// we seem to be a "new style" report, check if report extension is present.
Reference< XContentEnumerationAccess > xEnumAccess( m_aContext.getLegacyServiceFactory(), UNO_QUERY );
@@ -1931,8 +1757,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_
lcl_putLoadArgs( aExistentMediaDesc, optional_bool(), optional_bool() );
// don't put _bSuppressMacros and _bReadOnly here - if the document was already
// loaded, we should not tamper with its settings.
- // #i88977# / 2008-05-05 / frank.schoenheit@sun.com
- // #i86872# / 2008-03-13 / frank.schoenheit@sun.com
+ // #i88977# #i86872#
xModel->attachResource( xModel->getURL(), aExistentMediaDesc.getPropertyValues() );
}
@@ -1944,7 +1769,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_
}
// set the OfficeDatabaseDocument instance as parent of the embedded document
- // #i40358# / 2005-01-19 / frank.schoenheit@sun.com
+ // #i40358#
Reference< XChild > xDepdendDocAsChild( getComponent(), UNO_QUERY );
if ( xDepdendDocAsChild.is() )
{
@@ -1965,7 +1790,6 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_
m_xLastKnownConnection = i_rConnection;
}
-// -----------------------------------------------------------------------------
void ODocumentDefinition::onCommandPreview(Any& _rImage)
{
loadEmbeddedObjectForPreview();
@@ -1984,17 +1808,17 @@ void ODocumentDefinition::onCommandPreview(Any& _rImage)
_rImage = xTransfer->getTransferData( aFlavor );
}
}
- catch( Exception )
+ catch( const Exception& )
{
}
}
}
-// -----------------------------------------------------------------------------
+
void ODocumentDefinition::getPropertyDefaultByHandle( sal_Int32 /*_nHandle*/, Any& _rDefault ) const
{
_rDefault.clear();
}
-// -----------------------------------------------------------------------------
+
void ODocumentDefinition::onCommandGetDocumentProperties( Any& _rProps )
{
loadEmbeddedObjectForPreview();
@@ -2013,7 +1837,7 @@ void ODocumentDefinition::onCommandGetDocumentProperties( Any& _rProps )
}
}
}
-// -----------------------------------------------------------------------------
+
Reference< util::XCloseable > ODocumentDefinition::impl_getComponent_throw( const bool i_ForceCreate )
{
OSL_ENSURE(m_xEmbeddedObject.is(),"Illegal call for embeddedObject");
@@ -2041,14 +1865,12 @@ Reference< util::XCloseable > ODocumentDefinition::impl_getComponent_throw( cons
return xComp;
}
-// -----------------------------------------------------------------------------
Reference< util::XCloseable > ODocumentDefinition::getComponent() throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
return impl_getComponent_throw( true );
}
-// -----------------------------------------------------------------------------
namespace
{
Reference< XDatabaseDocumentUI > lcl_getDatabaseDocumentUI( ODatabaseModelImpl& _rModelImpl )
@@ -2062,7 +1884,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
Reference< XComponent > ODocumentDefinition::impl_openUI_nolck_throw( bool _bForEditing )
{
::osl::ClearableMutexGuard aGuard( m_aMutex );
@@ -2090,7 +1911,7 @@ Reference< XComponent > ODocumentDefinition::impl_openUI_nolck_throw( bool _bFor
nObjectType, sName, _bForEditing
);
}
- catch( RuntimeException& ) { throw; }
+ catch( const RuntimeException& ) { throw; }
catch( const Exception& )
{
throw WrappedTargetException(
@@ -2099,7 +1920,6 @@ Reference< XComponent > ODocumentDefinition::impl_openUI_nolck_throw( bool _bFor
return xComponent;
}
-// -----------------------------------------------------------------------------
void ODocumentDefinition::impl_store_throw()
{
Reference<XEmbedPersist> xPersist( m_xEmbeddedObject, UNO_QUERY );
@@ -2110,7 +1930,6 @@ void ODocumentDefinition::impl_store_throw()
}
}
-// -----------------------------------------------------------------------------
bool ODocumentDefinition::impl_close_throw()
{
bool bSuccess = prepareClose();
@@ -2122,19 +1941,16 @@ bool ODocumentDefinition::impl_close_throw()
return bSuccess;
}
-// -----------------------------------------------------------------------------
Reference< XComponent > SAL_CALL ODocumentDefinition::open( ) throw (WrappedTargetException, RuntimeException)
{
return impl_openUI_nolck_throw( false );
}
-// -----------------------------------------------------------------------------
Reference< XComponent > SAL_CALL ODocumentDefinition::openDesign( ) throw (WrappedTargetException, RuntimeException)
{
return impl_openUI_nolck_throw( true );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODocumentDefinition::store( ) throw (WrappedTargetException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -2142,7 +1958,7 @@ void SAL_CALL ODocumentDefinition::store( ) throw (WrappedTargetException, Runt
{
impl_store_throw();
}
- catch( RuntimeException& ) { throw; }
+ catch( const RuntimeException& ) { throw; }
catch( const Exception& )
{
throw WrappedTargetException(
@@ -2150,7 +1966,6 @@ void SAL_CALL ODocumentDefinition::store( ) throw (WrappedTargetException, Runt
}
}
-// -----------------------------------------------------------------------------
::sal_Bool SAL_CALL ODocumentDefinition::close( ) throw (WrappedTargetException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -2160,7 +1975,7 @@ void SAL_CALL ODocumentDefinition::store( ) throw (WrappedTargetException, Runt
{
bSuccess = impl_close_throw();
}
- catch( RuntimeException& ) { throw; }
+ catch( const RuntimeException& ) { throw; }
catch( const Exception& )
{
throw WrappedTargetException(
@@ -2169,14 +1984,12 @@ void SAL_CALL ODocumentDefinition::store( ) throw (WrappedTargetException, Runt
return bSuccess;
}
-// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODocumentDefinition::getHierarchicalName() throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
return impl_getHierarchicalName( false );
}
-// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODocumentDefinition::composeHierarchicalName( const ::rtl::OUString& i_rRelativeName ) throw (IllegalArgumentException, NoSupportException, RuntimeException)
{
::rtl::OUStringBuffer aBuffer;
@@ -2186,7 +1999,6 @@ void SAL_CALL ODocumentDefinition::store( ) throw (WrappedTargetException, Runt
return aBuffer.makeStringAndClear();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODocumentDefinition::rename( const ::rtl::OUString& _rNewName ) throw (SQLException, ElementExistException, RuntimeException)
{
try
@@ -2211,14 +2023,14 @@ void SAL_CALL ODocumentDefinition::rename( const ::rtl::OUString& _rNewName ) th
throw ElementExistException(_rNewName,*this);
}
}
-// -----------------------------------------------------------------------------
+
Reference< XStorage> ODocumentDefinition::getContainerStorage() const
{
return m_pImpl->m_pDataSource
? m_pImpl->m_pDataSource->getStorage( m_bForm ? ODatabaseModelImpl::E_FORM : ODatabaseModelImpl::E_REPORT )
: Reference< XStorage>();
}
-// -----------------------------------------------------------------------------
+
sal_Bool ODocumentDefinition::isModified()
{
osl::ClearableGuard< osl::Mutex > aGuard(m_aMutex);
@@ -2230,7 +2042,7 @@ sal_Bool ODocumentDefinition::isModified()
}
return bRet;
}
-// -----------------------------------------------------------------------------
+
bool ODocumentDefinition::prepareClose()
{
if ( !m_xEmbeddedObject.is() )
@@ -2241,7 +2053,7 @@ bool ODocumentDefinition::prepareClose()
// suspend the controller. Embedded objects are not allowed to raise
// own UI at their own discretion, instead, this has always to be triggered
// by the embedding component. Thus, we do the suspend call here.
- // #i49370# / 2005-06-09 / frank.schoenheit@sun.com
+ // #i49370#
Reference< util::XCloseable > xComponent( impl_getComponent_throw( false ) );
if ( !xComponent.is() )
@@ -2288,7 +2100,7 @@ bool ODocumentDefinition::prepareClose()
return true;
}
-// -----------------------------------------------------------------------------
+
void ODocumentDefinition::fillReportData( const ::comphelper::ComponentContext& _rContext,
const Reference< util::XCloseable >& _rxComponent,
const Reference< XConnection >& _rxActiveConnection )
@@ -2313,7 +2125,7 @@ void ODocumentDefinition::fillReportData( const ::comphelper::ComponentContext&
DBG_UNHANDLED_EXCEPTION();
}
}
-// -----------------------------------------------------------------------------
+
void ODocumentDefinition::updateDocumentTitle()
{
::rtl::OUString sName = m_pImpl->m_aProps.aTitle;
@@ -2329,7 +2141,7 @@ void ODocumentDefinition::updateDocumentTitle()
if ( xUntitledProvider.is() )
sName += ::rtl::OUString::valueOf( xUntitledProvider->leaseNumber(getComponent()) );
}
-
+
Reference< XTitle > xDatabaseDocumentModel(m_pImpl->m_pDataSource->getModel_noCreate(),uno::UNO_QUERY);
if ( xDatabaseDocumentModel.is() )
sName = xDatabaseDocumentModel->getTitle() + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" : ")) + sName;
@@ -2338,7 +2150,7 @@ void ODocumentDefinition::updateDocumentTitle()
if ( xTitle.is() )
xTitle->setTitle(sName);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODocumentDefinition::queryClosing( const lang::EventObject& Source, ::sal_Bool GetsOwnership ) throw (util::CloseVetoException, uno::RuntimeException)
{
(void) Source;
@@ -2353,16 +2165,15 @@ void SAL_CALL ODocumentDefinition::queryClosing( const lang::EventObject& Source
throw util::CloseVetoException();
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODocumentDefinition::notifyClosing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException)
{
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODocumentDefinition::disposing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException)
{
}
-// -----------------------------------------------------------------------------
void ODocumentDefinition::firePropertyChange( sal_Int32 i_nHandle, const Any& i_rNewValue, const Any& i_rOldValue,
sal_Bool i_bVetoable, const NotifierAccess )
{
@@ -2372,7 +2183,6 @@ void ODocumentDefinition::firePropertyChange( sal_Int32 i_nHandle, const Any& i_
// =============================================================================
// NameChangeNotifier
// =============================================================================
-// -----------------------------------------------------------------------------
NameChangeNotifier::NameChangeNotifier( ODocumentDefinition& i_rDocumentDefinition, const ::rtl::OUString& i_rNewName,
::osl::ResettableMutexGuard& i_rClearForNotify )
:m_rDocumentDefinition( i_rDocumentDefinition )
@@ -2383,13 +2193,11 @@ NameChangeNotifier::NameChangeNotifier( ODocumentDefinition& i_rDocumentDefiniti
impl_fireEvent_throw( sal_True );
}
-// -----------------------------------------------------------------------------
NameChangeNotifier::~NameChangeNotifier()
{
impl_fireEvent_throw( sal_False );
}
-// -----------------------------------------------------------------------------
void NameChangeNotifier::impl_fireEvent_throw( const sal_Bool i_bVetoable )
{
m_rClearForNotify.clear();
@@ -2398,7 +2206,5 @@ void NameChangeNotifier::impl_fireEvent_throw( const sal_Bool i_bVetoable )
m_rClearForNotify.reset();
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.hxx b/dbaccess/source/core/dataaccess/documentdefinition.hxx
index b011728a6..e51b95994 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.hxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,39 +29,17 @@
#ifndef _DBA_COREDATAACCESS_DOCUMENTDEFINITION_HXX_
#define _DBA_COREDATAACCESS_DOCUMENTDEFINITION_HXX_
-#ifndef _CPPUHELPER_PROPSHLP_HXX
#include <cppuhelper/propshlp.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE4_HXX_
#include <cppuhelper/implbase4.hxx>
-#endif
-#ifndef DBA_CONTENTHELPER_HXX
#include "ContentHelper.hxx"
-#endif
-#ifndef COMPHELPER_PROPERTYSTATECONTAINER_HXX
#include <comphelper/propertystatecontainer.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
#include <comphelper/proparrhlp.hxx>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
#include <com/sun/star/frame/XComponentLoader.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
#include <com/sun/star/frame/XController.hpp>
-#endif
-#ifndef _COM_SUN_STAR_EMBED_XSTATECHANGELISTENER_HPP_
#include <com/sun/star/embed/XStateChangeListener.hpp>
-#endif
#include <com/sun/star/sdb/XSubDocument.hpp>
#include <com/sun/star/util/XCloseListener.hpp>
#include <com/sun/star/container/XHierarchicalName.hpp>
@@ -366,9 +345,7 @@ private:
*/
sal_Bool objectSupportsEmbeddedScripts() const;
- //-------------------------------------------------------------------------
//- commands
- //-------------------------------------------------------------------------
void onCommandGetDocumentProperties( ::com::sun::star::uno::Any& _rProps );
void onCommandInsert( const ::rtl::OUString& _sURL, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& Environment ) throw( ::com::sun::star::uno::Exception );
@@ -397,14 +374,13 @@ private:
ODocumentDefinition& m_rDocumentDefinition;
const ::com::sun::star::uno::Any m_aOldValue;
const ::com::sun::star::uno::Any m_aNewValue;
- mutable ::osl::ResettableMutexGuard& m_rClearForNotify;
+ ::osl::ResettableMutexGuard& m_rClearForNotify;
void impl_fireEvent_throw( const sal_Bool i_bVetoable );
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_COREDATAACCESS_DOCUMENTDEFINITION_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
index 6788abf59..ab44de2c2 100644
--- a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
+++ b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
@@ -1,6 +1,7 @@
+/* -*- 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
@@ -41,12 +42,10 @@
#include <cppuhelper/weakref.hxx>
#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
/** === begin UNO using === **/
using ::com::sun::star::uno::Reference;
@@ -89,7 +88,6 @@ namespace dbaccess
}
};
- //--------------------------------------------------------------------
namespace
{
static void lcl_dispatchScriptURL_throw( DocumentEventExecutor_Data& _rDocExecData,
@@ -103,7 +101,7 @@ namespace dbaccess
xDispProv.set( xController->getFrame(), UNO_QUERY );
if ( !xDispProv.is() )
{
- OSL_ENSURE( false, "lcl_dispatchScriptURL_throw: no controller/frame? How should I dispatch?" );
+ OSL_FAIL( "lcl_dispatchScriptURL_throw: no controller/frame? How should I dispatch?" );
return;
}
@@ -115,12 +113,12 @@ namespace dbaccess
// unfortunately, executing a script can trigger all kind of complex stuff, and unfortunately, not
// every component involved into this properly cares for thread safety. To be on the safe side,
// we lock the solar mutex here.
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
Reference< XDispatch > xDispatch( xDispProv->queryDispatch( aScriptURL, ::rtl::OUString(), 0 ) );
if ( !xDispatch.is() )
{
- OSL_ENSURE( false, "lcl_dispatchScriptURL_throw: no dispatcher for the script URL!" );
+ OSL_FAIL( "lcl_dispatchScriptURL_throw: no dispatcher for the script URL!" );
return;
}
@@ -134,7 +132,6 @@ namespace dbaccess
//====================================================================
//= DocumentEventExecutor
//====================================================================
- //--------------------------------------------------------------------
DocumentEventExecutor::DocumentEventExecutor( const ::comphelper::ComponentContext& _rContext,
const Reference< XEventsSupplier >& _rxDocument )
:m_pData( new DocumentEventExecutor_Data( _rxDocument ) )
@@ -157,18 +154,16 @@ namespace dbaccess
}
}
- //--------------------------------------------------------------------
DocumentEventExecutor::~DocumentEventExecutor()
{
}
- //--------------------------------------------------------------------
void SAL_CALL DocumentEventExecutor::documentEventOccured( const DocumentEvent& _Event ) throw (RuntimeException)
{
Reference< XEventsSupplier > xEventsSupplier( m_pData->xDocument.get(), UNO_QUERY );
if ( !xEventsSupplier.is() )
{
- OSL_ENSURE( false, "DocumentEventExecutor::documentEventOccured: no document anymore, but still being notified?" );
+ OSL_FAIL( "DocumentEventExecutor::documentEventOccurred: no document anymore, but still being notified?" );
return;
}
@@ -181,13 +176,12 @@ namespace dbaccess
{
// this is worth an assertion: We are listener at the very same document which we just asked
// for its events. So when EventName is fired, why isn't it supported by xDocEvents?
- OSL_ENSURE( false, "DocumentEventExecutor::documentEventOccured: an unsupported event is notified!" );
+ OSL_FAIL( "DocumentEventExecutor::documentEventOccurred: an unsupported event is notified!" );
return;
}
const ::comphelper::NamedValueCollection aScriptDescriptor( xDocEvents->getByName( _Event.EventName ) );
-
::rtl::OUString sEventType;
bool bScriptAssigned = aScriptDescriptor.get_ensureType( "EventType", sEventType );
@@ -205,7 +199,7 @@ namespace dbaccess
bool bNonEmptyScript = sScript.getLength() != 0;
OSL_ENSURE( bDispatchScriptURL && bNonEmptyScript,
- "DocumentEventExecutor::documentEventOccured: invalid/unsupported script descriptor" );
+ "DocumentEventExecutor::documentEventOccurred: invalid/unsupported script descriptor" );
if ( bDispatchScriptURL && bNonEmptyScript )
{
@@ -218,14 +212,11 @@ namespace dbaccess
DBG_UNHANDLED_EXCEPTION();
}
}
-
- //--------------------------------------------------------------------
+
void SAL_CALL DocumentEventExecutor::disposing( const lang::EventObject& /*_Source*/ ) throw (RuntimeException)
{
// not interested in
}
-
-//........................................................................
} // namespace dbaccess
-//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/documenteventexecutor.hxx b/dbaccess/source/core/dataaccess/documenteventexecutor.hxx
index 518c2c6c0..c83a3e288 100644
--- a/dbaccess/source/core/dataaccess/documenteventexecutor.hxx
+++ b/dbaccess/source/core/dataaccess/documenteventexecutor.hxx
@@ -1,6 +1,7 @@
+/* -*- 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
@@ -41,10 +42,8 @@ namespace comphelper
class ComponentContext;
}
-//........................................................................
namespace dbaccess
{
-//........................................................................
struct DocumentEventExecutor_Data;
//====================================================================
@@ -71,8 +70,8 @@ namespace dbaccess
::std::auto_ptr< DocumentEventExecutor_Data > m_pData;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_DOCUMENTEVENTEXECUTOR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/documenteventnotifier.cxx b/dbaccess/source/core/dataaccess/documenteventnotifier.cxx
index 89c533bce..dabd16a93 100644
--- a/dbaccess/source/core/dataaccess/documenteventnotifier.cxx
+++ b/dbaccess/source/core/dataaccess/documenteventnotifier.cxx
@@ -1,6 +1,7 @@
+/* -*- 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
@@ -38,10 +39,8 @@
#include <cppuhelper/weak.hxx>
#include <tools/diagnose_ex.h>
-//........................................................................
namespace dbaccess
{
-//........................................................................
/** === begin UNO using === **/
using ::com::sun::star::uno::Reference;
@@ -148,20 +147,17 @@ namespace dbaccess
void impl_notifyEventAsync_nothrow( const DocumentEvent& _rEvent );
};
- //--------------------------------------------------------------------
void SAL_CALL DocumentEventNotifier_Impl::acquire()
{
osl_incrementInterlockedCount( &m_refCount );
}
- //--------------------------------------------------------------------
void SAL_CALL DocumentEventNotifier_Impl::release()
{
if ( 0 == osl_decrementInterlockedCount( &m_refCount ) )
delete this;
}
- //--------------------------------------------------------------------
void DocumentEventNotifier_Impl::disposing()
{
// SYNCHRONIZED ->
@@ -187,7 +183,6 @@ namespace dbaccess
// <-- SYNCHRONIZED
}
- //--------------------------------------------------------------------
void DocumentEventNotifier_Impl::onDocumentInitialized()
{
if ( m_bInitialized )
@@ -199,7 +194,6 @@ namespace dbaccess
m_pEventBroadcaster->create();
}
- //--------------------------------------------------------------------
void DocumentEventNotifier_Impl::impl_notifyEvent_nothrow( const DocumentEvent& _rEvent )
{
OSL_PRECOND( m_bInitialized,
@@ -223,7 +217,6 @@ namespace dbaccess
}
}
- //--------------------------------------------------------------------
void DocumentEventNotifier_Impl::impl_notifyEventAsync_nothrow( const DocumentEvent& _rEvent )
{
if ( !m_pEventBroadcaster.is() )
@@ -237,7 +230,6 @@ namespace dbaccess
m_pEventBroadcaster->addEvent( new DocumentEventHolder( _rEvent ), this );
}
- // -----------------------------------------------------------------------------
void DocumentEventNotifier_Impl::processEvent( const ::comphelper::AnyEvent& _rEvent )
{
// beware, this is called from the notification thread
@@ -253,67 +245,56 @@ namespace dbaccess
//====================================================================
//= DocumentEventNotifier
//====================================================================
- //--------------------------------------------------------------------
DocumentEventNotifier::DocumentEventNotifier( ::cppu::OWeakObject& _rBroadcasterDocument, ::osl::Mutex& _rMutex )
:m_pImpl( new DocumentEventNotifier_Impl( _rBroadcasterDocument, _rMutex ) )
{
}
- //--------------------------------------------------------------------
DocumentEventNotifier::~DocumentEventNotifier()
{
}
- //--------------------------------------------------------------------
void DocumentEventNotifier::disposing()
{
m_pImpl->disposing();
}
- //--------------------------------------------------------------------
void DocumentEventNotifier::onDocumentInitialized()
{
m_pImpl->onDocumentInitialized();
}
- //--------------------------------------------------------------------
void DocumentEventNotifier::addLegacyEventListener( const Reference< document::XEventListener >& _Listener )
{
m_pImpl->addLegacyEventListener( _Listener );
}
- //--------------------------------------------------------------------
void DocumentEventNotifier::removeLegacyEventListener( const Reference< document::XEventListener >& _Listener )
{
m_pImpl->removeLegacyEventListener( _Listener );
}
- //--------------------------------------------------------------------
void DocumentEventNotifier::addDocumentEventListener( const Reference< XDocumentEventListener >& _Listener )
{
m_pImpl->addDocumentEventListener( _Listener );
}
- //--------------------------------------------------------------------
void DocumentEventNotifier::removeDocumentEventListener( const Reference< XDocumentEventListener >& _Listener )
{
m_pImpl->removeDocumentEventListener( _Listener );
}
- //--------------------------------------------------------------------
void DocumentEventNotifier::notifyDocumentEvent( const ::rtl::OUString& _EventName,
const Reference< XController2 >& _ViewController, const Any& _Supplement )
{
m_pImpl->notifyDocumentEvent( _EventName, _ViewController, _Supplement );
}
- //--------------------------------------------------------------------
void DocumentEventNotifier::notifyDocumentEventAsync( const ::rtl::OUString& _EventName,
const Reference< XController2 >& _ViewController, const Any& _Supplement )
{
m_pImpl->notifyDocumentEventAsync( _EventName, _ViewController, _Supplement );
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/documenteventnotifier.hxx b/dbaccess/source/core/dataaccess/documenteventnotifier.hxx
index 3beb9b3cf..c92064aab 100644
--- a/dbaccess/source/core/dataaccess/documenteventnotifier.hxx
+++ b/dbaccess/source/core/dataaccess/documenteventnotifier.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -40,10 +41,8 @@ namespace cppu
class OWeakObject;
}
-//........................................................................
namespace dbaccess
{
-//........................................................................
class DocumentEventNotifier_Impl;
//====================================================================
@@ -137,8 +136,8 @@ namespace dbaccess
::rtl::Reference< DocumentEventNotifier_Impl > m_pImpl;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_DOCUMENTEVENTNOTIFIER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/documentevents.cxx b/dbaccess/source/core/dataaccess/documentevents.cxx
index 8594fc607..e24c2bf59 100644
--- a/dbaccess/source/core/dataaccess/documentevents.cxx
+++ b/dbaccess/source/core/dataaccess/documentevents.cxx
@@ -1,6 +1,7 @@
+/* -*- 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
@@ -37,11 +38,10 @@
#include <algorithm>
#include <functional>
+#include <o3tl/compat_functional.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
/** === begin UNO using === **/
using ::com::sun::star::uno::Reference;
@@ -87,7 +87,6 @@ namespace dbaccess
bool bNeedsSyncNotify;
};
- //--------------------------------------------------------------------
namespace
{
static const DocumentEventData* lcl_getDocumentEventData()
@@ -126,7 +125,6 @@ namespace dbaccess
//====================================================================
//= DocumentEvents
//====================================================================
- //--------------------------------------------------------------------
DocumentEvents::DocumentEvents( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, DocumentEventsData& _rEventsData )
:m_pData( new DocumentEvents_Data( _rParent, _rMutex, _rEventsData ) )
{
@@ -141,24 +139,20 @@ namespace dbaccess
}
}
- //--------------------------------------------------------------------
DocumentEvents::~DocumentEvents()
{
}
- //--------------------------------------------------------------------
void SAL_CALL DocumentEvents::acquire() throw()
{
m_pData->rParent.acquire();
}
- //--------------------------------------------------------------------
void SAL_CALL DocumentEvents::release() throw()
{
m_pData->rParent.release();
}
- //--------------------------------------------------------------------
bool DocumentEvents::needsSynchronousNotification( const ::rtl::OUString& _rEventName )
{
const DocumentEventData* pEventData = lcl_getDocumentEventData();
@@ -173,7 +167,6 @@ namespace dbaccess
return false;
}
- //--------------------------------------------------------------------
void SAL_CALL DocumentEvents::replaceByName( const ::rtl::OUString& _Name, const Any& _Element ) throw (IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
{
::osl::MutexGuard aGuard( m_pData->rMutex );
@@ -206,8 +199,7 @@ namespace dbaccess
elementPos->second = aEventDescriptor;
}
-
- //--------------------------------------------------------------------
+
Any SAL_CALL DocumentEvents::getByName( const ::rtl::OUString& _Name ) throw (NoSuchElementException, WrappedTargetException, RuntimeException)
{
::osl::MutexGuard aGuard( m_pData->rMutex );
@@ -222,8 +214,7 @@ namespace dbaccess
aReturn <<= rEventDesc;
return aReturn;
}
-
- //--------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL DocumentEvents::getElementNames( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_pData->rMutex );
@@ -233,33 +224,28 @@ namespace dbaccess
m_pData->rEventsData.begin(),
m_pData->rEventsData.end(),
aNames.getArray(),
- ::std::select1st< DocumentEventsData::value_type >()
+ ::o3tl::select1st< DocumentEventsData::value_type >()
);
return aNames;
}
-
- //--------------------------------------------------------------------
+
::sal_Bool SAL_CALL DocumentEvents::hasByName( const ::rtl::OUString& _Name ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_pData->rMutex );
return m_pData->rEventsData.find( _Name ) != m_pData->rEventsData.end();
}
-
- //--------------------------------------------------------------------
+
Type SAL_CALL DocumentEvents::getElementType( ) throw (RuntimeException)
{
return ::cppu::UnoType< Sequence< PropertyValue > >::get();
}
-
- //--------------------------------------------------------------------
+
::sal_Bool SAL_CALL DocumentEvents::hasElements( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_pData->rMutex );
return !m_pData->rEventsData.empty();
}
-
-//........................................................................
} // namespace dbaccess
-//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/documentevents.hxx b/dbaccess/source/core/dataaccess/documentevents.hxx
index 4951cefe5..16cb0c868 100644
--- a/dbaccess/source/core/dataaccess/documentevents.hxx
+++ b/dbaccess/source/core/dataaccess/documentevents.hxx
@@ -1,6 +1,7 @@
+/* -*- 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
@@ -38,10 +39,8 @@
#include <map>
#include <boost/noncopyable.hpp>
-//........................................................................
namespace dbaccess
{
-//........................................................................
typedef ::std::map< ::rtl::OUString, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >
DocumentEventsData;
@@ -83,8 +82,8 @@ namespace dbaccess
::std::auto_ptr< DocumentEvents_Data > m_pData;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_DOCUMENTEVENTS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/intercept.cxx b/dbaccess/source/core/dataaccess/intercept.cxx
index 352cae82b..d00c9e724 100644
--- a/dbaccess/source/core/dataaccess/intercept.cxx
+++ b/dbaccess/source/core/dataaccess/intercept.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -159,7 +160,7 @@ void SAL_CALL OInterceptor::dispatch( const URL& _URL,const Sequence<PropertyVal
while( nInd < aNewArgs.getLength() )
{
- if ( aNewArgs[nInd].Name.equalsAscii( "SaveTo" ) )
+ if ( aNewArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "SaveTo" ) ) )
{
aNewArgs[nInd].Value <<= sal_True;
break;
@@ -170,19 +171,19 @@ void SAL_CALL OInterceptor::dispatch( const URL& _URL,const Sequence<PropertyVal
if ( nInd == aNewArgs.getLength() )
{
aNewArgs.realloc( nInd + 1 );
- aNewArgs[nInd].Name = ::rtl::OUString::createFromAscii( "SaveTo" );
+ aNewArgs[nInd].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SaveTo"));
aNewArgs[nInd].Value <<= sal_True;
}
Reference< XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch(
- _URL, ::rtl::OUString::createFromAscii( "_self" ), 0 );
+ _URL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_self")), 0 );
if ( xDispatch.is() )
xDispatch->dispatch( _URL, aNewArgs );
}
return;
}
- if ( _URL.Complete == m_aInterceptedURL[ DISPATCH_CLOSEDOC ]
+ if ( _URL.Complete == m_aInterceptedURL[ DISPATCH_CLOSEDOC ]
|| _URL.Complete == m_aInterceptedURL[ DISPATCH_CLOSEWIN ]
|| _URL.Complete == m_aInterceptedURL[ DISPATCH_CLOSEFRAME ]
)
@@ -203,7 +204,7 @@ IMPL_LINK( OInterceptor, OnDispatch, void*, _pDispatcher )
if ( m_pContentHolder && m_pContentHolder->prepareClose() && m_xSlaveDispatchProvider.is() )
{
Reference< XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch(
- pHelper->aURL, ::rtl::OUString::createFromAscii( "_self" ), 0 );
+ pHelper->aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_self")), 0 );
if ( xDispatch.is() )
{
Reference< ::com::sun::star::document::XEventBroadcaster> xEvtB(m_pContentHolder->getComponent(),UNO_QUERY);
@@ -236,7 +237,7 @@ void SAL_CALL OInterceptor::addStatusListener(
if ( m_pContentHolder && _URL.Complete == m_aInterceptedURL[DISPATCH_SAVEAS] )
{ // SaveAs
-
+
if ( !m_pContentHolder->isNewReport() )
{
FeatureStateEvent aStateEvent;
@@ -246,7 +247,7 @@ void SAL_CALL OInterceptor::addStatusListener(
aStateEvent.Requery = sal_False;
aStateEvent.State <<= (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("($3)")));
Control->statusChanged(aStateEvent);
- }
+ }
{
osl::MutexGuard aGuard(m_aMutex);
@@ -416,7 +417,7 @@ void SAL_CALL OInterceptor::setMasterDispatchProvider(
osl::MutexGuard aGuard(m_aMutex);
m_xMasterDispatchProvider = NewSupplier;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OInterceptor::notifyEvent( const ::com::sun::star::document::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException)
{
osl::ResettableMutexGuard _rGuard(m_aMutex);
@@ -436,12 +437,10 @@ void SAL_CALL OInterceptor::notifyEvent( const ::com::sun::star::document::Event
}
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OInterceptor::disposing( const ::com::sun::star::lang::EventObject& /*Source*/ ) throw (::com::sun::star::uno::RuntimeException)
{
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/intercept.hxx b/dbaccess/source/core/dataaccess/intercept.hxx
index e7bacfc63..cb2cadc77 100644
--- a/dbaccess/source/core/dataaccess/intercept.hxx
+++ b/dbaccess/source/core/dataaccess/intercept.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,30 +29,14 @@
#ifndef DBA_INTERCEPT_HXX
#define DBA_INTERCEPT_HXX
-#ifndef _OSL_MUTEX_HXX_
#include <osl/mutex.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE4_HXX_
#include <cppuhelper/implbase4.hxx>
-#endif
-#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
#include <cppuhelper/interfacecontainer.hxx>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTOR_HPP_
#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XINTERCEPTORINFO_HPP_
#include <com/sun/star/frame/XInterceptorInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTLISTENER_HPP_
#include <com/sun/star/document/XEventListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_
#include <com/sun/star/frame/XDispatch.hpp>
-#endif
-#ifndef _DBA_COREDATAACCESS_DOCUMENTDEFINITION_HXX_
#include "documentdefinition.hxx"
-#endif
#include <vcl/svapp.hxx>
namespace dbaccess
@@ -69,104 +54,102 @@ protected:
public:
OInterceptor( ODocumentDefinition* _pContentHolder,sal_Bool _bAllowEditDoc );
-
+
void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
-
+
//XDispatch
- virtual void SAL_CALL
- dispatch(
+ virtual void SAL_CALL
+ dispatch(
const ::com::sun::star::util::URL& URL,
const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue >& Arguments )
throw (::com::sun::star::uno::RuntimeException);
-
+
virtual void SAL_CALL
- addStatusListener(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XStatusListener >& Control,
+ addStatusListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XStatusListener >& Control,
const ::com::sun::star::util::URL& URL )
throw (
::com::sun::star::uno::RuntimeException
);
-
+
virtual void SAL_CALL
- removeStatusListener(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XStatusListener >& Control,
- const ::com::sun::star::util::URL& URL )
+ removeStatusListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XStatusListener >& Control,
+ const ::com::sun::star::util::URL& URL )
throw (
::com::sun::star::uno::RuntimeException
);
-
+
//XInterceptorInfo
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
SAL_CALL getInterceptedURLs( )
throw (
::com::sun::star::uno::RuntimeException
);
-
+
//XDispatchProvider ( inherited by XDispatchProviderInterceptor )
- virtual ::com::sun::star::uno::Reference<
+ virtual ::com::sun::star::uno::Reference<
::com::sun::star::frame::XDispatch > SAL_CALL
- queryDispatch(
+ queryDispatch(
const ::com::sun::star::util::URL& URL,
- const ::rtl::OUString& TargetFrameName,
+ const ::rtl::OUString& TargetFrameName,
sal_Int32 SearchFlags )
throw (
::com::sun::star::uno::RuntimeException
);
-
- virtual ::com::sun::star::uno::Sequence<
- ::com::sun::star::uno::Reference<
+
+ virtual ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Reference<
::com::sun::star::frame::XDispatch > > SAL_CALL
- queryDispatches(
+ queryDispatches(
const ::com::sun::star::uno::Sequence<
::com::sun::star::frame::DispatchDescriptor >& Requests )
throw (
::com::sun::star::uno::RuntimeException
);
-
-
+
//XDispatchProviderInterceptor
virtual ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XDispatchProvider > SAL_CALL
- getSlaveDispatchProvider( )
+ ::com::sun::star::frame::XDispatchProvider > SAL_CALL
+ getSlaveDispatchProvider( )
throw (
::com::sun::star::uno::RuntimeException
);
-
+
virtual void SAL_CALL
- setSlaveDispatchProvider(
- const ::com::sun::star::uno::Reference<
+ setSlaveDispatchProvider(
+ const ::com::sun::star::uno::Reference<
::com::sun::star::frame::XDispatchProvider >& NewDispatchProvider )
throw (
::com::sun::star::uno::RuntimeException
);
- virtual ::com::sun::star::uno::Reference<
+ virtual ::com::sun::star::uno::Reference<
::com::sun::star::frame::XDispatchProvider > SAL_CALL
- getMasterDispatchProvider( )
+ getMasterDispatchProvider( )
throw (
::com::sun::star::uno::RuntimeException
);
-
+
virtual void SAL_CALL
- setMasterDispatchProvider(
- const ::com::sun::star::uno::Reference<
+ setMasterDispatchProvider(
+ const ::com::sun::star::uno::Reference<
::com::sun::star::frame::XDispatchProvider >& NewSupplier )
throw (
::com::sun::star::uno::RuntimeException
- );
+ );
// XEventListener
virtual void SAL_CALL notifyEvent( const ::com::sun::star::document::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
-
-
+
private:
-
+
osl::Mutex m_aMutex;
-
+
ODocumentDefinition* m_pContentHolder;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xSlaveDispatchProvider;
@@ -179,12 +162,8 @@ private:
sal_Bool m_bAllowEditDoc;
};
-
-//........................................................................
} // namespace dbaccess
-//........................................................................
-
#endif //DBA_INTERCEPT_HXX
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/makefile.mk b/dbaccess/source/core/dataaccess/makefile.mk
deleted file mode 100644
index 831eae349..000000000
--- a/dbaccess/source/core/dataaccess/makefile.mk
+++ /dev/null
@@ -1,69 +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=dataaccess
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/dba.pmk
-
-# --- Files -------------------------------------
-
-SLOFILES= \
- $(SLO)$/SharedConnection.obj \
- $(SLO)$/ContentHelper.obj \
- $(SLO)$/bookmarkcontainer.obj \
- $(SLO)$/definitioncontainer.obj \
- $(SLO)$/commanddefinition.obj \
- $(SLO)$/documentcontainer.obj \
- $(SLO)$/commandcontainer.obj \
- $(SLO)$/documentdefinition.obj \
- $(SLO)$/ComponentDefinition.obj \
- $(SLO)$/databasecontext.obj \
- $(SLO)$/connection.obj \
- $(SLO)$/datasource.obj \
- $(SLO)$/databaseregistrations.obj \
- $(SLO)$/intercept.obj \
- $(SLO)$/myucp_datasupplier.obj \
- $(SLO)$/myucp_resultset.obj \
- $(SLO)$/databasedocument.obj \
- $(SLO)$/dataaccessdescriptor.obj\
- $(SLO)$/ModelImpl.obj \
- $(SLO)$/documentevents.obj \
- $(SLO)$/documenteventexecutor.obj \
- $(SLO)$/documenteventnotifier.obj \
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
index e8602f483..b62e80de2 100644
--- a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
+++ b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -36,25 +37,13 @@
#include <vector>
-#ifndef _UCBHELPER_CONTENTIDENTIFIER_HXX
#include <ucbhelper/contentidentifier.hxx>
-#endif
-#ifndef _UCBHELPER_PROVIDERHELPER_HXX
#include <ucbhelper/providerhelper.hxx>
-#endif
-#ifndef DBA_DATASUPPLIER_HXX
#include "myucp_datasupplier.hxx"
-#endif
-#ifndef DBA_CONTENTHELPER_HXX
#include "ContentHelper.hxx"
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XHIERARCHICALNAMEACCESS_HPP_
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::ucb;
@@ -130,19 +119,17 @@ DataSupplier_Impl::~DataSupplier_Impl()
while ( it != end )
{
delete (*it);
- it++;
+ ++it;
}
}
}
//=========================================================================
-//=========================================================================
//
// DataSupplier Implementation.
//
//=========================================================================
-//=========================================================================
DBG_NAME(DataSupplier)
DataSupplier::DataSupplier( const Reference< XMultiServiceFactory >& rxSMgr,
@@ -154,16 +141,12 @@ DataSupplier::DataSupplier( const Reference< XMultiServiceFactory >& rxSMgr,
}
-//=========================================================================
-// virtual
DataSupplier::~DataSupplier()
{
DBG_DTOR(DataSupplier,NULL);
}
-//=========================================================================
-// virtual
rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -194,9 +177,7 @@ rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
return rtl::OUString();
}
-//=========================================================================
-// virtual
-Reference< XContentIdentifier >
+Reference< XContentIdentifier >
DataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -221,9 +202,7 @@ DataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
return Reference< XContentIdentifier >();
}
-//=========================================================================
-// virtual
-Reference< XContent >
+Reference< XContent >
DataSupplier::queryContent( sal_uInt32 _nIndex )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -249,7 +228,7 @@ DataSupplier::queryContent( sal_uInt32 _nIndex )
sName = sName.getToken(0,'/',nIndex);
m_pImpl->m_aResults[ _nIndex ]->xContent = m_pImpl->m_xContent->getContent(sName);
-
+
xContent = m_pImpl->m_aResults[ _nIndex ]->xContent.get();
return xContent;
@@ -261,8 +240,6 @@ DataSupplier::queryContent( sal_uInt32 _nIndex )
return Reference< XContent >();
}
-//=========================================================================
-// virtual
sal_Bool DataSupplier::getResult( sal_uInt32 nIndex )
{
osl::ClearableGuard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -324,8 +301,6 @@ sal_Bool DataSupplier::getResult( sal_uInt32 nIndex )
return bFound;
}
-//=========================================================================
-// virtual
sal_uInt32 DataSupplier::totalCount()
{
osl::ClearableGuard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -361,23 +336,17 @@ sal_uInt32 DataSupplier::totalCount()
return m_pImpl->m_aResults.size();
}
-//=========================================================================
-// virtual
sal_uInt32 DataSupplier::currentCount()
{
return m_pImpl->m_aResults.size();
}
-//=========================================================================
-// virtual
sal_Bool DataSupplier::isCountFinal()
{
return m_pImpl->m_bCountFinal;
}
-//=========================================================================
-// virtual
-Reference< XRow >
+Reference< XRow >
DataSupplier::queryPropertyValues( sal_uInt32 nIndex )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -405,8 +374,6 @@ DataSupplier::queryPropertyValues( sal_uInt32 nIndex )
return Reference< XRow >();
}
-//=========================================================================
-// virtual
void DataSupplier::releasePropertyValues( sal_uInt32 nIndex )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -415,16 +382,12 @@ void DataSupplier::releasePropertyValues( sal_uInt32 nIndex )
m_pImpl->m_aResults[ nIndex ]->xRow = Reference< XRow >();
}
-//=========================================================================
-// virtual
void DataSupplier::close()
{
}
-//=========================================================================
-// virtual
void DataSupplier::validate()
throw( ResultSetException )
{
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/myucp_datasupplier.hxx b/dbaccess/source/core/dataaccess/myucp_datasupplier.hxx
index 3b4ceb8ef..77dcbf2e9 100644
--- a/dbaccess/source/core/dataaccess/myucp_datasupplier.hxx
+++ b/dbaccess/source/core/dataaccess/myucp_datasupplier.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,15 +29,9 @@
#ifndef DBA_DATASUPPLIER_HXX
#define DBA_DATASUPPLIER_HXX
-#ifndef _RTL_REF_HXX_
#include <rtl/ref.hxx>
-#endif
-#ifndef _UCBHELPER_RESULTSET_HXX
#include <ucbhelper/resultset.hxx>
-#endif
-#ifndef _DBA_COREDATAACCESS_DOCUMENTCONTAINER_HXX_
#include "documentcontainer.hxx"
-#endif
#include <memory>
namespace dbaccess {
@@ -81,3 +76,5 @@ public:
}
#endif // DBA_DATASUPPLIER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/myucp_resultset.cxx b/dbaccess/source/core/dataaccess/myucp_resultset.cxx
index 26c2d2dc9..d59336d87 100644
--- a/dbaccess/source/core/dataaccess/myucp_resultset.cxx
+++ b/dbaccess/source/core/dataaccess/myucp_resultset.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -37,12 +38,8 @@
*************************************************************************/
-#ifndef DBA_DATASUPPLIER_HXX
#include "myucp_datasupplier.hxx"
-#endif
-#ifndef DBA_UCPRESULTSET_HXX
#include "myucp_resultset.hxx"
-#endif
using namespace ::com::sun::star::uno;
@@ -56,12 +53,10 @@ using namespace ::com::sun::star::container;
using namespace dbaccess;
//=========================================================================
-//=========================================================================
//
// DynamicResultSet Implementation.
//
//=========================================================================
-//=========================================================================
DynamicResultSet::DynamicResultSet(
const Reference< XMultiServiceFactory >& rxSMgr,
@@ -79,7 +74,6 @@ DynamicResultSet::DynamicResultSet(
// Non-interface methods.
//
//=========================================================================
-
void DynamicResultSet::initStatic()
{
m_xResultSet1
@@ -91,7 +85,6 @@ void DynamicResultSet::initStatic()
m_xEnv );
}
-//=========================================================================
void DynamicResultSet::initDynamic()
{
m_xResultSet1
@@ -103,4 +96,4 @@ void DynamicResultSet::initDynamic()
m_xEnv );
m_xResultSet2 = m_xResultSet1;
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/myucp_resultset.hxx b/dbaccess/source/core/dataaccess/myucp_resultset.hxx
index 24caf5c32..b74be38df 100644
--- a/dbaccess/source/core/dataaccess/myucp_resultset.hxx
+++ b/dbaccess/source/core/dataaccess/myucp_resultset.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,15 +29,9 @@
#ifndef DBA_UCPRESULTSET_HXX
#define DBA_UCPRESULTSET_HXX
-#ifndef _RTL_REF_HXX_
#include <rtl/ref.hxx>
-#endif
-#ifndef _UCBHELPER_RESULTSETHELPER_HXX
#include <ucbhelper/resultsethelper.hxx>
-#endif
-#ifndef _DBA_COREDATAACCESS_DOCUMENTCONTAINER_HXX_
#include "documentcontainer.hxx"
-#endif
// @@@ Adjust namespace name.
@@ -65,3 +60,5 @@ public:
}
#endif // DBA_UCPRESULTSET_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/ContainerListener.hxx b/dbaccess/source/core/inc/ContainerListener.hxx
index 749e3df9b..6db609e94 100644
--- a/dbaccess/source/core/inc/ContainerListener.hxx
+++ b/dbaccess/source/core/inc/ContainerListener.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,24 +28,14 @@
#ifndef DBA_CONTAINERLISTENER_HXX
#define DBA_CONTAINERLISTENER_HXX
-#ifndef _CPPUHELPER_IMPLBASE2_HXX_
#include <cppuhelper/implbase2.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_
#include <com/sun/star/container/XContainerListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERAPPROVELISTENER_HPP_
#include <com/sun/star/container/XContainerApproveListener.hpp>
-#endif
-#ifndef _CPPUHELPER_WEAK_HXX_
#include <cppuhelper/weak.hxx>
-#endif
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OContainerListener
@@ -53,7 +44,7 @@ namespace dbaccess
, ::com::sun::star::container::XContainerApproveListener
> OContainerListener_BASE;
- /** is helper class to avoid a cycle in refcount
+ /** is helper class to avoid a cycle in refcount
*/
class OContainerListener : public OContainerListener_BASE
{
@@ -90,8 +81,9 @@ namespace dbaccess
protected:
virtual ~OContainerListener();
};
-//........................................................................
+
} // namespace dbaccess
-//........................................................................
+
#endif // DBA_CONTAINERLISTENER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/ContainerMediator.hxx b/dbaccess/source/core/inc/ContainerMediator.hxx
index a4bb8d44a..ffea0538a 100644
--- a/dbaccess/source/core/inc/ContainerMediator.hxx
+++ b/dbaccess/source/core/inc/ContainerMediator.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,42 +28,22 @@
#ifndef DBA_CONTAINERMEDIATOR_HXX
#define DBA_CONTAINERMEDIATOR_HXX
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_
#include <com/sun/star/container/XContainerListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
#include <com/sun/star/container/XContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
#include <comphelper/broadcasthelper.hxx>
-#endif
-#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
#include <comphelper/broadcasthelper.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
-#ifndef _RTL_REF_HXX_
#include <rtl/ref.hxx>
-#endif
#include <map>
-//........................................................................
namespace dbaccess
{
-//........................................................................
-
+
class OPropertyForward;
class OContainerMediator : public ::comphelper::OBaseMutex
@@ -116,8 +97,9 @@ namespace dbaccess
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDestination
);
};
-//........................................................................
+
} // namespace dbaccess
-//........................................................................
#endif // DBA_CONTAINERMEDIATOR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/ContentHelper.hxx b/dbaccess/source/core/inc/ContentHelper.hxx
index 65bd10489..c2115a931 100644
--- a/dbaccess/source/core/inc/ContentHelper.hxx
+++ b/dbaccess/source/core/inc/ContentHelper.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,72 +28,28 @@
#ifndef DBA_CONTENTHELPER_HXX
#define DBA_CONTENTHELPER_HXX
-#ifndef _COM_SUN_STAR_UCB_XCONTENT_HPP_
#include <com/sun/star/ucb/XContent.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_XCOMMANDPROCESSOR_HPP_
#include <com/sun/star/ucb/XCommandProcessor.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTIESCHANGENOTIFIER_HPP_
#include <com/sun/star/beans/XPropertiesChangeNotifier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCONTAINER_HPP_
#include <com/sun/star/beans/XPropertyContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
#include <com/sun/star/lang/XInitialization.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_EMBED_XSTORAGE_HPP_
#include <com/sun/star/embed/XStorage.hpp>
-#endif
-#ifndef _COM_SUN_STAR_EMBED_XEMBEDDEDOBJECT_HPP_
#include <com/sun/star/embed/XEmbeddedObject.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#endif
-#ifndef _CPPUHELPER_COMPBASE9_HXX_
#include <cppuhelper/compbase9.hxx>
-#endif
-#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
#include <comphelper/broadcasthelper.hxx>
-#endif
-#ifndef COMPHELPER_COMPONENTCONTEXT_HXX
#include <comphelper/componentcontext.hxx>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTY_HPP_
#include <com/sun/star/beans/Property.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
#include <com/sun/star/container/XChild.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XRENAME_HPP_
#include <com/sun/star/sdbcx/XRename.hpp>
-#endif
-#ifndef CONNECTIVITY_SQLERROR_HXX
#include <connectivity/sqlerror.hxx>
-#endif
-#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <boost/shared_ptr.hpp>
-#endif
namespace dbaccess
{
@@ -170,7 +127,7 @@ namespace dbaccess
// helper
virtual void SAL_CALL disposing();
-
+
virtual void notifyDataSourceModified();
/**
@@ -237,13 +194,14 @@ namespace dbaccess
const ::comphelper::ComponentContext& getContext() const { return m_aContext; }
- inline TContentPtr getImpl() const { return m_pImpl; }
+ inline TContentPtr getImpl() const { return m_pImpl; }
protected:
virtual ::rtl::OUString determineContentType() const = 0;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
+
#endif // DBA_CONTENTHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/DatabaseDataProvider.hxx b/dbaccess/source/core/inc/DatabaseDataProvider.hxx
index 85f956a0b..ecd3c4f13 100644
--- a/dbaccess/source/core/inc/DatabaseDataProvider.hxx
+++ b/dbaccess/source/core/inc/DatabaseDataProvider.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -260,7 +261,7 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xParent;
::com::sun::star::uno::Sequence< ::rtl::OUString > m_MasterFields;
::com::sun::star::uno::Sequence< ::rtl::OUString > m_DetailFields;
-
+
::rtl::OUString m_Command;
::rtl::OUString m_DataSourceName;
::sal_Int32 m_CommandType;
@@ -276,3 +277,5 @@ private:
} // namespace dbaccess
#endif // DBA_DATABASEDATAPROVIDER_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/FilteredContainer.hxx b/dbaccess/source/core/inc/FilteredContainer.hxx
index 28ba22e17..8ba05a516 100644
--- a/dbaccess/source/core/inc/FilteredContainer.hxx
+++ b/dbaccess/source/core/inc/FilteredContainer.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -50,7 +51,7 @@ namespace dbaccess
::dbtools::IWarningsContainer* m_pWarningsContainer;
IRefreshListener* m_pRefreshListener;
oslInterlockedCount& m_nInAppend;
-
+
// holds the original container which where set in construct but they can be null
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xMasterContainer;
::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XConnection > m_xConnection;
@@ -142,3 +143,5 @@ namespace dbaccess
// ..............................................................................
#endif // DBACCESS_CORE_FILTERED_CONTAINER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/PropertyForward.hxx b/dbaccess/source/core/inc/PropertyForward.hxx
index dcdb81746..a3bb17da4 100644
--- a/dbaccess/source/core/inc/PropertyForward.hxx
+++ b/dbaccess/source/core/inc/PropertyForward.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,31 +28,17 @@
#ifndef DBA_PROPERTYSETFORWARD_HXX
#define DBA_PROPERTYSETFORWARD_HXX
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_
#include <com/sun/star/beans/XPropertySetInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
-#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
#include <comphelper/broadcasthelper.hxx>
-#endif
#include <vector>
-//........................................................................
namespace dbaccess
{
-//........................................................................
// ===================================================================
// = OPropertyForward
@@ -89,8 +76,8 @@ namespace dbaccess
inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getDefinition() const { return m_xDest; }
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
+
#endif // DBA_PROPERTYSETFORWARD_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/RefreshListener.hxx b/dbaccess/source/core/inc/RefreshListener.hxx
index 6b53f2bc5..b5fed70b8 100644
--- a/dbaccess/source/core/inc/RefreshListener.hxx
+++ b/dbaccess/source/core/inc/RefreshListener.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,9 +29,7 @@
#ifndef DBA_CORE_REFRESHLISTENER_HXX
#define DBA_CORE_REFRESHLISTENER_HXX
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
#include <com/sun/star/uno/Reference.h>
-#endif
namespace com { namespace sun { namespace star { namespace container
{
@@ -38,10 +37,8 @@ namespace com { namespace sun { namespace star { namespace container
}
}}}
-//.........................................................................
namespace dbaccess
{
-//.........................................................................
//=====================================================================
//= IRefreshListener
@@ -51,9 +48,9 @@ namespace dbaccess
public:
virtual void refresh(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rToBeRefreshed) = 0;
};
-//.........................................................................
+
} // namespace dbaccess
-//.........................................................................
#endif // DBA_CORE_REFRESHLISTENER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
index 21dfa7e5e..cad13ae11 100644
--- a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
+++ b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -156,7 +157,7 @@ namespace dbaccess
getStructuredCondition( TGetParseNode& _aGetFunctor );
::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >
- setCurrentColumns( EColumnType _eType, const ::vos::ORef< ::connectivity::OSQLColumns >& _rCols );
+ setCurrentColumns( EColumnType _eType, const ::rtl::Reference< ::connectivity::OSQLColumns >& _rCols );
//helper methods for mem_fun_t
inline bool implSetFilter(::rtl::OUString _sFilter) { setFilter(_sFilter); return true;}
@@ -251,3 +252,5 @@ namespace dbaccess
};
}
#endif // DBACCESS_CORE_API_SINGLESELECTQUERYCOMPOSER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/TableDeco.hxx b/dbaccess/source/core/inc/TableDeco.hxx
index 3ba43e6a1..543081d8c 100644
--- a/dbaccess/source/core/inc/TableDeco.hxx
+++ b/dbaccess/source/core/inc/TableDeco.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,61 +29,25 @@
#ifndef _DBA_CORE_TABLEDECORATOR_HXX_
#define _DBA_CORE_TABLEDECORATOR_HXX_
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XINDEXESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XIndexesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XKEYSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XRENAME_HPP_
#include <com/sun/star/sdbcx/XRename.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XALTERTABLE_HPP_
#include <com/sun/star/sdbcx/XAlterTable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _CPPUHELPER_COMPBASE9_HXX_
#include <cppuhelper/compbase9.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE5_HXX_
#include <cppuhelper/implbase5.hxx>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _DBA_CORE_DATASETTINGS_HXX_
#include "datasettings.hxx"
-#endif
-#ifndef _DBA_COREAPI_COLUMN_HXX_
#include "column.hxx"
-#endif
-#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
#include <connectivity/CommonTools.hxx>
-#endif
-#ifndef _CONNECTIVITY_SDBCX_IREFRESHABLE_HXX_
#include <connectivity/sdbcx/IRefreshable.hxx>
-#endif
-#ifndef COMPHELPER_IDPROPERTYARRAYUSAGEHELPER_HXX
#include <comphelper/IdPropArrayHelper.hxx>
-#endif
namespace dbaccess
{
@@ -146,7 +111,7 @@ namespace dbaccess
sal_Int32 nHandle,
const ::com::sun::star::uno::Any& rValue
)
-
+
throw (::com::sun::star::uno::Exception);
virtual ~ODBTableDecorator();
@@ -165,7 +130,7 @@ namespace dbaccess
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxColumnDefinitions
) throw(::com::sun::star::sdbc::SQLException);
-
+
// ODescriptor
virtual void construct();
@@ -192,7 +157,7 @@ namespace dbaccess
virtual void SAL_CALL alterColumnByName( const ::rtl::OUString& _rName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDescriptor ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL alterColumnByIndex( sal_Int32 _nIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDescriptor ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
- // XNamed
+ // XNamed
virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
// com::sun::star::lang::XUnoTunnel
@@ -218,3 +183,4 @@ namespace dbaccess
#endif // _DBA_CORE_TABLEDECORATOR_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/View.hxx b/dbaccess/source/core/inc/View.hxx
index 49d4b9190..a2dedc5a8 100644
--- a/dbaccess/source/core/inc/View.hxx
+++ b/dbaccess/source/core/inc/View.hxx
@@ -1,14 +1,12 @@
+/* -*- 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 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: View.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -41,10 +39,8 @@
#include <comphelper/uno3.hxx>
#include <cppuhelper/implbase1.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
//====================================================================
//= View
@@ -84,8 +80,8 @@ namespace dbaccess
using View_Base::getFastPropertyValue;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_VIEW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/callablestatement.hxx b/dbaccess/source/core/inc/callablestatement.hxx
index 45a405bfc..26230ee9c 100644
--- a/dbaccess/source/core/inc/callablestatement.hxx
+++ b/dbaccess/source/core/inc/callablestatement.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,15 +28,9 @@
#ifndef _DBA_COREAPI_CALLABLESTATEMENT_HXX_
#define _DBA_COREAPI_CALLABLESTATEMENT_HXX_
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XOUTPARAMETERS_HPP_
#include <com/sun/star/sdbc/XOutParameters.hpp>
-#endif
-#ifndef _DBA_COREAPI_PREPAREDSTATEMENT_HXX_
#include <preparedstatement.hxx>
-#endif
namespace dbaccess
{
@@ -93,3 +88,4 @@ namespace dbaccess
}
#endif // _DBA_COREAPI_CALLABLESTATEMENT_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/column.hxx b/dbaccess/source/core/inc/column.hxx
index 9ca29d4b0..fa96f0a1d 100644
--- a/dbaccess/source/core/inc/column.hxx
+++ b/dbaccess/source/core/inc/column.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -61,7 +62,7 @@
#include <cppuhelper/propshlp.hxx>
#include <osl/diagnose.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
namespace dbaccess
{
@@ -73,7 +74,6 @@ namespace dbaccess
::com::sun::star::container::XNamed
> OColumnBase;
- //------------------------------------------------------------
class OColumn :public comphelper::OBaseMutex
,public OColumnBase
,public ::comphelper::OPropertyContainer
@@ -157,13 +157,13 @@ namespace dbaccess
//= general columns map, could be used for readonly access
//= no appending and dropping is supported
//============================================================
- typedef ::std::hash_map<rtl::OUString, OColumn*, ::comphelper::UStringMixHash, ::comphelper::UStringMixEqual> OColumnMap;
+ typedef ::boost::unordered_map<rtl::OUString, OColumn*, ::comphelper::UStringMixHash, ::comphelper::UStringMixEqual> OColumnMap;
typedef ::std::vector<OColumn*> OColumnArray;
class OContainerMediator;
typedef ::cppu::ImplHelper1< ::com::sun::star::container::XChild > TXChild;
typedef connectivity::OColumnsHelper OColumns_BASE;
- //------------------------------------------------------------
+
class OColumns : public OColumns_BASE
,public TXChild
{
@@ -218,7 +218,7 @@ namespace dbaccess
OColumns(
::cppu::OWeakObject& _rParent,
- ::osl::Mutex& _rMutex,
+ ::osl::Mutex& _rMutex,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxDrvColumns,
sal_Bool _bCaseSensitive,
const ::std::vector< ::rtl::OUString> &_rVector,
@@ -256,3 +256,4 @@ namespace dbaccess
}
#endif // _DBA_COREAPI_COLUMN_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/columnsettings.hxx b/dbaccess/source/core/inc/columnsettings.hxx
index 032055d1b..0fb7d4362 100644
--- a/dbaccess/source/core/inc/columnsettings.hxx
+++ b/dbaccess/source/core/inc/columnsettings.hxx
@@ -1,6 +1,7 @@
+/* -*- 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
@@ -31,28 +32,26 @@
#include <com/sun/star/beans/XPropertySet.hpp>
/** === end UNO includes === **/
-//........................................................................
namespace dbaccess
{
-//........................................................................
// TODO: move the following to comphelper/propertycontainerhelper.hxx
class IPropertyContainer
{
public:
virtual void registerProperty(
- const ::rtl::OUString& _rName,
- sal_Int32 _nHandle,
- sal_Int32 _nAttributes,
- void* _pPointerToMember,
+ const ::rtl::OUString& _rName,
+ sal_Int32 _nHandle,
+ sal_Int32 _nAttributes,
+ void* _pPointerToMember,
const ::com::sun::star::uno::Type& _rMemberType
) = 0;
virtual void registerMayBeVoidProperty(
- const ::rtl::OUString& _rName,
- sal_Int32 _nHandle,
- sal_Int32 _nAttributes,
- ::com::sun::star::uno::Any* _pPointerToMember,
+ const ::rtl::OUString& _rName,
+ sal_Int32 _nHandle,
+ sal_Int32 _nAttributes,
+ ::com::sun::star::uno::Any* _pPointerToMember,
const ::com::sun::star::uno::Type& _rExpectedType
) = 0;
@@ -102,8 +101,8 @@ namespace dbaccess
static bool hasDefaultSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn );
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // COLUMNSETTINGS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/commandbase.hxx b/dbaccess/source/core/inc/commandbase.hxx
index 8a4bd018a..cc82cdc59 100644
--- a/dbaccess/source/core/inc/commandbase.hxx
+++ b/dbaccess/source/core/inc/commandbase.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,17 +29,11 @@
#ifndef _DBA_CORE_COMMANDBASE_HXX_
#define _DBA_CORE_COMMANDBASE_HXX_
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OCommandBase - a base class (in fact just a container for some members)
@@ -48,7 +43,7 @@ class OCommandBase
{
public: // need public access
// <properties>
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>
m_aLayoutInformation;
::rtl::OUString m_sCommand;
sal_Bool m_bEscapeProcessing; // no BitField ! so it can be used with a OPropertyStateContainer
@@ -62,10 +57,8 @@ protected:
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_CORE_COMMANDBASE_HXX_
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/composertools.hxx b/dbaccess/source/core/inc/composertools.hxx
index d98ff23e4..eaaba4cdd 100644
--- a/dbaccess/source/core/inc/composertools.hxx
+++ b/dbaccess/source/core/inc/composertools.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -31,16 +32,12 @@
/** === begin UNO includes === **/
/** === end UNO includes === **/
-#ifndef _RTL_USTRBUF_HXX_
#include <rtl/ustrbuf.hxx>
-#endif
#include <functional>
-//........................................................................
namespace dbaccess
{
-//........................................................................
//====================================================================
//= TokenComposer
@@ -134,9 +131,8 @@ namespace dbaccess
}
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_SOURCE_CORE_INC_COMPOSERTOOLS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/containerapprove.hxx b/dbaccess/source/core/inc/containerapprove.hxx
index 7aa84323b..abedd666e 100644
--- a/dbaccess/source/core/inc/containerapprove.hxx
+++ b/dbaccess/source/core/inc/containerapprove.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -29,17 +30,13 @@
#define DBACCESS_CONTAINERAPPROVE_HXX
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_UNO_XINTERFACE_HPP_
#include <com/sun/star/uno/XInterface.hpp>
-#endif
/** === end UNO includes === **/
#include <boost/shared_ptr.hpp>
-//........................................................................
namespace dbaccess
{
-//........................................................................
//====================================================================
//= IContainerApprove
@@ -72,9 +69,8 @@ namespace dbaccess
typedef ::boost::shared_ptr< IContainerApprove > PContainerApprove;
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_CONTAINERAPPROVE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/core_resource.hrc b/dbaccess/source/core/inc/core_resource.hrc
index c438314d6..77745302a 100644
--- a/dbaccess/source/core/inc/core_resource.hrc
+++ b/dbaccess/source/core/inc/core_resource.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,10 +32,8 @@
#include <svl/solar.hrc>
#endif
-//------------------------------------------------------------------------------
#define RID_CORE_STRINGS_START RID_DBACCESS_START
-//------------------------------------------------------------------------------
//- String-IDs
#define RID_STR_TRIED_OPEN_TABLE ( RID_CORE_STRINGS_START + 0 )
#define RID_STR_CONNECTION_INVALID ( RID_CORE_STRINGS_START + 1 )
@@ -110,4 +108,3 @@
#define RID_NO_SUCH_DATA_SOURCE ( RID_CORE_STRINGS_START + 67 )
#endif // _DBA_CORE_RESOURCE_HRC_
-
diff --git a/dbaccess/source/core/inc/core_resource.hxx b/dbaccess/source/core/inc/core_resource.hxx
index b97efa0c2..87d52e689 100644
--- a/dbaccess/source/core/inc/core_resource.hxx
+++ b/dbaccess/source/core/inc/core_resource.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,13 +29,12 @@
#ifndef _DBA_CORE_RESOURCE_HXX_
#define _DBA_CORE_RESOURCE_HXX_
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
-#endif
#include <osl/mutex.hxx>
+#include <sal/macros.h>
class ResMgr;
-//.........................................................................
+
namespace dbaccess
{
@@ -53,7 +53,7 @@ namespace dbaccess
friend class OModuleClient;
static ::osl::Mutex s_aMutex; /// access safety
static sal_Int32 s_nClients; /// number of registered clients
- static ResMgr* m_pImpl;
+ static ResMgr* m_pImpl;
private:
// no instantiation allowed
@@ -112,7 +112,7 @@ namespace dbaccess
//=========================================================================
//= OModuleClient
//=========================================================================
- /** base class for objects which uses any global module-specific ressources
+ /** base class for objects which uses any global module-specific ressources
*/
class OModuleClient
{
@@ -120,11 +120,8 @@ namespace dbaccess
OModuleClient() { ResourceManager::registerClient(); }
~OModuleClient() { ResourceManager::revokeClient(); }
};
-
-
-//.........................................................................
}
-//.........................................................................
#endif // _DBA_CORE_RESOURCE_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/datasettings.hxx b/dbaccess/source/core/inc/datasettings.hxx
index ada830b60..ed28b409a 100644
--- a/dbaccess/source/core/inc/datasettings.hxx
+++ b/dbaccess/source/core/inc/datasettings.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,29 +29,15 @@
#ifndef _DBA_CORE_DATASETTINGS_HXX_
#define _DBA_CORE_DATASETTINGS_HXX_
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTY_HPP_
#include <com/sun/star/beans/Property.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_FONTDESCRIPTOR_HPP_
#include <com/sun/star/awt/FontDescriptor.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HPP_
#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#endif
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
-#endif
-#ifndef COMPHELPER_PROPERTYSTATECONTAINER_HXX
#include <comphelper/propertystatecontainer.hxx>
-#endif
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= ODataSettings_Base - a base class which implements the property member
@@ -101,9 +88,8 @@ protected:
void registerPropertiesFor(ODataSettings_Base* _pItem);
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_CORE_DATASETTINGS_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/dbamiscres.hrc b/dbaccess/source/core/inc/dbamiscres.hrc
index b1eb879b0..dbb4713c0 100644
--- a/dbaccess/source/core/inc/dbamiscres.hrc
+++ b/dbaccess/source/core/inc/dbamiscres.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,16 +47,16 @@
#define STR_OUTLOOK 15
#define STR_OUTLOOKEXP 16
#define STR_EVOLUTION 17
-#define STR_EVOLUTION_GROUPWISE 18
+#define STR_EVOLUTION_GROUPWISE 18
#define STR_EVOLUTION_LDAP 19
#define STR_KAB 20
#define STR_MACAB 21
#define STR_EMBEDDED_HSQLDB 22
#define STR_THUNDERBIRD 23
#define STR_MYSQL_NATIVE 24
-
+
#define STR_END STR_MYSQL_NATIVE + 1
-
-#endif // _DBA_MISCRES_HRC_
+
+#endif // _DBA_MISCRES_HRC_
diff --git a/dbaccess/source/core/inc/definitioncolumn.hxx b/dbaccess/source/core/inc/definitioncolumn.hxx
index 462e273d0..5ad7d716f 100644
--- a/dbaccess/source/core/inc/definitioncolumn.hxx
+++ b/dbaccess/source/core/inc/definitioncolumn.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -316,3 +317,4 @@ namespace dbaccess
}
#endif // _DBACORE_DEFINITIONCOLUMN_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/definitioncontainer.hxx b/dbaccess/source/core/inc/definitioncontainer.hxx
index 4b87250e7..478d2eefb 100644
--- a/dbaccess/source/core/inc/definitioncontainer.hxx
+++ b/dbaccess/source/core/inc/definitioncontainer.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,67 +29,28 @@
#ifndef _DBA_CORE_DEFINITIONCONTAINER_HXX_
#define _DBA_CORE_DEFINITIONCONTAINER_HXX_
-#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
#include <cppuhelper/interfacecontainer.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE7_HXX_
#include <cppuhelper/implbase7.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _OSL_MUTEX_HXX_
#include <osl/mutex.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
#include <com/sun/star/container/XChild.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
#include <com/sun/star/container/XContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_
#include <com/sun/star/container/XEnumerationAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
#include <com/sun/star/container/XIndexAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XVETOABLECHANGELISTENER_HPP_
#include <com/sun/star/beans/XVetoableChangeListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERAPPROVEBROADCASTER_HPP_
#include <com/sun/star/container/XContainerApproveBroadcaster.hpp>
-#endif
-#ifndef DBA_CONTENTHELPER_HXX
#include "ContentHelper.hxx"
-#endif
-#ifndef DBACCESS_CONTAINERAPPROVE_HXX
#include "containerapprove.hxx"
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _RTL_REF_HXX_
#include <rtl/ref.hxx>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-//........................................................................
+
namespace dbaccess
{
-//........................................................................
class ODefinitionContainer_Impl : public OContentHelper_Impl
{
@@ -367,9 +329,8 @@ private:
}
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_CORE_DEFINITIONCONTAINER_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/module_dba.hxx b/dbaccess/source/core/inc/module_dba.hxx
index ef9a8cd75..8553348db 100644
--- a/dbaccess/source/core/inc/module_dba.hxx
+++ b/dbaccess/source/core/inc/module_dba.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -30,16 +31,13 @@
#include <unotools/componentresmodule.hxx>
-//........................................................................
namespace dba
{
-//........................................................................
DEFINE_MODULE( DbaModule, DbaClient, DbaRes )
-//........................................................................
} // namespace sdbtools
-//........................................................................
#endif // DBACCESS_MODULE_DBA_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/object.hxx b/dbaccess/source/core/inc/object.hxx
index 9d2032d88..7b32511f2 100644
--- a/dbaccess/source/core/inc/object.hxx
+++ b/dbaccess/source/core/inc/object.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -38,3 +39,4 @@ enum ObjectType
#endif // _DBA_OBJECT_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/objectnameapproval.hxx b/dbaccess/source/core/inc/objectnameapproval.hxx
index cf37ed62e..d641e6f1c 100644
--- a/dbaccess/source/core/inc/objectnameapproval.hxx
+++ b/dbaccess/source/core/inc/objectnameapproval.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,20 +29,14 @@
#ifndef DBACCESS_OBJECTNAMEAPPROVAL_HXX
#define DBACCESS_OBJECTNAMEAPPROVAL_HXX
-#ifndef DBACCESS_CONTAINERAPPROVE_HXX
#include "containerapprove.hxx"
-#endif
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
/** === end UNO includes === **/
-//........................................................................
namespace dbaccess
{
-//........................................................................
//====================================================================
//= ObjectNameApproval
@@ -80,7 +75,7 @@ namespace dbaccess
ObjectNameApproval(
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
ObjectType _eType
- );
+ );
virtual ~ObjectNameApproval();
// IContainerApprove
@@ -88,8 +83,8 @@ namespace dbaccess
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_OBJECTNAMEAPPROVAL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/preparedstatement.hxx b/dbaccess/source/core/inc/preparedstatement.hxx
index 63840b22b..bdeb3391b 100644
--- a/dbaccess/source/core/inc/preparedstatement.hxx
+++ b/dbaccess/source/core/inc/preparedstatement.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,30 +28,14 @@
#ifndef _DBA_COREAPI_PREPAREDSTATEMENT_HXX_
#define _DBA_COREAPI_PREPAREDSTATEMENT_HXX_
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XPREPAREDSTATEMENT_HPP_
#include <com/sun/star/sdbc/XPreparedStatement.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XPARAMETERS_HPP_
#include <com/sun/star/sdbc/XParameters.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XPARAMETERS_HPP_
#include <com/sun/star/sdbc/XParameters.hpp>
-#endif
-#ifndef _DBA_COREAPI_STATEMENT_HXX_
#include <statement.hxx>
-#endif
-#ifndef _DBA_COREAPI_COLUMN_HXX_
#include <column.hxx>
-#endif
namespace dbaccess
{
@@ -130,3 +115,4 @@ namespace dbaccess
}
#endif // _DBA_COREAPI_PREPAREDSTATEMENT_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/querycomposer.hxx b/dbaccess/source/core/inc/querycomposer.hxx
index 38f2dc46a..02b574f7b 100644
--- a/dbaccess/source/core/inc/querycomposer.hxx
+++ b/dbaccess/source/core/inc/querycomposer.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,45 +28,19 @@
#ifndef DBACCESS_CORE_API_QUERYCOMPOSER_HXX
#define DBACCESS_CORE_API_QUERYCOMPOSER_HXX
-#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
#include <connectivity/CommonTools.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSER_HPP_
#include <com/sun/star/sdb/XSQLQueryComposer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XPARAMETERSSUPPLIER_HPP_
#include <com/sun/star/sdb/XParametersSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SCRIPT_XTYPECONVERTER_HPP_
#include <com/sun/star/script/XTypeConverter.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE5_HXX_
#include <cppuhelper/implbase5.hxx>
-#endif
-#ifndef _CONNECTIVITY_PARSE_SQLITERATOR_HXX_
#include <connectivity/sqliterator.hxx>
-#endif
-#ifndef _CONNECTIVITY_SQLPARSE_HXX
#include <connectivity/sqlparse.hxx>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
#include <comphelper/broadcasthelper.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSER_HPP_
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
-#endif
@@ -137,3 +112,5 @@ namespace dbaccess
};
}
#endif // DBACCESS_CORE_API_QUERYCOMPOSER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/querycontainer.hxx b/dbaccess/source/core/inc/querycontainer.hxx
index 2f370fa5e..fce10a545 100644
--- a/dbaccess/source/core/inc/querycontainer.hxx
+++ b/dbaccess/source/core/inc/querycontainer.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,86 +29,40 @@
#ifndef _DBA_CORE_QUERYCONTAINER_HXX_
#define _DBA_CORE_QUERYCONTAINER_HXX_
-#ifndef _CPPUHELPER_IMPLBASE5_HXX_
#include <cppuhelper/implbase5.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
#include <cppuhelper/interfacecontainer.hxx>
-#endif
/** === begin UNO includes == **/
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_
#include <com/sun/star/container/XEnumerationAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_
#include <com/sun/star/container/XContainerListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
#include <com/sun/star/container/XIndexAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
#include <com/sun/star/container/XContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XREFRESHABLE_HPP_
#include <com/sun/star/util/XRefreshable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDROP_HPP_
#include <com/sun/star/sdbcx/XDrop.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERAPPROVELISTENER_HPP_
#include <com/sun/star/container/XContainerApproveListener.hpp>
-#endif
/** === end UNO includes === **/
-#ifndef _DBA_CORE_DEFINITIONCONTAINER_HXX_
#include "definitioncontainer.hxx"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
namespace dbtools
{
class IWarningsContainer;
}
-//........................................................................
namespace dbaccess
{
-//........................................................................
typedef ::cppu::ImplHelper5 < ::com::sun::star::container::XContainerListener
, ::com::sun::star::container::XContainerApproveListener
@@ -137,7 +92,6 @@ namespace dbaccess
OContainerListener* m_pCommandsListener;
- // ------------------------------------------------------------------------
/** a class which automatically resets m_eDoingCurrently in it's destructor
*/
class OAutoActionReset; // just for the following friend declaration
@@ -163,7 +117,7 @@ namespace dbaccess
@param _pWarnings
specifies a warnings container (May be <NULL/>)
-
+
Any errors which occur during the lifetime of the query container,
which cannot be reported as exceptionts (for instance in methods where throwing an SQLException is
not allowed) will be appended to this container.</p>
@@ -175,7 +129,7 @@ namespace dbaccess
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
::dbtools::IWarningsContainer* _pWarnings
);
-
+
DECLARE_XINTERFACE( )
DECLARE_XTYPEPROVIDER( )
DECLARE_SERVICE_INFO();
@@ -225,10 +179,8 @@ namespace dbaccess
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent > implCreateWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent >& _rxCommandDesc);
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_CORE_QUERYCONTAINER_HXX_
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/recovery/dbdocrecovery.hxx b/dbaccess/source/core/inc/recovery/dbdocrecovery.hxx
index afc3ba88a..5808a1344 100644
--- a/dbaccess/source/core/inc/recovery/dbdocrecovery.hxx
+++ b/dbaccess/source/core/inc/recovery/dbdocrecovery.hxx
@@ -1,6 +1,7 @@
+/* -*- 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 2009 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,10 +42,8 @@ namespace comphelper
class ComponentContext;
}
-//........................................................................
namespace dbaccess
{
-//........................................................................
//====================================================================
//= DatabaseDocumentRecovery
@@ -85,8 +84,8 @@ namespace dbaccess
const ::std::auto_ptr< DatabaseDocumentRecovery_Data > m_pData;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_DBDOCRECOVERY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/sdbcoretools.hxx b/dbaccess/source/core/inc/sdbcoretools.hxx
index a5f7ad284..ad484201b 100644
--- a/dbaccess/source/core/inc/sdbcoretools.hxx
+++ b/dbaccess/source/core/inc/sdbcoretools.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -42,21 +43,14 @@ namespace comphelper
class ComponentContext;
}
-//.........................................................................
namespace dbaccess
{
-//.........................................................................
- // -----------------------------------------------------------------------------
void notifyDataSourceModified(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxObject,sal_Bool _bModified);
- // -----------------------------------------------------------------------------
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
getDataSource( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxDependentObject );
- // -----------------------------------------------------------------------------
-
- // -----------------------------------------------------------------------------
/** retrieves a to-be-displayed string for a given caught exception;
*/
::rtl::OUString extractExceptionMessage( const ::comphelper::ComponentContext& _rContext, const ::com::sun::star::uno::Any& _rError );
@@ -82,7 +76,7 @@ namespace dbaccess
}
} // namespace dbaccess
-//.........................................................................
#endif // DBACORE_SDBCORETOOLS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/statement.hxx b/dbaccess/source/core/inc/statement.hxx
index 7f9da9560..b0a0f4583 100644
--- a/dbaccess/source/core/inc/statement.hxx
+++ b/dbaccess/source/core/inc/statement.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,49 +28,21 @@
#ifndef _DBA_COREAPI_STATEMENT_HXX_
#define _DBA_COREAPI_STATEMENT_HXX_
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XSTATEMENT_HPP_
#include <com/sun/star/sdbc/XStatement.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XCANCELLABLE_HPP_
#include <com/sun/star/util/XCancellable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XWARNINGSSUPPLIER_HPP_
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCLOSEABLE_HPP_
#include <com/sun/star/sdbc/XCloseable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XMULTIPLERESULTS_HDL_
#include <com/sun/star/sdbc/XMultipleResults.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XPREPAREDBATCHEXECUTION_HDL_
#include <com/sun/star/sdbc/XPreparedBatchExecution.hpp>
-#endif
#include <com/sun/star/sdbc/XBatchExecution.hpp>
-#ifndef _COM_SUN_STAR_SDBC_XGENERATEDRESULTSET_HPP_
#include <com/sun/star/sdbc/XGeneratedResultSet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSER_HPP_
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
-#endif
-#ifndef _CPPUHELPER_PROPSHLP_HXX
#include <cppuhelper/propshlp.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
#include <comphelper/proparrhlp.hxx>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
#include <comphelper/broadcasthelper.hxx>
-#endif
#include <cppuhelper/implbase3.hxx>
@@ -101,7 +74,7 @@ protected:
public:
OStatementBase(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > & _xConn,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & _xStatement);
-
+
// ::com::sun::star::lang::XTypeProvider
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException);
@@ -218,3 +191,4 @@ private:
#endif // _DBA_COREAPI_STATEMENT_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/table.hxx b/dbaccess/source/core/inc/table.hxx
index ec35f805d..506c316ce 100644
--- a/dbaccess/source/core/inc/table.hxx
+++ b/dbaccess/source/core/inc/table.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -142,7 +143,6 @@ namespace dbaccess
DECLARE_SERVICE_INFO();
// com::sun::star::beans::XPropertySet
- // virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL getFastPropertyValue(::com::sun::star::uno::Any& rValue, sal_Int32 nHandle) const;
// ::com::sun::star::sdbcx::XRename,
@@ -162,3 +162,4 @@ namespace dbaccess
#endif // _DBA_CORE_TABLE_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/tablecontainer.hxx b/dbaccess/source/core/inc/tablecontainer.hxx
index 4503edd5d..577ab1bb8 100644
--- a/dbaccess/source/core/inc/tablecontainer.hxx
+++ b/dbaccess/source/core/inc/tablecontainer.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,54 +29,22 @@
#ifndef _DBA_CORE_TABLECONTAINER_HXX_
#define _DBA_CORE_TABLECONTAINER_HXX_
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_
#include <com/sun/star/container/XEnumerationAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
#include <com/sun/star/container/XIndexAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XREFRESHABLE_HPP_
#include <com/sun/star/util/XRefreshable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_
#include <com/sun/star/container/XContainerListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef DBACCESS_CORE_FILTERED_CONTAINER_HXX
#include "FilteredContainer.hxx"
-#endif
-#ifndef DBTOOLS_WARNINGSCONTAINER_HXX
#include <connectivity/warningscontainer.hxx>
-#endif
-#ifndef DBA_CORE_REFRESHLISTENER_HXX
#include "RefreshListener.hxx"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
namespace dbaccess
{
@@ -87,14 +56,14 @@ namespace dbaccess
class OTable;
class OTableContainer;
class OContainerMediator;
-
+
class OTableContainer : public OFilteredContainer,
public OTableContainer_Base
{
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xTableDefinitions;
::rtl::Reference< OContainerMediator > m_pTableMediator;
sal_Bool m_bInDrop; // set when we are in the drop method
-
+
// OFilteredContainer
virtual void addMasterContainerListener();
@@ -147,3 +116,4 @@ namespace dbaccess
#endif // _DBA_CORE_TABLECONTAINER_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/userinformation.hxx b/dbaccess/source/core/inc/userinformation.hxx
index a2dcbcf39..7efbf6586 100644
--- a/dbaccess/source/core/inc/userinformation.hxx
+++ b/dbaccess/source/core/inc/userinformation.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,13 +29,9 @@
#ifndef _DBA_CORE_USERINFORMATION_HXX_
#define _DBA_CORE_USERINFORMATION_HXX_
-#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
#include <com/sun/star/lang/Locale.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
class UserInformation
{
@@ -48,3 +45,4 @@ public:
#endif // _DBA_CORE_USERINFORMATION_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/veto.hxx b/dbaccess/source/core/inc/veto.hxx
index ccf2349be..787d3d107 100644
--- a/dbaccess/source/core/inc/veto.hxx
+++ b/dbaccess/source/core/inc/veto.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -29,19 +30,13 @@
#define DBACCESS_VETO_HXX
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_UTIL_XVETO_HPP_
#include <com/sun/star/util/XVeto.hpp>
-#endif
/** === end UNO includes === **/
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
-//........................................................................
namespace dbaccess
{
-//........................................................................
//====================================================================
//= Veto
@@ -71,9 +66,8 @@ namespace dbaccess
Veto& operator=( const Veto& ); // never implemented
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_VETO_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/inc/viewcontainer.hxx b/dbaccess/source/core/inc/viewcontainer.hxx
index dc19dd8cd..95836f7ab 100644
--- a/dbaccess/source/core/inc/viewcontainer.hxx
+++ b/dbaccess/source/core/inc/viewcontainer.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,47 +29,21 @@
#ifndef _DBA_CORE_VIEWCONTAINER_HXX_
#define _DBA_CORE_VIEWCONTAINER_HXX_
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_
#include <com/sun/star/container/XEnumerationAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
#include <com/sun/star/container/XIndexAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XREFRESHABLE_HPP_
#include <com/sun/star/util/XRefreshable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_SQLWARNING_HPP_
#include <com/sun/star/sdbc/SQLWarning.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_
#include <com/sun/star/container/XContainerListener.hpp>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef DBACCESS_CORE_FILTERED_CONTAINER_HXX
#include "FilteredContainer.hxx"
-#endif
namespace dbtools
{
@@ -104,7 +79,7 @@ namespace dbaccess
oslInterlockedCount& _nInAppend
);
- virtual ~OViewContainer();
+ virtual ~OViewContainer();
protected:
// OFilteredContainer overridables
@@ -137,3 +112,4 @@ namespace dbaccess
#endif // _DBA_CORE_VIEWCONTAINER_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/misc/ContainerListener.cxx b/dbaccess/source/core/misc/ContainerListener.cxx
index 5995b8fa5..83f7f2507 100644
--- a/dbaccess/source/core/misc/ContainerListener.cxx
+++ b/dbaccess/source/core/misc/ContainerListener.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBA_CONTAINERLISTENER_HXX
#include "ContainerListener.hxx"
-#endif
//........................................................................
namespace dbaccess
@@ -129,3 +128,5 @@ namespace dbaccess
//........................................................................
} // namespace dbaccess
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/misc/ContainerMediator.cxx b/dbaccess/source/core/misc/ContainerMediator.cxx
index 07c07b015..e383e55ea 100644
--- a/dbaccess/source/core/misc/ContainerMediator.cxx
+++ b/dbaccess/source/core/misc/ContainerMediator.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,38 +28,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBA_CONTAINERMEDIATOR_HXX
#include "ContainerMediator.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef DBA_PROPERTYSETFORWARD_HXX
#include "PropertyForward.hxx"
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
#include <com/sun/star/sdbcx/XRename.hpp>
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
#include <comphelper/property.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
//........................................................................
@@ -94,7 +75,7 @@ OContainerMediator::OContainerMediator( const Reference< XContainer >& _xContain
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "OContainerMediator::OContainerMediator: caught an exception!");
+ OSL_FAIL("OContainerMediator::OContainerMediator: caught an exception!");
}
osl_decrementInterlockedCount( &m_refCount );
}
@@ -242,7 +223,7 @@ void OContainerMediator::notifyElementCreated( const ::rtl::OUString& _sName, co
&& aFind->second->getDefinition().is()
)
{
- OSL_ENSURE( false, "OContainerMediator::notifyElementCreated: is this really a valid case?" );
+ OSL_FAIL( "OContainerMediator::notifyElementCreated: is this really a valid case?" );
return;
}
@@ -279,3 +260,5 @@ void OContainerMediator::notifyElementCreated( const ::rtl::OUString& _sName, co
//........................................................................
} // namespace dbaccess
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index 93f2447a1..cf011efbc 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,6 +37,7 @@
#include <connectivity/dbtools.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
+#include <sal/macros.h>
#include <tools/diagnose_ex.h>
#include <com/sun/star/task/XInteractionHandler.hpp>
@@ -119,7 +121,7 @@ uno::Any DatabaseDataProvider::queryInterface(uno::Type const & type) throw (uno
//------------------------------------------------------------------------------
rtl::OUString DatabaseDataProvider::getImplementationName_Static( ) throw(uno::RuntimeException)
{
- return rtl::OUString::createFromAscii("com.sun.star.comp.chart2.data.DatabaseDataProvider");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.chart2.data.DatabaseDataProvider"));
}
// -----------------------------------------------------------------------------
// -------------------------------------------------------------------------
@@ -173,26 +175,25 @@ void SAL_CALL DatabaseDataProvider::initialize(const uno::Sequence< uno::Any > &
// chart2::data::XDataProvider:
::sal_Bool SAL_CALL DatabaseDataProvider::createDataSourcePossible(const uno::Sequence< beans::PropertyValue > & _aArguments) throw (uno::RuntimeException)
{
- //::osl::ResettableMutexGuard aClearForNotifies(m_aMutex);
const beans::PropertyValue* pArgIter = _aArguments.getConstArray();
const beans::PropertyValue* pArgEnd = pArgIter + _aArguments.getLength();
for(;pArgIter != pArgEnd;++pArgIter)
{
- if ( pArgIter->Name.equalsAscii("DataRowSource") )
+ if ( pArgIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DataRowSource")) )
{
::com::sun::star::chart::ChartDataRowSource eRowSource = ::com::sun::star::chart::ChartDataRowSource_COLUMNS;
pArgIter->Value >>= eRowSource;
if ( eRowSource != ::com::sun::star::chart::ChartDataRowSource_COLUMNS )
return sal_False;
- } // if ( pArgIter->Name.equalsAscii("DataRowSource") )
- else if ( pArgIter->Name.equalsAscii("CellRangeRepresentation") )
+ }
+ else if ( pArgIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CellRangeRepresentation")) )
{
::rtl::OUString sRange;
pArgIter->Value >>= sRange;
- if ( !sRange.equalsAscii("all") )
+ if ( !sRange.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("all")) )
return sal_False;
}
- else if ( pArgIter->Name.equalsAscii("FirstCellAsLabel") )
+ else if ( pArgIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FirstCellAsLabel")) )
{
sal_Bool bFirstCellAsLabel = sal_True;
pArgIter->Value >>= bFirstCellAsLabel;
@@ -241,7 +242,7 @@ uno::Reference< chart2::data::XDataSource > SAL_CALL DatabaseDataProvider::creat
{
}
}
- if ( !bRet ) // no command set or an error occured, use Internal data handler
+ if ( !bRet ) // no command set or an error occurred, use Internal data handler
{
uno::Reference< lang::XInitialization> xIni(m_xInternal,uno::UNO_QUERY);
if ( xIni.is() )
@@ -829,16 +830,16 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat
{
aRowLabels.push_back(::rtl::OUString::valueOf(h+1));
::std::vector< double > aRow;
- const sal_Int32 nSize = sizeof(fDefaultData)/sizeof(fDefaultData[0]);
+ const sal_Int32 nSize = SAL_N_ELEMENTS(fDefaultData);
for (size_t j = 0; j < (aColumns.size()-1); ++j,++k)
{
if ( k >= nSize )
k = 0;
aRow.push_back(fDefaultData[k]);
- } // for (sal_Int32 j = 0,k = 0; j < (aColumns.size()-1); ++j,++k)
+ }
aDataValues.push_back(aRow);
}
- } // if ( !nRowCount )
+ }
uno::Reference< chart::XChartDataArray> xData(m_xInternal,uno::UNO_QUERY);
xData->setRowDescriptions(uno::Sequence< ::rtl::OUString >(&(*aRowLabels.begin()),aRowLabels.size()));
@@ -1169,3 +1170,5 @@ void DatabaseDataProvider::impl_invalidateParameter_nothrow()
}
// -----------------------------------------------------------------------------
} // namespace dbaccess
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/misc/PropertyForward.cxx b/dbaccess/source/core/misc/PropertyForward.cxx
index e6e41a00d..3c5557b47 100644
--- a/dbaccess/source/core/misc/PropertyForward.cxx
+++ b/dbaccess/source/core/misc/PropertyForward.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -171,3 +172,4 @@ namespace dbaccess
} // namespace dbaccess
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/misc/apitools.cxx b/dbaccess/source/core/misc/apitools.cxx
index 05478d031..db763f853 100644
--- a/dbaccess/source/core/misc/apitools.cxx
+++ b/dbaccess/source/core/misc/apitools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,22 +29,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
#include <com/sun/star/lang/XServiceInfo.hpp>
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -153,3 +144,4 @@ Any OSubComponent::queryInterface( const Type & rType ) throw(RuntimeException)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/misc/dbastrings.cxx b/dbaccess/source/core/misc/dbastrings.cxx
index 771da8075..479baa1df 100644
--- a/dbaccess/source/core/misc/dbastrings.cxx
+++ b/dbaccess/source/core/misc/dbastrings.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
namespace dbaccess
{
@@ -47,3 +46,5 @@ namespace dbaccess
IMPLEMENT_CONSTASCII_USTRING( PROPERTY_IS_FORM, "IsForm" );
IMPLEMENT_CONSTASCII_USTRING( PROPERTY_PERSISTENT_PATH, "PersistentPath" );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index c53c6f9dc..98318ad63 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,10 +29,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
+#include <sal/macros.h>
+
#include "dsntypes.hxx"
#include "dbamiscres.hrc"
#include <unotools/confignode.hxx>
#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <tools/wldcrd.hxx>
#include <osl/file.hxx>
#include "dbastrings.hrc"
@@ -48,7 +52,6 @@ namespace dbaccess
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
- //using namespace ::com::sun::star::sdbc;
namespace
{
@@ -69,7 +72,7 @@ DBG_NAME(ODsnTypeCollection)
ODsnTypeCollection::ODsnTypeCollection(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xFactory)
:m_aDriverConfig(_xFactory)
,m_xFactory(_xFactory)
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
,m_nLivingIterators(0)
#endif
{
@@ -83,7 +86,7 @@ ODsnTypeCollection::ODsnTypeCollection(const ::com::sun::star::uno::Reference< :
m_aDsnTypesDisplayNames.push_back(m_aDriverConfig.getDriverTypeDisplayName(*pIter));
}
- DBG_ASSERT(m_aDsnTypesDisplayNames.size() == m_aDsnPrefixes.size(),
+ OSL_ENSURE(m_aDsnTypesDisplayNames.size() == m_aDsnPrefixes.size(),
"ODsnTypeCollection::ODsnTypeCollection : invalid resources !");
}
@@ -91,7 +94,7 @@ ODsnTypeCollection::ODsnTypeCollection(const ::com::sun::star::uno::Reference< :
ODsnTypeCollection::~ODsnTypeCollection()
{
DBG_DTOR(ODsnTypeCollection,NULL);
- DBG_ASSERT(0 == m_nLivingIterators, "ODsnTypeCollection::~ODsnTypeCollection : there are still living iterator objects!");
+ OSL_ENSURE(0 == m_nLivingIterators, "ODsnTypeCollection::~ODsnTypeCollection : there are still living iterator objects!");
}
//-------------------------------------------------------------------------
String ODsnTypeCollection::getTypeDisplayName(const ::rtl::OUString& _sURL) const
@@ -170,7 +173,7 @@ bool ODsnTypeCollection::isConnectionUrlRequired(const ::rtl::OUString& _sURL) c
sRet = *aIter;
sOldPattern = *aIter;
}
- } // for(;aIter != aEnd;++aIter)
+ }
return sRet.GetChar(sRet.Len()-1) == '*';
}
// -----------------------------------------------------------------------------
@@ -200,7 +203,7 @@ String ODsnTypeCollection::getDatasourcePrefixFromMediaType(const ::rtl::OUStrin
if ( !sFileExtension.getLength() && _sExtension.getLength() )
sFallbackURL = *pIter;
}
- } // for(;pIter != pEnd;++pIter )
+ }
if ( !sURL.Len() && sFallbackURL.Len() )
sURL = sFallbackURL;
@@ -236,7 +239,7 @@ void ODsnTypeCollection::extractHostNamePort(const ::rtl::OUString& _rDsn,String
if ( _rsHostname.Len() )
_rsHostname = _rsHostname.GetToken(_rsHostname.GetTokenCount('@') - 1,'@');
_sDatabaseName = sUrl.GetToken(sUrl.GetTokenCount(':') - 1,':');
- } // if ( _rDsn.matchIgnoreAsciiCaseAsciiL("jdbc:oracle:thin:",sizeof("jdbc:oracle:thin:")-1) )
+ }
else if ( _rDsn.matchIgnoreAsciiCaseAsciiL("sdbc:address:ldap:",sizeof("sdbc:address:ldap:")-1) )
{
lcl_extractHostAndPort(sUrl,_sDatabaseName,_nPortNumber);
@@ -331,7 +334,7 @@ bool ODsnTypeCollection::isEmbeddedDatabase( const ::rtl::OUString& _sURL ) cons
if ( sEmbeddedDatabaseURL.getLength() )
aInstalled.getNodeValue(s_sValue + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + sEmbeddedDatabaseURL + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/URL"))) >>= sEmbeddedDatabaseURL;
}
- } // if ( aInstalled.isValid() )
+ }
if ( !sEmbeddedDatabaseURL.getLength() )
sEmbeddedDatabaseURL = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:embedded:hsqldb"));
return sEmbeddedDatabaseURL;
@@ -356,7 +359,7 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const String& _rDsn) const
if (STRING_NOTFOUND == nSeparator)
{
// there should be at least one such separator
- DBG_ERROR("ODsnTypeCollection::implDetermineType : missing the colon !");
+ OSL_FAIL("ODsnTypeCollection::implDetermineType : missing the colon !");
return DST_UNKNOWN;
}
// find first :
@@ -379,7 +382,7 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const String& _rDsn) const
if (STRING_NOTFOUND == nSeparator)
{
// at the moment only jdbc is allowed to have just one separator
- DBG_ERROR("ODsnTypeCollection::implDetermineType : missing the second colon !");
+ OSL_FAIL("ODsnTypeCollection::implDetermineType : missing the second colon !");
return DST_UNKNOWN;
}
@@ -440,7 +443,7 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const String& _rDsn) const
KnownPrefix( "sdbc:address:macab", DST_MACAB, true )
};
- for ( size_t i=0; i < sizeof( aKnowPrefixes ) / sizeof( aKnowPrefixes[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS( aKnowPrefixes ); ++i )
{
sal_uInt16 nMatchLen = aKnowPrefixes[i].bMatchComplete ? sDsn.Len() : (sal_uInt16)rtl_str_getLength( aKnowPrefixes[i].pAsciiPrefix );
if ( sDsn.EqualsIgnoreCaseAscii( aKnowPrefixes[i].pAsciiPrefix, 0, nMatchLen ) )
@@ -527,7 +530,7 @@ void ODsnTypeCollection::fillPageIds(const ::rtl::OUString& _sURL,::std::vector<
{
sOldPattern = *aIter;
}
- } // for(sal_Int32 i = 0;aIter != aEnd;++aIter,++i)
+ }
return sOldPattern;
}
// -----------------------------------------------------------------------------
@@ -563,8 +566,8 @@ ODsnTypeCollection::TypeIterator::TypeIterator(const ODsnTypeCollection* _pConta
:m_pContainer(_pContainer)
,m_nPosition(_nInitialPos)
{
- DBG_ASSERT(m_pContainer, "ODsnTypeCollection::TypeIterator::TypeIterator : invalid container!");
-#ifdef DBG_UTIL
+ OSL_ENSURE(m_pContainer, "ODsnTypeCollection::TypeIterator::TypeIterator : invalid container!");
+#if OSL_DEBUG_LEVEL > 0
++const_cast<ODsnTypeCollection*>(m_pContainer)->m_nLivingIterators;
#endif
}
@@ -574,7 +577,7 @@ ODsnTypeCollection::TypeIterator::TypeIterator(const TypeIterator& _rSource)
:m_pContainer(_rSource.m_pContainer)
,m_nPosition(_rSource.m_nPosition)
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
++const_cast<ODsnTypeCollection*>(m_pContainer)->m_nLivingIterators;
#endif
}
@@ -582,7 +585,7 @@ ODsnTypeCollection::TypeIterator::TypeIterator(const TypeIterator& _rSource)
//-------------------------------------------------------------------------
ODsnTypeCollection::TypeIterator::~TypeIterator()
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
--const_cast<ODsnTypeCollection*>(m_pContainer)->m_nLivingIterators;
#endif
}
@@ -590,19 +593,19 @@ ODsnTypeCollection::TypeIterator::~TypeIterator()
//-------------------------------------------------------------------------
String ODsnTypeCollection::TypeIterator::getDisplayName() const
{
- DBG_ASSERT(m_nPosition < (sal_Int32)m_pContainer->m_aDsnTypesDisplayNames.size(), "ODsnTypeCollection::TypeIterator::getDisplayName : invalid position!");
+ OSL_ENSURE(m_nPosition < (sal_Int32)m_pContainer->m_aDsnTypesDisplayNames.size(), "ODsnTypeCollection::TypeIterator::getDisplayName : invalid position!");
return m_pContainer->m_aDsnTypesDisplayNames[m_nPosition];
}
// -----------------------------------------------------------------------------
::rtl::OUString ODsnTypeCollection::TypeIterator::getURLPrefix() const
{
- DBG_ASSERT(m_nPosition < (sal_Int32)m_pContainer->m_aDsnPrefixes.size(), "ODsnTypeCollection::TypeIterator::getDisplayName : invalid position!");
+ OSL_ENSURE(m_nPosition < (sal_Int32)m_pContainer->m_aDsnPrefixes.size(), "ODsnTypeCollection::TypeIterator::getDisplayName : invalid position!");
return m_pContainer->m_aDsnPrefixes[m_nPosition];
}
//-------------------------------------------------------------------------
const ODsnTypeCollection::TypeIterator& ODsnTypeCollection::TypeIterator::operator++()
{
- DBG_ASSERT(m_nPosition < (sal_Int32)m_pContainer->m_aDsnTypesDisplayNames.size(), "ODsnTypeCollection::TypeIterator::operator++ : invalid position!");
+ OSL_ENSURE(m_nPosition < (sal_Int32)m_pContainer->m_aDsnTypesDisplayNames.size(), "ODsnTypeCollection::TypeIterator::operator++ : invalid position!");
if (m_nPosition < (sal_Int32)m_pContainer->m_aDsnTypesDisplayNames.size())
++m_nPosition;
return *this;
@@ -611,7 +614,7 @@ const ODsnTypeCollection::TypeIterator& ODsnTypeCollection::TypeIterator::operat
//-------------------------------------------------------------------------
const ODsnTypeCollection::TypeIterator& ODsnTypeCollection::TypeIterator::operator--()
{
- DBG_ASSERT(m_nPosition >= 0, "ODsnTypeCollection::TypeIterator::operator-- : invalid position!");
+ OSL_ENSURE(m_nPosition >= 0, "ODsnTypeCollection::TypeIterator::operator-- : invalid position!");
if (m_nPosition >= 0)
--m_nPosition;
return *this;
@@ -627,3 +630,4 @@ bool operator==(const ODsnTypeCollection::TypeIterator& lhs, const ODsnTypeColle
} // namespace dbaccess
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/misc/makefile.mk b/dbaccess/source/core/misc/makefile.mk
deleted file mode 100644
index 3f41bbf80..000000000
--- a/dbaccess/source/core/misc/makefile.mk
+++ /dev/null
@@ -1,60 +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=misc
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/dba.pmk
-
-# --- Files -------------------------------------
-
-SLOFILES= \
- $(SLO)$/sdbcoretools.obj \
- $(SLO)$/services.obj \
- $(SLO)$/PropertyForward.obj \
- $(SLO)$/ContainerMediator.obj \
- $(SLO)$/userinformation.obj \
- $(SLO)$/ContainerListener.obj \
- $(SLO)$/objectnameapproval.obj \
- $(SLO)$/DatabaseDataProvider.obj \
- $(SLO)$/module_dba.obj \
- $(SLO)$/dsntypes.obj \
- $(SLO)$/veto.obj \
- $(SLO)$/apitools.obj \
- $(SLO)$/dbastrings.obj
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/dbaccess/source/core/misc/module_dba.cxx b/dbaccess/source/core/misc/module_dba.cxx
index e943ddea2..1c4472f12 100644
--- a/dbaccess/source/core/misc/module_dba.cxx
+++ b/dbaccess/source/core/misc/module_dba.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,3 +42,4 @@ namespace dba
} // namespace sdbtools
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/misc/objectnameapproval.cxx b/dbaccess/source/core/misc/objectnameapproval.cxx
index 1ac277a89..06ba68246 100644
--- a/dbaccess/source/core/misc/objectnameapproval.cxx
+++ b/dbaccess/source/core/misc/objectnameapproval.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,31 +29,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBACCESS_OBJECTNAMEAPPROVAL_HXX
#include "objectnameapproval.hxx"
-#endif
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_TOOLS_XCONNECTIONTOOLS_HPP_
#include <com/sun/star/sdb/tools/XConnectionTools.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
#include <com/sun/star/sdb/CommandType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_SQLEXCEPTION_HPP_
#include <com/sun/star/sdbc/SQLException.hpp>
-#endif
/** === end UNO includes === **/
-#ifndef _CPPUHELPER_WEAKREF_HXX_
#include <cppuhelper/weakref.hxx>
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
//........................................................................
namespace dbaccess
@@ -114,3 +101,4 @@ namespace dbaccess
} // namespace dbaccess
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/misc/sdbcoretools.cxx b/dbaccess/source/core/misc/sdbcoretools.cxx
index 6fb936cb4..01cdab86f 100644
--- a/dbaccess/source/core/misc/sdbcoretools.cxx
+++ b/dbaccess/source/core/misc/sdbcoretools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -173,3 +174,4 @@ namespace dbaccess
} // namespace dbaccess
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/misc/services.cxx b/dbaccess/source/core/misc/services.cxx
index ac3d69e67..dcd6278f4 100644
--- a/dbaccess/source/core/misc/services.cxx
+++ b/dbaccess/source/core/misc/services.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,6 +36,8 @@
#include "DatabaseDataProvider.hxx"
#include "dbadllapi.hxx"
+#include <../dataaccess/databasecontext.hxx>
+
/********************************************************************************************/
using namespace ::com::sun::star::uno;
@@ -44,7 +47,6 @@ using namespace ::com::sun::star::registry;
//***************************************************************************************
//
// registry functions
-extern "C" void SAL_CALL createRegistryInfo_ODatabaseContext();
extern "C" void SAL_CALL createRegistryInfo_OCommandDefinition();
extern "C" void SAL_CALL createRegistryInfo_OComponentDefinition();
extern "C" void SAL_CALL createRegistryInfo_ORowSet();
@@ -55,23 +57,34 @@ extern "C" void SAL_CALL createRegistryInfo_DataAccessDescriptorFactory();
namespace dba{
//--------------------------------------------------------------------------
::cppu::ImplementationEntry entries[] = {
- { &::dbaccess::DatabaseDataProvider::Create, &::dbaccess::DatabaseDataProvider::getImplementationName_Static, &::dbaccess::DatabaseDataProvider::getSupportedServiceNames_Static,
- &cppu::createSingleComponentFactory, 0, 0 },
+ {
+ &::dbaccess::DatabaseDataProvider::Create,
+ &::dbaccess::DatabaseDataProvider::getImplementationName_Static,
+ &::dbaccess::DatabaseDataProvider::getSupportedServiceNames_Static,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+
+ {
+ &dbaccess::ODatabaseContext::Create,
+ &dbaccess::ODatabaseContext::getImplementationName_static,
+ &dbaccess::ODatabaseContext::getSupportedServiceNames_static,
+ &cppu::createOneInstanceComponentFactory, 0, 0
+ },
+
{ 0, 0, 0, 0, 0, 0 }
};
}
//***************************************************************************************
//
-// Die vorgeschriebene C-Api muss erfuellt werden!
-// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen.
+// The prescribed C api must be complied with
+// It consists of three functions which must be exported by the module.
//
extern "C" void SAL_CALL createRegistryInfo_DBA()
{
static sal_Bool bInit = sal_False;
if (!bInit)
{
- createRegistryInfo_ODatabaseContext();
createRegistryInfo_OCommandDefinition();
createRegistryInfo_OComponentDefinition();
createRegistryInfo_ORowSet();
@@ -84,7 +97,7 @@ extern "C" void SAL_CALL createRegistryInfo_DBA()
//---------------------------------------------------------------------------------------
-extern "C" OOO_DLLPUBLIC_DBA void SAL_CALL component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
uno_Environment **
)
@@ -94,7 +107,7 @@ extern "C" OOO_DLLPUBLIC_DBA void SAL_CALL component_getImplementationEnvironmen
}
//---------------------------------------------------------------------------------------
-extern "C" OOO_DLLPUBLIC_DBA void* SAL_CALL component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,
void* pRegistryKey)
@@ -114,3 +127,5 @@ extern "C" OOO_DLLPUBLIC_DBA void* SAL_CALL component_getFactory(
pImplementationName, pServiceManager, pRegistryKey, dba::entries);
return xRet.get();
};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/misc/userinformation.cxx b/dbaccess/source/core/misc/userinformation.cxx
index a37837ae4..679236c69 100644
--- a/dbaccess/source/core/misc/userinformation.cxx
+++ b/dbaccess/source/core/misc/userinformation.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,22 +29,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_CORE_USERINFORMATION_HXX_
#include "userinformation.hxx"
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef INCLUDED_I18NPOOL_MSLANGID_HXX
#include <i18npool/mslangid.hxx>
-#endif
-#ifndef _UTL_CONFIGMGR_HXX_
#include <unotools/configmgr.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
using namespace ::utl;
using namespace ::com::sun::star::uno;
@@ -57,3 +48,4 @@ UserInformation::UserInformation()
m_aUserLocale = MsLangId::convertLanguageToLocale(eLanguage);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/misc/veto.cxx b/dbaccess/source/core/misc/veto.cxx
index 0a43ae9d3..80ec1e3fa 100644
--- a/dbaccess/source/core/misc/veto.cxx
+++ b/dbaccess/source/core/misc/veto.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBACCESS_VETO_HXX
#include "veto.hxx"
-#endif
/** === begin UNO includes === **/
/** === end UNO includes === **/
@@ -76,3 +75,4 @@ namespace dbaccess
} // namespace dbaccess
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx b/dbaccess/source/core/recovery/dbdocrecovery.cxx
index 6833d7faf..5dc9a5e51 100644
--- a/dbaccess/source/core/recovery/dbdocrecovery.cxx
+++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -48,6 +49,7 @@
#include <comphelper/namedvaluecollection.hxx>
#include <rtl/ustrbuf.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/macros.h>
#include <algorithm>
@@ -108,7 +110,7 @@ namespace dbaccess
const sal_Int32 nEqualSignPos = i_rIniLine.indexOf( sal_Unicode( '=' ) );
if ( nEqualSignPos < 1 )
{
- OSL_ENSURE( false, "lcl_extractCompDesc: invalid map file entry - unexpected pos of '='" );
+ OSL_FAIL( "lcl_extractCompDesc: invalid map file entry - unexpected pos of '='" );
return false;
}
o_rStorName = i_rIniLine.copy( 0, nEqualSignPos );
@@ -116,7 +118,7 @@ namespace dbaccess
const sal_Int32 nCommaPos = i_rIniLine.lastIndexOf( sal_Unicode( ',' ) );
if ( nCommaPos != i_rIniLine.getLength() - 2 )
{
- OSL_ENSURE( false, "lcl_extractCompDesc: invalid map file entry - unexpected pos of ','" );
+ OSL_FAIL( "lcl_extractCompDesc: invalid map file entry - unexpected pos of ','" );
return false;
}
o_rCompDesc.sName = i_rIniLine.copy( nEqualSignPos + 1, nCommaPos - nEqualSignPos - 1 );
@@ -197,7 +199,7 @@ namespace dbaccess
ENSURE_OR_THROW( i_rStorage.is(), "invalid storage" );
if ( !i_rStorage->hasByName( lcl_getObjectMapStreamName() ) )
{ // nothing to do, though suspicious
- OSL_ENSURE( false, "lcl_readObjectMap_throw: if there's no map file, then there's expected to be no storage, too!" );
+ OSL_FAIL( "lcl_readObjectMap_throw: if there's no map file, then there's expected to be no storage, too!" );
return;
}
@@ -230,7 +232,7 @@ namespace dbaccess
continue;
// the only section we support so far is "storages"
- if ( !sCurrentSection.equalsAscii( "storages" ) )
+ if ( !sCurrentSection.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "storages" ) ) )
{
bCurrentSectionIsKnownToBeUnsupported = true;
continue;
@@ -250,7 +252,7 @@ namespace dbaccess
const Reference< XModifiable > xModify( i_rSubComponent, UNO_QUERY );
if ( !xModify.is() )
{
- OSL_ENSURE( false, "lcl_markModified: unhandled case!" );
+ OSL_FAIL( "lcl_markModified: unhandled case!" );
return;
}
@@ -357,7 +359,7 @@ namespace dbaccess
// read the map from sub storages to object names
MapCompTypeToCompDescs aMapCompDescs;
SubComponentType aKnownTypes[] = { TABLE, QUERY, FORM, REPORT, RELATION_DESIGN };
- for ( size_t i = 0; i < sizeof( aKnownTypes ) / sizeof( aKnownTypes[0] ); ++i )
+ for ( size_t i = 0; i < SAL_N_ELEMENTS( aKnownTypes ); ++i )
{
if ( !xRecoveryStorage->hasByName( SubComponentRecovery::getComponentsStorageName( aKnownTypes[i] ) ) )
continue;
@@ -396,7 +398,7 @@ namespace dbaccess
message.append( "' not found in '" );
message.append( ::rtl::OUStringToOString( SubComponentRecovery::getComponentsStorageName( eComponentType ), RTL_TEXTENCODING_ASCII_US ) );
message.append( "', but required per map file!" );
- OSL_ENSURE( false, message.makeStringAndClear() );
+ OSL_FAIL( message.makeStringAndClear() );
#endif
continue;
}
@@ -434,3 +436,5 @@ namespace dbaccess
//........................................................................
} // namespace dbaccess
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/makefile.mk b/dbaccess/source/core/recovery/makefile.mk
deleted file mode 100644
index c13334bbc..000000000
--- a/dbaccess/source/core/recovery/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.10.2.3 $
-#
-# 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=recovery
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/dba.pmk
-
-# --- Files -------------------------------------
-
-SLOFILES= \
- $(SLO)$/dbdocrecovery.obj \
- $(SLO)$/subcomponentloader.obj \
- $(SLO)$/storagestream.obj \
- $(SLO)$/storagexmlstream.obj \
- $(SLO)$/storagetextstream.obj \
- $(SLO)$/subcomponentrecovery.obj \
- $(SLO)$/settingsimport.obj
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/dbaccess/source/core/recovery/settingsimport.cxx b/dbaccess/source/core/recovery/settingsimport.cxx
index c30792b78..5fd359da0 100644
--- a/dbaccess/source/core/recovery/settingsimport.cxx
+++ b/dbaccess/source/core/recovery/settingsimport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -117,7 +118,7 @@ namespace dbaccess
o_rLocalName = i_rElementName.copy( nSeparatorPos + 1 );
}
- OSL_ENSURE( o_rNamespace.equalsAscii( "config" ), "SettingsImport::split: unexpected namespace!" );
+ OSL_ENSURE( o_rNamespace.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "config" ) ), "SettingsImport::split: unexpected namespace!" );
// our recovery file is kind of hand-made, so there shouldn't be anything else than "config".
// If there is, then just ignore it ...
}
@@ -154,14 +155,14 @@ namespace dbaccess
::rtl::OUString sLocalName;
split( i_rElementName, sNamespace, sLocalName );
- if ( sLocalName.equalsAscii( "config-item-set" ) )
+ if ( sLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "config-item-set" ) ) )
return new ConfigItemSetImport( m_rSettings );
#if OSL_DEBUG_LEVEL > 0
::rtl::OString sMessage( "unknown (or unsupported at this place) element name '" );
sMessage += ::rtl::OUStringToOString( i_rElementName, RTL_TEXTENCODING_UTF8 );
sMessage += "', ignoring";
- OSL_ENSURE( false, sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
#endif
return new IgnoringSettingsImport;
}
@@ -183,7 +184,7 @@ namespace dbaccess
//--------------------------------------------------------------------
::rtl::Reference< SettingsImport > ConfigItemImport::nextState( const ::rtl::OUString& i_rElementName )
{
- OSL_ENSURE( false, "ConfigItemImport::nextState: unexpected: this class is responsible for child-less items only!" );
+ OSL_FAIL( "ConfigItemImport::nextState: unexpected: this class is responsible for child-less items only!" );
(void)i_rElementName;
return new IgnoringSettingsImport;
}
@@ -219,17 +220,17 @@ namespace dbaccess
o_rValue <<= nValue;
else
{
- OSL_ENSURE( false, "ConfigItemImport::getItemValue: could not convert an int value!" );
+ OSL_FAIL( "ConfigItemImport::getItemValue: could not convert an int value!" );
}
}
else if ( ::xmloff::token::IsXMLToken( rItemType, ::xmloff::token::XML_BOOLEAN ) )
{
- sal_Bool nValue( sal_False );
+ bool nValue( sal_False );
if ( SvXMLUnitConverter::convertBool( nValue, sValue ) )
o_rValue <<= nValue;
else
{
- OSL_ENSURE( false, "ConfigItemImport::getItemValue: could not convert a boolean value!" );
+ OSL_FAIL( "ConfigItemImport::getItemValue: could not convert a boolean value!" );
}
}
else if ( ::xmloff::token::IsXMLToken( rItemType, ::xmloff::token::XML_STRING ) )
@@ -242,7 +243,7 @@ namespace dbaccess
::rtl::OString sMessage( "ConfigItemImport::getItemValue: unsupported item type '" );
sMessage += ::rtl::OUStringToOString( rItemType, RTL_TEXTENCODING_UTF8 );
sMessage += "', ignoring";
- OSL_ENSURE( false, sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
}
#endif
}
@@ -269,16 +270,16 @@ namespace dbaccess
::rtl::OUString sLocalName;
split( i_rElementName, sNamespace, sLocalName );
- if ( sLocalName.equalsAscii( "config-item-set" ) )
+ if ( sLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "config-item-set" ) ) )
return new ConfigItemSetImport( m_aChildSettings );
- if ( sLocalName.equalsAscii( "config-item" ) )
+ if ( sLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "config-item" ) ) )
return new ConfigItemImport( m_aChildSettings );
#if OSL_DEBUG_LEVEL > 0
::rtl::OString sMessage( "unknown element name '" );
sMessage += ::rtl::OUStringToOString( i_rElementName, RTL_TEXTENCODING_UTF8 );
sMessage += "', ignoring";
- OSL_ENSURE( false, sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
#endif
return new IgnoringSettingsImport;
}
@@ -292,3 +293,5 @@ namespace dbaccess
//........................................................................
} // namespace dbaccess
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/settingsimport.hxx b/dbaccess/source/core/recovery/settingsimport.hxx
index 372f084f7..ad241cacf 100644
--- a/dbaccess/source/core/recovery/settingsimport.hxx
+++ b/dbaccess/source/core/recovery/settingsimport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -188,3 +189,5 @@ namespace dbaccess
//........................................................................
#endif // SETTINGSIMPORT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/storagestream.cxx b/dbaccess/source/core/recovery/storagestream.cxx
index c02569b3b..4a7f9e603 100644
--- a/dbaccess/source/core/recovery/storagestream.cxx
+++ b/dbaccess/source/core/recovery/storagestream.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -124,3 +125,5 @@ namespace dbaccess
//........................................................................
} // namespace dbaccess
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/storagestream.hxx b/dbaccess/source/core/recovery/storagestream.hxx
index 91503221f..efe9846f4 100644
--- a/dbaccess/source/core/recovery/storagestream.hxx
+++ b/dbaccess/source/core/recovery/storagestream.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -107,3 +108,5 @@ namespace dbaccess
//........................................................................
#endif // STORAGESTREAM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/storagetextstream.cxx b/dbaccess/source/core/recovery/storagetextstream.cxx
index 0a680a192..77b6d53dd 100644
--- a/dbaccess/source/core/recovery/storagetextstream.cxx
+++ b/dbaccess/source/core/recovery/storagetextstream.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -128,3 +129,5 @@ namespace dbaccess
//......................................................................................................................
} // namespace dbaccess
//......................................................................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/storagetextstream.hxx b/dbaccess/source/core/recovery/storagetextstream.hxx
index 19ec4bcdc..91d7592f4 100644
--- a/dbaccess/source/core/recovery/storagetextstream.hxx
+++ b/dbaccess/source/core/recovery/storagetextstream.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -64,3 +65,5 @@ namespace dbaccess
//......................................................................................................................
#endif // STORAGETEXTSTREAM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/storagexmlstream.cxx b/dbaccess/source/core/recovery/storagexmlstream.cxx
index 47a326842..860f77298 100644
--- a/dbaccess/source/core/recovery/storagexmlstream.cxx
+++ b/dbaccess/source/core/recovery/storagexmlstream.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -195,3 +196,5 @@ namespace dbaccess
//......................................................................................................................
} // namespace dbaccess
//......................................................................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/storagexmlstream.hxx b/dbaccess/source/core/recovery/storagexmlstream.hxx
index 572c86a69..92be6dad3 100644
--- a/dbaccess/source/core/recovery/storagexmlstream.hxx
+++ b/dbaccess/source/core/recovery/storagexmlstream.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -111,3 +112,5 @@ namespace dbaccess
//........................................................................
#endif // STORAGEXMLSTREAM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/subcomponentloader.cxx b/dbaccess/source/core/recovery/subcomponentloader.cxx
index 5ea946f2e..6c169c7ce 100644
--- a/dbaccess/source/core/recovery/subcomponentloader.cxx
+++ b/dbaccess/source/core/recovery/subcomponentloader.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -198,3 +199,5 @@ namespace dbaccess
//........................................................................
} // namespace dbaccess
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/subcomponentloader.hxx b/dbaccess/source/core/recovery/subcomponentloader.hxx
index 96c98fe45..190ad0b4a 100644
--- a/dbaccess/source/core/recovery/subcomponentloader.hxx
+++ b/dbaccess/source/core/recovery/subcomponentloader.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -85,3 +86,5 @@ namespace dbaccess
//........................................................................
#endif // SUBCOMPONENTLOADER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index c2ec6c6f0..9c7b411db 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -117,7 +118,7 @@ namespace dbaccess
break;
}
- OSL_ENSURE( false, "lcl_getComponentStorageBaseName: unimplemented case!" );
+ OSL_FAIL( "lcl_getComponentStorageBaseName: unimplemented case!" );
static const ::rtl::OUString s_sFallback;
return s_sFallback;
}
@@ -334,13 +335,13 @@ namespace dbaccess
if ( m_aStates.empty() )
{
- if ( i_Name.equalsAscii( "office:settings" ) )
+ if ( i_Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "office:settings" ) ) )
{
pNewState = new OfficeSettingsImport( m_aSettings );
}
else
{
- OSL_ENSURE( false, "SettingsDocumentHandler::startElement: invalid settings file!" );
+ OSL_FAIL( "SettingsDocumentHandler::startElement: invalid settings file!" );
// Yes, that's not correct. Somebody could, in theory, give us a document which starts with "foo:settings",
// where "foo" is mapped to the proper namespace URL.
// However, there's no need to bother with this. The "recovery" sub storage we're recovering from is
@@ -389,7 +390,7 @@ namespace dbaccess
//--------------------------------------------------------------------
void SAL_CALL SettingsDocumentHandler::processingInstruction( const ::rtl::OUString& i_Target, const ::rtl::OUString& i_Data ) throw (SAXException, RuntimeException)
{
- OSL_ENSURE( false, "SettingsDocumentHandler::processingInstruction: unexpected ..." );
+ OSL_FAIL( "SettingsDocumentHandler::processingInstruction: unexpected ..." );
(void)i_Target;
(void)i_Data;
}
@@ -428,7 +429,7 @@ namespace dbaccess
break;
}
- OSL_ENSURE( false, "SubComponentRecovery::getComponentsStorageName: unimplemented case!" );
+ OSL_FAIL( "SubComponentRecovery::getComponentsStorageName: unimplemented case!" );
static const ::rtl::OUString s_sFallback;
return s_sFallback;
}
@@ -465,7 +466,7 @@ namespace dbaccess
default:
// TODO
- OSL_ENSURE( false, "SubComponentRecoverys::saveToRecoveryStorage: unimplemented case!" );
+ OSL_FAIL( "SubComponentRecoverys::saveToRecoveryStorage: unimplemented case!" );
break;
}
@@ -495,17 +496,17 @@ namespace dbaccess
switch ( m_eType )
{
case TABLE:
- m_aCompDesc.bForEditing = sModuleIdentifier.equalsAscii( "com.sun.star.sdb.TableDesign" );
+ m_aCompDesc.bForEditing = sModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.TableDesign" ) );
break;
case QUERY:
- m_aCompDesc.bForEditing = sModuleIdentifier.equalsAscii( "com.sun.star.sdb.QueryDesign" );
+ m_aCompDesc.bForEditing = sModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.QueryDesign" ) );
break;
case REPORT:
- if ( sModuleIdentifier.equalsAscii( "com.sun.star.report.ReportDefinition" ) )
+ if ( sModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.report.ReportDefinition" ) ) )
{
- // it's an SRB report desginer
+ // it's an SRB report designer
m_aCompDesc.bForEditing = true;
break;
}
@@ -516,14 +517,14 @@ namespace dbaccess
break;
default:
- if ( sModuleIdentifier.equalsAscii( "com.sun.star.sdb.RelationDesign" ) )
+ if ( sModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.RelationDesign" ) ) )
{
m_eType = RELATION_DESIGN;
m_aCompDesc.bForEditing = true;
}
else
{
- OSL_ENSURE( false, "SubComponentRecovery::impl_identifyComponent_throw: couldn't classify the given sub component!" );
+ OSL_FAIL( "SubComponentRecovery::impl_identifyComponent_throw: couldn't classify the given sub component!" );
}
break;
}
@@ -691,7 +692,7 @@ namespace dbaccess
xSubComponent = impl_recoverQueryDesign_throw( i_rRecoveryStorage, i_rComponentName, i_bForEditing );
break;
default:
- OSL_ENSURE( false, "SubComponentRecovery::recoverFromStorage: unimplemented case!" );
+ OSL_FAIL( "SubComponentRecovery::recoverFromStorage: unimplemented case!" );
break;
}
return xSubComponent;
@@ -700,3 +701,5 @@ namespace dbaccess
//........................................................................
} // namespace dbaccess
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.hxx b/dbaccess/source/core/recovery/subcomponentrecovery.hxx
index dee2436d9..6ddd121c3 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.hxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -124,3 +125,5 @@ namespace dbaccess
//........................................................................
#endif // SUBCOMPONENTRECOVERY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/recovery/subcomponents.hxx b/dbaccess/source/core/recovery/subcomponents.hxx
index 65a837355..43b7fa8cb 100644
--- a/dbaccess/source/core/recovery/subcomponents.hxx
+++ b/dbaccess/source/core/recovery/subcomponents.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -34,7 +35,7 @@
#include <rtl/ustring.hxx>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <map>
//........................................................................
@@ -77,7 +78,7 @@ namespace dbaccess
};
// -------------------------------------------------------------------
- typedef ::std::hash_map< ::rtl::OUString, SubComponentDescriptor, ::rtl::OUStringHash > MapStringToCompDesc;
+ typedef ::boost::unordered_map< ::rtl::OUString, SubComponentDescriptor, ::rtl::OUStringHash > MapStringToCompDesc;
typedef ::std::map< SubComponentType, MapStringToCompDesc > MapCompTypeToCompDescs;
@@ -86,3 +87,5 @@ namespace dbaccess
//........................................................................
#endif // SUBCOMPONENTS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/resource/core_resource.cxx b/dbaccess/source/core/resource/core_resource.cxx
index 973d1fff2..123aeb118 100644
--- a/dbaccess/source/core/resource/core_resource.cxx
+++ b/dbaccess/source/core/resource/core_resource.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,14 +34,10 @@
#include <tools/resmgr.hxx>
// ---- needed as long as we have no contexts for components ---
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
//---------------------------------------------------
-#ifndef _SOLAR_HRC
#include <svl/solar.hrc>
-#endif
//.........................................................................
namespace dbaccess
@@ -117,3 +114,4 @@ namespace dbaccess
}
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/resource/makefile.mk b/dbaccess/source/core/resource/makefile.mk
deleted file mode 100644
index 293b92b5e..000000000
--- a/dbaccess/source/core/resource/makefile.mk
+++ /dev/null
@@ -1,48 +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=core_resource
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/dba.pmk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=core_strings
-SRC1FILES= \
- strings.src \
-
-SLOFILES= $(SLO)$/core_resource.obj \
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
diff --git a/dbaccess/source/core/resource/strings.src b/dbaccess/source/core/resource/strings.src
index a95366b25..1a572c8a1 100644
--- a/dbaccess/source/core/resource/strings.src
+++ b/dbaccess/source/core/resource/strings.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,6 +32,7 @@ String RID_STR_TRIED_OPEN_TABLE
{
Text [ en-US ] = "Tried to open the table $name$.";
};
+
String RID_STR_CONNECTION_INVALID
{
Text [ en-US ] = "No connection could be established.";
@@ -47,7 +48,6 @@ String RID_STR_NEED_CONFIG_WRITE_ACCESS
Text [ en-US ] = "You have no write access to the configuration data the object is based on.";
};
-
String RID_STR_COULDNOTCONNECT_UNSPECIFIED
{
Text [ en-US ] = "The connection to the external data source could not be established. An unknown error occurred. The driver is probably defective.";
@@ -77,106 +77,132 @@ String RID_STR_DATASOURCE_NOT_STORED
{
Text [ en-US ] = "The data source was not saved. Please use the interface XStorable to save the data source.";
};
+
String RID_STR_ONLY_QUERY
{
- Text [ en-US ] = "The given command is not a SELECT statement.\nOnly queries are allowed.";
+ Text [ en-US ] = "The given command is not a SELECT statement.\nOnly queries are allowed.";
};
+
String RID_STR_NO_VALUE_CHANGED
{
Text [ en-US ] = "No values were modified.";
};
+
String RID_STR_NO_XROWUPDATE
{
Text [ en-US ] = "Values could not be inserted. The XRowUpdate interface is not supported by ResultSet.";
};
+
String RID_STR_NO_XRESULTSETUPDATE
{
Text [ en-US ] = "Values could not be inserted. The XResultSetUpdate interface is not supported by ResultSet.";
};
+
String RID_STR_NO_UPDATE_MISSING_CONDITION
{
Text [ en-US ] = "Values could not be modified, due to a missing condition statement.";
};
+
String RID_STR_NO_COLUMN_ADD
{
Text [ en-US ] = "The adding of columns is not supported.";
};
+
String RID_STR_NO_COLUMN_DROP
{
Text [ en-US ] = "The dropping of columns is not supported.";
};
+
String RID_STR_NO_CONDITION_FOR_PK
{
Text [ en-US ] = "The WHERE condition could not be created for the primary key.";
};
+
String RID_STR_COLUMN_UNKNOWN_PROP
{
Text [ en-US ] = "The column does not support the property '%value'.";
};
+
String RID_STR_COLUMN_NOT_SEARCHABLE
{
Text [ en-US ] = "The column is not searchable!";
};
+
String RID_STR_NOT_SEQUENCE_INT8
{
Text [ en-US ] = "The value of the columns is not of the type Sequence<sal_Int8>.";
};
+
String RID_STR_COLUMN_NOT_VALID
{
Text [ en-US ] = "The column is not valid.";
};
+
String RID_STR_COLUMN_MUST_VISIBLE
{
Text [ en-US ] = "The column '%name' must be visible as a column.";
};
+
String RID_STR_NO_XQUERIESSUPPLIER
{
Text [ en-US ] = "The interface XQueriesSupplier is not available.";
};
+
String RID_STR_NOT_SUPPORTED_BY_DRIVER
{
Text [ en-US ] = "The driver does not support this function.";
};
+
String RID_STR_NO_ABS_ZERO
{
Text [ en-US ] = "An 'absolute(0)' call is not allowed.";
};
+
String RID_STR_NO_RELATIVE
{
Text [ en-US ] = "Relative positioning is not allowed in this state.";
};
+
String RID_STR_NO_REFESH_AFTERLAST
{
Text [ en-US ] = "A row cannot be refreshed when the ResultSet is positioned after the last row.";
};
+
String RID_STR_NO_MOVETOINSERTROW_CALLED
{
Text [ en-US ] = "A new row cannot be inserted when the ResultSet is not first moved to the insert row.";
};
+
String RID_STR_NO_UPDATEROW
{
Text [ en-US ] = "A row cannot be modified in this state";
};
+
String RID_STR_NO_DELETEROW
{
Text [ en-US ] = "A row cannot be deleted in this state.";
};
+
String RID_STR_NO_TABLE_RENAME
{
Text [ en-US ] = "The driver does not support table renaming.";
};
+
String RID_STR_NO_ALTER_COLUMN_DEF
{
Text [ en-US ] = "The driver does not support the modification of column descriptions.";
};
+
String RID_STR_COLUMN_ALTER_BY_NAME
{
Text [ en-US ] = "The driver does not support the modification of column descriptions by changing the name.";
};
+
String RID_STR_COLUMN_ALTER_BY_INDEX
{
Text [ en-US ] = "The driver does not support the modification of column descriptions by changing the index.";
};
+
String RID_STR_FILE_DOES_NOT_EXIST
{
Text[ en-US ] = "The file \"$file$\" does not exist.";
@@ -200,7 +226,6 @@ String RID_STR_CONFLICTING_NAMES
String RID_STR_COMMAND_LEADING_TO_ERROR
{
Text [ en-US ] = "The SQL command leading to this error is:\n\n$command$";
-
};
String RID_STR_STATEMENT_WITHOUT_RESULT_SET
@@ -247,79 +272,99 @@ String RID_NO_SUCH_DATA_SOURCE
{
Text [ en-US ] = "Error accessing data source '$name$':\n$error$";
};
+
String RID_STR_NO_SUB_FOLDER
{
Text [ en-US ] = "There exists no folder named \"$folder$\".";
};
+
String RID_STR_NO_DELETE_BEFORE_AFTER
{
Text [ en-US ] = "Cannot delete the before-first or after-last row.";
};
+
String RID_STR_NO_DELETE_INSERT_ROW
{
Text [ en-US ] = "Cannot delete the insert-row.";
};
+
String RID_STR_RESULT_IS_READONLY
{
Text [ en-US ] = "Result set is read only.";
};
+
String RID_STR_NO_DELETE_PRIVILEGE
{
Text [ en-US ] = "DELETE privilege not available.";
};
+
String RID_STR_ROW_ALREADY_DELETED
{
Text [ en-US ] = "Current row is already deleted.";
};
+
String RID_STR_UPDATE_FAILED
{
Text [ en-US ] = "Current row could not be updated.";
};
+
//-------------------------------------------------------------------------
+
String RID_STR_NO_INSERT_PRIVILEGE
{
Text [ en-US ] = "INSERT privilege not available.";
};
+
String RID_STR_INTERNAL_ERROR
{
Text [ en-US ] = "Internal error: no statement object provided by the database driver.";
};
+
String RID_STR_EXPRESSION1
{
Text [ en-US ] = "Expression1";
};
+
String RID_STR_NO_SQL_COMMAND
{
Text [ en-US ] = "No SQL command was provided.";
};
+
String RID_STR_INVALID_INDEX
{
Text [ en-US ] = "Invalid column index.";
};
+
String RID_STR_INVALID_CURSOR_STATE
{
Text [ en-US ] = "Invalid cursor state.";
};
+
String RID_STR_CURSOR_BEFORE_OR_AFTER
{
Text [ en-US ] = "The cursor points to before the first or after the last row.";
};
+
String RID_STR_NO_BOOKMARK_BEFORE_OR_AFTER
{
Text [ en-US ] = "The rows before the first and after the last row don't have a bookmark.";
};
+
String RID_STR_NO_BOOKMARK_DELETED
{
Text [ en-US ] = "The current row is deleted, and thus doesn't have a bookmark.";
};
+
String RID_STR_NO_EMBEDDING
{
Text [ en-US ] = "Embedding of database documents is not supported.";
};
+
String RID_STR_CONNECTION_REQUEST
{
Text [ en-US ] = "A connection for the following URL was requested \"$name$\".";
};
+
String RID_STR_MISSING_EXTENSION
{
Text [ en-US ] = "The extension is not installed.";
diff --git a/dbaccess/source/ext/adabas/ANewDb.cxx b/dbaccess/source/ext/adabas/ANewDb.cxx
index 67362f860..834102c4f 100644
--- a/dbaccess/source/ext/adabas/ANewDb.cxx
+++ b/dbaccess/source/ext/adabas/ANewDb.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,24 +26,12 @@
*
************************************************************************/
-#ifndef ADABASUI_NEWDB_HXX
#include "ANewDb.hxx"
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef adabasui_ADABAS_CREATEDB_HXX
#include "AdabasNewDb.hxx"
-#endif
-#ifndef adabasui_SHARED_DBUSTRINGS_HRC
#include "adabasuistrings.hrc"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
using namespace adabasui;
using namespace dbtools;
@@ -98,7 +87,7 @@ Reference< XInterface > SAL_CALL OAdabasCreateDialog::Create(const Reference< XM
//-------------------------------------------------------------------------
::rtl::OUString OAdabasCreateDialog::getImplementationName_Static() throw(RuntimeException)
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.adabasui.AdabasCreateDialog");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.adabasui.AdabasCreateDialog"));
}
//-------------------------------------------------------------------------
@@ -111,7 +100,7 @@ Reference< XInterface > SAL_CALL OAdabasCreateDialog::Create(const Reference< XM
::comphelper::StringSequence OAdabasCreateDialog::getSupportedServiceNames_Static() throw(RuntimeException)
{
::comphelper::StringSequence aSupported(1);
- aSupported.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.AdabasCreationDialog");
+ aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.AdabasCreationDialog"));
return aSupported;
}
@@ -159,3 +148,4 @@ void OAdabasCreateDialog::executedDialog(sal_Int16 _nExecutionResult)
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/adabas/ANewDb.hxx b/dbaccess/source/ext/adabas/ANewDb.hxx
index 6af12e564..f1f0087be 100644
--- a/dbaccess/source/ext/adabas/ANewDb.hxx
+++ b/dbaccess/source/ext/adabas/ANewDb.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,15 +30,9 @@
#ifndef ADABASUI_NEWDB_HXX
#define ADABASUI_NEWDB_HXX
-#ifndef _SVT_GENERICUNODIALOG_HXX_
#include <svtools/genericunodialog.hxx>
-#endif
-#ifndef _EXTENSIONS_COMPONENT_MODULE_HXX_
#include "Acomponentmodule.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCREATECATALOG_HPP_
#include <com/sun/star/sdbcx/XCreateCatalog.hpp>
-#endif
@@ -98,3 +93,5 @@ namespace adabasui
//.........................................................................
#endif // ADABASUI_NEWDB_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/adabas/ASQLNameEdit.hxx b/dbaccess/source/ext/adabas/ASQLNameEdit.hxx
index d010f8a6d..046a3fb9f 100644
--- a/dbaccess/source/ext/adabas/ASQLNameEdit.hxx
+++ b/dbaccess/source/ext/adabas/ASQLNameEdit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,12 +29,8 @@
#ifndef ADABASUI_SQLNAMEEDIT_HXX
#define ADABASUI_SQLNAMEEDIT_HXX
-#ifndef _SV_EDIT_HXX
#include <vcl/edit.hxx>
-#endif
-#ifndef _SV_COMBOBOX_HXX
#include <vcl/combobox.hxx>
-#endif
namespace adabasui
{
@@ -59,3 +56,4 @@ namespace adabasui
#endif // DBAUI_SQLNAMEEDIT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/adabas/ASqlNameEdit.cxx b/dbaccess/source/ext/adabas/ASqlNameEdit.cxx
index 5affe4748..ae6071d6a 100644
--- a/dbaccess/source/ext/adabas/ASqlNameEdit.cxx
+++ b/dbaccess/source/ext/adabas/ASqlNameEdit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,9 +26,7 @@
*
************************************************************************/
-#ifndef ADABASUI_SQLNAMEEDIT_HXX
#include "ASQLNameEdit.hxx"
-#endif
namespace adabasui
{
//------------------------------------------------------------------
@@ -78,3 +77,4 @@ namespace adabasui
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/adabas/Acomponentmodule.cxx b/dbaccess/source/ext/adabas/Acomponentmodule.cxx
index bceba0388..25f52efbd 100644
--- a/dbaccess/source/ext/adabas/Acomponentmodule.cxx
+++ b/dbaccess/source/ext/adabas/Acomponentmodule.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,22 +27,12 @@
************************************************************************/
-#ifndef _EXTENSIONS_COMPONENT_MODULE_HXX_
#include "Acomponentmodule.hxx"
-#endif
-#ifndef _TOOLS_RESMGR_HXX
#include <tools/resmgr.hxx>
-#endif
-#ifndef _SOLAR_HRC
#include <svl/solar.hrc>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
+#include <osl/diagnose.h>
#define ENTER_MOD_METHOD() \
::osl::MutexGuard aGuard(s_aMutex); \
@@ -99,12 +90,12 @@ namespace COMPMOD_NAMESPACE
// note that this method is not threadsafe, which counts for the whole class !
if (!m_pRessources && !m_bInitialized)
{
- DBG_ASSERT(m_sFilePrefix.Len(), "OModuleImpl::getResManager: no resource file prefix!");
+ OSL_ENSURE(m_sFilePrefix.Len(), "OModuleImpl::getResManager: no resource file prefix!");
// create a manager with a fixed prefix
ByteString aMgrName = m_sFilePrefix;
m_pRessources = ResMgr::CreateResMgr(aMgrName.GetBuffer());
- DBG_ASSERT(m_pRessources,
+ OSL_ENSURE(m_pRessources,
(ByteString("OModuleImpl::getResManager: could not create the resource manager (file name: ")
+= aMgrName
+= ByteString(")!")).GetBuffer());
@@ -214,7 +205,7 @@ namespace COMPMOD_NAMESPACE
{
if (!s_pImplementationNames)
{
- OSL_ASSERT("OModule::revokeComponent : have no class infos ! Are you sure called this method at the right time ?");
+ OSL_FAIL("OModule::revokeComponent : have no class infos ! Are you sure called this method at the right time ?");
return;
}
OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers,
@@ -257,7 +248,7 @@ namespace COMPMOD_NAMESPACE
if (!s_pImplementationNames)
{
- OSL_ASSERT("OModule::getComponentFactory : have no class infos ! Are you sure called this method at the right time ?");
+ OSL_FAIL("OModule::getComponentFactory : have no class infos ! Are you sure called this method at the right time ?");
return NULL;
}
OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers,
@@ -301,3 +292,4 @@ namespace COMPMOD_NAMESPACE
} // namespace COMPMOD_NAMESPACE
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/adabas/Acomponentmodule.hxx b/dbaccess/source/ext/adabas/Acomponentmodule.hxx
index 31e9adb4a..6834f3c55 100644
--- a/dbaccess/source/ext/adabas/Acomponentmodule.hxx
+++ b/dbaccess/source/ext/adabas/Acomponentmodule.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,30 +37,14 @@
which should be used as namespace for the classes defined herein.</p>
*/
-#ifndef _OSL_MUTEX_HXX_
#include <osl/mutex.hxx>
-#endif
-#ifndef _TOOLS_RESID_HXX
#include <tools/resid.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
-#endif
-#ifndef _COM_SUN_STAR_REGISTRY_XREGISTRYKEY_HPP_
#include <com/sun/star/registry/XRegistryKey.hpp>
-#endif
-#ifndef _CPPUHELPER_FACTORY_HXX_
#include <cppuhelper/factory.hxx>
-#endif
-#ifndef _RTL_STRING_HXX_
#include <rtl/string.hxx>
-#endif
class ResMgr;
@@ -277,3 +262,4 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService
#endif // _EXTENSIONS_COMPONENT_MODULE_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/adabas/AdabasNewDb.cxx b/dbaccess/source/ext/adabas/AdabasNewDb.cxx
index 8251337ff..8171200eb 100644
--- a/dbaccess/source/ext/adabas/AdabasNewDb.cxx
+++ b/dbaccess/source/ext/adabas/AdabasNewDb.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,95 +26,39 @@
*
************************************************************************/
-#ifndef adabasui_ADABAS_CREATEDB_HXX
#include "AdabasNewDb.hxx"
-#endif
-#ifndef adabasui_ADABASNEWDB_HRC
#include "AdabasNewDb.hrc"
-#endif
-#ifndef _VOS_PROCESS_HXX_
-#include <vos/process.hxx>
-#endif
-#ifndef _OSL_PROCESS_H_
#include <osl/process.h>
-#endif
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _PASSWD_HXX //autogen
#include <sfx2/passwd.hxx>
-#endif
-#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
-#endif
-#ifndef _STREAM_HXX
#include <tools/stream.hxx>
-#endif
-#ifndef _BIGINT_HXX
#include <tools/bigint.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _EXTENSIONS_COMPONENT_MODULE_HXX_
#include "Acomponentmodule.hxx"
-#endif
-#ifndef _UNOTOOLS_TEMPFILE_HXX
#include <unotools/tempfile.hxx>
-#endif
-#ifndef _ADABASUI_RESOURCE_HRC_
#include "adabasui_resource.hrc"
-#endif
-#ifndef _UCBHELPER_CONTENT_HXX
#include <ucbhelper/content.hxx>
-#endif
-#ifndef _SV_WAITOBJ_HXX
#include <vcl/waitobj.hxx>
-#endif
-#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX
#include <unotools/pathoptions.hxx>
-#endif
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/unohlp.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _UNOTOOLS_TEMPFILE_HXX
#include <unotools/tempfile.hxx>
-#endif
-#ifndef _UNOTOOLS_LOCALFILEHELPER_HXX
#include <unotools/localfilehelper.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_SQLEXCEPTION_HPP_
#include <com/sun/star/sdbc/SQLException.hpp>
-#endif
-#ifndef _UNOTOOLS_UCBHELPER_HXX
#include <unotools/ucbhelper.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
#include "adabasuistrings.hrc"
-#ifndef _THREAD_HXX_
#include <osl/thread.hxx>
-#endif
-#ifndef _OSL_FILE_HXX_
#include <osl/file.hxx>
-#endif
using namespace adabasui;
using namespace ucbhelper;
using namespace utl;
-using namespace vos;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::sdbcx;
@@ -162,7 +107,6 @@ namespace adabasui
catch(Exception&)
{
OSL_ASSERT(0);
- // showError(::dbtools::SQLExceptionInfo(e),this,);
}
}
void SAL_CALL ODatabaseCreator::onTerminated()
@@ -271,8 +215,6 @@ OAdabasNewDbDlg::OAdabasNewDbDlg( Window* pParent,
m_ET_CONUSR.SetModifyHdl( LINK(this,OAdabasNewDbDlg,LoseFocusHdl));
m_ET_DOMAIN_USR.Enable(sal_False);
- // m_ET_SYSUSR.setUpperCase();
- // m_ET_CONUSR.setUpperCase();
}
@@ -304,7 +246,7 @@ OAdabasNewDbDlg::OAdabasNewDbDlg( Window* pParent,
m_NF_DATADEVSPACE_SIZE.SetDecimalDigits(0);
m_NF_CACHE_SIZE.SetDecimalDigits(0);
- m_ET_DATABASENAME.SetMaxTextLen( 8 ); //98292
+ m_ET_DATABASENAME.SetMaxTextLen( 8 );
m_PB_CONPWD.SetClickHdl( LINK(this,OAdabasNewDbDlg,PwdClickHdl));
m_PB_SYSPWD.SetClickHdl( LINK(this,OAdabasNewDbDlg,PwdClickHdl));
@@ -803,3 +745,5 @@ sal_Bool OAdabasNewDbDlg::fillEnvironmentVariable(const ::rtl::OUString& _sVaria
return bError;
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/adabas/AdabasNewDb.hxx b/dbaccess/source/ext/adabas/AdabasNewDb.hxx
index ee48ed7a9..93de2546e 100644
--- a/dbaccess/source/ext/adabas/AdabasNewDb.hxx
+++ b/dbaccess/source/ext/adabas/AdabasNewDb.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,31 +30,15 @@
#define ADABASUI_ADABAS_CREATEDB_HXX
-#ifndef _SV_DIALOG_HXX
#include <vcl/dialog.hxx>
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
-#ifndef _SV_FIELD_HXX
#include <vcl/field.hxx>
-#endif
-#ifndef _SV_EDIT_HXX
#include <vcl/edit.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCREATECATALOG_HPP_
#include <com/sun/star/sdbcx/XCreateCatalog.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _FILEDLGHELPER_HXX
#include <sfx2/filedlghelper.hxx>
-#endif
#include <memory>
#include "ASQLNameEdit.hxx"
@@ -163,3 +148,4 @@ namespace adabasui
}
#endif // adabasui_ADABAS_CREATEDB_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/adabas/AdabasNewDb.src b/dbaccess/source/ext/adabas/AdabasNewDb.src
index ae3cd2e2d..5d1b7e482 100644
--- a/dbaccess/source/ext/adabas/AdabasNewDb.src
+++ b/dbaccess/source/ext/adabas/AdabasNewDb.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,7 +51,8 @@ ModalDialog DLG_ADABAS_NEWDB
Pos = MAP_APPFONT ( 12 , 6) ;
Size = MAP_APPFONT ( 64 + ADJUST_X, 10 ) ;
Text[ en-US ] = "Database ~name";
-};
+ };
+
Edit ET_DATABASENAME
{
Border = TRUE ;
@@ -66,26 +67,28 @@ ModalDialog DLG_ADABAS_NEWDB
Pos = MAP_APPFONT ( 6 , 3 + MOVE_Y) ;
Size = MAP_APPFONT ( WIN_X - 12 , 8 ) ;
Text[ en-US ] = "User settings";
-};
+ };
FixedText FT_CONUSR
{
Pos = MAP_APPFONT ( 12 , 31 + MOVE_Y) ;
Size = MAP_APPFONT ( 64 + ADJUST_X, 10 ) ;
Text[ en-US ] = "~Control user";
-};
+ };
+
FixedText FT_SYSUSR
{
Pos = MAP_APPFONT ( 12 , 14 + MOVE_Y) ;
Size = MAP_APPFONT ( 64 + ADJUST_X, 10 ) ;
Text[ en-US ] = "~Administrator";
-};
+ };
+
FixedText FT_DOMAIN_USR
{
Pos = MAP_APPFONT ( 12 , 48 + MOVE_Y) ;
Size = MAP_APPFONT ( 64 + ADJUST_X, 10 ) ;
Text[ en-US ] = "~Domain user";
-};
+ };
Edit ET_SYSUSR
{
@@ -103,7 +106,7 @@ ModalDialog DLG_ADABAS_NEWDB
TabStop = TRUE ;
HelpID = HID_DLG_ADABAS_SYSPWD ;
Text[ en-US ] = "P~assword...";
-};
+ };
Edit ET_CONUSR
{
@@ -121,7 +124,8 @@ ModalDialog DLG_ADABAS_NEWDB
TabStop = TRUE ;
HelpID = HID_DLG_ADABAS_CONPWD ;
Text[ en-US ] = "~Password...";
-};
+ };
+
Edit ET_DOMAIN_USR
{
Pos = MAP_APPFONT ( 77 + ADJUST_X, 47 + MOVE_Y) ;
@@ -140,7 +144,7 @@ ModalDialog DLG_ADABAS_NEWDB
TabStop = TRUE ;
HelpID = HID_DLG_ADABAS_DOMAINPWD ;
Text[ en-US ] = "Passwo~rd...";
-};
+ };
FixedImage BMP_CON
{
@@ -148,12 +152,14 @@ ModalDialog DLG_ADABAS_NEWDB
Size = MAP_APPFONT ( 20 , 20 ) ;
HelpID = HID_DLG_ADABAS_CON_PWD ;
};
+
FixedImage BMP_SYS
{
Pos = MAP_APPFONT ( 240 , 11 + MOVE_Y) ;
Size = MAP_APPFONT ( 20 , 20 ) ;
HelpID = HID_DLG_ADABAS_SYS_PWD ;
};
+
FixedImage BMP_DOMAIN
{
Pos = MAP_APPFONT ( 240 , 44 + MOVE_Y) ;
@@ -166,7 +172,7 @@ ModalDialog DLG_ADABAS_NEWDB
Pos = MAP_APPFONT ( 12 , 13 + MOVE_Y) ;
Size = MAP_APPFONT ( 64 + ADJUST_X, 10 ) ;
Text[ en-US ] = "~Backup file";
-};
+ };
Edit ET_RESTORE
{
@@ -184,7 +190,7 @@ ModalDialog DLG_ADABAS_NEWDB
TabStop = TRUE ;
HelpID = HID_DLG_ADABAS_PBRESTORE ;
Text[ en-US ] = "...";
-};
+ };
/* DEVSPACE positions */
FixedLine FL_DBSETTINGS
@@ -192,28 +198,28 @@ ModalDialog DLG_ADABAS_NEWDB
Pos = MAP_APPFONT ( 6 , 70 + MOVE_Y) ;
Size = MAP_APPFONT ( WIN_X - 12 , 8 ) ;
Text[ en-US ] = "Database settings";
-};
+ };
FixedText FT_SYSDEVSPACE
{
Pos = MAP_APPFONT ( 12 , 83 + MOVE_Y) ;
Size = MAP_APPFONT ( 64 + ADJUST_X, 8 ) ;
Text[ en-US ] = "S~YSDEVSPACE";
-};
+ };
FixedText FT_TRANSACTIONLOG
{
Pos = MAP_APPFONT ( 12 , 99 + MOVE_Y) ;
Size = MAP_APPFONT ( 64 + ADJUST_X, 8 ) ;
Text[ en-US ] = "TRANSACTI~ONLOG";
-};
+ };
FixedText FT_DATADEVSPACE
{
Pos = MAP_APPFONT ( 12 , 116 + MOVE_Y) ;
Size = MAP_APPFONT ( 64 + ADJUST_X, 8 ) ;
Text[ en-US ] = "DATAD~EVSPACE";
-};
+ };
Edit ET_SYSDEVSPACE
{
@@ -231,7 +237,7 @@ ModalDialog DLG_ADABAS_NEWDB
TabStop = TRUE ;
HelpID = HID_DLG_ADABAS_PBSYSDEVSPACE ;
Text[ en-US ] = "...";
-};
+ };
Edit ET_TRANSACTIONLOG
{
@@ -249,7 +255,7 @@ ModalDialog DLG_ADABAS_NEWDB
TabStop = TRUE ;
HelpID = HID_DLG_ADABAS_PBTRANSACTIONLOG ;
Text[ en-US ] = "...";
-};
+ };
Edit ET_DATADEVSPACE
{
@@ -260,7 +266,6 @@ ModalDialog DLG_ADABAS_NEWDB
HelpID = HID_DLG_ADABAS_DATADEVSPACE ;
};
-
PushButton PB_DATADEVSPACE
{
Pos = MAP_APPFONT ( WIN_X - 24, 114 + MOVE_Y) ;
@@ -268,14 +273,16 @@ ModalDialog DLG_ADABAS_NEWDB
TabStop = TRUE ;
HelpID = HID_DLG_ADABAS_PBDATADEVSPACE ;
Text[ en-US ] = "...";
-};
+ };
+
/* DEVSPACE sizes */
FixedText FT_TRANSACTIONLOG_SIZE
{
Pos = MAP_APPFONT ( 12 , 133 + MOVE_Y) ;
Size = MAP_APPFONT ( 64 + ADJUST_X, 8 ) ;
Text[ en-US ] = "Transaction ~file (MB)";
-};
+ };
+
NumericField NF_TRANSACTIONLOG_SIZE
{
Pos = MAP_APPFONT ( 77 + ADJUST_X, 131 + MOVE_Y) ;
@@ -283,15 +290,17 @@ ModalDialog DLG_ADABAS_NEWDB
Border = TRUE ;
TabStop = TRUE ;
Spin = TRUE ;
-StrictFormat = TRUE;
+ StrictFormat = TRUE;
HelpID = HID_DLG_ADABAS_TRANSACTIONLOG_SIZE ;
};
+
FixedText FT_DATADEVSPACE_SIZE
{
Pos = MAP_APPFONT ( 12 , 150 + MOVE_Y) ;
Size = MAP_APPFONT ( 64 + ADJUST_X, 8 ) ;
Text[ en-US ] = "Data~base size (MB)";
-};
+ };
+
NumericField NF_DATADEVSPACE_SIZE
{
Pos = MAP_APPFONT ( 77 + ADJUST_X, 148 + MOVE_Y) ;
@@ -299,15 +308,17 @@ StrictFormat = TRUE;
Border = TRUE ;
TabStop = TRUE ;
Spin = TRUE ;
-StrictFormat = TRUE;
+ StrictFormat = TRUE;
HelpID = HID_DLG_ADABAS_DATADEVSPACE_SIZE ;
};
+
FixedText FT_CACHE_SIZE
{
Pos = MAP_APPFONT ( 12 , 167 + MOVE_Y) ;
Size = MAP_APPFONT ( 64 + ADJUST_X, 8 ) ;
Text[ en-US ] = "Data ~buffer size (MB)";
-};
+ };
+
NumericField NF_CACHE_SIZE
{
Pos = MAP_APPFONT ( 77 + ADJUST_X, 165 + MOVE_Y) ;
@@ -315,14 +326,16 @@ StrictFormat = TRUE;
Border = TRUE ;
TabStop = TRUE ;
Spin = TRUE ;
-StrictFormat = TRUE;
+ StrictFormat = TRUE;
HelpID = HID_DLG_ADABAS_CACHE_SIZE ;
};
+
FixedLine FL_END
{
Pos = MAP_APPFONT ( 0 , WIN_Y - 24 + MOVE_Y) ;
Size = MAP_APPFONT ( WIN_X , 1 ) ;
};
+
OKButton PB_OK
{
Pos = MAP_APPFONT ( WIN_X - 112, WIN_Y - 20 + MOVE_Y) ;
@@ -330,6 +343,7 @@ StrictFormat = TRUE;
TabStop = TRUE ;
DefButton = TRUE ;
};
+
CancelButton PB_CANCEL
{
Pos = MAP_APPFONT ( WIN_X - 56 , WIN_Y - 20+ MOVE_Y) ;
@@ -340,26 +354,29 @@ StrictFormat = TRUE;
String STR_BACKUPFILE_LOAD
{
Text[ en-US ] = "Backup file information";
-};
+ };
Text[ en-US ] = "Create New Adabas D Database";
};
Image CHECK_GREEN
{
- ImageBitmap = Bitmap { File = "nu07.bmp"; };
+ ImageBitmap = Bitmap { File = "nu07.png"; };
MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
};
+
Image UNCHECK_RED
{
- ImageBitmap = Bitmap { File = "nu08.bmp"; };
+ ImageBitmap = Bitmap { File = "nu08.png"; };
MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
};
+
Image DEFAULT_BLUE
{
- ImageBitmap = Bitmap { File = "nu09.bmp"; };
+ ImageBitmap = Bitmap { File = "nu09.png"; };
MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
};
+
/* Fehlermeldungen beim Erstellen einer Adabas DB */
String STR_ADABAS_NO_PARAM_SET
@@ -376,6 +393,7 @@ String STR_ADABAS_NO_SYSTEM_TABLES
{
Text[ en-US ] = "An error occurred as the system tables were being created.";
};
+
String STR_ADABAS_NO_BACKUP_FILE
{
Text[ en-US ] = "The backup file entered does not exist.";
@@ -390,10 +408,12 @@ String STR_NO_SAME_USER
{
Text[ en-US ] = "The administrator and the control user cannot have the same name!";
};
+
String STR_DEVSPACE_NO_FILE
{
Text[ en-US ] = "No name has been entered for the $name$ file!";
};
+
String STR_NO_PERMISSION
{
Text[ en-US ] = "You have to have administrator rights to create a new database!";
@@ -423,11 +443,12 @@ String STR_ADABAS_CREATEPARAM_FILE
{
Text [ en-US ] = "Creating database configuration file." ;
};
+
String STR_ADABAS_START_DATABASE
{
Text [ en-US ] = "Starting database for the first time." ;
-
};
+
String STR_ADABAS_DB_EXISTS
{
Text[ en-US ] = "The name entered already exists.";
@@ -445,11 +466,10 @@ String STR_ADABAS_NO_ACCESSRIGHTS
String STR_ADABAS_CANNOT_CONVERT
{
- Text[ en-US ] = "The current database need to be converted. Please insert control user and password.";
+ Text[ en-US ] = "The current database need to be converted. Please insert control user and password.";
};
String STR_ADABAS_PASSWORD_ILLEGAL
{
Text[ en-US ] = "Spaces are not permitted in the password. Please enter a new password.";
};
-
diff --git a/dbaccess/source/ext/adabas/Aservices.cxx b/dbaccess/source/ext/adabas/Aservices.cxx
index a879e5fb4..49d88f959 100644
--- a/dbaccess/source/ext/adabas/Aservices.cxx
+++ b/dbaccess/source/ext/adabas/Aservices.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,15 +26,9 @@
*
************************************************************************/
-#ifndef _CPPUHELPER_FACTORY_HXX_
#include <cppuhelper/factory.hxx>
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef _EXTENSIONS_COMPONENT_MODULE_HXX_
#include "Acomponentmodule.hxx"
-#endif
/********************************************************************************************/
@@ -63,8 +58,7 @@ extern "C" void SAL_CALL createRegistryInfo_adabasui()
//---------------------------------------------------------------------------------------
-extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
-component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
uno_Environment **
)
@@ -91,3 +85,5 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
xRet->acquire();
return xRet.get();
};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/adabas/Astringconstants.cxx b/dbaccess/source/ext/adabas/Astringconstants.cxx
index 5fd0ed1a8..4375af2ee 100644
--- a/dbaccess/source/ext/adabas/Astringconstants.cxx
+++ b/dbaccess/source/ext/adabas/Astringconstants.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,3 +59,4 @@ IMPLEMENT_CONSTASCII_USTRING(SQLSTATE_GENERAL, "01000");
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/adabas/adabasuistrings.cxx b/dbaccess/source/ext/adabas/adabasuistrings.cxx
index e640f77ed..ec71721e7 100644
--- a/dbaccess/source/ext/adabas/adabasuistrings.cxx
+++ b/dbaccess/source/ext/adabas/adabasuistrings.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,9 +26,7 @@
*
************************************************************************/
-#ifndef ADABASUI_SHARED_DBUSTRINGS_HRC
#include "adabasuistrings.hrc"
-#endif
namespace adabasui
{
@@ -35,3 +34,4 @@ namespace adabasui
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/adabas/makefile.mk b/dbaccess/source/ext/adabas/makefile.mk
deleted file mode 100644
index 8dbbe7abc..000000000
--- a/dbaccess/source/ext/adabas/makefile.mk
+++ /dev/null
@@ -1,100 +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=..$/..$/..
-
-PRJNAME=dbaccess
-TARGET=adabasui
-ENABLE_EXCEPTIONS=TRUE
-VISIBILITY_HIDDEN=TRUE
-
-# --- Settings ----------------------------------
-.INCLUDE : settings.mk
-
-# --- resource -----------------------------------------------------
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- AdabasNewDb.src
-
-# --- defines ------------------------------------------------------
-CDEFS+=-DCOMPMOD_NAMESPACE=adabasui
-
-# --- Files -------------------------------------
-SLOFILES=\
- $(SLO)$/ASqlNameEdit.obj \
- $(SLO)$/AdabasNewDb.obj \
- $(SLO)$/ANewDb.obj \
- $(SLO)$/adabasuistrings.obj \
- $(SLO)$/Aservices.obj \
- $(SLO)$/Acomponentmodule.obj
-
-# --- Library -----------------------------------
-SHL1TARGET=$(TARGET)$(DLLPOSTFIX)
-
-SHL1STDLIBS=\
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(SALLIB) \
- $(DBTOOLSLIB) \
- $(UNOTOOLSLIB) \
- $(SVTOOLLIB) \
- $(TOOLSLIB) \
- $(SVLLIB) \
- $(VCLLIB) \
- $(UCBHELPERLIB) \
- $(SFXLIB) \
- $(TKLIB) \
- $(COMPHELPERLIB)
-
-SHL1IMPLIB=i$(SHL1TARGET)
-
-SHL1DEF=$(MISC)$/$(SHL1TARGET).def
-SHL1LIBS=$(SLB)$/$(TARGET).lib
-DEF1NAME=$(SHL1TARGET)
-DEF1EXPORTFILE=$(TARGET).dxp
-SHL1VERSIONMAP=$(SOLARENV)/src/component.map
-
-# --- .res file ----------------------------------------------------------
-RES1FILELIST=\
- $(SRS)$/$(SRS1NAME).srs
-
-RESLIB1NAME=$(TARGET)
-RESLIB1IMAGES=$(PRJ)$/res
-RESLIB1SRSFILES=$(RES1FILELIST)
-
-
-# --- Targets ----------------------------------
-
-.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_module.cxx b/dbaccess/source/ext/macromigration/dbmm_module.cxx
index 598fe195f..d7e81bce8 100644
--- a/dbaccess/source/ext/macromigration/dbmm_module.cxx
+++ b/dbaccess/source/ext/macromigration/dbmm_module.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,4 @@ namespace dbmm
} // namespace dbmm
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/dbmm_module.hxx b/dbaccess/source/ext/macromigration/dbmm_module.hxx
index c11ea114d..8342a7aa8 100644
--- a/dbaccess/source/ext/macromigration/dbmm_module.hxx
+++ b/dbaccess/source/ext/macromigration/dbmm_module.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,4 @@ namespace dbmm
#endif // DBACCESS_MACROMIGRATION_MODULE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/dbmm_services.cxx b/dbaccess/source/ext/macromigration/dbmm_services.cxx
index 48d24c8a2..7cdf5915d 100644
--- a/dbaccess/source/ext/macromigration/dbmm_services.cxx
+++ b/dbaccess/source/ext/macromigration/dbmm_services.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,15 +41,8 @@ namespace dbmm
static void initializeModule()
{
- static bool bInitialized( false );
- if ( !bInitialized )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !bInitialized )
- {
- createRegistryInfo_MacroMigrationDialogService();
- }
- }
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ createRegistryInfo_MacroMigrationDialogService();
}
//........................................................................
@@ -56,3 +50,5 @@ namespace dbmm
//........................................................................
IMPLEMENT_COMPONENT_LIBRARY_API( ::dbmm::MacroMigrationModule, ::dbmm::initializeModule )
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/dbmm_types.cxx b/dbaccess/source/ext/macromigration/dbmm_types.cxx
index d28403cb9..cacbfac9c 100644
--- a/dbaccess/source/ext/macromigration/dbmm_types.cxx
+++ b/dbaccess/source/ext/macromigration/dbmm_types.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -61,3 +62,5 @@ namespace dbmm
//........................................................................
} // namespace dbmm
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/dbmm_types.hxx b/dbaccess/source/ext/macromigration/dbmm_types.hxx
index 7695eb285..6c6500239 100644
--- a/dbaccess/source/ext/macromigration/dbmm_types.hxx
+++ b/dbaccess/source/ext/macromigration/dbmm_types.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,6 +30,7 @@
#define DBACCESS_DBMM_TYPES_HXX
#include <tools/string.hxx>
+#include <sal/macros.h>
//........................................................................
namespace dbmm
@@ -67,3 +69,5 @@ namespace dbmm
//........................................................................
#endif // DBACCESS_DBMM_TYPES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/docinteraction.cxx b/dbaccess/source/ext/macromigration/docinteraction.cxx
index 1b67dd4ad..7f96e2173 100644
--- a/dbaccess/source/ext/macromigration/docinteraction.cxx
+++ b/dbaccess/source/ext/macromigration/docinteraction.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -140,3 +141,5 @@ namespace dbmm
//........................................................................
} // namespace dbmm
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/docinteraction.hxx b/dbaccess/source/ext/macromigration/docinteraction.hxx
index 514d0b8e4..9575fd8c9 100644
--- a/dbaccess/source/ext/macromigration/docinteraction.hxx
+++ b/dbaccess/source/ext/macromigration/docinteraction.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,5 @@ namespace dbmm
//........................................................................
#endif // DBACCESS_DOCERRORHANDLING_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/macromigration.src b/dbaccess/source/ext/macromigration/macromigration.src
index f971bd133..5d1d9db39 100644
--- a/dbaccess/source/ext/macromigration/macromigration.src
+++ b/dbaccess/source/ext/macromigration/macromigration.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -228,7 +228,7 @@ TabPage TP_MIGRATE
};
FixedText FT_CURRENT_OBJECT
- {
+ {
Pos = MAP_APPFONT( TAB_PAGE_CONTENT_MARGIN + 60,
CONTENT_POS_X + 2 * FIXED_TEXT_HEIGHT + SPACING_UNRELATED );
Size = MAP_APPFONT( TAB_PAGE_WIDTH - ( TAB_PAGE_CONTENT_MARGIN + 60 ), FIXED_TEXT_HEIGHT );
@@ -244,7 +244,7 @@ TabPage TP_MIGRATE
};
FixedText FT_CURRENT_PROGRESS
- {
+ {
Pos = MAP_APPFONT( TAB_PAGE_CONTENT_MARGIN + 60,
CONTENT_POS_X + 2 * FIXED_TEXT_HEIGHT + SPACING_UNRELATED + FIXED_TEXT_HEIGHT + SPACING_UNRELATED );
Size = MAP_APPFONT( TAB_PAGE_WIDTH - ( TAB_PAGE_CONTENT_MARGIN + 60 ), FIXED_TEXT_HEIGHT );
@@ -347,6 +347,7 @@ TabPage TP_SUMMARY
{
Text [ en-US ] = "The migration was successful. Below is a log of the actions which have been taken to your document.";
};
+
String STR_UNSUCCESSFUL
{
Text [ en-US ] = "The migration was not successful. Examine the migration log below for details.";
@@ -451,10 +452,12 @@ String STR_INVALID_NUMBER_ARGS
{
Text [ en-US ] = "Invalid number of initialization arguments. Expected 1.";
};
+
String STR_NO_DATABASE
{
Text [ en-US ] = "No database document found in the initialization arguments.";
};
+
String STR_NOT_READONLY
{
Text [ en-US ] = "Not applicable to read-only documents.";
diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
index 1ae34a1b9..e5db897d8 100644
--- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -270,7 +271,7 @@ namespace dbmm
break;
default:
- OSL_ENSURE( false, "MacroMigrationDialog::enterState: unhandled state!" );
+ OSL_FAIL( "MacroMigrationDialog::enterState: unhandled state!" );
}
}
@@ -295,7 +296,7 @@ namespace dbmm
case STATE_SUMMARY:
break;
default:
- OSL_ENSURE( false, "MacroMigrationDialog::prepareLeaveCurrentState: unhandled state!" );
+ OSL_FAIL( "MacroMigrationDialog::prepareLeaveCurrentState: unhandled state!" );
}
return sal_True;
@@ -534,7 +535,7 @@ namespace dbmm
if ( !xController->suspend( sal_True ) )
{ // ouch. There shouldn't be any modal dialogs and such, so there
// really is no reason why suspending shouldn't work.
- OSL_ENSURE( false, "MacroMigrationDialog::impl_reloadDocument_nothrow: could not suspend a controller!" );
+ OSL_FAIL( "MacroMigrationDialog::impl_reloadDocument_nothrow: could not suspend a controller!" );
// ignoring this would be at the cost of a crash (potentially)
// so, we cannot continue here.
throw CloseVetoException();
@@ -626,3 +627,5 @@ namespace dbmm
//........................................................................
} // namespace dbmm
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.hxx b/dbaccess/source/ext/macromigration/macromigrationdialog.hxx
index cda90cb5b..d3cdb3ece 100644
--- a/dbaccess/source/ext/macromigration/macromigrationdialog.hxx
+++ b/dbaccess/source/ext/macromigration/macromigrationdialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -92,3 +93,5 @@ namespace dbmm
//........................................................................
#endif // DBACCESS_MACROMIGRATIONDIALOG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
index 88a45081a..7dc05cdfb 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -359,3 +360,5 @@ namespace dbmm
//........................................................................
} // namespace dbmm
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.hxx b/dbaccess/source/ext/macromigration/macromigrationpages.hxx
index 321c2c76a..5b23e8105 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.hxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -179,3 +180,5 @@ namespace dbmm
//........................................................................
#endif // DBACCESS_MACROMIGRATIONPAGES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/macromigrationwizard.cxx b/dbaccess/source/ext/macromigration/macromigrationwizard.cxx
index 6f10e4823..b8b94910c 100644
--- a/dbaccess/source/ext/macromigration/macromigrationwizard.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationwizard.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -261,3 +262,5 @@ namespace dbmm
//........................................................................
} // namespace dbmm
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/makefile.mk b/dbaccess/source/ext/macromigration/makefile.mk
deleted file mode 100644
index b71330f17..000000000
--- a/dbaccess/source/ext/macromigration/makefile.mk
+++ /dev/null
@@ -1,109 +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=dbmm
-USE_DEFFILE=TRUE
-
-ENABLE_EXCEPTIONS=TRUE
-VISIBILITY_HIDDEN=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files -------------------------------------
-
-# ... resource files ............................
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- macromigration.src
-
-# ... object files ............................
-SLOFILES= $(SLO)$/macromigrationwizard.obj \
- $(SLO)$/macromigrationdialog.obj \
- $(SLO)$/macromigrationpages.obj \
- $(SLO)$/dbmm_module.obj \
- $(SLO)$/dbmm_services.obj \
- $(SLO)$/migrationengine.obj \
- $(SLO)$/docinteraction.obj \
- $(SLO)$/progresscapture.obj \
- $(SLO)$/progressmixer.obj \
- $(SLO)$/migrationlog.obj \
- $(SLO)$/dbmm_types.obj \
-
-# --- library -----------------------------------
-
-SHL1TARGET=$(TARGET)$(DLLPOSTFIX)
-SHL1VERSIONMAP=$(SOLARENV)/src/component.map
-
-SHL1STDLIBS= \
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(COMPHELPERLIB) \
- $(UNOTOOLSLIB) \
- $(TOOLSLIB) \
- $(SALLIB) \
- $(SVTOOLLIB) \
- $(SVLLIB) \
- $(VCLLIB) \
- $(SVXCORELIB) \
- $(SVXLIB) \
- $(UCBHELPERLIB) \
- $(XMLSCRIPTLIB)
-
-SHL1LIBS= $(SLB)$/$(TARGET).lib
-SHL1IMPLIB= i$(TARGET)
-SHL1DEPN= $(SHL1LIBS)
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-
-DEF1NAME= $(SHL1TARGET)
-
-# --- .res files -------------------------------
-
-RES1FILELIST=\
- $(SRS)$/$(TARGET).srs
-
-RESLIB1NAME=$(TARGET)
-RESLIB1IMAGES=$(PRJ)$/res
-RESLIB1SRSFILES=$(RES1FILELIST)
-
-# --- Targets ----------------------------------
-
-.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/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx
index 1ee652a88..80215ee25 100644
--- a/dbaccess/source/ext/macromigration/migrationengine.cxx
+++ b/dbaccess/source/ext/macromigration/migrationengine.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -214,7 +215,7 @@ namespace dbmm
break;
}
- OSL_ENSURE( false, "lcl_getScriptsSubStorageName: illegal type!" );
+ OSL_FAIL( "lcl_getScriptsSubStorageName: illegal type!" );
static ::rtl::OUString s_sEmpty;
return s_sEmpty;
}
@@ -241,7 +242,7 @@ namespace dbmm
LanguageMapping( "Python", ePython ), // TODO: is this correct?
LanguageMapping( "Basic", eBasic )
};
- for ( size_t i=0; i < sizeof( aLanguageMapping ) / sizeof( aLanguageMapping[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS( aLanguageMapping ); ++i )
{
if ( _rLanguage.equalsAscii( aLanguageMapping[i].pAsciiLanguage ) )
{
@@ -249,7 +250,7 @@ namespace dbmm
return true;
}
}
- OSL_ENSURE( false, "lcl_getScriptTypeFromLanguage: unknown language!" );
+ OSL_FAIL( "lcl_getScriptTypeFromLanguage: unknown language!" );
return false;
}
@@ -332,7 +333,7 @@ namespace dbmm
bool bCausedByNewStyleReport =
( _rDocument.eType == eReport )
&& ( aError.isExtractableTo( ::cppu::UnoType< WrongFormatException >::get() ) )
- && ( lcl_getMimeType_nothrow( _rDocument.xCommandProcessor ).equalsAscii( "application/vnd.sun.xml.report" ) );
+ && ( lcl_getMimeType_nothrow( _rDocument.xCommandProcessor ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.sun.xml.report" ) ) );
if ( bCausedByNewStyleReport )
{
@@ -1019,7 +1020,7 @@ namespace dbmm
{
if ( m_aSubDocs.empty() )
{
- OSL_ENSURE( false, "MigrationEngine_Impl::migrateAll: no forms/reports found!" );
+ OSL_FAIL( "MigrationEngine_Impl::migrateAll: no forms/reports found!" );
// The whole migration wizard is not expected to be called when there are no forms/reports
// with macros, not to mention when there are no forms/reports at all.
return false;
@@ -1162,7 +1163,7 @@ namespace dbmm
aProgressMixer.registerPhase( PHASE_PYTHON, 1 );
aProgressMixer.registerPhase( PHASE_JAVA, 1 );
aProgressMixer.registerPhase( PHASE_BASIC, 5 );
- // more weight than then others, assuming that usually, there are much more Basic macros than any other scripts
+ // more weight than the others, assuming that usually, there are many more Basic macros than any other scripts
aProgressMixer.registerPhase( PHASE_DIALOGS, 1 );
bool bSuccess = impl_checkScriptStorageStructure_nothrow( aSubDocument );
@@ -1222,7 +1223,7 @@ namespace dbmm
const ::rtl::OUString& _rSourceLibName, const Reference< XNameAccess >& _rxTargetContainer )
{
// The new library name is composed from the prefix, the base name, and the old library name.
- const ::rtl::OUString sPrefix( ::rtl::OUString::createFromAscii( _rDocument.eType == eForm ? "Form_" : "Report_" ) );
+ const ::rtl::OUString sPrefix = (_rDocument.eType == eForm)?rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Form_")): rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Report_"));
::rtl::OUString sBaseName( _rDocument.sHierarchicalName.copy(
_rDocument.sHierarchicalName.lastIndexOf( '/' ) + 1 ) );
@@ -1231,8 +1232,8 @@ namespace dbmm
// The bug requesting to change this is #i95409#.
// Unfortunately, the storage implementation does not complain if you use invalid characters/names, but instead
// it silently accepts them, and produces garbage in the file (#i95408).
- // So, until especially the former is fixed, we need to strip the name from all invalid characters.
- // #i95865# / 2008-11-06 / frank.schoenheit@sun.com
+ // So, until especially the former is fixed, we need to strip all invalid characters from the name.
+ // #i95865#
// The general idea is to replace invalid characters with '_'. However, since "valid" essentially means
// ASCII only, this implies that for a lot of languages, we would simply replace everything with '_',
@@ -1305,7 +1306,7 @@ namespace dbmm
ScriptType aKnownStorageBasedTypes[] = {
eBeanShell, eJavaScript, ePython, eJava
};
- for ( size_t i=0; i<sizeof( aKnownStorageBasedTypes ) / sizeof( aKnownStorageBasedTypes[0] ); ++i )
+ for ( size_t i=0; i< SAL_N_ELEMENTS( aKnownStorageBasedTypes ); ++i )
aElementNames.erase( lcl_getScriptsSubStorageName( aKnownStorageBasedTypes[i] ) );
if ( !aElementNames.empty() )
@@ -1638,7 +1639,7 @@ namespace dbmm
|| !_rScriptType.getLength()
)
{
- OSL_ENSURE( false,
+ OSL_FAIL(
"MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow: no or unknown script type!" );
m_rLogger.logRecoverable( MigrationError(
ERR_UNKNOWN_SCRIPT_TYPE,
@@ -1656,7 +1657,7 @@ namespace dbmm
ScriptType eScriptType = eBasic;
if ( !lcl_getScriptTypeFromLanguage( sScriptLanguage, eScriptType ) )
{
- OSL_ENSURE( false,
+ OSL_FAIL(
"MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow: unknown script language!" );
m_rLogger.logRecoverable( MigrationError(
ERR_UNKNOWN_SCRIPT_LANGUAGE,
@@ -1667,7 +1668,7 @@ namespace dbmm
::rtl::OUString sLocation = xUri->getParameter(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "location" ) ) );
- if ( !sLocation.equalsAscii( "document" ) )
+ if ( !sLocation.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "document" ) ) )
{
// only document libraries must be migrated, of course
return false;
@@ -1677,7 +1678,7 @@ namespace dbmm
sal_Int32 nLibModuleSeparator = sScriptName.indexOf( '.' );
if ( nLibModuleSeparator < 0 )
{
- OSL_ENSURE( false,
+ OSL_FAIL(
"MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow: invalid/unknown location format!" );
m_rLogger.logRecoverable( MigrationError(
ERR_UNKNOWN_SCRIPT_NAME_FORMAT,
@@ -1835,7 +1836,7 @@ namespace dbmm
Reference< XInputStream > xInput( xISP->createInputStream(), UNO_QUERY_THROW );
Reference< XNameContainer > xDialogModel( m_aContext.createComponent( "com.sun.star.awt.UnoControlDialogModel" ), UNO_QUERY_THROW );
- ::xmlscript::importDialogModel( xInput, xDialogModel, m_aContext.getUNOContext() );
+ ::xmlscript::importDialogModel( xInput, xDialogModel, m_aContext.getUNOContext(), m_xDocumentModel );
// adjust the events of the dialog
impl_adjustDialogElementEvents_throw( xDialogModel );
@@ -1850,7 +1851,7 @@ namespace dbmm
}
// export dialog model
- xISP = ::xmlscript::exportDialogModel( xDialogModel, m_aContext.getUNOContext() );
+ xISP = ::xmlscript::exportDialogModel( xDialogModel, m_aContext.getUNOContext(), m_xDocumentModel );
_inout_rDialogLibraryElement <<= xISP;
}
catch( const Exception& )
@@ -1988,3 +1989,5 @@ namespace dbmm
//........................................................................
} // namespace dbmm
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/migrationengine.hxx b/dbaccess/source/ext/macromigration/migrationengine.hxx
index f0a8e9bf0..986bba551 100644
--- a/dbaccess/source/ext/macromigration/migrationengine.hxx
+++ b/dbaccess/source/ext/macromigration/migrationengine.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -98,3 +99,5 @@ namespace dbmm
//........................................................................
#endif // DBACCESS_MIGRATIONENGINE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/migrationerror.hxx b/dbaccess/source/ext/macromigration/migrationerror.hxx
index 21fa31e7f..d76a0b1bc 100644
--- a/dbaccess/source/ext/macromigration/migrationerror.hxx
+++ b/dbaccess/source/ext/macromigration/migrationerror.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -171,3 +172,4 @@ namespace dbmm
#endif // DBACCESS_MIGRATIONERROR_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/migrationlog.cxx b/dbaccess/source/ext/macromigration/migrationlog.cxx
index 7c83fb02d..3dacec263 100644
--- a/dbaccess/source/ext/macromigration/migrationlog.cxx
+++ b/dbaccess/source/ext/macromigration/migrationlog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -214,7 +215,7 @@ namespace dbmm
DocumentLogs::const_iterator docPos = m_pData->aDocumentLogs.find( _nDocID );
if ( docPos == m_pData->aDocumentLogs.end() )
{
- OSL_ENSURE( false, "MigrationLog::getNewLibraryName: document is not known!" );
+ OSL_FAIL( "MigrationLog::getNewLibraryName: document is not known!" );
return s_sEmptyString;
}
@@ -230,7 +231,7 @@ namespace dbmm
return lib->sNewName;
}
- OSL_ENSURE( false, "MigrationLog::getNewLibraryName: doc is known, but library isn't!" );
+ OSL_FAIL( "MigrationLog::getNewLibraryName: doc is known, but library isn't!" );
return s_sEmptyString;
}
@@ -432,7 +433,7 @@ namespace dbmm
DocumentLogs::const_iterator docPos = m_pData->aDocumentLogs.find( _nDocID );
if ( docPos == m_pData->aDocumentLogs.end() )
{
- OSL_ENSURE( false, "MigrationLog::movedAnyLibrary: document is not known!" );
+ OSL_FAIL( "MigrationLog::movedAnyLibrary: document is not known!" );
return false;
}
return !docPos->second.aMovedLibraries.empty();
@@ -510,3 +511,5 @@ namespace dbmm
//........................................................................
} // namespace dbmm
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/migrationlog.hxx b/dbaccess/source/ext/macromigration/migrationlog.hxx
index e5356eca5..1bcd0411c 100644
--- a/dbaccess/source/ext/macromigration/migrationlog.hxx
+++ b/dbaccess/source/ext/macromigration/migrationlog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -126,3 +127,5 @@ namespace dbmm
//........................................................................
#endif // DBACCESS_MIGRATIONLOG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/migrationprogress.hxx b/dbaccess/source/ext/macromigration/migrationprogress.hxx
index 613b1c238..44dbaf838 100644
--- a/dbaccess/source/ext/macromigration/migrationprogress.hxx
+++ b/dbaccess/source/ext/macromigration/migrationprogress.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,3 +57,5 @@ namespace dbmm
//........................................................................
#endif // DBACCESS_MIGRATIONPROGRESS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/progresscapture.cxx b/dbaccess/source/ext/macromigration/progresscapture.cxx
index 0c5de36f1..ee42bb8f9 100644
--- a/dbaccess/source/ext/macromigration/progresscapture.cxx
+++ b/dbaccess/source/ext/macromigration/progresscapture.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,7 @@
/** === end UNO includes === **/
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
//........................................................................
namespace dbmm
@@ -88,14 +89,14 @@ namespace dbmm
//--------------------------------------------------------------------
void ProgressCapture::dispose()
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
m_pData->bDisposed = true;
}
//--------------------------------------------------------------------
void SAL_CALL ProgressCapture::start( const ::rtl::OUString& _rText, ::sal_Int32 _nRange ) throw (RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if ( !m_pData->bDisposed )
m_pData->rMasterProgress.startObject( m_pData->sObjectName, _rText, _nRange );
}
@@ -103,7 +104,7 @@ namespace dbmm
//--------------------------------------------------------------------
void SAL_CALL ProgressCapture::end( ) throw (RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if ( !m_pData->bDisposed )
m_pData->rMasterProgress.endObject();
}
@@ -111,7 +112,7 @@ namespace dbmm
//--------------------------------------------------------------------
void SAL_CALL ProgressCapture::setText( const ::rtl::OUString& _rText ) throw (RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if ( !m_pData->bDisposed )
m_pData->rMasterProgress.setObjectProgressText( _rText );
}
@@ -119,7 +120,7 @@ namespace dbmm
//--------------------------------------------------------------------
void SAL_CALL ProgressCapture::setValue( ::sal_Int32 _nValue ) throw (RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if ( !m_pData->bDisposed )
m_pData->rMasterProgress.setObjectProgressValue( _nValue );
}
@@ -127,9 +128,11 @@ namespace dbmm
//--------------------------------------------------------------------
void SAL_CALL ProgressCapture::reset( ) throw (RuntimeException)
{
- OSL_ENSURE( false, "ProgressCapture::reset: not implemented!" );
+ OSL_FAIL( "ProgressCapture::reset: not implemented!" );
}
//........................................................................
} // namespace dbmm
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/progresscapture.hxx b/dbaccess/source/ext/macromigration/progresscapture.hxx
index 0b2aec9b4..720c76a74 100644
--- a/dbaccess/source/ext/macromigration/progresscapture.hxx
+++ b/dbaccess/source/ext/macromigration/progresscapture.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,5 @@ namespace dbmm
//........................................................................
#endif // DBACCESS_PROGRESSCAPTURE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/progressmixer.cxx b/dbaccess/source/ext/macromigration/progressmixer.cxx
index f530be082..22685b6ff 100644
--- a/dbaccess/source/ext/macromigration/progressmixer.cxx
+++ b/dbaccess/source/ext/macromigration/progressmixer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -214,3 +215,5 @@ namespace dbmm
//........................................................................
} // namespace dbmm
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/progressmixer.hxx b/dbaccess/source/ext/macromigration/progressmixer.hxx
index 2c9ac4b92..50506f931 100644
--- a/dbaccess/source/ext/macromigration/progressmixer.hxx
+++ b/dbaccess/source/ext/macromigration/progressmixer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -98,3 +99,5 @@ namespace dbmm
//........................................................................
#endif // DBACCESS_PROGRESSMIXER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ext/macromigration/rangeprogressbar.hxx b/dbaccess/source/ext/macromigration/rangeprogressbar.hxx
index 890324cf6..f4d1c840e 100644
--- a/dbaccess/source/ext/macromigration/rangeprogressbar.hxx
+++ b/dbaccess/source/ext/macromigration/rangeprogressbar.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,3 +103,5 @@ namespace dbmm
//........................................................................
#endif // DBACCESS_RANGEPROGRESSBAR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx
index e64c901b6..48cf7fac6 100644
--- a/dbaccess/source/filter/xml/dbloader2.cxx
+++ b/dbaccess/source/filter/xml/dbloader2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -121,7 +122,7 @@ public:
// static methods
static ::rtl::OUString getImplementationName_Static() throw( )
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbflt.DBTypeDetection");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbflt.DBTypeDetection"));
}
static Sequence< ::rtl::OUString> getSupportedServiceNames_Static(void) throw( );
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
@@ -167,7 +168,7 @@ DBTypeDetection::DBTypeDetection(const Reference< XMultiServiceFactory >& _rxFac
{
::rtl::OUString sMediaType;
xStorageProperties->getPropertyValue( INFO_MEDIATYPE ) >>= sMediaType;
- if ( sMediaType.equalsAscii(MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII) || sMediaType.equalsAscii(MIMETYPE_VND_SUN_XML_BASE_ASCII) )
+ if ( sMediaType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII)) || sMediaType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(MIMETYPE_VND_SUN_XML_BASE_ASCII)) )
{
if ( bStreamFromDescr && sURL.compareTo( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:stream" ) ), 14 ) != COMPARE_EQUAL )
{
@@ -230,7 +231,7 @@ Sequence< ::rtl::OUString > SAL_CALL DBTypeDetection::getSupportedServiceNames(v
Sequence< ::rtl::OUString > DBTypeDetection::getSupportedServiceNames_Static(void) throw( )
{
Sequence< ::rtl::OUString > aSNS( 1 );
- aSNS.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.document.ExtendedTypeDetection");
+ aSNS.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExtendedTypeDetection"));
return aSNS;
}
// -------------------------------------------------------------------------
@@ -261,7 +262,7 @@ public:
// static methods
static ::rtl::OUString getImplementationName_Static() throw( )
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbflt.DBContentLoader2");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbflt.DBContentLoader2"));
}
static Sequence< ::rtl::OUString> getSupportedServiceNames_Static(void) throw( );
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
@@ -329,7 +330,7 @@ Sequence< ::rtl::OUString > SAL_CALL DBContentLoader::getSupportedServiceNames(v
Sequence< ::rtl::OUString > DBContentLoader::getSupportedServiceNames_Static(void) throw( )
{
Sequence< ::rtl::OUString > aSNS( 1 );
- aSNS.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.frame.FrameLoader");
+ aSNS.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.FrameLoader"));
return aSNS;
}
@@ -348,12 +349,12 @@ namespace
URL aURL;
aURL.Complete = _rURL;
xTransformer->parseStrict( aURL );
- bDoesAllow = aURL.Arguments.equalsAscii( "Interactive" );
+ bDoesAllow = aURL.Arguments.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Interactive" ) );
}
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "lcl_urlAllowsInteraction: caught an exception while analyzing the URL!" );
+ OSL_FAIL( "lcl_urlAllowsInteraction: caught an exception while analyzing the URL!" );
}
return bDoesAllow;
}
@@ -618,14 +619,14 @@ IMPL_LINK( DBContentLoader, OnStartTableWizard, void*, /*NOTINTERESTEDIN*/ )
aValue.Value <<= m_sCurrentURL;
aWizArgs[0] <<= aValue;
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Reference< XJobExecutor > xTableWizard;
if ( m_aContext.createComponentWithArguments( "com.sun.star.wizards.table.CallTableWizard", aWizArgs, xTableWizard ) )
xTableWizard->trigger(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("start")));
}
catch(const Exception&)
{
- OSL_ENSURE(sal_False, "caught an exception while starting the table wizard!");
+ OSL_FAIL("caught an exception while starting the table wizard!");
}
m_xMySelf = NULL;
return 0L;
@@ -642,17 +643,18 @@ extern "C" void SAL_CALL writeDBLoaderInfo2(void* pRegistryKey)
Reference< XRegistryKey> xKey(reinterpret_cast< XRegistryKey*>(pRegistryKey));
// register content loader for dispatch
- ::rtl::OUString aImpl = ::rtl::OUString::createFromAscii("/");
+ ::rtl::OUString aImpl(RTL_CONSTASCII_USTRINGPARAM("/"));
aImpl += ::dbaxml::DBContentLoader::getImplementationName_Static();
::rtl::OUString aImpltwo = aImpl;
- aImpltwo += ::rtl::OUString::createFromAscii("/UNO/Loader");
+ aImpltwo += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/Loader"));
Reference< XRegistryKey> xNewKey = xKey->createKey( aImpltwo );
aImpltwo = aImpl;
- aImpltwo += ::rtl::OUString::createFromAscii("/Loader");
+ aImpltwo += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Loader"));
Reference< XRegistryKey > xLoaderKey = xKey->createKey( aImpltwo );
- xNewKey = xLoaderKey->createKey( ::rtl::OUString::createFromAscii("Pattern") );
- xNewKey->setAsciiValue( ::rtl::OUString::createFromAscii("private:factory/sdatabase") );
+ xNewKey = xLoaderKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Pattern")) );
+ xNewKey->setAsciiValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:factory/sdatabase")) );
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/makefile.mk b/dbaccess/source/filter/xml/makefile.mk
deleted file mode 100644
index e36173f5a..000000000
--- a/dbaccess/source/filter/xml/makefile.mk
+++ /dev/null
@@ -1,122 +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=dbaxml
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files -------------------------------------
-
-SLOFILES= $(SLO)$/xmlfilter.obj \
- $(SLO)$/dbloader2.obj \
- $(SLO)$/xmlDatabase.obj \
- $(SLO)$/xmlDataSource.obj \
- $(SLO)$/xmlTableFilterPattern.obj \
- $(SLO)$/xmlTableFilterList.obj \
- $(SLO)$/xmlDataSourceInfo.obj \
- $(SLO)$/xmlDataSourceSetting.obj \
- $(SLO)$/xmlDataSourceSettings.obj \
- $(SLO)$/xmlDocuments.obj \
- $(SLO)$/xmlComponent.obj \
- $(SLO)$/xmlHierarchyCollection.obj \
- $(SLO)$/xmlLogin.obj \
- $(SLO)$/xmlExport.obj \
- $(SLO)$/xmlQuery.obj \
- $(SLO)$/xmlTable.obj \
- $(SLO)$/xmlColumn.obj \
- $(SLO)$/xmlStyleImport.obj \
- $(SLO)$/xmlHelper.obj \
- $(SLO)$/xmlAutoStyle.obj \
- $(SLO)$/xmlConnectionData.obj \
- $(SLO)$/xmlDatabaseDescription.obj \
- $(SLO)$/xmlFileBasedDatabase.obj \
- $(SLO)$/xmlServerDatabase.obj \
- $(SLO)$/xmlConnectionResource.obj \
- $(SLO)$/xmlservices.obj
-
-# --- Library -----------------------------------
-LIB1TARGET=$(SLB)$/dba_flt.lib
-LIB1FILES=\
- $(SLB)$/fltshared.lib \
- $(SLB)$/$(TARGET).lib
-
-SHL1TARGET=$(TARGET)$(DLLPOSTFIX)
-
-SHL1STDLIBS=\
- $(XMLOFFLIB) \
- $(VCLLIB) \
- $(TOOLSLIB) \
- $(TKLIB) \
- $(COMPHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SFXLIB) \
- $(SVLLIB) \
- $(DBTOOLSLIB) \
- $(UNOTOOLSLIB) \
- $(SO2LIB) \
- $(SALLIB)
-
-.IF "$(GUI)"=="OS2"
-SHL1STDLIBS+= \
- idba.lib
-.ELIF "$(GUI)"!="WNT" || "$(COM)"=="GCC"
-SHL1STDLIBS+= \
- -ldba$(DLLPOSTFIX)
-.ELSE
-SHL1STDLIBS+= \
- idba.lib
-.ENDIF
-
-
-SHL1DEPN=
-SHL1LIBS=$(LIB1TARGET)
-SHL1IMPLIB= i$(SHL1TARGET)
-# SHL1LIBS= $(SLB)$/$(TARGET).lib
-SHL1VERSIONMAP=$(SOLARENV)/src/component.map
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-
-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/xmlAutoStyle.cxx b/dbaccess/source/filter/xml/xmlAutoStyle.cxx
index bf228833e..8685f6845 100644
--- a/dbaccess/source/filter/xml/xmlAutoStyle.cxx
+++ b/dbaccess/source/filter/xml/xmlAutoStyle.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,21 +28,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLAUTOSTYLE_HXX
#include "xmlAutoStyle.hxx"
-#endif
-#ifndef DBA_XMLHELPER_HXX
#include "xmlHelper.hxx"
-#endif
-#ifndef DBA_XMLEXPORT_HXX
#include "xmlExport.hxx"
-#endif
-#ifndef _XMLOFF_FAMILIES_HXX_
#include <xmloff/families.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
namespace dbaxml
{
using namespace ::com::sun::star::uno;
@@ -107,3 +98,5 @@ OXMLAutoStylePoolP::~OXMLAutoStylePoolP()
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlAutoStyle.hxx b/dbaccess/source/filter/xml/xmlAutoStyle.hxx
index 3c6427ef0..5d7083794 100644
--- a/dbaccess/source/filter/xml/xmlAutoStyle.hxx
+++ b/dbaccess/source/filter/xml/xmlAutoStyle.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,18 +27,10 @@
************************************************************************/
#ifndef DBA_XMLAUTOSTYLE_HXX
#define DBA_XMLAUTOSTYLE_HXX
-#ifndef _XMLOFF_PROPMAPPINGTYPES_HXX
#include <xmloff/maptype.hxx>
-#endif
-#ifndef _XMLOFF_XMLASTPLP_HXX
#include <xmloff/xmlaustp.hxx>
-#endif
-#ifndef _XMLOFF_XMLTYPES_HXX
#include <xmloff/xmltypes.hxx>
-#endif
-#ifndef _XMLOFF_PROPERTYSETMAPPER_HXX
#include <xmloff/xmlprmap.hxx>
-#endif
namespace dbaxml
{
@@ -64,3 +57,4 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLAUTOSTYLE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlColumn.cxx b/dbaccess/source/filter/xml/xmlColumn.cxx
index bca24ac0b..4a092160d 100644
--- a/dbaccess/source/filter/xml/xmlColumn.cxx
+++ b/dbaccess/source/filter/xml/xmlColumn.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,49 +28,21 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLCOLUMN_HXX
#include "xmlColumn.hxx"
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLUCONV_HXX
#include <xmloff/xmluconv.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
#include <com/sun/star/container/XChild.hpp>
-#ifndef DBA_XMLSTYLEIMPORT_HXX
#include "xmlStyleImport.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
namespace dbaxml
{
@@ -119,7 +92,7 @@ OXMLColumn::OXMLColumn( ODBFilter& rImport
m_sHelpMessage = sValue;
break;
case XML_TOK_COLUMN_VISIBILITY:
- m_bHidden = !sValue.equalsAscii("visible");
+ m_bHidden = !sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("visible"));
break;
case XML_TOK_COLUMN_TYPE_NAME:
sType = sValue;
@@ -128,10 +101,9 @@ OXMLColumn::OXMLColumn( ODBFilter& rImport
case XML_TOK_COLUMN_DEFAULT_VALUE:
if ( sValue.getLength() && sType.getLength() )
m_aDefaultValue <<= sValue;
- // SvXMLUnitConverter::convertAny(m_aDefaultValue,sType,sValue);
break;
case XML_TOK_COLUMN_VISIBLE:
- m_bHidden = sValue.equalsAscii("false");
+ m_bHidden = sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("false"));
break;
case XML_TOK_DEFAULT_CELL_STYLE_NAME:
m_sCellStyleName = sValue;
@@ -179,7 +151,7 @@ void OXMLColumn::EndElement()
pAutoStyle->FillPropertySet(xProp);
}
}
- } // if ( m_sStyleName.getLength() )
+ }
if ( m_sCellStyleName.getLength() )
{
const SvXMLStylesContext* pAutoStyles = GetOwnImport().GetAutoStyles();
@@ -196,7 +168,7 @@ void OXMLColumn::EndElement()
}
}
- } // if ( xFac.is() && m_sName.getLength() )
+ }
else if ( m_sCellStyleName.getLength() )
{
const SvXMLStylesContext* pAutoStyles = GetOwnImport().GetAutoStyles();
@@ -219,3 +191,5 @@ ODBFilter& OXMLColumn::GetOwnImport()
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlColumn.hxx b/dbaccess/source/filter/xml/xmlColumn.hxx
index 462560c29..583a0a727 100644
--- a/dbaccess/source/filter/xml/xmlColumn.hxx
+++ b/dbaccess/source/filter/xml/xmlColumn.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,3 +65,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLCOLUMN_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlComponent.cxx b/dbaccess/source/filter/xml/xmlComponent.cxx
index 0828989eb..59a9a15fa 100644
--- a/dbaccess/source/filter/xml/xmlComponent.cxx
+++ b/dbaccess/source/filter/xml/xmlComponent.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,39 +28,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLCOMPONENT_HXX
#include "xmlComponent.hxx"
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
namespace dbaxml
{
@@ -153,3 +132,5 @@ OXMLComponent::~OXMLComponent()
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlComponent.hxx b/dbaccess/source/filter/xml/xmlComponent.hxx
index 8e3237cef..0aa1fde81 100644
--- a/dbaccess/source/filter/xml/xmlComponent.hxx
+++ b/dbaccess/source/filter/xml/xmlComponent.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBA_XMLCOMPONENT_HXX
#define DBA_XMLCOMPONENT_HXX
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
namespace dbaxml
@@ -62,3 +59,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLCOMPONENT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlConnectionData.cxx b/dbaccess/source/filter/xml/xmlConnectionData.cxx
index 0252a05a8..0edb8a9e3 100644
--- a/dbaccess/source/filter/xml/xmlConnectionData.cxx
+++ b/dbaccess/source/filter/xml/xmlConnectionData.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,37 +28,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLCONNECTIONDATA_HXX_INCLUDED
#include "xmlConnectionData.hxx"
-#endif
-#ifndef DBA_XMLLOGIN_HXX
#include "xmlLogin.hxx"
-#endif
-#ifndef DBA_XMLTABLEFILTERLIST_HXX
#include "xmlTableFilterList.hxx"
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
#include "xmlEnums.hxx"
#include "xmlDatabaseDescription.hxx"
#include "xmlConnectionResource.hxx"
#include "xmlstrings.hrc"
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
namespace dbaxml
{
@@ -116,7 +99,7 @@ SvXMLImportContext* OXMLConnectionData::CreateChildContext(
if ( !m_bFoundOne )
{
m_bFoundOne = true;
- OSL_ENSURE(0,"Not supported yet!");
+ OSL_FAIL("Not supported yet!");
}
break;
}
@@ -135,3 +118,5 @@ ODBFilter& OXMLConnectionData::GetOwnImport()
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlConnectionData.hxx b/dbaccess/source/filter/xml/xmlConnectionData.hxx
index 8b1a959db..0dd3bd493 100644
--- a/dbaccess/source/filter/xml/xmlConnectionData.hxx
+++ b/dbaccess/source/filter/xml/xmlConnectionData.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBA_XMLCONNECTIONDATA_HXX_INCLUDED
#define DBA_XMLCONNECTIONDATA_HXX_INCLUDED
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
#include <vector>
namespace dbaxml
@@ -58,3 +55,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLCONNECTIONDATA_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlConnectionResource.cxx b/dbaccess/source/filter/xml/xmlConnectionResource.cxx
index db3ddd116..53c40ee68 100644
--- a/dbaccess/source/filter/xml/xmlConnectionResource.cxx
+++ b/dbaccess/source/filter/xml/xmlConnectionResource.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,33 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLCONNECTIONRESOURCE_HXX_INCLUDED
#include "xmlConnectionResource.hxx"
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
namespace dbaxml
{
@@ -94,7 +77,7 @@ OXMLConnectionResource::OXMLConnectionResource( ODBFilter& rImport,
{
xDataSource->setPropertyValue(PROPERTY_URL,makeAny(sValue));
}
- catch(Exception)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -128,3 +111,5 @@ OXMLConnectionResource::~OXMLConnectionResource()
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlConnectionResource.hxx b/dbaccess/source/filter/xml/xmlConnectionResource.hxx
index f95cbb00d..ecae54328 100644
--- a/dbaccess/source/filter/xml/xmlConnectionResource.hxx
+++ b/dbaccess/source/filter/xml/xmlConnectionResource.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBA_XMLCONNECTIONRESOURCE_HXX_INCLUDED
#define DBA_XMLCONNECTIONRESOURCE_HXX_INCLUDED
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
#include <vector>
namespace dbaxml
@@ -53,3 +50,4 @@ namespace dbaxml
#endif // DBA_XMLCONNECTIONRESOURCE_HXX_INCLUDED
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlDataSource.cxx b/dbaccess/source/filter/xml/xmlDataSource.cxx
index 93134c4aa..13018ed86 100644
--- a/dbaccess/source/filter/xml/xmlDataSource.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSource.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,48 +28,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLDATASOURCE_HXX
#include "xmlDataSource.hxx"
-#endif
-#ifndef DBA_XMLLOGIN_HXX
#include "xmlLogin.hxx"
-#endif
-#ifndef DBA_XMLTABLEFILTERLIST_HXX
#include "xmlTableFilterList.hxx"
-#endif
-#ifndef DBA_XMLDATASOURCEINFO_HXX
#include "xmlDataSourceInfo.hxx"
-#endif
-#ifndef DBA_XMLDATASOURCESETTINGS_HXX
#include "xmlDataSourceSettings.hxx"
-#endif
-#ifndef DBA_XMLDATASOURCESETTING_HXX
#include "xmlDataSourceSetting.hxx"
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
#include "xmlConnectionData.hxx"
namespace dbaxml
@@ -115,7 +88,7 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
{
xDataSource->setPropertyValue(PROPERTY_URL,makeAny(sValue));
}
- catch(Exception)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -126,7 +99,7 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
xDataSource->setPropertyValue(PROPERTY_SUPPRESSVERSIONCL,makeAny(sValue == s_sTRUE ? sal_True : sal_False));
bFoundSuppressVersionColumns = true;
}
- catch(Exception)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -173,13 +146,13 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
break;
case XML_TOK_BOOLEAN_COMPARISON_MODE:
aProperty.Name = PROPERTY_BOOLEANCOMPARISONMODE;
- if ( sValue.equalsAscii("equal-integer") )
+ if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("equal-integer")) )
aProperty.Value <<= sal_Int32(0);
- else if ( sValue.equalsAscii("is-boolean") )
+ else if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("is-boolean")) )
aProperty.Value <<= sal_Int32(1);
- else if ( sValue.equalsAscii("equal-boolean") )
+ else if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("equal-boolean")) )
aProperty.Value <<= sal_Int32(2);
- else if ( sValue.equalsAscii("equal-use-only-zero") )
+ else if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("equal-use-only-zero")) )
aProperty.Value <<= sal_Int32(3);
break;
case XML_TOK_USE_CATALOG:
@@ -230,7 +203,7 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
{
xDataSource->setPropertyValue(PROPERTY_SUPPRESSVERSIONCL,makeAny(sal_True));
}
- catch(Exception)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -307,3 +280,5 @@ ODBFilter& OXMLDataSource::GetOwnImport()
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlDataSource.hxx b/dbaccess/source/filter/xml/xmlDataSource.hxx
index f92e1476f..1f95f9c14 100644
--- a/dbaccess/source/filter/xml/xmlDataSource.hxx
+++ b/dbaccess/source/filter/xml/xmlDataSource.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBA_XMLDATASOURCE_HXX
#define DBA_XMLDATASOURCE_HXX
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
#include <vector>
namespace dbaxml
@@ -64,3 +61,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLDATASOURCE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx b/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
index 6e978e825..bfd5f54d7 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,36 +28,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLDATASOURCEINFO_HXX
#include "xmlDataSourceInfo.hxx"
-#endif
-#ifndef DBA_XMLDATASOURCE_HXX
#include "xmlDataSource.hxx"
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
#include <vector>
namespace dbaxml
@@ -150,7 +131,7 @@ OXMLDataSourceInfo::OXMLDataSourceInfo( ODBFilter& rImport
aProperty.Name = INFO_THOUSANDSDELIMITER;
aProperty.Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
rImport.addInfo(aProperty);
- } // if ( !bFoundThousand )
+ }
}
if ( XML_TOK_FONT_CHARSET == _nToken && !bFoundCharset )
{
@@ -171,3 +152,5 @@ OXMLDataSourceInfo::~OXMLDataSourceInfo()
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlDataSourceInfo.hxx b/dbaccess/source/filter/xml/xmlDataSourceInfo.hxx
index e09214058..56274429a 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceInfo.hxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceInfo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBA_XMLDATASOURCEINFO_HXX
#define DBA_XMLDATASOURCEINFO_HXX
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
namespace dbaxml
{
@@ -50,3 +49,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLDATASOURCEINFO_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
index 336c33206..c460aca03 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,36 +28,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLDATASOURCESETTING_HXX
#include "xmlDataSourceSetting.hxx"
-#endif
-#ifndef DBA_XMLDATASOURCE_HXX
#include "xmlDataSource.hxx"
-#endif
-#ifndef _XMLOFF_XMLUCONV_HXX
#include <xmloff/xmluconv.hxx>
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
namespace dbaxml
{
@@ -92,7 +73,7 @@ OXMLDataSourceSetting::OXMLDataSourceSetting( ODBFilter& rImport
switch( rTokenMap.Get( nPrefix, sLocalName ) )
{
case XML_TOK_DATA_SOURCE_SETTING_IS_LIST:
- m_bIsList = sValue.equalsAscii("true");
+ m_bIsList = sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true"));
break;
case XML_TOK_DATA_SOURCE_SETTING_TYPE:
{
@@ -207,7 +188,7 @@ Any OXMLDataSourceSetting::convertString(const ::com::sun::star::uno::Type& _rEx
{
case TypeClass_BOOLEAN: // sal_Bool
{
- sal_Bool bValue;
+ bool bValue;
#if OSL_DEBUG_LEVEL > 0
sal_Bool bSuccess =
#endif
@@ -239,7 +220,7 @@ Any OXMLDataSourceSetting::convertString(const ::com::sun::star::uno::Type& _rEx
}
case TypeClass_HYPER:
{
- OSL_ENSURE(sal_False, "OXMLDataSourceSetting::convertString: 64-bit integers not implemented yet!");
+ OSL_FAIL("OXMLDataSourceSetting::convertString: 64-bit integers not implemented yet!");
}
break;
case TypeClass_DOUBLE:
@@ -260,7 +241,7 @@ Any OXMLDataSourceSetting::convertString(const ::com::sun::star::uno::Type& _rEx
aReturn <<= _rReadCharacters;
break;
default:
- OSL_ENSURE(sal_False, "OXMLDataSourceSetting::convertString: invalid type class!");
+ OSL_FAIL("OXMLDataSourceSetting::convertString: invalid type class!");
}
return aReturn;
@@ -269,3 +250,5 @@ Any OXMLDataSourceSetting::convertString(const ::com::sun::star::uno::Type& _rEx
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx
index c6515e503..ccea90fe1 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef DBA_XMLDATASOURCESETTING_HXX
#define DBA_XMLDATASOURCESETTING_HXX
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
-#endif
namespace dbaxml
{
@@ -79,3 +74,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLDATASOURCESETTING_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlDataSourceSettings.cxx b/dbaccess/source/filter/xml/xmlDataSourceSettings.cxx
index 99c0db9e4..d14425f0f 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceSettings.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceSettings.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,36 +28,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLDATASOURCESETTINGS_HXX
#include "xmlDataSourceSettings.hxx"
-#endif
-#ifndef DBA_XMLDATASOURCESETTING_HXX
#include "xmlDataSourceSetting.hxx"
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
#include <vector>
@@ -112,3 +93,5 @@ ODBFilter& OXMLDataSourceSettings::GetOwnImport()
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlDataSourceSettings.hxx b/dbaccess/source/filter/xml/xmlDataSourceSettings.hxx
index 3855ef182..9d14fc40c 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceSettings.hxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceSettings.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBA_XMLDATASOURCESETTINGS_HXX
#define DBA_XMLDATASOURCESETTINGS_HXX
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
namespace dbaxml
{
@@ -51,3 +50,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLDATASOURCESETTINGS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlDatabase.cxx b/dbaccess/source/filter/xml/xmlDatabase.cxx
index f1a696a1a..1ef776684 100644
--- a/dbaccess/source/filter/xml/xmlDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlDatabase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -156,3 +157,5 @@ void OXMLDatabase::EndElement()
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlDatabase.hxx b/dbaccess/source/filter/xml/xmlDatabase.hxx
index b599f2769..588ef668f 100644
--- a/dbaccess/source/filter/xml/xmlDatabase.hxx
+++ b/dbaccess/source/filter/xml/xmlDatabase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBA_XMLDATABASE_HXX
#define DBA_XMLDATABASE_HXX
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
namespace dbaxml
{
@@ -54,3 +53,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLDATABASE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlDatabaseDescription.cxx b/dbaccess/source/filter/xml/xmlDatabaseDescription.cxx
index 42cdc5a45..7ef8256b0 100644
--- a/dbaccess/source/filter/xml/xmlDatabaseDescription.cxx
+++ b/dbaccess/source/filter/xml/xmlDatabaseDescription.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,34 +28,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLDATABASEDESCRIPTION_HXX_INCLUDED
#include "xmlDatabaseDescription.hxx"
-#endif
-#ifndef DBA_XMLLOGIN_HXX
#include "xmlLogin.hxx"
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
#include "xmlEnums.hxx"
#include "xmlFileBasedDatabase.hxx"
#include "xmlServerDatabase.hxx"
#include "xmlstrings.hrc"
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
namespace dbaxml
{
@@ -120,3 +105,5 @@ ODBFilter& OXMLDatabaseDescription::GetOwnImport()
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlDatabaseDescription.hxx b/dbaccess/source/filter/xml/xmlDatabaseDescription.hxx
index 42e5bc53f..1f3224683 100644
--- a/dbaccess/source/filter/xml/xmlDatabaseDescription.hxx
+++ b/dbaccess/source/filter/xml/xmlDatabaseDescription.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBA_XMLDATABASEDESCRIPTION_HXX_INCLUDED
#define DBA_XMLDATABASEDESCRIPTION_HXX_INCLUDED
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
#include <vector>
namespace dbaxml
@@ -58,3 +55,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLDATABASEDESCRIPTION_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlDocuments.cxx b/dbaccess/source/filter/xml/xmlDocuments.cxx
index 74715f9d4..32ddca65e 100644
--- a/dbaccess/source/filter/xml/xmlDocuments.cxx
+++ b/dbaccess/source/filter/xml/xmlDocuments.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,39 +28,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLDOCUMENTS_HXX
#include "xmlDocuments.hxx"
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef DBA_XMLQUERY_HXX
#include "xmlQuery.hxx"
-#endif
-#ifndef DBA_XMLTABLE_HXX
#include "xmlTable.hxx"
-#endif
-#ifndef DBA_XMLCOMPONENT_HXX
#include "xmlComponent.hxx"
-#endif
-#ifndef DBA_XMLHIERARCHYCOLLECTION_HXX
#include "xmlHierarchyCollection.hxx"
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
namespace dbaxml
{
@@ -126,7 +105,6 @@ SvXMLImportContext* OXMLDocuments::CreateChildContext(
GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
pContext = new OXMLComponent( GetOwnImport(), nPrefix, rLocalName,xAttrList,m_xContainer,m_sComponentServiceName );
break;
- // case XML_TOK_QUERY_COLLECTION:
case XML_TOK_COMPONENT_COLLECTION:
GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
pContext = new OXMLHierarchyCollection( GetOwnImport(), nPrefix, rLocalName,xAttrList,m_xContainer,m_sCollectionServiceName,m_sComponentServiceName );
@@ -148,3 +126,5 @@ ODBFilter& OXMLDocuments::GetOwnImport()
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlDocuments.hxx b/dbaccess/source/filter/xml/xmlDocuments.hxx
index 486d7d3d3..98f415360 100644
--- a/dbaccess/source/filter/xml/xmlDocuments.hxx
+++ b/dbaccess/source/filter/xml/xmlDocuments.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef DBA_XMLDOCUMENTS_HXX
#define DBA_XMLDOCUMENTS_HXX
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
namespace dbaxml
{
@@ -77,3 +72,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLDOCUMENTS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlEnums.hxx b/dbaccess/source/filter/xml/xmlEnums.hxx
index 816ac5b53..c43ab6b00 100644
--- a/dbaccess/source/filter/xml/xmlEnums.hxx
+++ b/dbaccess/source/filter/xml/xmlEnums.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -170,3 +171,5 @@ namespace dbaxml
} // namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLENUMS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 9732a09ff..fa6bf1bcc 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,6 +60,7 @@
#include <tools/diagnose_ex.h>
#include <connectivity/DriversConfig.hxx>
#include <connectivity/dbtools.hxx>
+#include <sal/macros.h>
#include <boost/optional.hpp>
@@ -116,13 +118,13 @@ namespace dbaxml
//---------------------------------------------------------------------
::rtl::OUString SAL_CALL ODBExportHelper::getImplementationName_Static( ) throw (RuntimeException)
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.sdb.XMLSettingsExporter");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdb.XMLSettingsExporter"));
}
//---------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL ODBExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aSupported(1);
- aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.document.ExportFilter");
+ aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter"));
return aSupported;
}
@@ -135,13 +137,13 @@ namespace dbaxml
//---------------------------------------------------------------------
::rtl::OUString SAL_CALL ODBFullExportHelper::getImplementationName_Static( ) throw (RuntimeException)
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.sdb.XMLFullExporter");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdb.XMLFullExporter"));
}
//---------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL ODBFullExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aSupported(1);
- aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.document.ExportFilter");
+ aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter"));
return aSupported;
}
@@ -177,7 +179,7 @@ namespace dbaxml
return s_sTypeInteger;
default:
- OSL_ENSURE( false, "lcl_implGetPropertyXMLType: unsupported value type!" );
+ OSL_FAIL( "lcl_implGetPropertyXMLType: unsupported value type!" );
return s_sTypeDouble;
}
}
@@ -239,36 +241,32 @@ ODBExport::ODBExport(const Reference< XMultiServiceFactory >& _rxMSF,sal_uInt16
m_xExportHelper = new SvXMLExportPropertyMapper(GetTableStylesPropertySetMapper());
m_xColumnExportHelper = new OSpecialHanldeXMLExportPropertyMapper(GetColumnStylesPropertySetMapper());
- //UniReference < XMLPropertySetMapper > xCellStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetCellStylesPropertySetMapper(),m_xPropHdlFactory);
- //m_xCellExportHelper = new OSpecialHanldeXMLExportPropertyMapper(xCellStylesPropertySetMapper);
- //m_xCellExportHelper = new OSpecialHanldeXMLExportPropertyMapper(GetCellStylesPropertySetMapper());
- //m_xCellExportHelper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(*this));
m_xCellExportHelper = new OSpecialHanldeXMLExportPropertyMapper(GetCellStylesPropertySetMapper());
m_xRowExportHelper = new OSpecialHanldeXMLExportPropertyMapper(OXMLHelper::GetRowStylesPropertySetMapper());
GetAutoStylePool()->AddFamily(
XML_STYLE_FAMILY_TABLE_TABLE,
- rtl::OUString::createFromAscii( XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME )),
m_xExportHelper.get(),
- rtl::OUString::createFromAscii( XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX ));
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX )));
GetAutoStylePool()->AddFamily(
XML_STYLE_FAMILY_TABLE_COLUMN,
- rtl::OUString::createFromAscii( XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME )),
m_xColumnExportHelper.get(),
- rtl::OUString::createFromAscii( XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX ));
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX )));
GetAutoStylePool()->AddFamily(
XML_STYLE_FAMILY_TABLE_CELL,
- rtl::OUString::createFromAscii( XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME )),
m_xCellExportHelper.get(),
- rtl::OUString::createFromAscii( XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX ));
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX )));
GetAutoStylePool()->AddFamily(
XML_STYLE_FAMILY_TABLE_ROW,
- rtl::OUString::createFromAscii( XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME )),
m_xRowExportHelper.get(),
- rtl::OUString::createFromAscii( XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX ));
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX )));
}
// -----------------------------------------------------------------------------
IMPLEMENT_SERVICE_INFO1_STATIC( ODBExport, "com.sun.star.comp.sdb.DBExportFilter", "com.sun.star.document.ExportFilter")
@@ -370,7 +368,7 @@ void ODBExport::exportDataSource()
};
bool bIsXMLDefault = false;
- for ( size_t i=0; i < sizeof( aTokens ) / sizeof( aTokens[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS( aTokens ); ++i )
{
if ( pProperties->Name == aTokens[i].sPropertyName )
{
@@ -406,15 +404,15 @@ void ODBExport::exportDataSource()
{
sal_Int32 nValue = 0;
aValue >>= nValue;
- if ( sValue.equalsAscii("0") )
+ if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("0")) )
sValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("equal-integer"));
- else if ( sValue.equalsAscii("1") )
+ else if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("1")) )
sValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("is-boolean"));
- else if ( sValue.equalsAscii("2") )
+ else if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")) )
sValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("equal-boolean"));
- else if ( sValue.equalsAscii("3") )
+ else if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("3")) )
sValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("equal-use-only-zero"));
- if ( sValue.equalsAscii("equal-integer") )
+ if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("equal-integer")) )
continue;
eToken = XML_BOOLEAN_COMPARISON_MODE;
}
@@ -504,7 +502,7 @@ void ODBExport::exportApplicationConnectionSettings(const TSettingsMap& _aSettin
,XML_MAX_ROW_COUNT
,XML_SUPPRESS_VERSION_COLUMNS
};
- for (size_t i = 0; i< sizeof(pSettings)/sizeof(pSettings[0]); ++i)
+ for (size_t i = 0; i< SAL_N_ELEMENTS(pSettings); ++i)
{
TSettingsMap::const_iterator aFind = _aSettings.find(pSettings[i]);
if ( aFind != _aSettings.end() )
@@ -537,7 +535,7 @@ void ODBExport::exportDriverSettings(const TSettingsMap& _aSettings)
,XML_IS_FIRST_ROW_HEADER_LINE
,XML_PARAMETER_NAME_SUBSTITUTION
};
- for (size_t i = 0; i< sizeof(pSettings)/sizeof(pSettings[0]); ++i)
+ for (size_t i = 0; i< SAL_N_ELEMENTS(pSettings); ++i)
{
TSettingsMap::const_iterator aFind = _aSettings.find(pSettings[i]);
if ( aFind != _aSettings.end() )
@@ -572,7 +570,7 @@ void ODBExport::exportConnectionData()
sURL.append(sal_Unicode('/'));
AddAttribute(XML_NAMESPACE_XLINK,XML_HREF,GetRelativeReference(sURL.makeStringAndClear()));
- } // if ( sOrigUrl == sFileName )
+ }
else
AddAttribute(XML_NAMESPACE_XLINK,XML_HREF,sOrigUrl);
AddAttribute(XML_NAMESPACE_DB,XML_MEDIA_TYPE,m_aTypeCollection.getMediaType(sValue));
@@ -593,7 +591,6 @@ void ODBExport::exportConnectionData()
}
catch(const Exception&)
{
- // nii
}
SvXMLElementExport aFileBasedDB(*this,XML_NAMESPACE_DB, XML_FILE_BASED_DATABASE, sal_True, sal_True);
}
@@ -640,7 +637,7 @@ void ODBExport::exportConnectionData()
};
for ( size_t i=0;
- i < sizeof( aProperties ) / sizeof( aProperties[0] );
+ i < SAL_N_ELEMENTS( aProperties );
++i
)
{
@@ -742,7 +739,7 @@ void ODBExport::exportDataSourceSettings()
pSequenceIterator.reset( new OSequenceIterator< Any >( aIter->Value ) );
break;
default:
- OSL_ENSURE(sal_False, "unsupported sequence type !");
+ OSL_FAIL("unsupported sequence type !");
break;
}
if ( pSequenceIterator.get() )
@@ -1160,7 +1157,7 @@ void ODBExport::exportAutoStyle(XPropertySet* _xProp)
};
::std::vector< XMLPropertyState > aPropertyStates;
- for (size_t i = 0 ; i < sizeof(pExportHelper)/sizeof(pExportHelper[0]); ++i)
+ for (size_t i = 0 ; i < SAL_N_ELEMENTS(pExportHelper); ++i)
{
aPropertyStates = pExportHelper[i].first->Filter(_xProp);
if ( !aPropertyStates.empty() )
@@ -1192,7 +1189,7 @@ void ODBExport::exportAutoStyle(XPropertySet* _xProp)
exportCollection(xCollection,XML_TOKEN_INVALID,XML_TOKEN_INVALID,sal_False,aMemFunc);
}
}
- catch(Exception&)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -1204,7 +1201,7 @@ void ODBExport::exportAutoStyle(XPropertySet* _xProp)
TExportPropMapperPair(m_xColumnExportHelper,TEnumMapperPair(&m_aAutoStyleNames,XML_STYLE_FAMILY_TABLE_COLUMN ))
,TExportPropMapperPair(m_xCellExportHelper,TEnumMapperPair(&m_aCellAutoStyleNames,XML_STYLE_FAMILY_TABLE_CELL))
};
- for (size_t i = 0 ; i < sizeof(pExportHelper)/sizeof(pExportHelper[0]); ++i)
+ for (size_t i = 0 ; i < SAL_N_ELEMENTS(pExportHelper); ++i)
{
::std::vector< XMLPropertyState > aPropStates = pExportHelper[i].first->Filter( _xProp );
if ( !aPropStates.empty() )
@@ -1232,9 +1229,9 @@ void ODBExport::exportAutoStyle(XPropertySet* _xProp)
}
}
++aItr;
- } // while ( aItr != aEnd )
+ }
- } // if ( !aPropStates.empty() )
+ }
if ( XML_STYLE_FAMILY_TABLE_CELL == pExportHelper[i].second.second )
::std::copy( m_aCurrentPropertyStates.begin(), m_aCurrentPropertyStates.end(), ::std::back_inserter( aPropStates ));
if ( !aPropStates.empty() )
@@ -1326,9 +1323,9 @@ void ODBExport::GetViewSettings(Sequence<PropertyValue>& aProps)
}
aProps[nLength].Value <<= aQueries;
}
- catch(Exception)
+ catch(const Exception&)
{
- OSL_ENSURE(0,"ODBExport::GetViewSettings: Exception catched!");
+ OSL_FAIL("ODBExport::GetViewSettings: Exception caught!");
}
}
}
@@ -1353,9 +1350,9 @@ void ODBExport::GetConfigurationSettings(Sequence<PropertyValue>& aProps)
aProps[nLength].Value = aValue;
}
}
- catch(Exception)
+ catch(const Exception&)
{
- OSL_ENSURE(0,"Could not access layout information from the data source!");
+ OSL_FAIL("Could not access layout information from the data source!");
}
}
}
@@ -1386,7 +1383,7 @@ void ODBExport::GetConfigurationSettings(Sequence<PropertyValue>& aProps)
GetMM100UnitConverter().convertNumber(aBuffer, getINT32(_rValue));
break;
default:
- OSL_ENSURE(0,"ODBExport::implConvertAny: Invalid type");
+ OSL_FAIL("ODBExport::implConvertAny: Invalid type");
}
return aBuffer.makeStringAndClear();
@@ -1453,3 +1450,5 @@ void ODBExport::collectComponentStyles()
// -----------------------------------------------------------------------------
}// dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx
index de2e4acf8..ae27e2349 100644
--- a/dbaccess/source/filter/xml/xmlExport.hxx
+++ b/dbaccess/source/filter/xml/xmlExport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,70 +29,28 @@
#ifndef DBA_XMLEXPORT_HXX
#define DBA_XMLEXPORT_HXX
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_
#include <com/sun/star/container/XNamed.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DOCUMENT_XFILTER_HPP_
#include <com/sun/star/document/XFilter.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DOCUMENT_XIMPORTER_HPP_
#include <com/sun/star/document/XImporter.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DOCUMENT_XEXPORTER_HPP_
#include <com/sun/star/document/XExporter.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
#include <com/sun/star/lang/XInitialization.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_
#include <com/sun/star/lang/XComponent.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE5_HXX_
#include <cppuhelper/implbase5.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_XACTIVEDATASOURCE_HPP_
#include <com/sun/star/io/XActiveDataSource.hpp>
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef _UNOTOOLS_TEMPFILE_HXX
#include <unotools/tempfile.hxx>
-#endif
-#ifndef _UNOTOOLS_LOCALFILEHELPER_HXX
#include <unotools/localfilehelper.hxx>
-#endif
-#ifndef _UNTOOLS_UCBSTREAMHELPER_HXX
#include <unotools/ucbstreamhelper.hxx>
-#endif
-#ifndef _XMLOFF_XMLEXP_HXX
#include <xmloff/xmlexp.hxx>
-#endif
-#ifndef _XMLOFF_XMLIMP_HXX
#include <xmloff/xmlimp.hxx>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
#include "dsntypes.hxx"
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
#include <memory>
@@ -241,3 +200,5 @@ public:
} // dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLEXPORT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
index 2f6e150d3..53b6cca68 100644
--- a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,33 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLFILEBASEDDATABASE_HXX_INCLUDED
#include "xmlFileBasedDatabase.hxx"
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
#include <comphelper/sequence.hxx>
#include <svl/filenotation.hxx>
#include <unotools/pathoptions.hxx>
@@ -134,7 +117,7 @@ OXMLFileBasedDatabase::OXMLFileBasedDatabase( ODBFilter& rImport,
{
xDataSource->setPropertyValue(PROPERTY_URL,makeAny(sURL));
}
- catch(Exception)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -151,3 +134,5 @@ OXMLFileBasedDatabase::~OXMLFileBasedDatabase()
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlFileBasedDatabase.hxx b/dbaccess/source/filter/xml/xmlFileBasedDatabase.hxx
index a4c8a1b68..fc5767cff 100644
--- a/dbaccess/source/filter/xml/xmlFileBasedDatabase.hxx
+++ b/dbaccess/source/filter/xml/xmlFileBasedDatabase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBA_XMLFILEBASEDDATABASE_HXX_INCLUDED
#define DBA_XMLFILEBASEDDATABASE_HXX_INCLUDED
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
#include <vector>
namespace dbaxml
@@ -52,3 +49,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLFILEBASEDDATABASE_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlHelper.cxx b/dbaccess/source/filter/xml/xmlHelper.cxx
index 7688a9293..5f6a5b5a2 100644
--- a/dbaccess/source/filter/xml/xmlHelper.cxx
+++ b/dbaccess/source/filter/xml/xmlHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,39 +28,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLHELPER_HXX
#include "xmlHelper.hxx"
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _COM_SUN_STAR_AWT_TEXTALIGN_HPP_
#include <com/sun/star/awt/TextAlign.hpp>
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef _XMLOFF_CONTEXTID_HXX_
#include <xmloff/contextid.hxx>
-#endif
-#ifndef _XMLOFF_XMLCONSTANTSPROPERTYHANDLER_HXX
#include <xmloff/XMLConstantsPropertyHandler.hxx>
-#endif
-#ifndef _XMLOFF_XMLEMENT_HXX
#include <xmloff/xmlement.hxx>
-#endif
-#ifndef _COM_SUN_STAR_AWT_TEXTALIGN_HPP_
#include <com/sun/star/awt/TextAlign.hpp>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
namespace dbaxml
{
@@ -112,34 +91,6 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetTableStylesPropertySetMappe
{
static const XMLPropertyMapEntry s_aTableStylesProperties[] =
{
- //MAP_CONST( PROPERTY_FONTNAME, XML_NAMESPACE_STYLE, XML_FONT_NAME, XML_TYPE_STRING, 0 ),
- //MAP_CONST( PROPERTY_TEXTCOLOR, XML_NAMESPACE_FO, XML_COLOR, XML_TYPE_COLOR, 0 ),
- //MAP_CONST( PROPERTY_TEXTLINECOLOR, XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_COLOR|MID_FLAG_MULTI_PROPERTY, 0 ),
-
- //MAP_CONST( PROPERTY_TEXTRELIEF, XML_NAMESPACE_STYLE, XML_FONT_RELIEF, XML_TYPE_TEXT_FONT_RELIEF|MID_FLAG_MULTI_PROPERTY, 0 ),
- //MAP_CONST( PROPERTY_TEXTEMPHASIS, XML_NAMESPACE_STYLE, XML_TEXT_EMPHASIZE, XML_TYPE_CONTROL_TEXT_EMPHASIZE, 0 ),
- //MAP_CONST( PROPERTY_FONTCHARWIDTH, XML_NAMESPACE_STYLE, XML_FONT_CHAR_WIDTH, XML_TYPE_NUMBER16, 0 ),
- //MAP_CONST( PROPERTY_FONTCHARSET, XML_NAMESPACE_STYLE, XML_FONT_CHARSET, XML_TYPE_TEXT_FONTENCODING, 0 ),
- //MAP_CONST( PROPERTY_FONTFAMILY, XML_NAMESPACE_STYLE, XML_FONT_FAMILY_GENERIC, XML_TYPE_TEXT_FONTFAMILY, 0 ),
- //MAP_CONST( PROPERTY_FONTHEIGHT, XML_NAMESPACE_FO, XML_FONT_SIZE, XML_TYPE_MEASURE16, 0 ),
- //MAP_CONST( PROPERTY_FONTKERNING, XML_NAMESPACE_STYLE, XML_LETTER_KERNING, XML_TYPE_BOOL, 0 ),
- //
- //MAP_CONST( PROPERTY_FONTORIENTATION, XML_NAMESPACE_STYLE, XML_ROTATION_ANGLE, XML_TYPE_ROTATION_ANGLE, 0 ),
- //MAP_CONST( PROPERTY_FONTPITCH, XML_NAMESPACE_STYLE, XML_FONT_PITCH, XML_TYPE_TEXT_FONTPITCH, 0 ),
- //MAP_CONST( PROPERTY_FONTSLANT, XML_NAMESPACE_FO, XML_FONT_STYLE, XML_TYPE_TEXT_POSTURE, 0 ),
- //MAP_CONST_ASCII( "CharStrikeout", XML_NAMESPACE_STYLE, XML_TEXT_LINE_THROUGH_STYLE, XML_TYPE_TEXT_CROSSEDOUT_STYLE|MID_FLAG_MERGE_PROPERTY, 0),
- //MAP_CONST_ASCII( "CharStrikeout", XML_NAMESPACE_STYLE, XML_TEXT_LINE_THROUGH_TYPE, XML_TYPE_TEXT_CROSSEDOUT_TYPE|MID_FLAG_MERGE_PROPERTY, 0),
- //MAP_CONST_ASCII( "CharStrikeout", XML_NAMESPACE_STYLE, XML_TEXT_LINE_THROUGH_WIDTH, XML_TYPE_TEXT_CROSSEDOUT_WIDTH|MID_FLAG_MERGE_PROPERTY, 0),
- //MAP_CONST_ASCII( "CharStrikeout", XML_NAMESPACE_STYLE, XML_TEXT_LINE_THROUGH_TEXT, XML_TYPE_TEXT_CROSSEDOUT_TEXT|MID_FLAG_MERGE_PROPERTY, 0),
- //MAP_CONST( PROPERTY_FONTSTYLENAME, XML_NAMESPACE_STYLE, XML_FONT_STYLE_NAME, XML_TYPE_STRING, 0 ),
- //MAP_CONST_ASCII( "CharUnderline", XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_STYLE, XML_TYPE_TEXT_UNDERLINE_STYLE|MID_FLAG_MERGE_PROPERTY, 0 ),
- //MAP_CONST_ASCII( "CharUnderline", XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_TYPE, XML_TYPE_TEXT_UNDERLINE_TYPE|MID_FLAG_MERGE_PROPERTY, 0 ),
- //MAP_CONST_ASCII( "CharUnderline", XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_WIDTH, XML_TYPE_TEXT_UNDERLINE_WIDTH|MID_FLAG_MERGE_PROPERTY, 0 ),
- //MAP_CONST_ASCII( "CharUnderlineColor", XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_COLOR|MID_FLAG_MULTI_PROPERTY, 0 ),
- //MAP_CONST_ASCII( "CharUnderlineHasColor",XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_HASCOLOR|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
- //MAP_CONST( PROPERTY_FONTWEIGHT, XML_NAMESPACE_FO, XML_FONT_WEIGHT, XML_TYPE_TEXT_WEIGHT, 0 ),
- //MAP_CONST( PROPERTY_FONTWIDTH, XML_NAMESPACE_STYLE, XML_FONT_WIDTH, XML_TYPE_FONT_WIDTH, 0 ),
- //MAP_CONST( PROPERTY_FONTWORDLINEMODE, XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_MODE, XML_TYPE_TEXT_LINE_MODE, 0 ),
MAP_END()
};
UniReference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory();
@@ -216,3 +167,4 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMapper(
// -----------------------------------------------------------------------------
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlHelper.hxx b/dbaccess/source/filter/xml/xmlHelper.hxx
index e7a9e4cd5..50c9d7168 100644
--- a/dbaccess/source/filter/xml/xmlHelper.hxx
+++ b/dbaccess/source/filter/xml/xmlHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef DBA_XMLHELPER_HXX
#define DBA_XMLHELPER_HXX
-#ifndef _XMLOFF_PROPERTYSETMAPPER_HXX
#include <xmloff/xmlprmap.hxx>
-#endif
-#ifndef _XMLOFF_CONTEXTID_HXX_
#include <xmloff/contextid.hxx>
-#endif
-#ifndef _XMLOFF_FORMS_CONTROLPROPERTYHDL_HXX_
#include <xmloff/controlpropertyhdl.hxx>
-#endif
#include <memory>
@@ -74,3 +69,4 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLHELPER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
index 7e4b8c6d5..69b012c9f 100644
--- a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
+++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,45 +28,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLHIERARCHYCOLLECTION_HXX
#include "xmlHierarchyCollection.hxx"
-#endif
-#ifndef DBA_XMLCOMPONENT_HXX
#include "xmlComponent.hxx"
-#endif
-#ifndef DBA_XMLQUERY_HXX
#include "xmlQuery.hxx"
-#endif
-#ifndef DBA_XMLCOLUMN_HXX
#include "xmlColumn.hxx"
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
namespace dbaxml
@@ -134,7 +109,7 @@ OXMLHierarchyCollection::OXMLHierarchyCollection( ODBFilter& rImport
}
catch(Exception&)
{
- OSL_ENSURE(0,"OXMLHierarchyCollection::OXMLHierarchyCollection -> exception catched");
+ OSL_FAIL("OXMLHierarchyCollection::OXMLHierarchyCollection -> exception catched");
}
}
}
@@ -169,9 +144,6 @@ SvXMLImportContext* OXMLHierarchyCollection::CreateChildContext(
switch( rTokenMap.Get( nPrefix, rLocalName ) )
{
-// case XML_TOK_QUERY:
-// pContext = new OXMLQuery( GetOwnImport(), nPrefix, rLocalName,xAttrList,m_xContainer );
-// break;
case XML_TOK_COMPONENT:
GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
pContext = new OXMLComponent( GetOwnImport(), nPrefix, rLocalName,xAttrList,m_xContainer,m_sComponentServiceName );
@@ -180,7 +152,6 @@ SvXMLImportContext* OXMLHierarchyCollection::CreateChildContext(
GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
pContext = new OXMLColumn( GetOwnImport(), nPrefix, rLocalName,xAttrList,m_xContainer,m_xTable);
break;
- // case XML_TOK_QUERY_COLLECTION:
case XML_TOK_COMPONENT_COLLECTION:
GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
pContext = new OXMLHierarchyCollection( GetOwnImport(), nPrefix, rLocalName,xAttrList,m_xContainer,m_sCollectionServiceName,m_sComponentServiceName);
@@ -201,3 +172,5 @@ ODBFilter& OXMLHierarchyCollection::GetOwnImport()
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx
index 2bd21739e..8a85e1410 100644
--- a/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx
+++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,3 +74,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLHIERARCHYCOLLECTION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlLogin.cxx b/dbaccess/source/filter/xml/xmlLogin.cxx
index 17d7a4220..a61d65e3a 100644
--- a/dbaccess/source/filter/xml/xmlLogin.cxx
+++ b/dbaccess/source/filter/xml/xmlLogin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,33 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLLOGIN_HXX
#include "xmlLogin.hxx"
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
#include <com/sun/star/sdbc/XDataSource.hpp>
#include <vector>
@@ -99,7 +82,7 @@ OXMLLogin::OXMLLogin( ODBFilter& rImport,
{
xDataSource->setPropertyValue(PROPERTY_USER,makeAny(sValue));
}
- catch(Exception)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -110,7 +93,7 @@ OXMLLogin::OXMLLogin( ODBFilter& rImport,
{
xDataSource->setPropertyValue(PROPERTY_ISPASSWORDREQUIRED,makeAny((sValue == s_sTRUE ? sal_True : sal_False)));
}
- catch(Exception)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -130,14 +113,14 @@ OXMLLogin::OXMLLogin( ODBFilter& rImport,
{
Reference< XDataSource>(xDataSource,UNO_QUERY_THROW)->setLoginTimeout(sValue.toInt32());
}
- catch(Exception)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
break;
}
}
- catch(Exception)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -155,3 +138,5 @@ OXMLLogin::~OXMLLogin()
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlLogin.hxx b/dbaccess/source/filter/xml/xmlLogin.hxx
index db2276966..a6734a28e 100644
--- a/dbaccess/source/filter/xml/xmlLogin.hxx
+++ b/dbaccess/source/filter/xml/xmlLogin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBA_XMLLOGIN_HXX
#define DBA_XMLLOGIN_HXX
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
namespace dbaxml
{
@@ -50,3 +49,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLLOGIN_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlQuery.cxx b/dbaccess/source/filter/xml/xmlQuery.cxx
index b9b23d2a9..12a5e2a43 100644
--- a/dbaccess/source/filter/xml/xmlQuery.cxx
+++ b/dbaccess/source/filter/xml/xmlQuery.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,39 +28,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLQUERY_HXX
#include "xmlQuery.hxx"
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
namespace dbaxml
{
@@ -99,7 +78,7 @@ OXMLQuery::OXMLQuery( ODBFilter& rImport
m_sCommand = sValue;
break;
case XML_TOK_ESCAPE_PROCESSING:
- m_bEscapeProcessing = sValue.equalsAscii("true");
+ m_bEscapeProcessing = sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true"));
break;
}
}
@@ -166,9 +145,11 @@ void OXMLQuery::setProperties(Reference< XPropertySet > & _xProp )
}
catch(Exception&)
{
- OSL_ENSURE(0,"OXMLTable::EndElement -> exception catched");
+ OSL_FAIL("OXMLTable::EndElement -> exception catched");
}
}
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlQuery.hxx b/dbaccess/source/filter/xml/xmlQuery.hxx
index 3e2c03c4d..9ac948c04 100644
--- a/dbaccess/source/filter/xml/xmlQuery.hxx
+++ b/dbaccess/source/filter/xml/xmlQuery.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBA_XMLQUERY_HXX
#define DBA_XMLQUERY_HXX
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
-#ifndef DBA_XMLTABLE_HXX
#include "xmlTable.hxx"
-#endif
namespace dbaxml
@@ -64,3 +61,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLQUERY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlServerDatabase.cxx b/dbaccess/source/filter/xml/xmlServerDatabase.cxx
index c699977d8..8cafb358b 100644
--- a/dbaccess/source/filter/xml/xmlServerDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlServerDatabase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,33 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLSERVERDATABASE_HXX_INCLUDED
#include "xmlServerDatabase.hxx"
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
namespace dbaxml
{
@@ -173,7 +156,7 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport,
{
xDataSource->setPropertyValue(PROPERTY_URL,makeAny(sURL.makeStringAndClear()));
}
- catch(Exception)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -191,3 +174,5 @@ OXMLServerDatabase::~OXMLServerDatabase()
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlServerDatabase.hxx b/dbaccess/source/filter/xml/xmlServerDatabase.hxx
index e0fa99062..99349b100 100644
--- a/dbaccess/source/filter/xml/xmlServerDatabase.hxx
+++ b/dbaccess/source/filter/xml/xmlServerDatabase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBA_XMLSERVERDATABASE_HXX_INCLUDED
#define DBA_XMLSERVERDATABASE_HXX_INCLUDED
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
#include <vector>
namespace dbaxml
@@ -53,3 +50,4 @@ namespace dbaxml
#endif // DBA_XMLSERVERDATABASE_HXX_INCLUDED
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlStyleImport.cxx b/dbaccess/source/filter/xml/xmlStyleImport.cxx
index f7d7f4c3c..47b279b78 100644
--- a/dbaccess/source/filter/xml/xmlStyleImport.cxx
+++ b/dbaccess/source/filter/xml/xmlStyleImport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,58 +29,23 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLSTYLEIMPORT_HXX
#include "xmlStyleImport.hxx"
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_XMLIMPPR_HXX
#include <xmloff/xmlimppr.hxx>
-#endif
-#ifndef _XMLOFF_FAMILIES_HXX_
#include <xmloff/families.hxx>
-#endif
-#ifndef _XMLOFF_XMLNUMFI_HXX
#include <xmloff/xmlnumfi.hxx>
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _COM_SUN_STAR_STYLE_XSTYLEFAMILIESSUPPLIER_HPP_
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TABLE_BORDERLINE_HPP_
#include <com/sun/star/table/BorderLine.hpp>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _XMLOFF_XMLPROPERTYSETCONTEXT_HXX
#include <xmloff/xmlprcon.hxx>
-#endif
-#ifndef _XMLOFF_XMLUCONV_HXX
#include <xmloff/xmluconv.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef DBA_XMLFILTER_HXX
+#include <osl/diagnose.h>
#include "xmlfilter.hxx"
-#endif
-#ifndef DBA_XMLHELPER_HXX
#include "xmlHelper.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
#define XML_LINE_LEFT 0
@@ -154,7 +120,7 @@ void OTableStyleContext::FillPropertySet(
pStyle = PTR_CAST(SvXMLNumFormatContext,pMyStyles->
FindStyleChildContext(XML_STYLE_FAMILY_DATA_STYLE, m_sDataStyleName, sal_True));
else {
- DBG_ERROR("not possible to get style");
+ OSL_FAIL("not possible to get style");
}
}
if ( pStyle )
@@ -162,7 +128,6 @@ void OTableStyleContext::FillPropertySet(
uno::Any aNumberFormat;
m_nNumberFormat = pStyle->GetKey();
aNumberFormat <<= m_nNumberFormat;
- //rPropSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_NUMBERFORMAT)), aNumberFormat);
AddProperty(CTF_DB_NUMBERFORMAT, aNumberFormat);
}
}
@@ -180,7 +145,7 @@ void OTableStyleContext::SetDefaults()
void OTableStyleContext::AddProperty(const sal_Int16 nContextID, const uno::Any& rValue)
{
sal_Int32 nIndex(static_cast<OTableStylesContext *>(pStyles)->GetIndex(nContextID));
- DBG_ASSERT(nIndex != -1, "Property not found in Map");
+ OSL_ENSURE(nIndex != -1, "Property not found in Map");
XMLPropertyState aPropState(nIndex, rValue);
GetProperties().push_back(aPropState); // has to be insertes in a sort order later
}
@@ -361,3 +326,5 @@ ODBFilter& OTableStylesContext::GetOwnImport()
// -----------------------------------------------------------------------------
} // dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlStyleImport.hxx b/dbaccess/source/filter/xml/xmlStyleImport.hxx
index 323ac3066..0f5cb78fd 100644
--- a/dbaccess/source/filter/xml/xmlStyleImport.hxx
+++ b/dbaccess/source/filter/xml/xmlStyleImport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,36 +29,16 @@
#ifndef DBA_XMLSTYLEIMPORT_HXX
#define DBA_XMLSTYLEIMPORT_HXX
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
-#endif
-#ifndef _XMLOFF_XMLIMP_HXX
#include <xmloff/xmlimp.hxx>
-#endif
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
-#ifndef _XMLOFF_PROPMAPPINGTYPES_HXX
#include <xmloff/maptype.hxx>
-#endif
-#ifndef _XMLOFF_PRSTYLEI_HXX_
#include <xmloff/prstylei.hxx>
-#endif
-#ifndef _XMLOFF_XMLIMPPR_HXX
#include <xmloff/xmlimppr.hxx>
-#endif
-#ifndef _XMLTEXTMASTERPAGECONTEXT_HXX
#include <xmloff/XMLTextMasterPageContext.hxx>
-#endif
-#ifndef _XMLTEXTMASTERSTYLESCONTEXT_HXX
#include <xmloff/XMLTextMasterStylesContext.hxx>
-#endif
-#ifndef _XMLOFF_CONTEXTID_HXX_
#include <xmloff/contextid.hxx>
-#endif
-#ifndef _XMLOFF_FORMS_CONTROLPROPERTYHDL_HXX_
#include <xmloff/controlpropertyhdl.hxx>
-#endif
#include <vector>
namespace dbaxml
@@ -70,7 +51,6 @@ namespace dbaxml
::rtl::OUString sPageStyle;
const rtl::OUString sNumberFormat;
SvXMLStylesContext* pStyles;
- // std::vector<ScXMLMapContent> aMaps;
com::sun::star::uno::Any aConditionalFormat;
sal_Int32 m_nNumberFormat;
sal_Bool bConditionalFormatCreated : 1;
@@ -155,3 +135,5 @@ namespace dbaxml
} // dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLSTYLEIMPORT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlTable.cxx b/dbaccess/source/filter/xml/xmlTable.cxx
index d9088e378..dc5cc3623 100644
--- a/dbaccess/source/filter/xml/xmlTable.cxx
+++ b/dbaccess/source/filter/xml/xmlTable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,48 +28,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLTABLE_HXX
#include "xmlTable.hxx"
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef DBA_XMLSTYLEIMPORT_HXX
#include "xmlStyleImport.hxx"
-#endif
-#ifndef DBA_XMLHIERARCHYCOLLECTION_HXX
#include "xmlHierarchyCollection.hxx"
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef _UCBHELPER_CONTENT_HXX
#include <ucbhelper/content.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UCB_XCOMMANDENVIRONMENT_HPP_
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COMPHELPER_NAMECONTAINER_HXX_
#include <comphelper/namecontainer.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
namespace dbaxml
{
@@ -120,10 +93,10 @@ OXMLTable::OXMLTable( ODBFilter& _rImport
m_sStyleName = sValue;
break;
case XML_TOK_APPLY_FILTER:
- m_bApplyFilter = sValue.equalsAscii("true");
+ m_bApplyFilter = sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true"));
break;
case XML_TOK_APPLY_ORDER:
- m_bApplyOrder = sValue.equalsAscii("true");
+ m_bApplyOrder = sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true"));
break;
}
}
@@ -213,7 +186,7 @@ void OXMLTable::setProperties(uno::Reference< XPropertySet > & _xProp )
}
catch(Exception&)
{
- OSL_ENSURE(0,"OXMLTable::EndElement -> exception catched");
+ OSL_FAIL("OXMLTable::EndElement -> exception catched");
}
}
// -----------------------------------------------------------------------------
@@ -246,7 +219,7 @@ void OXMLTable::EndElement()
}
catch(Exception&)
{
- OSL_ENSURE(0,"OXMLQuery::EndElement -> exception catched");
+ OSL_FAIL("OXMLQuery::EndElement -> exception catched");
}
}
@@ -293,3 +266,5 @@ void OXMLTable::fillAttributes(sal_uInt16 /*nPrfx*/
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlTable.hxx b/dbaccess/source/filter/xml/xmlTable.hxx
index 02cf49db3..681270456 100644
--- a/dbaccess/source/filter/xml/xmlTable.hxx
+++ b/dbaccess/source/filter/xml/xmlTable.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef DBA_XMLTABLE_HXX
#define DBA_XMLTABLE_HXX
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
namespace dbaxml
{
@@ -89,3 +84,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLTABLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlTableFilterList.cxx b/dbaccess/source/filter/xml/xmlTableFilterList.cxx
index d5943dd94..15eecb516 100644
--- a/dbaccess/source/filter/xml/xmlTableFilterList.cxx
+++ b/dbaccess/source/filter/xml/xmlTableFilterList.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,42 +28,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLTABLEFILTERLIST_HXX
#include "xmlTableFilterList.hxx"
-#endif
-#ifndef DBA_XMLTABLEFILTERPATTERN_HXX
#include "xmlTableFilterPattern.hxx"
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _XMLOFF_XMLIMP_HXX
#include <xmloff/xmlimp.hxx>
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
namespace dbaxml
{
@@ -130,3 +107,5 @@ void OXMLTableFilterList::EndElement()
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlTableFilterList.hxx b/dbaccess/source/filter/xml/xmlTableFilterList.hxx
index 6b284fa10..07162624c 100644
--- a/dbaccess/source/filter/xml/xmlTableFilterList.hxx
+++ b/dbaccess/source/filter/xml/xmlTableFilterList.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBA_XMLTABLEFILTERLIST_HXX
#define DBA_XMLTABLEFILTERLIST_HXX
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
#include <vector>
namespace dbaxml
@@ -77,3 +76,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLTABLEFILTERLIST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx b/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx
index 3e3f8606f..fabbeed77 100644
--- a/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx
+++ b/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef DBA_XMLTABLEFILTERPATTERN_HXX
#include "xmlTableFilterPattern.hxx"
-#endif
-#ifndef DBA_XMLTABLEFILTERLIST_HXX
#include "xmlTableFilterList.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
namespace dbaxml
{
@@ -74,3 +69,5 @@ void OXMLTableFilterPattern::Characters( const ::rtl::OUString& rChars )
//----------------------------------------------------------------------------
} // namespace dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlTableFilterPattern.hxx b/dbaccess/source/filter/xml/xmlTableFilterPattern.hxx
index 7c027d558..80452c8d6 100644
--- a/dbaccess/source/filter/xml/xmlTableFilterPattern.hxx
+++ b/dbaccess/source/filter/xml/xmlTableFilterPattern.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBA_XMLTABLEFILTERPATTERN_HXX
#define DBA_XMLTABLEFILTERPATTERN_HXX
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
namespace dbaxml
{
@@ -54,3 +53,5 @@ namespace dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLTABLEFILTERPATTERN_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index cf9e0caf0..83f704de1 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,105 +29,44 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef _COM_SUN_STAR_PACKAGES_ZIP_ZIPIOEXCEPTION_HPP_
#include <com/sun/star/packages/zip/ZipIOException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_EMBED_ELEMENTMODES_HPP_
#include <com/sun/star/embed/ElementModes.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XOFFICEDATABASEDOCUMENT_HPP_
#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
-#endif
-#ifndef DBA_XMLFILTER_HXX
#include "xmlfilter.hxx"
-#endif
-#ifndef _FLT_REGHELPER_HXX_
#include "flt_reghelper.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_WINDOW_HXX
#include <vcl/window.hxx>
-#endif
-#ifndef _XMLOFF_XMLNMSPE_HXX
#include <xmloff/xmlnmspe.hxx>
-#endif
-#ifndef _XMLOFF_XMLSCRIPTI_HXX
#include <xmloff/xmlscripti.hxx>
-#endif
-#ifndef _XMLOFF_XMLTOKEN_HXX
#include <xmloff/xmltoken.hxx>
-#endif
-#ifndef _XMLOFF_TEXTIMP_HXX_
#include <xmloff/txtimp.hxx>
-#endif
-#ifndef _XMLOFF_NMSPMAP_HXX
#include <xmloff/nmspmap.hxx>
-#endif
-#ifndef _RTL_LOGFILE_HXX_
#include <rtl/logfile.hxx>
-#endif
-#ifndef _COM_SUN_STAR_XML_SAX_INPUTSOURCE_HPP_
#include <com/sun/star/xml/sax/InputSource.hpp>
-#endif
-#ifndef _COM_SUN_STAR_XML_SAX_XPARSER_HPP_
#include <com/sun/star/xml/sax/XParser.hpp>
-#endif
-#ifndef _XMLOFF_PROGRESSBARHELPER_HXX
#include <xmloff/ProgressBarHelper.hxx>
-#endif
-#ifndef _SFXDOCFILE_HXX //autogen wg. SfxMedium
#include <sfx2/docfile.hxx>
-#endif
-#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_
#include <com/sun/star/io/XInputStream.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UNO_XNAMINGSERVICE_HPP_
#include <com/sun/star/uno/XNamingService.hpp>
-#endif
-#ifndef DBA_XMLDATABASE_HXX
#include "xmlDatabase.hxx"
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef _URLOBJ_HXX //autogen wg. INetURLObject
#include <tools/urlobj.hxx>
-#endif
-#ifndef DBACCESS_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
-#ifndef _XMLOFF_DOCUMENTSETTINGSCONTEXT_HXX
#include <xmloff/DocumentSettingsContext.hxx>
-#endif
-#ifndef DBA_XMLSTYLEIMPORT_HXX
#include "xmlStyleImport.hxx"
-#endif
-#ifndef _XMLOFF_XMLUCONV_HXX
#include <xmloff/xmluconv.hxx>
-#endif
-#ifndef DBA_XMLHELPER_HXX
#include "xmlHelper.hxx"
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XMODIFIABLE_HPP_
#include <com/sun/star/util/XModifiable.hpp>
-#endif
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
-#ifndef _SV_SVAPP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _VOS_MUTEX_HXX_
-#include <vos/mutex.hxx>
-#endif
+#include <osl/mutex.hxx>
#include <svtools/sfxecode.hxx>
#include <unotools/moduleoptions.hxx>
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/helper/vclunohelper.hxx>
-#endif
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/mimeconfighelper.hxx>
#include <comphelper/documentconstants.hxx>
@@ -185,8 +125,8 @@ namespace dbaxml
(void)ex;
OSL_ASSERT(0);
}
- } // if ( s_bFirstTime )
- } // if ( m_eWhat == E_JAVA )
+ }
+ }
else if ( m_eWhat == E_CALC )
{
static bool s_bFirstTime = true;
@@ -260,7 +200,7 @@ namespace dbaxml
if ( m_aTypeCollection.needsJVM(sURL) )
{
pCreatorThread = new FastLoader(m_xFactory,FastLoader::E_JAVA);
- } // if ( m_aTypeCollection.needsJVM(sURL) )
+ }
else if ( sURL.matchIgnoreAsciiCaseAsciiL("sdbc:calc:",10,0) )
{
pCreatorThread = new FastLoader(m_xFactory,FastLoader::E_CALC);
@@ -278,8 +218,8 @@ namespace dbaxml
}
};
}
- sal_Char __READONLY_DATA sXML_np__db[] = "_db";
- sal_Char __READONLY_DATA sXML_np___db[] = "__db";
+ sal_Char const sXML_np__db[] = "_db";
+ sal_Char const sXML_np___db[] = "__db";
using namespace ::com::sun::star::util;
/// read a component (file + filter version)
@@ -289,9 +229,9 @@ sal_Int32 ReadThroughComponent(
const uno::Reference<XMultiServiceFactory> & rFactory,
const uno::Reference< XDocumentHandler >& _xFilter )
{
- DBG_ASSERT(xInputStream.is(), "input stream missing");
- DBG_ASSERT(xModelComponent.is(), "document missing");
- DBG_ASSERT(rFactory.is(), "factory missing");
+ OSL_ENSURE(xInputStream.is(), "input stream missing");
+ OSL_ENSURE(xModelComponent.is(), "document missing");
+ OSL_ENSURE(rFactory.is(), "factory missing");
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "dbaxml", "oj", "ReadThroughComponent" );
@@ -302,15 +242,15 @@ sal_Int32 ReadThroughComponent(
// get parser
uno::Reference< XParser > xParser(
rFactory->createInstance(
- ::rtl::OUString::createFromAscii("com.sun.star.xml.sax.Parser") ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser"))),
UNO_QUERY );
- DBG_ASSERT( xParser.is(), "Can't create parser" );
+ OSL_ENSURE( xParser.is(), "Can't create parser" );
if( !xParser.is() )
return 1;
RTL_LOGFILE_CONTEXT_TRACE( aLog, "parser created" );
// get filter
- DBG_ASSERT( _xFilter.is(), "Can't instantiate filter component." );
+ OSL_ENSURE( _xFilter.is(), "Can't instantiate filter component." );
if( !_xFilter.is() )
return 1;
@@ -337,7 +277,7 @@ sal_Int32 ReadThroughComponent(
aError += ',';
aError += ByteString::CreateFromInt32( r.ColumnNumber );
- DBG_ERROR( aError.GetBuffer() );
+ OSL_FAIL( aError.GetBuffer() );
return 1;
}
#else
@@ -372,8 +312,8 @@ sal_Int32 ReadThroughComponent(
const uno::Reference<XMultiServiceFactory> & rFactory,
const uno::Reference< XDocumentHandler >& _xFilter)
{
- DBG_ASSERT( xStorage.is(), "Need storage!");
- DBG_ASSERT(NULL != pStreamName, "Please, please, give me a name!");
+ OSL_ENSURE( xStorage.is(), "Need storage!");
+ OSL_ENSURE(NULL != pStreamName, "Please, please, give me a name!");
if ( xStorage.is() )
{
@@ -470,7 +410,7 @@ sal_Bool SAL_CALL ODBFilter::filter( const Sequence< PropertyValue >& rDescripto
{
uno::Reference< ::com::sun::star::awt::XWindow > xWindow;
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Window* pFocusWindow = Application::GetFocusWindow();
xWindow = VCLUnoHelper::GetInterface( pFocusWindow );
if( pFocusWindow )
@@ -483,7 +423,7 @@ sal_Bool SAL_CALL ODBFilter::filter( const Sequence< PropertyValue >& rDescripto
if ( xWindow.is() )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Window* pFocusWindow = VCLUnoHelper::GetWindow( xWindow );
if ( pFocusWindow )
pFocusWindow->LeaveWait();
@@ -668,7 +608,7 @@ const SvXMLTokenMap& ODBFilter::GetDocElemTokenMap() const
{
if ( !m_pDocElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_OFFICE, XML_SETTINGS, XML_TOK_DOC_SETTINGS },
{ XML_NAMESPACE_OOO, XML_SETTINGS, XML_TOK_DOC_SETTINGS },
@@ -690,7 +630,7 @@ const SvXMLTokenMap& ODBFilter::GetDatabaseElemTokenMap() const
{
if ( !m_pDatabaseElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_DB, XML_DATASOURCE, XML_TOK_DATASOURCE },
{ XML_NAMESPACE_DB, XML_FORMS, XML_TOK_FORMS},
@@ -710,7 +650,7 @@ const SvXMLTokenMap& ODBFilter::GetDataSourceElemTokenMap() const
{
if ( !m_pDataSourceElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_DB, XML_CONNECTION_RESOURCE, XML_TOK_CONNECTION_RESOURCE},
{ XML_NAMESPACE_DB, XML_SUPPRESS_VERSION_COLUMNS, XML_TOK_SUPPRESS_VERSION_COLUMNS},
@@ -761,7 +701,7 @@ const SvXMLTokenMap& ODBFilter::GetLoginElemTokenMap() const
{
if ( !m_pLoginElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_DB, XML_USER_NAME, XML_TOK_USER_NAME},
{ XML_NAMESPACE_DB, XML_IS_PASSWORD_REQUIRED, XML_TOK_IS_PASSWORD_REQUIRED},
@@ -778,7 +718,7 @@ const SvXMLTokenMap& ODBFilter::GetDatabaseDescriptionElemTokenMap() const
{
if ( !m_pDatabaseDescriptionElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_DB, XML_FILE_BASED_DATABASE, XML_TOK_FILE_BASED_DATABASE},
{ XML_NAMESPACE_DB, XML_SERVER_DATABASE, XML_TOK_SERVER_DATABASE},
@@ -793,7 +733,7 @@ const SvXMLTokenMap& ODBFilter::GetDataSourceInfoElemTokenMap() const
{
if ( !m_pDataSourceInfoElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_DB, XML_ADDITIONAL_COLUMN_STATEMENT,XML_TOK_ADDITIONAL_COLUMN_STATEMENT},
{ XML_NAMESPACE_DB, XML_ROW_RETRIEVING_STATEMENT, XML_TOK_ROW_RETRIEVING_STATEMENT},
@@ -819,7 +759,7 @@ const SvXMLTokenMap& ODBFilter::GetDocumentsElemTokenMap() const
{
if ( !m_pDocumentsElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_DB, XML_COMPONENT, XML_TOK_COMPONENT},
{ XML_NAMESPACE_DB, XML_COMPONENT_COLLECTION, XML_TOK_COMPONENT_COLLECTION},
@@ -839,7 +779,7 @@ const SvXMLTokenMap& ODBFilter::GetComponentElemTokenMap() const
{
if ( !m_pComponentElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_HREF },
{ XML_NAMESPACE_XLINK, XML_TYPE, XML_TOK_TYPE },
@@ -858,7 +798,7 @@ const SvXMLTokenMap& ODBFilter::GetQueryElemTokenMap() const
{
if ( !m_pQueryElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_DB, XML_COMMAND, XML_TOK_COMMAND },
{ XML_NAMESPACE_DB, XML_ESCAPE_PROCESSING, XML_TOK_ESCAPE_PROCESSING },
@@ -882,7 +822,7 @@ const SvXMLTokenMap& ODBFilter::GetColumnElemTokenMap() const
{
if ( !m_pColumnElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_DB, XML_NAME, XML_TOK_COLUMN_NAME },
{ XML_NAMESPACE_DB, XML_STYLE_NAME, XML_TOK_COLUMN_STYLE_NAME },
@@ -907,10 +847,8 @@ SvXMLImportContext* ODBFilter::CreateStylesContext(sal_uInt16 _nPrefix,const ::r
{
pContext = new OTableStylesContext(*this, _nPrefix, rLocalName, xAttrList, bIsAutoStyle);
if (bIsAutoStyle)
- //xAutoStyles = pContext;
SetAutoStyles((SvXMLStylesContext*)pContext);
else
- //xStyles = pContext;
SetStyles((SvXMLStylesContext*)pContext);
}
return pContext;
@@ -970,7 +908,7 @@ void ODBFilter::setPropertyInfo()
{
xDataSource->setPropertyValue(PROPERTY_INFO,makeAny(aInfo));
}
- catch(Exception)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -979,3 +917,5 @@ void ODBFilter::setPropertyInfo()
// -----------------------------------------------------------------------------
}// dbaxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlfilter.hxx b/dbaccess/source/filter/xml/xmlfilter.hxx
index b9513852f..6a7488e08 100644
--- a/dbaccess/source/filter/xml/xmlfilter.hxx
+++ b/dbaccess/source/filter/xml/xmlfilter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,63 +29,25 @@
#ifndef DBA_XMLFILTER_HXX
#define DBA_XMLFILTER_HXX
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_
#include <com/sun/star/container/XNamed.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DOCUMENT_XFILTER_HPP_
#include <com/sun/star/document/XFilter.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DOCUMENT_XIMPORTER_HPP_
#include <com/sun/star/document/XImporter.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DOCUMENT_XEXPORTER_HPP_
#include <com/sun/star/document/XExporter.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
#include <com/sun/star/lang/XInitialization.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_
#include <com/sun/star/lang/XComponent.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE5_HXX_
#include <cppuhelper/implbase5.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_XACTIVEDATASOURCE_HPP_
#include <com/sun/star/io/XActiveDataSource.hpp>
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef _UNOTOOLS_TEMPFILE_HXX
#include <unotools/tempfile.hxx>
-#endif
-#ifndef _UNOTOOLS_LOCALFILEHELPER_HXX
#include <unotools/localfilehelper.hxx>
-#endif
-#ifndef _UNTOOLS_UCBSTREAMHELPER_HXX
#include <unotools/ucbstreamhelper.hxx>
-#endif
-#ifndef _XMLOFF_XMLIMP_HXX
#include <xmloff/xmlimp.hxx>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
#include <memory>
@@ -208,3 +171,5 @@ public:
} // dbaxml
// -----------------------------------------------------------------------------
#endif // DBA_XMLFILTER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/filter/xml/xmlservices.cxx b/dbaccess/source/filter/xml/xmlservices.cxx
index f40717ac3..33302016e 100644
--- a/dbaccess/source/filter/xml/xmlservices.cxx
+++ b/dbaccess/source/filter/xml/xmlservices.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef _CPPUHELPER_FACTORY_HXX_
#include <cppuhelper/factory.hxx>
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef _FLT_REGHELPER_HXX_
#include "flt_reghelper.hxx"
-#endif
/********************************************************************************************/
@@ -102,3 +97,4 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
return xRet.get();
};
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/inc/OAuthenticationContinuation.hxx b/dbaccess/source/inc/OAuthenticationContinuation.hxx
index 8f44097e4..fc8a2a612 100755..100644
--- a/dbaccess/source/inc/OAuthenticationContinuation.hxx
+++ b/dbaccess/source/inc/OAuthenticationContinuation.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,3 +81,4 @@ public:
#endif // _DBACCESS_OAUTHENTICATIONCONTINUATION_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/inc/apitools.hxx b/dbaccess/source/inc/apitools.hxx
index cd4bbaf2f..85b73c382 100644
--- a/dbaccess/source/inc/apitools.hxx
+++ b/dbaccess/source/inc/apitools.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,27 +29,13 @@
#ifndef _DBASHARED_APITOOLS_HXX_
#define _DBASHARED_APITOOLS_HXX_
-#ifndef _CPPUHELPER_COMPONENT_HXX_
#include <cppuhelper/component.hxx>
-#endif
-#ifndef _OSL_MUTEX_HXX_
#include <osl/mutex.hxx>
-#endif
-#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
#include <cppuhelper/interfacecontainer.hxx>
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
//==================================================================================
//= various typedefs
@@ -453,3 +440,4 @@ public:
#endif // _DBASHARED_APITOOLS_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/inc/constasciistring.hxx b/dbaccess/source/inc/constasciistring.hxx
index 4d5e91d65..3b86e19e2 100644
--- a/dbaccess/source/inc/constasciistring.hxx
+++ b/dbaccess/source/inc/constasciistring.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef _DBASHARED_CONSTASCIISTRING_HXX_
#define _DBASHARED_CONSTASCIISTRING_HXX_
@@ -59,3 +60,5 @@ inline ConstAsciiString::operator const ::rtl::OUString& () const
#endif // _DBASHARED_CONSTASCIISTRING_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/inc/dbadllapi.hxx b/dbaccess/source/inc/dbadllapi.hxx
index 37508ab36..b505ae135 100644
--- a/dbaccess/source/inc/dbadllapi.hxx
+++ b/dbaccess/source/inc/dbadllapi.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,3 +40,5 @@
#endif
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/inc/dbu_reghelper.hxx b/dbaccess/source/inc/dbu_reghelper.hxx
index 16fca9fd4..f9ba053b3 100644
--- a/dbaccess/source/inc/dbu_reghelper.hxx
+++ b/dbaccess/source/inc/dbu_reghelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,24 +29,12 @@
#ifndef _DBU_REGHELPER_HXX_
#define _DBU_REGHELPER_HXX_
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
-#endif
-#ifndef _COM_SUN_STAR_REGISTRY_XREGISTRYKEY_HPP_
#include <com/sun/star/registry/XRegistryKey.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
-#endif
-#ifndef _CPPUHELPER_FACTORY_HXX_
#include <cppuhelper/factory.hxx>
-#endif
namespace dbaui
{
@@ -58,3 +47,4 @@ namespace dbaui
#endif // _DBU_REGHELPER_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/inc/dsntypes.hxx b/dbaccess/source/inc/dsntypes.hxx
index f08c59c66..670e673e8 100644
--- a/dbaccess/source/inc/dsntypes.hxx
+++ b/dbaccess/source/inc/dsntypes.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -121,7 +122,7 @@ protected:
::connectivity::DriversConfig m_aDriverConfig;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
sal_Int32 m_nLivingIterators; /// just for debugging reasons, counts the living iterators
#endif
@@ -239,3 +240,4 @@ protected:
#endif // _DBACCESS_DSNTYPES_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/inc/flt_reghelper.hxx b/dbaccess/source/inc/flt_reghelper.hxx
index 25acdfead..e572d494e 100644
--- a/dbaccess/source/inc/flt_reghelper.hxx
+++ b/dbaccess/source/inc/flt_reghelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,24 +29,12 @@
#ifndef _FLT_REGHELPER_HXX_
#define _FLT_REGHELPER_HXX_
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
-#endif
-#ifndef _COM_SUN_STAR_REGISTRY_XREGISTRYKEY_HPP_
#include <com/sun/star/registry/XRegistryKey.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
-#endif
-#ifndef _CPPUHELPER_FACTORY_HXX_
#include <cppuhelper/factory.hxx>
-#endif
namespace dbaxml
{
@@ -58,3 +47,4 @@ namespace dbaxml
#endif // _FLT_REGHELPER_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/inc/registrationhelper.hxx b/dbaccess/source/inc/registrationhelper.hxx
index fdb21f3e9..343e0ef71 100644
--- a/dbaccess/source/inc/registrationhelper.hxx
+++ b/dbaccess/source/inc/registrationhelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -156,3 +157,4 @@ OOneInstanceAutoRegistration<TYPE>::~OOneInstanceAutoRegistration()
OModuleRegistration::revokeComponent(TYPE::getImplementationName_Static());
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/inc/stringconstants.hrc b/dbaccess/source/inc/stringconstants.hrc
index 5d7b985ea..651600613 100644
--- a/dbaccess/source/inc/stringconstants.hrc
+++ b/dbaccess/source/inc/stringconstants.hrc
@@ -183,6 +183,7 @@
#define PROPERTY_ID_PERSISTENT_PATH 143
#define PROPERTY_ID_CURRENT_QUERY_DESIGN 144
#define PROPERTY_ID_SINGLESELECTQUERYCOMPOSER 145
+#define PROPERTY_ID_PROPCHANGE_NOTIFY 146
//============================================================
//= property names
@@ -340,6 +341,7 @@ DECLARE_CONSTASCII_USTRING(PROPERTY_HAVING_CLAUSE);
DECLARE_CONSTASCII_USTRING(PROPERTY_GROUP_BY);
DECLARE_CONSTASCII_USTRING(PROPERTY_EDIT_WIDTH);
DECLARE_CONSTASCII_USTRING(PROPERTY_SINGLESELECTQUERYCOMPOSER);
+DECLARE_CONSTASCII_USTRING(PROPERTY_CHANGE_NOTIFICATION_ENABLED);
//============================================================
//= service names
diff --git a/dbaccess/source/inc/stringconstants.inc b/dbaccess/source/inc/stringconstants.inc
index f2a39b06f..5eef8a68d 100644
--- a/dbaccess/source/inc/stringconstants.inc
+++ b/dbaccess/source/inc/stringconstants.inc
@@ -183,6 +183,7 @@ IMPLEMENT_CONSTASCII_USTRING(PROPERTY_HAVING_CLAUSE, "HavingClause");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_GROUP_BY, "GroupBy");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_EDIT_WIDTH, "EditWidth");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_SINGLESELECTQUERYCOMPOSER,"SingleSelectQueryComposer");
+IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CHANGE_NOTIFICATION_ENABLED, "PropertyChangeNotificationEnabled");
//============================================================
//= service names
diff --git a/dbaccess/source/sdbtools/connection/connectiondependent.hxx b/dbaccess/source/sdbtools/connection/connectiondependent.hxx
index b4498011e..12aa55645 100644
--- a/dbaccess/source/sdbtools/connection/connectiondependent.hxx
+++ b/dbaccess/source/sdbtools/connection/connectiondependent.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -154,3 +155,4 @@ namespace sdbtools
#endif // DBACCESS_CONNECTION_DEPENDENT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/sdbtools/connection/connectiontools.cxx b/dbaccess/source/sdbtools/connection/connectiontools.cxx
index ed65d0380..cba20331f 100644
--- a/dbaccess/source/sdbtools/connection/connectiontools.cxx
+++ b/dbaccess/source/sdbtools/connection/connectiontools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,26 +29,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBACCESS_CONNECTIONTOOLS_HXX
#include "connectiontools.hxx"
-#endif
-#ifndef DBACCESS_SOURCE_SDBTOOLS_CONNECTION_TABLENAME_HXX
#include "tablename.hxx"
-#endif
-#ifndef DBACCESS_SOURCE_SDBTOOLS_CONNECTION_OBJECTNAMES_HXX
#include "objectnames.hxx"
-#endif
-#ifndef DBACCESS_DATASOURCEMETADATA_HXX
#include "datasourcemetadata.hxx"
-#endif
/** === begin UNO includes === **/
/** === end UNO includes === **/
-#ifndef COMPHELPER_NAMEDVALUECOLLECTION_HXX
#include <comphelper/namedvaluecollection.hxx>
-#endif
#include <connectivity/dbtools.hxx>
#include <connectivity/statementcomposer.hxx>
@@ -195,3 +186,4 @@ namespace sdbtools
} // namespace sdbtools
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/sdbtools/connection/connectiontools.hxx b/dbaccess/source/sdbtools/connection/connectiontools.hxx
index 9e24c8e56..a85ade702 100644
--- a/dbaccess/source/sdbtools/connection/connectiontools.hxx
+++ b/dbaccess/source/sdbtools/connection/connectiontools.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,36 +29,20 @@
#ifndef DBACCESS_CONNECTIONTOOLS_HXX
#define DBACCESS_CONNECTIONTOOLS_HXX
-#ifndef DBACCESS_MODULE_SDBT_HXX
#include "module_sdbt.hxx"
-#endif
-#ifndef DBACCESS_CONNECTION_DEPENDENT_HXX
#include "connectiondependent.hxx"
-#endif
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_SDB_TOOLS_XCONNECTIONTOOLS_HPP_
#include <com/sun/star/sdb/tools/XConnectionTools.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
#include <com/sun/star/lang/XInitialization.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_
#include <com/sun/star/uno/XComponentContext.hpp>
-#endif
/** === end UNO includes === **/
-#ifndef _CPPUHELPER_IMPLBASE3_HXX_
#include <cppuhelper/implbase3.hxx>
-#endif
-#ifndef COMPHELPER_COMPONENTCONTEXT_HXX
#include <comphelper/componentcontext.hxx>
-#endif
//........................................................................
namespace sdbtools
@@ -123,3 +108,4 @@ namespace sdbtools
#endif // DBACCESS_CONNECTIONTOOLS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/sdbtools/connection/datasourcemetadata.cxx b/dbaccess/source/sdbtools/connection/datasourcemetadata.cxx
index 28332566a..169230063 100644
--- a/dbaccess/source/sdbtools/connection/datasourcemetadata.cxx
+++ b/dbaccess/source/sdbtools/connection/datasourcemetadata.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,19 +29,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBACCESS_DATASOURCEMETADATA_HXX
#include "datasourcemetadata.hxx"
-#endif
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_LANG_NULLPOINTEREXCEPTION_HPP_
#include <com/sun/star/lang/NullPointerException.hpp>
-#endif
/** === end UNO includes === **/
-#ifndef CONNECTIVITY_INC_CONNECTIVITY_DBMETADATA_HXX
#include <connectivity/dbmetadata.hxx>
-#endif
//........................................................................
namespace sdbtools
@@ -91,3 +86,4 @@ namespace sdbtools
} // namespace sdbtools
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx b/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx
index 2361d502e..41f19047b 100644
--- a/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx
+++ b/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,19 +29,13 @@
#ifndef DBACCESS_DATASOURCEMETADATA_HXX
#define DBACCESS_DATASOURCEMETADATA_HXX
-#ifndef DBACCESS_CONNECTION_DEPENDENT_HXX
#include "connectiondependent.hxx"
-#endif
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_SDB_TOOLS_XDATASOURCEMETADATA_HPP_
#include <com/sun/star/sdb/tools/XDataSourceMetaData.hpp>
-#endif
/** === end UNO includes === **/
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
#include <memory>
@@ -95,3 +90,5 @@ namespace sdbtools
//........................................................................
#endif // DBACCESS_DATASOURCEMETADATA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/sdbtools/connection/makefile.mk b/dbaccess/source/sdbtools/connection/makefile.mk
deleted file mode 100644
index f8d43df01..000000000
--- a/dbaccess/source/sdbtools/connection/makefile.mk
+++ /dev/null
@@ -1,49 +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=conntools
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files -------------------------------------
-SLOFILES= \
- $(SLO)$/connectiontools.obj \
- $(SLO)$/tablename.obj \
- $(SLO)$/objectnames.obj \
- $(SLO)$/datasourcemetadata.obj
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx
index 0755b0d8c..d8aadca8c 100644
--- a/dbaccess/source/sdbtools/connection/objectnames.cxx
+++ b/dbaccess/source/sdbtools/connection/objectnames.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,16 +29,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBACCESS_SOURCE_SDBTOOLS_CONNECTION_OBJECTNAMES_HXX
#include "objectnames.hxx"
-#endif
-#ifndef DBACCESS_MODULE_SDBT_HXX
#include "module_sdbt.hxx"
-#endif
-#ifndef DBACCESS_SDBT_RESOURCE_HRC
#include "sdbt_resource.hrc"
-#endif
/** === begin UNO includes === **/
#include <com/sun/star/lang/NullPointerException.hpp>
@@ -207,7 +202,7 @@ namespace sdbtools
|| ( _rName.indexOf( (sal_Unicode)96 ) >= 0 ) //
|| ( _rName.indexOf( (sal_Unicode)145 ) >= 0 ) //
|| ( _rName.indexOf( (sal_Unicode)146 ) >= 0 ) //
- || ( _rName.indexOf( (sal_Unicode)180 ) >= 0 ) // #86621# removed unparsable chars
+ || ( _rName.indexOf( (sal_Unicode)180 ) >= 0 ) // removed unparsable chars
)
return ErrorCondition::DB_QUERY_NAME_WITH_QUOTES;
@@ -496,3 +491,4 @@ namespace sdbtools
} // namespace sdbtools
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/sdbtools/connection/objectnames.hxx b/dbaccess/source/sdbtools/connection/objectnames.hxx
index 678304ec0..4a9609a0d 100644
--- a/dbaccess/source/sdbtools/connection/objectnames.hxx
+++ b/dbaccess/source/sdbtools/connection/objectnames.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96,3 +97,4 @@ namespace sdbtools
#endif // DBACCESS_SOURCE_SDBTOOLS_INC_OBJECTNAMES_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/sdbtools/connection/tablename.cxx b/dbaccess/source/sdbtools/connection/tablename.cxx
index a63500027..6faada417 100644
--- a/dbaccess/source/sdbtools/connection/tablename.cxx
+++ b/dbaccess/source/sdbtools/connection/tablename.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,6 +43,7 @@
#include <connectivity/dbtools.hxx>
#include <tools/diagnose_ex.h>
#include <tools/string.hxx>
+#include <sal/macros.h>
//........................................................................
namespace sdbtools
@@ -210,7 +212,7 @@ namespace sdbtools
//--------------------------------------------------------------------
namespace
{
- /** translates a CopmositionType into a EComposeRule
+ /** translates a CompositionType into a EComposeRule
@throws IllegalArgumentException
if the given value does not denote a valid CompositionType
*/
@@ -232,7 +234,7 @@ namespace sdbtools
bool found = false;
size_t i = 0;
- for ( ; ( i < sizeof( TypeTable ) / sizeof( TypeTable[0] ) ) && !found; ++i )
+ for ( ; ( i < SAL_N_ELEMENTS( TypeTable ) ) && !found; ++i )
if ( TypeTable[i].nCompositionType == _nType )
found = true;
if ( !found )
@@ -273,3 +275,4 @@ namespace sdbtools
} // namespace sdbtools
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/sdbtools/connection/tablename.hxx b/dbaccess/source/sdbtools/connection/tablename.hxx
index 980f61091..073a6ed34 100644
--- a/dbaccess/source/sdbtools/connection/tablename.hxx
+++ b/dbaccess/source/sdbtools/connection/tablename.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,19 +29,13 @@
#ifndef DBACCESS_SOURCE_SDBTOOLS_CONNECTION_TABLENAME_HXX
#define DBACCESS_SOURCE_SDBTOOLS_CONNECTION_TABLENAME_HXX
-#ifndef DBACCESS_CONNECTION_DEPENDENT_HXX
#include "connectiondependent.hxx"
-#endif
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_SDB_TOOLS_XTABLENAME_HPP_
#include <com/sun/star/sdb/tools/XTableName.hpp>
-#endif
/** === end UNO includes === **/
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
#include <memory>
@@ -107,3 +102,4 @@ namespace sdbtools
#endif // DBACCESS_SOURCE_SDBTOOLS_CONNECTION_TABLENAME_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/sdbtools/inc/module_sdbt.hxx b/dbaccess/source/sdbtools/inc/module_sdbt.hxx
index 4c2f17874..185d9b1ad 100644
--- a/dbaccess/source/sdbtools/inc/module_sdbt.hxx
+++ b/dbaccess/source/sdbtools/inc/module_sdbt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef DBACCESS_MODULE_SDBT_HXX
#define DBACCESS_MODULE_SDBT_HXX
-#ifndef UNOTOOLS_INC_UNOTOOLS_COMPONENTRESMODULE_HXX
#include <unotools/componentresmodule.hxx>
-#endif
//........................................................................
namespace sdbtools
@@ -45,3 +44,4 @@ namespace sdbtools
#endif // DBACCESS_MODULE_SDBT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/sdbtools/misc/makefile.mk b/dbaccess/source/sdbtools/misc/makefile.mk
deleted file mode 100644
index 8c51fc7a8..000000000
--- a/dbaccess/source/sdbtools/misc/makefile.mk
+++ /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.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-PRJINC=$(PRJ)$/source
-PRJNAME=dbaccess
-TARGET=sdbtmisc
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files -------------------------------------
-SLOFILES= \
- $(SLO)$/sdbt_services.obj \
- $(SLO)$/module_sdbt.obj
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/dbaccess/source/sdbtools/misc/module_sdbt.cxx b/dbaccess/source/sdbtools/misc/module_sdbt.cxx
index 45aa686cb..e90999ced 100644
--- a/dbaccess/source/sdbtools/misc/module_sdbt.cxx
+++ b/dbaccess/source/sdbtools/misc/module_sdbt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBACCESS_MODULE_SDBT_HXX
#include "module_sdbt.hxx"
-#endif
//........................................................................
namespace sdbtools
@@ -43,3 +42,4 @@ namespace sdbtools
} // namespace sdbtools
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/sdbtools/misc/sdbt_services.cxx b/dbaccess/source/sdbtools/misc/sdbt_services.cxx
index 31eea5221..af6c1603e 100644
--- a/dbaccess/source/sdbtools/misc/sdbt_services.cxx
+++ b/dbaccess/source/sdbtools/misc/sdbt_services.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBACCESS_MODULE_SDBT_HXX
#include "module_sdbt.hxx"
-#endif
/** === begin UNO using === **/
using ::com::sun::star::lang::XMultiServiceFactory;
@@ -84,3 +83,4 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
return xRet.get();
};
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/sdbtools/resource/makefile.mk b/dbaccess/source/sdbtools/resource/makefile.mk
deleted file mode 100644
index 9b55104c9..000000000
--- a/dbaccess/source/sdbtools/resource/makefile.mk
+++ /dev/null
@@ -1,45 +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=sdbt_resource
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=sdbt_strings
-SRC1FILES= \
- sdbt_strings.src \
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
diff --git a/dbaccess/source/sdbtools/resource/sdbt_strings.src b/dbaccess/source/sdbtools/resource/sdbt_strings.src
index f19a52c4b..bd6d7d49f 100644
--- a/dbaccess/source/sdbtools/resource/sdbt_strings.src
+++ b/dbaccess/source/sdbtools/resource/sdbt_strings.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/shared/dbu_reghelper.cxx b/dbaccess/source/shared/dbu_reghelper.cxx
index c8ed3d785..bbfa236ab 100644
--- a/dbaccess/source/shared/dbu_reghelper.cxx
+++ b/dbaccess/source/shared/dbu_reghelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,12 +31,8 @@
#include "dbu_reghelper.hxx"
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
namespace dbaui
{
@@ -46,3 +43,4 @@ namespace dbaui
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/shared/dbustrings.cxx b/dbaccess/source/shared/dbustrings.cxx
index 6a2cf648b..2eab5ab1b 100644
--- a/dbaccess/source/shared/dbustrings.cxx
+++ b/dbaccess/source/shared/dbustrings.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,3 +72,5 @@ namespace dbaui
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_ENABLED, "Enabled");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_MOUSE_WHEEL_BEHAVIOR, "MouseWheelBehavior");
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/shared/flt_reghelper.cxx b/dbaccess/source/shared/flt_reghelper.cxx
index 261052c62..55c5e3d57 100644
--- a/dbaccess/source/shared/flt_reghelper.cxx
+++ b/dbaccess/source/shared/flt_reghelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,16 +29,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaxml.hxx"
-#ifndef _FLT_REGHELPER_HXX_
#include "flt_reghelper.hxx"
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
namespace dbaxml
{
@@ -47,3 +42,5 @@ namespace dbaxml
#undef _REGISTRATIONHELPER_CXX_INCLUDED_INDIRECTLY_
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/shared/makefile.mk b/dbaccess/source/shared/makefile.mk
deleted file mode 100644
index 5f75c13f9..000000000
--- a/dbaccess/source/shared/makefile.mk
+++ /dev/null
@@ -1,69 +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
-LIBTARGET=NO
-TARGET=shared
-LIB1TARGET=$(SLB)$/dbushared.lib
-LIB2TARGET=$(SLB)$/fltshared.lib
-LIB4TARGET=$(SLB)$/sdbtshared.lib
-
-#ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Types -------------------------------------
-
-# --- Files -------------------------------------
-EXCEPTIONSFILES= \
- $(SLO)$/dbu_reghelper.obj \
- $(SLO)$/flt_reghelper.obj
-
-SLOFILES= \
- $(EXCEPTIONSFILES) \
- $(SLO)$/xmlstrings.obj \
- $(SLO)$/dbustrings.obj
-
-LIB1OBJFILES= \
- $(SLO)$/dbu_reghelper.obj \
- $(SLO)$/dbustrings.obj
-
-LIB2OBJFILES= \
- $(SLO)$/flt_reghelper.obj \
- $(SLO)$/xmlstrings.obj
-
-LIB4OBJFILES= \
- $(SLO)$/sdbtstrings.obj
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/dbaccess/source/shared/registrationhelper.cxx b/dbaccess/source/shared/registrationhelper.cxx
index f36ec97e2..fe283002e 100644
--- a/dbaccess/source/shared/registrationhelper.cxx
+++ b/dbaccess/source/shared/registrationhelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,7 +83,7 @@ void OModuleRegistration::revokeComponent(const ::rtl::OUString& _rImplementatio
{
if (!s_pImplementationNames)
{
- OSL_ENSURE(sal_False, "OModuleRegistration::revokeComponent : have no class infos ! Are you sure called this method at the right time ?");
+ OSL_FAIL("OModuleRegistration::revokeComponent : have no class infos ! Are you sure called this method at the right time ?");
return;
}
OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers,
@@ -125,7 +126,7 @@ uno::Reference< uno::XInterface > OModuleRegistration::getComponentFactory(
if (!s_pImplementationNames)
{
- OSL_ENSURE(sal_False, "OModuleRegistration::getComponentFactory : have no class infos ! Are you sure called this method at the right time ?");
+ OSL_FAIL("OModuleRegistration::getComponentFactory : have no class infos ! Are you sure called this method at the right time ?");
return NULL;
}
OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers,
@@ -165,3 +166,4 @@ uno::Reference< uno::XInterface > OModuleRegistration::getComponentFactory(
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/shared/sdbtstrings.cxx b/dbaccess/source/shared/sdbtstrings.cxx
index 3032628ee..6203ffb71 100644
--- a/dbaccess/source/shared/sdbtstrings.cxx
+++ b/dbaccess/source/shared/sdbtstrings.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,3 +34,5 @@ namespace sdbtools
{
#include "stringconstants.inc"
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/shared/xmlstrings.cxx b/dbaccess/source/shared/xmlstrings.cxx
index bcc1a58d2..d121d48ad 100644
--- a/dbaccess/source/shared/xmlstrings.cxx
+++ b/dbaccess/source/shared/xmlstrings.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,3 +35,4 @@ namespace dbaxml
#include "stringconstants.inc"
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 7b08ef946..bf53c1362 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,8 +79,8 @@
#include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
#include <com/sun/star/container/XHierarchicalName.hpp>
/** === end UNO includes === **/
-#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <tools/string.hxx>
#include <svl/urihelper.hxx>
@@ -124,7 +125,7 @@
#include <svx/dbaobjectex.hxx>
#include <svx/svxdlg.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include "AppView.hxx"
#include "browserids.hxx"
#include "dbu_reghelper.hxx"
@@ -194,7 +195,7 @@ namespace DatabaseObjectContainer = ::com::sun::star::sdb::application::Database
Sequence< ::rtl::OUString> OApplicationController::getSupportedServiceNames_Static(void) throw( RuntimeException )
{
Sequence< ::rtl::OUString> aSupported(1);
- aSupported.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.application.DefaultViewController");
+ aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.application.DefaultViewController"));
return aSupported;
}
//-------------------------------------------------------------------------
@@ -336,7 +337,7 @@ OApplicationController::~OApplicationController()
{
if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
{
- OSL_ENSURE(0,"Please check who doesn't dispose this component!");
+ OSL_FAIL("Please check who doesn't dispose this component!");
// increment ref count to prevent double call of Dtor
osl_incrementInterlockedCount( &m_refCount );
dispose();
@@ -446,7 +447,7 @@ void SAL_CALL OApplicationController::disposing()
m_xModel.clear();
}
}
- catch(Exception)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -468,12 +469,12 @@ sal_Bool OApplicationController::Construct(Window* _pParent)
getContainer()->Construct();
bSuccess = sal_True;
}
- catch(SQLException&)
+ catch(const SQLException&)
{
}
- catch(Exception&)
+ catch(const Exception&)
{
- DBG_ERROR("OApplicationController::Construct : the construction of UnoDataBrowserView failed !");
+ OSL_FAIL("OApplicationController::Construct : the construction of UnoDataBrowserView failed !");
}
if ( !bSuccess )
@@ -504,7 +505,7 @@ void SAL_CALL OApplicationController::disposing(const EventObject& _rSource) thr
Reference<XConnection> xCon(_rSource.Source, UNO_QUERY);
if ( xCon.is() )
{
- DBG_ASSERT( m_xDataSourceConnection == xCon,
+ OSL_ENSURE( m_xDataSourceConnection == xCon,
"OApplicationController::disposing: which connection does this come from?" );
if ( getContainer() && getContainer()->getElementType() == E_TABLE )
@@ -549,7 +550,7 @@ sal_Bool SAL_CALL OApplicationController::suspend(sal_Bool bSuspend) throw( Runt
);
}
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
if ( getView() && getView()->IsInModalMode() )
@@ -1018,7 +1019,7 @@ namespace
// -----------------------------------------------------------------------------
void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& aArgs)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
if ( isUserDefinedFeature( _nId ) )
@@ -1115,7 +1116,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
const PropertyValue* pEnd = pIter + aArgs.getLength();
for( ; pIter != pEnd ; ++pIter)
{
- if ( pIter->Name.equalsAscii("FormatStringId") )
+ if ( pIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FormatStringId")) )
{
SotFormatStringId nFormatId = 0;
if ( pIter->Value >>= nFormatId )
@@ -1272,7 +1273,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
case ID_NEW_TABLE_DESIGN:
break;
default:
- OSL_ENSURE(0,"illegal switch call!");
+ OSL_FAIL("illegal switch call!");
}
if ( bAutoPilot )
getContainer()->PostUserEvent( LINK( this, OApplicationController, OnCreateWithPilot ), reinterpret_cast< void* >( eType ) );
@@ -1555,7 +1556,7 @@ OApplicationView* OApplicationController::getContainer() const
// ::com::sun::star::container::XContainerListener
void SAL_CALL OApplicationController::elementInserted( const ContainerEvent& _rEvent ) throw(RuntimeException)
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
Reference< XContainer > xContainer(_rEvent.Source, UNO_QUERY);
@@ -1591,7 +1592,7 @@ void SAL_CALL OApplicationController::elementInserted( const ContainerEvent& _rE
// -----------------------------------------------------------------------------
void SAL_CALL OApplicationController::elementRemoved( const ContainerEvent& _rEvent ) throw(RuntimeException)
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
Reference< XContainer > xContainer(_rEvent.Source, UNO_QUERY);
@@ -1625,7 +1626,7 @@ void SAL_CALL OApplicationController::elementRemoved( const ContainerEvent& _rEv
// -----------------------------------------------------------------------------
void SAL_CALL OApplicationController::elementReplaced( const ContainerEvent& _rEvent ) throw(RuntimeException)
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
Reference< XContainer > xContainer(_rEvent.Source, UNO_QUERY);
@@ -1693,7 +1694,7 @@ namespace
case E_NONE:
break;
default:
- OSL_ENSURE(0,"Invalid ElementType!");
+ OSL_FAIL("Invalid ElementType!");
break;
}
return sToolbar;
@@ -1927,7 +1928,7 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const
break;
default:
- OSL_ENSURE( false, "OApplicationController::openElement: illegal object type!" );
+ OSL_FAIL( "OApplicationController::openElement: illegal object type!" );
break;
}
return xRet;
@@ -2038,7 +2039,7 @@ Reference< XComponent > OApplicationController::newElement( ElementType _eType,
break;
default:
- OSL_ENSURE( false, "OApplicationController::newElement: illegal type!" );
+ OSL_FAIL( "OApplicationController::newElement: illegal type!" );
break;
}
@@ -2073,7 +2074,7 @@ void OApplicationController::addContainerListener(const Reference<XNameAccess>&
// -----------------------------------------------------------------------------
void OApplicationController::renameEntry()
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
OSL_ENSURE(getContainer(),"View is NULL! -> GPF");
@@ -2277,7 +2278,7 @@ void OApplicationController::showPreviewFor(const ElementType _eType,const ::rtl
return;
default:
- OSL_ENSURE( false, "OApplicationController::showPreviewFor: unexpected element type!" );
+ OSL_FAIL( "OApplicationController::showPreviewFor: unexpected element type!" );
break;
}
}
@@ -2339,7 +2340,7 @@ void OApplicationController::onDeleteEntry()
nId = SID_DB_APP_REPORT_DELETE;
break;
default:
- OSL_ENSURE(0,"Invalid ElementType!");
+ OSL_FAIL("Invalid ElementType!");
break;
}
executeChecked(nId,Sequence<PropertyValue>());
@@ -2499,9 +2500,6 @@ sal_Int8 OApplicationController::queryDrop( const AcceptDropEvent& _rEvt, const
nAction = DND_ACTION_NONE;
}
}
- /*else
- nAction = nActionAskedFor & DND_ACTION_COPYMOVE;
- */
}
return nAction;
}
@@ -2516,7 +2514,7 @@ sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt )
OApplicationView* pView = getContainer();
if ( !pView || pView->getElementType() == E_NONE )
{
- DBG_ERROR("OApplicationController::executeDrop: what the hell did queryDrop do?");
+ OSL_FAIL("OApplicationController::executeDrop: what the hell did queryDrop do?");
// queryDrop shoud not have allowed us to reach this situation ....
return DND_ACTION_NONE;
}
@@ -2653,7 +2651,7 @@ IMPL_LINK( OApplicationController, OnFirstControllerConnected, void*, /**/ )
if ( !m_xModel.is() )
{
- OSL_ENSURE( false, "OApplicationController::OnFirstControllerConnected: too late!" );
+ OSL_FAIL( "OApplicationController::OnFirstControllerConnected: too late!" );
}
// if we have forms or reports which contain macros/scripts, then show a warning
@@ -2718,7 +2716,7 @@ sal_Bool SAL_CALL OApplicationController::attachModel(const Reference< XModel >
const Reference< XModifiable > xDocModify( _rxModel, UNO_QUERY );
if ( ( !xOfficeDoc.is() || !xDocModify.is() ) && _rxModel.is() )
{
- DBG_ERROR( "OApplicationController::attachModel: invalid model!" );
+ OSL_FAIL( "OApplicationController::attachModel: invalid model!" );
return sal_False;
}
@@ -2855,7 +2853,7 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer
// -----------------------------------------------------------------------------
::sal_Bool SAL_CALL OApplicationController::select( const Any& _aSelection ) throw (IllegalArgumentException, RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
Sequence< ::rtl::OUString> aSelection;
if ( !_aSelection.hasValue() || !getView() )
@@ -2874,7 +2872,7 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer
const NamedValue* pEnd = pIter + aCurrentSelection.getLength();
for(;pIter != pEnd;++pIter)
{
- if ( pIter->Name.equalsAscii("Type") )
+ if ( pIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Type")) )
{
sal_Int32 nType = 0;
pIter->Value >>= nType;
@@ -2882,7 +2880,7 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer
throw IllegalArgumentException();
eType = static_cast< ElementType >( nType );
}
- else if ( pIter->Name.equalsAscii("Selection") )
+ else if ( pIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Selection")) )
pIter->Value >>= aSelection;
}
@@ -2978,7 +2976,7 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer
// -----------------------------------------------------------------------------
Any SAL_CALL OApplicationController::getSelection( ) throw (RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
Sequence< NamedDatabaseObject > aCurrentSelection;
@@ -2998,7 +2996,7 @@ Any SAL_CALL OApplicationController::getSelection( ) throw (RuntimeException)
case E_FORM: aCurrentSelection[0].Type = DatabaseObjectContainer::FORMS; break;
case E_REPORT: aCurrentSelection[0].Type = DatabaseObjectContainer::REPORTS; break;
default:
- OSL_ENSURE( false, "OApplicationController::getSelection: unexpected current element type!" );
+ OSL_FAIL( "OApplicationController::getSelection: unexpected current element type!" );
break;
}
}
@@ -3036,3 +3034,4 @@ void OApplicationController::impl_migrateScripts_nothrow()
} // namespace dbaui
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx
index 32a4ef19f..a29213f6a 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -574,3 +575,4 @@ namespace dbaui
#endif // DBAUI_APPCONTROLLER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index e65644937..335926138 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,196 +29,70 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_APPCONTROLLER_HXX
#include "AppController.hxx"
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
#include <comphelper/property.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSER_HPP_
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UNO_XNAMINGSERVICE_HPP_
#include <com/sun/star/uno/XNamingService.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_
#include <com/sun/star/sdbc/XDataSource.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XSTORABLE_HPP_
#include <com/sun/star/frame/XStorable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
#include <com/sun/star/container/XChild.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XHIERARCHICALNAMECONTAINER_HPP_
#include <com/sun/star/container/XHierarchicalNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
#include <com/sun/star/sdb/CommandType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XBOOKMARKSSUPPLIER_HPP_
#include <com/sun/star/sdb/XBookmarksSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XVIEWSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XQUERYDEFINITIONSSUPPLIER_HPP_
#include <com/sun/star/sdb/XQueryDefinitionsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDROP_HPP_
#include <com/sun/star/sdbcx/XDrop.hpp>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
-#endif
-#ifndef _UNOTOOLS_UCBHELPER_HXX
#include <unotools/ucbhelper.hxx>
-#endif
-#ifndef DBAUI_DLGSAVE_HXX
#include "dlgsave.hxx"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _SV_WAITOBJ_HXX
#include <vcl/waitobj.hxx>
-#endif
-#ifndef _RTL_USTRBUF_HXX_
#include <rtl/ustrbuf.hxx>
-#endif
-#ifndef DBAUI_APPVIEW_HXX
#include "AppView.hxx"
-#endif
-#ifndef _SVX_DATACCESSDESCRIPTOR_HXX_
#include <svx/dataaccessdescriptor.hxx>
-#endif
-#ifndef SVX_DBAOBJECTEX_HXX
#include <svx/dbaobjectex.hxx>
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _DBAU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef _DBU_APP_HRC_
#include "dbu_app.hrc"
-#endif
-#ifndef _SV_MENU_HXX
#include <vcl/menu.hxx>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _SVLBOXITM_HXX
#include <svtools/svlbitm.hxx>
-#endif
-#ifndef _DBAUI_LISTVIEWITEMS_HXX_
#include "listviewitems.hxx"
-#endif
-#ifndef DBAUI_APPDETAILVIEW_HXX
#include "AppDetailView.hxx"
-#endif
-#ifndef _DBAUI_LINKEDDOCUMENTS_HXX_
#include "linkeddocuments.hxx"
-#endif
-#ifndef _SV_LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef DBAUI_DBEXCHANGE_HXX
#include "dbexchange.hxx"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
#include <algorithm>
-#ifndef _SVTREEBOX_HXX
#include <svtools/svtreebx.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XREPORTDOCUMENTSSUPPLIER_HPP_
#include <com/sun/star/sdb/XReportDocumentsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XFORMDOCUMENTSSUPPLIER_HPP_
#include <com/sun/star/sdb/XFormDocumentsSupplier.hpp>
-#endif
-#ifndef _FILEDLGHELPER_HXX
#include <sfx2/filedlghelper.hxx>
-#endif
-#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX
#include <unotools/pathoptions.hxx>
-#endif
-#ifndef _SFX_DOCFILT_HACK_HXX
#include <sfx2/docfilt.hxx>
-#endif
-#ifndef _SVT_FILEVIEW_HXX
#include <svtools/fileview.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef DBACCESS_SOURCE_UI_MISC_DEFAULTOBJECTNAMECHECK_HXX
+#include <osl/diagnose.h>
#include "defaultobjectnamecheck.hxx"
-#endif
-#ifndef _VOS_MUTEX_HXX_
-#include <vos/mutex.hxx>
-#endif
+#include <osl/mutex.hxx>
#include "subcomponentmanager.hxx"
//........................................................................
@@ -298,7 +173,7 @@ void OApplicationController::deleteTables(const ::std::vector< ::rtl::OUString>&
if(e.TargetException >>= aSql)
aErrorInfo = aSql;
else
- OSL_ENSURE(sal_False, "OApplicationController::implDropTable: something strange happended!");
+ OSL_FAIL("OApplicationController::implDropTable: something strange happended!");
}
catch( const Exception& )
{
@@ -336,7 +211,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
// The list of elements to delete is allowed to contain related elements: A given element may
// be the ancestor or child of another element from the list.
// We want to ensure that ancestors get deleted first, so we normalize the list in this respect.
- // #i33353# - 2004-09-27 - fs@openoffice.org
+ // #i33353#
::std::set< ::rtl::OUString > aDeleteNames;
// Note that this implicitly uses ::std::less< ::rtl::OUString > a comparison operation, which
// results in lexicographical order, which is exactly what we need, because "foo" is *before*
@@ -390,7 +265,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
// now that we removed the element, care for all it's child elements
// which may also be a part of the list
- // #i33353# - 2004-09-27 - fs@openoffice.org
+ // #i33353#
OSL_ENSURE( aThisRound->getLength() - 1 >= 0, "OApplicationController::deleteObjects: empty name?" );
::rtl::OUStringBuffer sSmallestSiblingName( *aThisRound );
sSmallestSiblingName.append( (sal_Unicode)( '/' + 1) );
@@ -419,7 +294,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
if ( e.TargetException >>= aSql )
showError( SQLExceptionInfo( e.TargetException ) );
else
- OSL_ENSURE( sal_False, "OApplicationController::deleteObjects: something strange happended!" );
+ OSL_FAIL( "OApplicationController::deleteObjects: something strange happended!" );
}
catch( const Exception& )
{
@@ -440,7 +315,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
// -----------------------------------------------------------------------------
void OApplicationController::deleteEntries()
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
if ( getContainer() )
@@ -470,7 +345,7 @@ void OApplicationController::deleteEntries()
// -----------------------------------------------------------------------------
const SharedConnection& OApplicationController::ensureConnection( ::dbtools::SQLExceptionInfo* _pErrorInfo )
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
if ( !m_xDataSourceConnection.is() )
@@ -586,7 +461,7 @@ Reference< XNameAccess > OApplicationController::getElements( ElementType _eType
// -----------------------------------------------------------------------------
void OApplicationController::getSelectionElementNames(::std::vector< ::rtl::OUString>& _rNames) const
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
OSL_ENSURE(getContainer(),"View isn't valid! -> GPF");
@@ -619,7 +494,7 @@ TransferableHelper* OApplicationController::copyObject()
{
try
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
ElementType eType = getContainer()->getElementType();
@@ -693,7 +568,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc
if ( CommandType::QUERY == nCommandType || CommandType::COMMAND == nCommandType )
{
- // read all nescessary data
+ // read all necessary data
::rtl::OUString sCommand;
sal_Bool bEscapeProcessing = sal_True;
@@ -711,7 +586,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc
bValidDescriptor = (0 != sCommand.getLength());
if (!bValidDescriptor)
{
- DBG_ERROR("OApplicationController::paste: invalid descriptor!");
+ OSL_FAIL("OApplicationController::paste: invalid descriptor!");
return sal_False;
}
@@ -762,7 +637,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc
if (!bSuccess)
{
- DBG_ERROR("OApplicationController::paste: could not extract the source query object!");
+ OSL_FAIL("OApplicationController::paste: could not extract the source query object!");
// TODO: maybe this is worth an error message to be displayed to the user ....
return sal_False;
}
@@ -773,7 +648,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc
Reference< XSingleServiceFactory > xQueryFactory(xDestQueries, UNO_QUERY);
if (!xQueryFactory.is())
{
- DBG_ERROR("OApplicationController::paste: invalid destination query container!");
+ OSL_FAIL("OApplicationController::paste: invalid destination query container!");
return sal_False;
}
@@ -805,7 +680,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc
// create a new object
Reference< XPropertySet > xNewQuery(xQueryFactory->createInstance(), UNO_QUERY);
- DBG_ASSERT(xNewQuery.is(), "OApplicationController::paste: invalid object created by factory!");
+ OSL_ENSURE(xNewQuery.is(), "OApplicationController::paste: invalid object created by factory!");
if (xNewQuery.is())
{
// initialize
@@ -902,7 +777,7 @@ sal_Bool OApplicationController::isTableFormat() const
IMPL_LINK( OApplicationController, OnAsyncDrop, void*, /*NOTINTERESTEDIN*/ )
{
m_nAsyncDrop = 0;
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
@@ -940,3 +815,4 @@ IMPL_LINK( OApplicationController, OnAsyncDrop, void*, /*NOTINTERESTEDIN*/ )
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index 062eea972..79724aa51 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,12 +75,13 @@
#include <svx/dbaexchange.hxx>
#include <toolkit/unohlp.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <tools/urlobj.hxx>
#include <unotools/bootstrap.hxx>
#include <vcl/mnemonic.hxx>
#include <vcl/svapp.hxx>
#include <vcl/waitobj.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
//........................................................................
namespace dbaui
@@ -215,7 +217,7 @@ void OApplicationController::openDialog( const ::rtl::OUString& _sServiceName )
{
try
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
WaitObject aWO(getView());
@@ -225,7 +227,7 @@ void OApplicationController::openDialog( const ::rtl::OUString& _sServiceName )
Reference< ::com::sun::star::awt::XWindow> xWindow = getTopMostContainerWindow();
if ( !xWindow.is() )
{
- DBG_ASSERT( getContainer(), "OApplicationController::Construct: have no view!" );
+ OSL_ENSURE( getContainer(), "OApplicationController::Construct: have no view!" );
if ( getContainer() )
xWindow = VCLUnoHelper::GetInterface(getView()->Window::GetParent());
}
@@ -290,7 +292,7 @@ void OApplicationController::refreshTables()
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Could not refresh tables!");
+ OSL_FAIL("Could not refresh tables!");
}
getContainer()->getDetailView()->clearPages(sal_False);
@@ -305,7 +307,7 @@ void OApplicationController::openDirectSQLDialog()
// -----------------------------------------------------------------------------
void SAL_CALL OApplicationController::propertyChange( const PropertyChangeEvent& evt ) throw (RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
if ( evt.PropertyName == PROPERTY_USER )
{
@@ -392,7 +394,7 @@ Reference< XConnection > SAL_CALL OApplicationController::getActiveConnection()
// -----------------------------------------------------------------------------
void SAL_CALL OApplicationController::connect( ) throw (SQLException, RuntimeException)
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
SQLExceptionInfo aError;
@@ -431,7 +433,7 @@ beans::Pair< ::sal_Int32, ::rtl::OUString > SAL_CALL OApplicationController::ide
// -----------------------------------------------------------------------------
::sal_Bool SAL_CALL OApplicationController::closeSubComponents( ) throw (RuntimeException)
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
return m_pSubComponentManager->closeSubComponents();
}
@@ -450,7 +452,7 @@ namespace
case DatabaseObject::FORM: eType = E_FORM; break;
case DatabaseObject::REPORT: eType = E_REPORT; break;
default:
- OSL_ENSURE( false, "lcl_objectType2ElementType: unsupported object type!" );
+ OSL_FAIL( "lcl_objectType2ElementType: unsupported object type!" );
// this should have been caught earlier
}
return eType;
@@ -516,7 +518,7 @@ Reference< XComponent > SAL_CALL OApplicationController::loadComponent( ::sal_In
Reference< XComponent > SAL_CALL OApplicationController::loadComponentWithArguments( ::sal_Int32 _ObjectType,
const ::rtl::OUString& _ObjectName, ::sal_Bool _ForEditing, const Sequence< PropertyValue >& _Arguments ) throw (IllegalArgumentException, NoSuchElementException, SQLException, RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
impl_validateObjectTypeAndName_throw( _ObjectType, _ObjectName );
@@ -541,7 +543,7 @@ Reference< XComponent > SAL_CALL OApplicationController::createComponent( ::sal_
// -----------------------------------------------------------------------------
Reference< XComponent > SAL_CALL OApplicationController::createComponentWithArguments( ::sal_Int32 i_nObjectType, const Sequence< PropertyValue >& i_rArguments, Reference< XComponent >& o_DocumentDefinition ) throw (IllegalArgumentException, SQLException, RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
impl_validateObjectTypeAndName_throw( i_nObjectType, ::boost::optional< ::rtl::OUString >() );
@@ -571,7 +573,7 @@ void SAL_CALL OApplicationController::releaseContextMenuInterceptor( const Refer
// -----------------------------------------------------------------------------
void OApplicationController::previewChanged( sal_Int32 _nMode )
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
if ( m_xDataSource.is() && !isDataSourceReadOnly() )
@@ -596,20 +598,6 @@ void OApplicationController::previewChanged( sal_Int32 _nMode )
InvalidateFeature(SID_DB_APP_VIEW_DOC_PREVIEW);
}
// -----------------------------------------------------------------------------
-//void OApplicationController::updateTitle()
-//{
-// ::rtl::OUString sName = getStrippedDatabaseName();
-//
-// String sTitle = String(ModuleRes(STR_APP_TITLE));
-// sName = sName + sTitle;
-//#ifdef DBG_UTIL
-// ::rtl::OUString aDefault;
-// sName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ["));
-// sName += utl::Bootstrap::getBuildIdData( aDefault );
-// sName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]"));
-//#endif
-//}
-// -----------------------------------------------------------------------------
void OApplicationController::askToReconnect()
{
if ( m_bNeedToReconnect )
@@ -853,3 +841,5 @@ ElementType OApplicationController::getElementType(const Reference< XContainer >
//........................................................................
} // namespace dbaui
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 24f443d88..a71ae6947 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,137 +28,51 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_APPDETAILPAGEHELPER_HXX
#include "AppDetailPageHelper.hxx"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _DBAUI_TABLETREE_HXX_
#include "tabletree.hxx"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef DBAUI_DBTREELISTBOX_HXX
#include "dbtreelistbox.hxx"
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XLAYOUTMANAGER_HPP_
#include <com/sun/star/frame/XLayoutManager.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_XTABCONTROLLER_HPP_
#include <com/sun/star/awt/XTabController.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XVIEWSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
#include <com/sun/star/frame/XFrame.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
#include <com/sun/star/frame/XComponentLoader.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XFRAMES_HPP_
#include <com/sun/star/frame/XFrames.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XFRAMESSUPPLIER_HPP_
#include <com/sun/star/frame/XFramesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
#include <com/sun/star/awt/XWindow.hpp>
-#endif
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/helper/vclunohelper.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UCB_XCOMMANDENVIRONMENT_HPP_
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_XCOMMANDPROCESSOR_HPP_
#include <com/sun/star/ucb/XCommandProcessor.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_COMMAND_HPP_
#include <com/sun/star/ucb/Command.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_
#include <com/sun/star/form/XLoadable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
#include <com/sun/star/container/XChild.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
#include <com/sun/star/container/XContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
#include <com/sun/star/sdb/CommandType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XCLOSEABLE_HPP_
#include <com/sun/star/util/XCloseable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_XDATABASEDOCUMENTUI_HPP_
#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
-#endif
#include <com/sun/star/sdb/application/DatabaseObject.hpp>
#include <com/sun/star/sdb/application/DatabaseObjectContainer.hpp>
-#ifndef DBAUI_APPVIEW_HXX
#include "AppView.hxx"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _DBU_APP_HRC_
#include "dbu_app.hrc"
-#endif
-#ifndef _DBACCESS_UI_CALLBACKS_HXX_
#include "callbacks.hxx"
-#endif
-#ifndef DBAUI_ICONTROLLER_HXX
#include "IController.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _DBACCESS_SLOTID_HRC_
#include "dbaccess_slotid.hrc"
-#endif
-#ifndef DBACCESS_DATABASE_OBJECT_VIEW_HXX
#include "databaseobjectview.hxx"
-#endif
-#ifndef DBACCESS_IMAGEPROVIDER_HXX
#include "imageprovider.hxx"
-#endif
-#ifndef _SV_WAITOBJ_HXX
#include <vcl/waitobj.hxx>
-#endif
-#ifndef _STREAM_HXX
#include <tools/stream.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _RTL_USTRBUF_HXX_
#include <rtl/ustrbuf.hxx>
-#endif
#include "IApplicationController.hxx"
#include <com/sun/star/document/XDocumentProperties.hpp>
@@ -278,7 +193,7 @@ namespace
{
SetTextColor( rStyleSettings.GetFieldTextColor() );
SetTextFillColor();
- } // if( bForeground || bFont )
+ }
if( bBackground )
SetBackground( rStyleSettings.GetFieldColor() );
@@ -337,9 +252,9 @@ OAppDetailPageHelper::~OAppDetailPageHelper()
if ( xCloseable.is() )
xCloseable->close(sal_True);
}
- catch(Exception)
+ catch(const Exception&)
{
- OSL_ENSURE(0,"Exception thrown while disposing preview frame!");
+ OSL_FAIL("Exception thrown while disposing preview frame!");
}
for (int i=0; i < E_ELEMENT_TYPE_COUNT; ++i)
@@ -459,7 +374,7 @@ void OAppDetailPageHelper::describeCurrentSelectionForControl( const Control& _r
return;
}
}
- OSL_ENSURE( false, "OAppDetailPageHelper::describeCurrentSelectionForControl: invalid control!" );
+ OSL_FAIL( "OAppDetailPageHelper::describeCurrentSelectionForControl: invalid control!" );
}
// -----------------------------------------------------------------------------
@@ -515,7 +430,7 @@ void OAppDetailPageHelper::describeCurrentSelectionForType( const ElementType _e
}
break;
default:
- OSL_ENSURE( false, "OAppDetailPageHelper::describeCurrentSelectionForType: unexpected type!" );
+ OSL_FAIL( "OAppDetailPageHelper::describeCurrentSelectionForType: unexpected type!" );
break;
}
@@ -628,13 +543,11 @@ sal_Bool OAppDetailPageHelper::isCutAllowed()
// -----------------------------------------------------------------------------
sal_Bool OAppDetailPageHelper::isCopyAllowed()
{
- //int nPos = getVisibleControlIndex();
return sal_True;
}
// -----------------------------------------------------------------------------
sal_Bool OAppDetailPageHelper::isPasteAllowed()
{
- //int nPos = getVisibleControlIndex();
return sal_True;
}
// -----------------------------------------------------------------------------
@@ -708,8 +621,7 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon
ImageProvider aImageProvider( _xConnection );
createTree( pTreeView,
- aImageProvider.getDefaultImage( DatabaseObject::TABLE, false ),
- aImageProvider.getDefaultImage( DatabaseObject::TABLE, true )
+ aImageProvider.getDefaultImage( DatabaseObject::TABLE )
);
pTreeView->notifyHiContrastChanged();
@@ -729,10 +641,10 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon
}
// -----------------------------------------------------------------------------
-void OAppDetailPageHelper::getElementIcons( ElementType _eType, sal_uInt16& _rImageId, sal_uInt16& _rHighContrastImageId )
+void OAppDetailPageHelper::getElementIcons( ElementType _eType, sal_uInt16& _rImageId)
{
ImageProvider aImageProvider;
- _rImageId = _rHighContrastImageId = 0;
+ _rImageId = 0;
sal_Int32 nDatabaseObjectType( 0 );
switch(_eType )
@@ -741,11 +653,10 @@ void OAppDetailPageHelper::getElementIcons( ElementType _eType, sal_uInt16& _rIm
case E_REPORT: nDatabaseObjectType = DatabaseObject::REPORT; break;
case E_QUERY: nDatabaseObjectType = DatabaseObject::QUERY; break;
default:
- OSL_ENSURE( sal_False, "OAppDetailPageHelper::GetElementIcons: invalid element type!" );
+ OSL_FAIL( "OAppDetailPageHelper::GetElementIcons: invalid element type!" );
return;
}
- _rImageId = aImageProvider.getDefaultImageResourceID( nDatabaseObjectType, false );
- _rHighContrastImageId = aImageProvider.getDefaultImageResourceID( nDatabaseObjectType, true );
+ _rImageId = aImageProvider.getDefaultImageResourceID( nDatabaseObjectType );
}
// -----------------------------------------------------------------------------
@@ -753,42 +664,39 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA
{
OSL_ENSURE(E_TABLE != _eType,"E_TABLE isn't allowed.");
- sal_uInt16 nImageId = 0, nImageIdH = 0;
+ sal_uInt16 nImageId = 0;
rtl::OString sHelpId;
ImageProvider aImageProvider;
- Image aFolderImage, aFolderImageHC;
+ Image aFolderImage;
switch( _eType )
{
case E_FORM:
sHelpId = HID_APP_FORM_TREE;
- aFolderImage = aImageProvider.getFolderImage( DatabaseObject::FORM, false );
- aFolderImageHC = aImageProvider.getFolderImage( DatabaseObject::FORM, true );
+ aFolderImage = aImageProvider.getFolderImage( DatabaseObject::FORM );
break;
case E_REPORT:
sHelpId = HID_APP_REPORT_TREE;
- aFolderImage = aImageProvider.getFolderImage( DatabaseObject::REPORT, false );
- aFolderImageHC = aImageProvider.getFolderImage( DatabaseObject::REPORT, true );
+ aFolderImage = aImageProvider.getFolderImage( DatabaseObject::REPORT );
break;
case E_QUERY:
sHelpId = HID_APP_QUERY_TREE;
- aFolderImage = aImageProvider.getFolderImage( DatabaseObject::QUERY, false );
- aFolderImageHC = aImageProvider.getFolderImage( DatabaseObject::QUERY, true );
+ aFolderImage = aImageProvider.getFolderImage( DatabaseObject::QUERY );
break;
default:
- OSL_ENSURE(0,"Illegal call!");
+ OSL_FAIL("Illegal call!");
}
- getElementIcons( _eType, nImageId, nImageIdH );
+ getElementIcons( _eType, nImageId );
if ( !m_pLists[_eType] )
{
- m_pLists[_eType] = createSimpleTree( sHelpId, aFolderImage, aFolderImageHC );
+ m_pLists[_eType] = createSimpleTree( sHelpId, aFolderImage );
}
if ( m_pLists[_eType] )
{
if ( !m_pLists[_eType]->GetEntryCount() && _xContainer.is() )
{
- fillNames( _xContainer, _eType, nImageId, nImageIdH, NULL );
+ fillNames( _xContainer, _eType, nImageId, NULL );
m_pLists[_eType]->SelectAll(sal_False);
}
@@ -836,7 +744,7 @@ namespace
// -----------------------------------------------------------------------------
void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContainer, const ElementType _eType,
- const sal_uInt16 _nImageId, const sal_uInt16 _nHighContrastImageId, 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!" );
@@ -861,33 +769,29 @@ void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContaine
{
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, _nHighContrastImageId, pEntry );
+ fillNames( xSubElements, _eType, _nImageId, pEntry );
}
else
{
pEntry = pList->InsertEntry( *pIter, _pParent );
Image aImage = Image( ModuleRes( _nImageId ) );
- pList->SetExpandedEntryBmp( pEntry, aImage, BMP_COLOR_NORMAL );
- pList->SetCollapsedEntryBmp( pEntry, aImage, BMP_COLOR_NORMAL );
-
- Image aHCImage = Image( ModuleRes( _nHighContrastImageId ) );
- pList->SetExpandedEntryBmp( pEntry, aHCImage, BMP_COLOR_HIGHCONTRAST );
- pList->SetCollapsedEntryBmp( pEntry, aHCImage, BMP_COLOR_HIGHCONTRAST );
+ pList->SetExpandedEntryBmp( pEntry, aImage );
+ pList->SetCollapsedEntryBmp( pEntry, aImage );
}
}
}
}
// -----------------------------------------------------------------------------
-DBTreeListBox* OAppDetailPageHelper::createSimpleTree( const rtl::OString& _sHelpId, const Image& _rImage, const Image& _rImageHC )
+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( _sHelpId );
- return createTree( pTreeView, _rImage, _rImageHC );
+ return createTree( pTreeView, _rImage );
}
// -----------------------------------------------------------------------------
-DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, const Image& _rImage, const Image& _rImageHC )
+DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, const Image& _rImage )
{
WaitObject aWaitCursor(this);
@@ -897,9 +801,7 @@ DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, cons
_pTreeView->SetSelectionMode(MULTIPLE_SELECTION);
_pTreeView->SetDefaultCollapsedEntryBmp( _rImage );
- _pTreeView->SetDefaultCollapsedEntryBmp( _rImageHC, BMP_COLOR_HIGHCONTRAST );
_pTreeView->SetDefaultExpandedEntryBmp( _rImage );
- _pTreeView->SetDefaultExpandedEntryBmp( _rImageHC, BMP_COLOR_HIGHCONTRAST );
_pTreeView->SetDoubleClickHdl(LINK(this, OAppDetailPageHelper, OnEntryDoubleClick));
_pTreeView->SetEnterKeyHdl(LINK(this, OAppDetailPageHelper, OnEntryDoubleClick));
@@ -958,7 +860,7 @@ void OAppDetailPageHelper::elementReplaced(ElementType _eType
pEntry = lcl_findEntry(*pTreeView,_rOldName,pTreeView->First());
break;
default:
- OSL_ENSURE(0,"Invalid element type");
+ OSL_FAIL("Invalid element type");
}
OSL_ENSURE(pEntry,"Do you know that the name isn't existence!");
if ( pEntry )
@@ -991,26 +893,22 @@ SvLBoxEntry* OAppDetailPageHelper::elementAdded(ElementType _eType,const ::rtl::
}
}
- sal_uInt16 nImageId = 0, nImageIdH = 0;
- getElementIcons( _eType, nImageId, nImageIdH );
+ 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, sal_False, LIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) );
- fillNames( xContainer, _eType, nImageId, nImageIdH, pRet );
+ fillNames( xContainer, _eType, nImageId, pRet );
}
else
{
pRet = pTreeView->InsertEntry( _rName, pEntry );
Image aImage = Image( ModuleRes( nImageId ) );
- pTreeView->SetExpandedEntryBmp( pRet, aImage, BMP_COLOR_NORMAL );
- pTreeView->SetCollapsedEntryBmp( pRet, aImage, BMP_COLOR_NORMAL );
-
- Image aHCImage = Image( ModuleRes( nImageIdH ) );
- pTreeView->SetExpandedEntryBmp( pRet, aHCImage, BMP_COLOR_HIGHCONTRAST );
- pTreeView->SetCollapsedEntryBmp( pRet, aHCImage, BMP_COLOR_HIGHCONTRAST );
+ pTreeView->SetExpandedEntryBmp( pRet, aImage );
+ pTreeView->SetCollapsedEntryBmp( pRet, aImage );
}
}
return pRet;
@@ -1047,7 +945,7 @@ void OAppDetailPageHelper::elementRemoved( ElementType _eType,const ::rtl::OUStr
}
break;
default:
- OSL_ENSURE(0,"Invalid element type");
+ OSL_FAIL("Invalid element type");
}
if ( !pTreeView->GetEntryCount() )
showPreview(NULL);
@@ -1093,8 +991,7 @@ IMPL_LINK( OAppDetailPageHelper, OnDeleteEntry, void*, /*NOINTERESTEDIN*/ )
// -----------------------------------------------------------------------------
void OAppDetailPageHelper::Resize()
{
- //////////////////////////////////////////////////////////////////////
- // Abmessungen parent window
+ // parent window dimension
Size aOutputSize( GetOutputSize() );
long nOutputWidth = aOutputSize.Width();
long nOutputHeight = aOutputSize.Height();
@@ -1231,12 +1128,6 @@ void OAppDetailPageHelper::showPreview(const Reference< XContent >& _xContent)
{
m_aPreview.Hide();
m_aDocumentInfo.Hide();
-
- // Why the below code? It might have side effects, as the tree view needs to know
- // its current selection for other purposes than the preview, too.
-// DBTreeListBox* pTreeView = getCurrentView();
-// if ( pTreeView )
-// pTreeView->clearCurrentSelection();
}
}
catch( const Exception& )
@@ -1263,9 +1154,9 @@ void OAppDetailPageHelper::showPreview( const ::rtl::OUString& _sDataSourceName,
m_xFrame = Reference < XFrame > ( getBorderWin().getView()->getORB()->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Frame")) ), UNO_QUERY );
m_xFrame->initialize( m_xWindow );
- // work-around for #150518#: no layout manager (and thus no toolbars) in the preview
+ // no layout manager (and thus no toolbars) in the preview
// Must be called after initialize ... but before any other call to this frame.
- // Otherwhise frame throws "life time exceptions" as e.g. NON_INITIALIZED
+ // Otherwise frame throws "life time exceptions" as e.g. NON_INITIALIZED
Reference< XPropertySet > xFrameProps( m_xFrame, UNO_QUERY_THROW );
xFrameProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ) ), makeAny(Reference< XLayoutManager >()) );
@@ -1276,7 +1167,7 @@ void OAppDetailPageHelper::showPreview( const ::rtl::OUString& _sDataSourceName,
xFrames->append(m_xFrame);
}
}
- catch(Exception)
+ catch(const Exception&)
{
}
}
@@ -1334,7 +1225,7 @@ IMPL_LINK(OAppDetailPageHelper, OnDropdownClickHdl, ToolBox*, /*pToolBox*/)
, SID_DB_APP_VIEW_DOCINFO_PREVIEW
};
- for(size_t i=0; i < sizeof(pActions)/sizeof(pActions[0]);++i)
+ for(size_t i=0; i < SAL_N_ELEMENTS(pActions);++i)
{
aMenu->CheckItem(pActions[i],m_aMenu->IsItemChecked(pActions[i]));
}
@@ -1400,34 +1291,25 @@ void OAppDetailPageHelper::DataChanged( const DataChangedEvent& rDCEvt )
void OAppDetailPageHelper::ImplInitSettings()
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- if( true )
- {
Font aFont;
aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont( aFont );
m_aTBPreview.SetPointFont( aFont );
- }
- if( true )
- {
SetTextColor( rStyleSettings.GetFieldTextColor() );
SetTextFillColor();
m_aBorder.SetTextColor( rStyleSettings.GetFieldTextColor() );
m_aBorder.SetTextFillColor();
m_aTBPreview.SetTextColor( rStyleSettings.GetFieldTextColor() );
m_aTBPreview.SetTextFillColor();
- } // if( true )
- if( true )
- {
SetBackground( rStyleSettings.GetFieldColor() );
m_aBorder.SetBackground( rStyleSettings.GetFieldColor() );
m_aFL.SetBackground( rStyleSettings.GetFieldColor() );
m_aDocumentInfo.SetBackground( rStyleSettings.GetFieldColor() );
m_aTBPreview.SetBackground( rStyleSettings.GetFieldColor() );
m_pTablePreview->SetBackground( rStyleSettings.GetFieldColor() );
- } // if( true )
}
// -----------------------------------------------------------------------------
OPreviewWindow::OPreviewWindow(Window* _pParent)
@@ -1514,7 +1396,7 @@ void OPreviewWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal
{
SetTextColor( rStyleSettings.GetFieldTextColor() );
SetTextFillColor();
- } // if( bForeground || bFont )
+ }
if( bBackground )
SetBackground( rStyleSettings.GetFieldColor() );
@@ -1522,3 +1404,4 @@ void OPreviewWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
index dfc2298df..67c426cde 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,42 +30,18 @@
#include <vector>
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_NAMEDDATABASEOBJECT_HPP_
#include <com/sun/star/sdb/application/NamedDatabaseObject.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_XCONTENT_HPP_
#include <com/sun/star/ucb/XContent.hpp>
-#endif
-#ifndef DBAUI_APPELEMENTTYPE_HXX
#include "AppElementType.hxx"
-#endif
-#ifndef _SVTREEBOX_HXX
#include <svtools/svtreebx.hxx>
-#endif
-#ifndef SVTOOLS_DOCUMENTINFOPREVIEW_HXX
#include <svtools/DocumentInfoPreview.hxx>
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_TOOLBOX_HXX
#include <vcl/toolbox.hxx>
-#endif
-#ifndef _SV_CVTGRF_HXX
#include <vcl/cvtgrf.hxx>
-#endif
-#ifndef _SV_GRAPH_HXX
#include <vcl/graph.hxx>
-#endif
-#ifndef _GRFMGR_HXX
#include <svtools/grfmgr.hxx>
-#endif
#include "callbacks.hxx"
#include <memory>
@@ -142,7 +119,7 @@ namespace dbaui
/** retrieves the resource ids of the images representing elements of the given type
*/
- void getElementIcons( ElementType _eType, sal_uInt16& _rImageId, sal_uInt16& _rHighContrastImageId );
+ void getElementIcons( ElementType _eType, sal_uInt16& _rImageId);
/** fills the names in the listbox
@param _xContainer
@@ -151,15 +128,12 @@ namespace dbaui
the type of elements which are being filled
@param _nImageId
the resource id of the image to use for non-container entries
- @param _nHighContrastImageId
- the resource id of the high contrast image to use for non-container entries
@param _pParent
The parent of the entries to be inserted.
*/
void fillNames( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xContainer,
const ElementType _eType,
const sal_uInt16 _nImageId,
- const sal_uInt16 _nHighContrastImageId,
SvLBoxEntry* _pParent );
/** sets the detail page
@@ -173,24 +147,20 @@ namespace dbaui
The newly created DBTreeListBox
@param _rImage
the resource id of the default icon
- @param _rImageHC
- the resource id of the default icon (HC version)
@return
The new tree.
*/
- DBTreeListBox* createTree( DBTreeListBox* _pTreeView, const Image& _rImage, const Image& _rImageHC );
+ DBTreeListBox* createTree( DBTreeListBox* _pTreeView, const Image& _rImage );
/** creates the tree and sets all HandleCallbacks
@param _nHelpId
The help id of the control
@param _nCollapsedBitmap
- The image to use for tree entries.
- @param _rImageHC
The image to use in high contrast mode.
@return
The new tree.
*/
- DBTreeListBox* createSimpleTree( const rtl::OString& _sHelpId, const Image& _rImage, const Image& _rImageHC );
+ DBTreeListBox* createSimpleTree( const rtl::OString& _sHelpId, const Image& _rImage);
DECL_LINK( OnEntryDoubleClick, SvTreeListBox* );
DECL_LINK( OnEntrySelChange, void* );
@@ -401,3 +371,4 @@ namespace dbaui
}
#endif // DBAUI_APPDETAILPAGEHELPER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index 29f0b8b87..ce41d984e 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,75 +28,29 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_APPDETAILVIEW_HXX
#include "AppDetailView.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
+#include <osl/diagnose.h>
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _DBU_APP_HRC_
#include "dbu_app.hrc"
-#endif
-#ifndef DBAUI_APPVIEW_HXX
#include "AppView.hxx"
-#endif
-#ifndef _COM_SUN_STAR_UI_XUICONFIGURATIONMANAGER_HPP_
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_XMODULEUICONFIGURATIONMANAGERSUPPLIER_HPP_
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_XIMAGEMANAGER_HPP_
#include <com/sun/star/ui/XImageManager.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_IMAGETYPE_HPP_
#include <com/sun/star/ui/ImageType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XVIEWSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_GRAPHIC_XGRAPHIC_HPP_
#include <com/sun/star/graphic/XGraphic.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_URL_HPP_
#include <com/sun/star/util/URL.hpp>
-#endif
-#ifndef _DBAUI_LISTVIEWITEMS_HXX_
#include "listviewitems.hxx"
-#endif
-#ifndef _IMAGE_HXX //autogen
#include <vcl/image.hxx>
-#endif
-#ifndef _SV_MNEMONIC_HXX
#include <vcl/mnemonic.hxx>
-#endif
-#ifndef _SV_MNEMONIC_HXX
#include <vcl/mnemonic.hxx>
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef DBAUI_APPDETAILPAGEHELPER_HXX
#include "AppDetailPageHelper.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _DBACCESS_UI_CALLBACKS_HXX_
#include "callbacks.hxx"
-#endif
-#ifndef DBAUI_ICONTROLLER_HXX
#include "IController.hxx"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _SVTOOLS_LOCALRESACCESS_HXX_
#include <svtools/localresaccess.hxx>
-#endif
#include <algorithm>
#include "dbtreelistbox.hxx"
#include "IApplicationController.hxx"
@@ -185,7 +140,7 @@ void OCreationList::PreparePaint( SvLBoxEntry* _pEntry )
void OCreationList::SelectSearchEntry( const void* _pEntry )
{
SvLBoxEntry* pEntry = const_cast< SvLBoxEntry* >( static_cast< const SvLBoxEntry* >( _pEntry ) );
- DBG_ASSERT( pEntry, "OCreationList::SelectSearchEntry: invalid entry!" );
+ OSL_ENSURE( pEntry, "OCreationList::SelectSearchEntry: invalid entry!" );
if ( pEntry )
setCurrentEntryInvalidate( pEntry );
@@ -198,8 +153,8 @@ void OCreationList::SelectSearchEntry( const void* _pEntry )
void OCreationList::ExecuteSearchEntry( const void* _pEntry ) const
{
SvLBoxEntry* pEntry = const_cast< SvLBoxEntry* >( static_cast< const SvLBoxEntry* >( _pEntry ) );
- DBG_ASSERT( pEntry, "OCreationList::ExecuteSearchEntry: invalid entry!" );
- DBG_ASSERT( pEntry == GetCurEntry(), "OCreationList::ExecuteSearchEntry: SelectSearchEntry should have been called before!" );
+ OSL_ENSURE( pEntry, "OCreationList::ExecuteSearchEntry: invalid entry!" );
+ OSL_ENSURE( pEntry == GetCurEntry(), "OCreationList::ExecuteSearchEntry: SelectSearchEntry should have been called before!" );
if ( pEntry )
onSelected( pEntry );
@@ -215,7 +170,7 @@ Rectangle OCreationList::GetFocusRect( SvLBoxEntry* _pEntry, long _nLine )
SvLBoxItem* pBitmapItem = _pEntry->GetFirstItem( SV_ITEM_ID_LBOXCONTEXTBMP );
SvLBoxTab* pTab = pBitmapItem ? GetTab( _pEntry, pBitmapItem ) : NULL;
SvViewDataItem* pItemData = pBitmapItem ? GetViewDataItem( _pEntry, pBitmapItem ) : NULL;
- DBG_ASSERT( pTab && pItemData, "OCreationList::GetFocusRect: could not find the first bitmap item!" );
+ OSL_ENSURE( pTab && pItemData, "OCreationList::GetFocusRect: could not find the first bitmap item!" );
if ( pTab && pItemData )
aRect.Left() = pTab->GetPos() - pItemData->aSize.Width() / 2;
@@ -259,7 +214,7 @@ void OCreationList::MouseButtonDown( const MouseEvent& rMEvt )
{
SvTreeListBox::MouseButtonDown( rMEvt );
- DBG_ASSERT( !m_pMouseDownEntry, "OCreationList::MouseButtonDown: I missed some mouse event!" );
+ OSL_ENSURE( !m_pMouseDownEntry, "OCreationList::MouseButtonDown: I missed some mouse event!" );
m_pMouseDownEntry = GetCurEntry();
if ( m_pMouseDownEntry )
{
@@ -281,14 +236,14 @@ void OCreationList::MouseMove( const MouseEvent& rMEvt )
if ( m_pMouseDownEntry )
{
// we're currently in a "mouse down" phase
- DBG_ASSERT( IsMouseCaptured(), "OCreationList::MouseMove: inconsistence (1)!" );
+ OSL_ENSURE( IsMouseCaptured(), "OCreationList::MouseMove: inconsistence (1)!" );
if ( pEntry == m_pMouseDownEntry )
{
setCurrentEntryInvalidate( m_pMouseDownEntry );
}
else
{
- DBG_ASSERT( ( GetCurEntry() == m_pMouseDownEntry ) || !GetCurEntry(),
+ OSL_ENSURE( ( GetCurEntry() == m_pMouseDownEntry ) || !GetCurEntry(),
"OCreationList::MouseMove: inconsistence (2)!" );
setCurrentEntryInvalidate( NULL );
}
@@ -321,7 +276,7 @@ void OCreationList::MouseButtonUp( const MouseEvent& rMEvt )
if ( m_pMouseDownEntry )
{
- DBG_ASSERT( IsMouseCaptured(), "OCreationList::MouseButtonUp: hmmm .... no mouse captured, but an active entry?" );
+ OSL_ENSURE( IsMouseCaptured(), "OCreationList::MouseButtonUp: hmmm .... no mouse captured, but an active entry?" );
ReleaseMouse();
InvalidateEntry( m_pMouseDownEntry );
@@ -362,7 +317,7 @@ void OCreationList::updateHelpText()
// -----------------------------------------------------------------------------
void OCreationList::onSelected( SvLBoxEntry* _pEntry ) const
{
- DBG_ASSERT( _pEntry, "OCreationList::onSelected: invalid entry!" );
+ OSL_ENSURE( _pEntry, "OCreationList::onSelected: invalid entry!" );
URL aCommand;
aCommand.Complete = reinterpret_cast< TaskEntry* >( _pEntry->GetUserData() )->sUNOCommand;
m_rTaskWindow.getDetailView()->getBorderWin().getView()->getAppController().executeChecked( aCommand, Sequence< PropertyValue >() );
@@ -393,7 +348,7 @@ void OCreationList::KeyInput( const KeyEvent& rKEvt )
{
InvalidateEntry( pNewCurrent );
CallEventListeners( VCLEVENT_LISTBOX_SELECT, pNewCurrent );
- } // if ( pNewCurrent )
+ }
updateHelpText();
}
}
@@ -407,7 +362,7 @@ OTasksWindow::OTasksWindow(Window* _pParent,OApplicationDetailView* _pDetailView
,m_aFL(this,WB_VERT)
,m_pDetailView(_pDetailView)
{
- DBG_CTOR(OTasksWindow,NULL);
+ DBG_CTOR(OTasksWindow,NULL);
SetUniqueId(UID_APP_TASKS_WINDOW);
m_aCreation.SetHelpId(HID_APP_CREATION_LIST);
m_aCreation.SetSelectHdl(LINK(this, OTasksWindow, OnEntrySelectHdl));
@@ -416,16 +371,16 @@ OTasksWindow::OTasksWindow(Window* _pParent,OApplicationDetailView* _pDetailView
m_aDescription.SetText(ModuleRes(STR_DESCRIPTION));
ImageProvider aImageProvider;
- Image aFolderImage = aImageProvider.getFolderImage( DatabaseObject::FORM, false );
+ Image aFolderImage = aImageProvider.getFolderImage( DatabaseObject::FORM );
m_aCreation.SetDefaultCollapsedEntryBmp( aFolderImage );
m_aCreation.SetDefaultExpandedEntryBmp( aFolderImage );
-
+
ImplInitSettings(sal_True,sal_True,sal_True);
}
// -----------------------------------------------------------------------------
OTasksWindow::~OTasksWindow()
{
- DBG_DTOR(OTasksWindow,NULL);
+ DBG_DTOR(OTasksWindow,NULL);
Clear();
}
// -----------------------------------------------------------------------
@@ -462,8 +417,6 @@ void OTasksWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_B
m_aHelpText.SetTextFillColor();
m_aDescription.SetTextColor( rStyleSettings.GetFieldTextColor() );
m_aDescription.SetTextFillColor();
- //m_aFL.SetTextColor( rStyleSettings.GetFieldTextColor() );
- //m_aFL.SetTextFillColor();
}
if( bBackground )
@@ -486,11 +439,6 @@ void OTasksWindow::setHelpText(sal_uInt16 _nId)
{
String sText = ModuleRes(_nId);
- // calulate the size of the text field
- // Size aHelpTextSize = m_aHelpText.GetSizePixel();
- // Size aHelpTextPixelSize = LogicToPixel( aHelpTextSize, MAP_APPFONT );
- // Rectangle aPrimaryRect( Point(0,0), aHelpTextSize );
- // Rectangle aSuggestedRect( GetTextRect( aPrimaryRect, sText, TEXT_DRAW_MULTILINE | TEXT_DRAW_LEFT | TEXT_DRAW_WORDBREAK ) );
m_aHelpText.SetText(sText);
}
else
@@ -511,8 +459,8 @@ IMPL_LINK(OTasksWindow, OnEntrySelectHdl, SvTreeListBox*, /*_pTreeBox*/)
void OTasksWindow::Resize()
{
DBG_CHKTHIS(OTasksWindow,NULL);
- //////////////////////////////////////////////////////////////////////
- // Abmessungen parent window
+
+ // parent window dimension
Size aOutputSize( GetOutputSize() );
long nOutputWidth = aOutputSize.Width();
long nOutputHeight = aOutputSize.Height();
@@ -520,30 +468,34 @@ void OTasksWindow::Resize()
Size aFLSize = LogicToPixel( Size( 2, 6 ), MAP_APPFONT );
sal_Int32 n6PPT = aFLSize.Height();
long nHalfOutputWidth = static_cast<long>(nOutputWidth * 0.5);
-
+
m_aCreation.SetPosSizePixel( Point(0, 0), Size(nHalfOutputWidth - n6PPT, nOutputHeight) );
// i77897 make the m_aHelpText a little bit smaller. (-5)
sal_Int32 nNewWidth = nOutputWidth - nHalfOutputWidth - aFLSize.Width() - 5;
- // m_aHelpText.SetBackground( MAKE_SALCOLOR( 0xe0, 0xe0, 0xe0 ) );
- // Wallpaper aLightGray(Color(0xe0, 0xe0, 0xe0));
- // m_aHelpText.SetBackground( aLightGray );
m_aDescription.SetPosSizePixel( Point(nHalfOutputWidth + n6PPT, 0), Size(nNewWidth, nOutputHeight) );
Size aDesc = m_aDescription.CalcMinimumSize();
m_aHelpText.SetPosSizePixel( Point(nHalfOutputWidth + n6PPT, aDesc.Height() ), Size(nNewWidth, nOutputHeight - aDesc.Height() - n6PPT) );
-
+
m_aFL.SetPosSizePixel( Point(nHalfOutputWidth , 0), Size(aFLSize.Width(), nOutputHeight ) );
}
// -----------------------------------------------------------------------------
void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList )
-{
+{
DBG_CHKTHIS(OTasksWindow,NULL);
Clear();
-
+
try
{
- Reference<XModuleUIConfigurationManagerSupplier> xModuleCfgMgrSupplier(getDetailView()->getBorderWin().getView()->getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"))),UNO_QUERY);
- Reference<XUIConfigurationManager> xUIConfigMgr = xModuleCfgMgrSupplier->getUIConfigurationManager(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument")));
- Reference<XImageManager> xImageMgr(xUIConfigMgr->getImageManager(),UNO_QUERY);
+ Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier(
+ getDetailView()->getBorderWin().getView()->getORB()->createInstance(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ) )
+ ) ,
+ UNO_QUERY
+ );
+ Reference< XUIConfigurationManager > xUIConfigMgr = xModuleCfgMgrSupplier->getUIConfigurationManager(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OfficeDatabaseDocument" ) )
+ );
+ Reference< XImageManager > xImageMgr( xUIConfigMgr->getImageManager(), UNO_QUERY );
// copy the commands so we can use them with the config managers
Sequence< ::rtl::OUString > aCommands( _rList.size() );
@@ -552,31 +504,28 @@ void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList )
for ( TaskEntryList::const_iterator pCopyTask = _rList.begin(); pCopyTask != aEnd; ++pCopyTask, ++pCommands )
*pCommands = pCopyTask->sUNOCommand;
- Sequence< Reference< XGraphic> > aImages = xImageMgr->getImages( ImageType::SIZE_DEFAULT | ImageType::COLOR_NORMAL, aCommands );
- Sequence< Reference< XGraphic> > aHCImages = xImageMgr->getImages( ImageType::SIZE_DEFAULT | ImageType::COLOR_HIGHCONTRAST, aCommands );
+ Sequence< Reference< XGraphic> > aImages = xImageMgr->getImages(
+ ImageType::SIZE_DEFAULT | ImageType::COLOR_NORMAL ,
+ aCommands
+ );
const Reference< XGraphic >* pImages( aImages.getConstArray() );
- const Reference< XGraphic >* pHCImages( aHCImages.getConstArray() );
- for ( TaskEntryList::const_iterator pTask = _rList.begin(); pTask != aEnd; ++pTask, ++pImages, ++pHCImages )
+ for ( TaskEntryList::const_iterator pTask = _rList.begin(); pTask != aEnd; ++pTask, ++pImages )
{
SvLBoxEntry* pEntry = m_aCreation.InsertEntry( pTask->sTitle );
pEntry->SetUserData( reinterpret_cast< void* >( new TaskEntry( *pTask ) ) );
Image aImage = Image( *pImages );
- m_aCreation.SetExpandedEntryBmp( pEntry, aImage, BMP_COLOR_NORMAL );
- m_aCreation.SetCollapsedEntryBmp( pEntry, aImage, BMP_COLOR_NORMAL );
-
- Image aHCImage = Image( *pHCImages );
- m_aCreation.SetExpandedEntryBmp( pEntry, aHCImage, BMP_COLOR_HIGHCONTRAST );
- m_aCreation.SetCollapsedEntryBmp( pEntry, aHCImage, BMP_COLOR_HIGHCONTRAST );
+ m_aCreation.SetExpandedEntryBmp( pEntry, aImage );
+ m_aCreation.SetCollapsedEntryBmp( pEntry, aImage );
}
}
catch(Exception&)
{
}
- m_aCreation.Show();
+ m_aCreation.Show();
m_aCreation.SelectAll(sal_False);
m_aHelpText.Show();
m_aDescription.Show();
@@ -595,7 +544,7 @@ void OTasksWindow::Clear()
delete reinterpret_cast< TaskEntry* >( pEntry->GetUserData() );
pEntry = m_aCreation.Next(pEntry);
}
- m_aCreation.Clear();
+ m_aCreation.Clear();
}
//==================================================================
// class OApplicationDetailView
@@ -607,7 +556,7 @@ OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,Previe
,m_aContainer(this,0,WB_BORDER | WB_DIALOGCONTROL )
,m_rBorderWin(_rParent)
{
- DBG_CTOR(OApplicationDetailView,NULL);
+ DBG_CTOR(OApplicationDetailView,NULL);
SetUniqueId(UID_APP_DETAIL_VIEW);
ImplInitSettings( sal_True, sal_True, sal_True );
@@ -664,7 +613,6 @@ void OApplicationDetailView::ImplInitSettings( sal_Bool bFont, sal_Bool bForegro
if( bBackground )
SetBackground( rStyleSettings.GetFieldColor() );
- //SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetDialogColor() ) );
m_aHorzSplitter.SetBackground( rStyleSettings.GetDialogColor() );
m_aHorzSplitter.SetFillColor( rStyleSettings.GetDialogColor() );
m_aHorzSplitter.SetTextFillColor(rStyleSettings.GetDialogColor() );
@@ -757,7 +705,6 @@ const TaskPaneData& OApplicationDetailView::impl_getTaskPaneData( ElementType _e
OSL_ENSURE( ( _eType >= 0 ) && ( _eType < E_ELEMENT_TYPE_COUNT ), "OApplicationDetailView::impl_getTaskPaneData: illegal element type!" );
TaskPaneData& rData = m_aTaskPaneData[ _eType ];
-// if ( rData.aTasks.empty() )
//oj: do not check, otherwise extensions will only be visible after a reload.
impl_fillTaskPaneData( _eType, rData );
@@ -799,7 +746,7 @@ void OApplicationDetailView::impl_fillTaskPaneData( ElementType _eType, TaskPane
break;
default:
- OSL_ENSURE( false, "OApplicationDetailView::impl_fillTaskPaneData: illegal element type!" );
+ OSL_FAIL( "OApplicationDetailView::impl_fillTaskPaneData: illegal element type!" );
}
MnemonicGenerator aAllMnemonics( m_aExternalMnemonics );
@@ -931,23 +878,23 @@ SvLBoxEntry* OApplicationDetailView::getEntry( const Point& _aPoint ) const
return m_pControlHelper->getEntry(_aPoint);
}
// -----------------------------------------------------------------------------
-sal_Bool OApplicationDetailView::isCutAllowed()
-{
+sal_Bool OApplicationDetailView::isCutAllowed()
+{
DBG_CHKTHIS(OApplicationDetailView,NULL);
- return m_pControlHelper->isCutAllowed();
+ return m_pControlHelper->isCutAllowed();
}
-sal_Bool OApplicationDetailView::isCopyAllowed()
-{
+sal_Bool OApplicationDetailView::isCopyAllowed()
+{
DBG_CHKTHIS(OApplicationDetailView,NULL);
- return m_pControlHelper->isCopyAllowed();
+ return m_pControlHelper->isCopyAllowed();
}
sal_Bool OApplicationDetailView::isPasteAllowed() { DBG_CHKTHIS(OApplicationDetailView,NULL);return m_pControlHelper->isPasteAllowed(); }
void OApplicationDetailView::copy() { DBG_CHKTHIS(OApplicationDetailView,NULL);m_pControlHelper->copy(); }
void OApplicationDetailView::cut() { DBG_CHKTHIS(OApplicationDetailView,NULL);m_pControlHelper->cut(); }
-void OApplicationDetailView::paste()
-{
+void OApplicationDetailView::paste()
+{
DBG_CHKTHIS(OApplicationDetailView,NULL);
- m_pControlHelper->paste();
+ m_pControlHelper->paste();
}
// -----------------------------------------------------------------------------
SvLBoxEntry* OApplicationDetailView::elementAdded(ElementType _eType,const ::rtl::OUString& _rName, const Any& _rObject )
@@ -1013,3 +960,4 @@ Window* OApplicationDetailView::getTreeWindow() const
return m_pControlHelper->getCurrentView();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx
index f7af54689..3e682287b 100644
--- a/dbaccess/source/ui/app/AppDetailView.hxx
+++ b/dbaccess/source/ui/app/AppDetailView.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,45 +28,19 @@
#ifndef DBAUI_APPDETAILVIEW_HXX
#define DBAUI_APPDETAILVIEW_HXX
-#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
#include <com/sun/star/frame/XController.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_XCONTENT_HPP_
#include <com/sun/star/ucb/XContent.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_NAMEDDATABASEOBJECT_HPP_
#include <com/sun/star/sdb/application/NamedDatabaseObject.hpp>
-#endif
-#ifndef _SV_SPLIT_HXX
#include <vcl/split.hxx>
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_MNEMONIC_HXX
#include <vcl/mnemonic.hxx>
-#endif
-#ifndef DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
#include "IClipBoardTest.hxx"
-#endif
-#ifndef DBAUI_TITLE_WINDOW_HXX
#include "AppTitleWindow.hxx"
-#endif
-#ifndef DBAUI_APPELEMENTTYPE_HXX
#include "AppElementType.hxx"
-#endif
-#ifndef _SVTREEBOX_HXX
#include <svtools/svtreebx.hxx>
-#endif
-#ifndef DBAUI_VERTSPLITVIEW_HXX
#include "VertSplitView.hxx"
-#endif
#include <vector>
@@ -196,7 +171,6 @@ namespace dbaui
OApplicationDetailView(OAppBorderWindow& _rParent,PreviewMode _ePreviewMode);
virtual ~OApplicationDetailView();
// window overloads
- // virtual void Resize();
virtual void GetFocus();
/** creates the tables page
@@ -403,3 +377,4 @@ namespace dbaui
}
#endif // DBAUI_APPDETAILVIEW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppIconControl.cxx b/dbaccess/source/ui/app/AppIconControl.cxx
index ce99efe4c..3d0ba6091 100644
--- a/dbaccess/source/ui/app/AppIconControl.cxx
+++ b/dbaccess/source/ui/app/AppIconControl.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,30 +28,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_APPICONCONTROL_HXX
#include "AppIconControl.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _DBU_APP_HRC_
#include "dbu_app.hrc"
-#endif
-#ifndef _IMAGE_HXX //autogen
#include <vcl/image.hxx>
-#endif
-#ifndef _DBACCESS_UI_CALLBACKS_HXX_
#include "callbacks.hxx"
-#endif
-#ifndef DBAUI_APPELEMENTTYPE_HXX
#include "AppElementType.hxx"
-#endif
#include <memory>
using namespace ::dbaui;
@@ -58,7 +43,7 @@ using namespace ::dbaui;
// class OApplicationIconControl
DBG_NAME(OApplicationIconControl)
//==================================================================
-OApplicationIconControl::OApplicationIconControl(Window* _pParent)
+OApplicationIconControl::OApplicationIconControl(Window* _pParent)
: SvtIconChoiceCtrl(_pParent,WB_ICON | WB_NOCOLUMNHEADER | WB_HIGHLIGHTFRAME | /*!WB_NOSELECTION |*/
WB_TABSTOP | WB_CLIPCHILDREN | WB_NOVSCROLL | WB_SMART_ARRANGE | WB_NOHSCROLL | WB_CENTER)
,DropTargetHelper(this)
@@ -71,20 +56,18 @@ OApplicationIconControl::OApplicationIconControl(Window* _pParent)
sal_uInt16 nLabelResId;
ElementType eType;
sal_uInt16 nImageResId;
- sal_uInt16 nImageResIdHC;
} aCategories[] = {
- { RID_STR_TABLES_CONTAINER, E_TABLE, IMG_TABLEFOLDER_TREE_L, IMG_TABLEFOLDER_TREE_LHC },
- { RID_STR_QUERIES_CONTAINER, E_QUERY, IMG_QUERYFOLDER_TREE_L, IMG_QUERYFOLDER_TREE_LHC },
- { RID_STR_FORMS_CONTAINER, E_FORM, IMG_FORMFOLDER_TREE_L, IMG_FORMFOLDER_TREE_LHC },
- { RID_STR_REPORTS_CONTAINER, E_REPORT, IMG_REPORTFOLDER_TREE_L,IMG_REPORTFOLDER_TREE_LHC }
+ { RID_STR_TABLES_CONTAINER, E_TABLE, IMG_TABLEFOLDER_TREE_L },
+ { RID_STR_QUERIES_CONTAINER, E_QUERY, IMG_QUERYFOLDER_TREE_L },
+ { RID_STR_FORMS_CONTAINER, E_FORM, IMG_FORMFOLDER_TREE_L },
+ { RID_STR_REPORTS_CONTAINER, E_REPORT, IMG_REPORTFOLDER_TREE_L }
};
- for ( size_t i=0; i < sizeof(aCategories)/sizeof(aCategories[0]); ++i)
+ for ( size_t i=0; i < SAL_N_ELEMENTS(aCategories); ++i)
{
SvxIconChoiceCtrlEntry* pEntry = InsertEntry(
- String( ModuleRes( aCategories[i].nLabelResId ) ),
- Image( ModuleRes( aCategories[i].nImageResId ) ),
- Image( ModuleRes( aCategories[i].nImageResIdHC ) ) );
- if ( pEntry )
+ String( ModuleRes( aCategories[i].nLabelResId ) ) ,
+ Image( ModuleRes( aCategories[i].nImageResId ) ) );
+ if ( pEntry )
pEntry->SetUserData( new ElementType( aCategories[i].eType ) );
}
@@ -113,7 +96,7 @@ sal_Int8 OApplicationIconControl::AcceptDrop( const AcceptDropEvent& _rEvt )
sal_Int8 nDropOption = DND_ACTION_NONE;
if ( m_pActionListener )
{
-
+
SvxIconChoiceCtrlEntry* pEntry = GetEntry(_rEvt.maPosPixel);
if ( pEntry )
{
@@ -133,3 +116,5 @@ sal_Int8 OApplicationIconControl::ExecuteDrop( const ExecuteDropEvent& _rEvt )
return DND_ACTION_NONE;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppIconControl.hxx b/dbaccess/source/ui/app/AppIconControl.hxx
index cc27014e5..be650da50 100644
--- a/dbaccess/source/ui/app/AppIconControl.hxx
+++ b/dbaccess/source/ui/app/AppIconControl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBAUI_APPICONCONTROL_HXX
#define DBAUI_APPICONCONTROL_HXX
-#ifndef _ICNVW_HXX
#include <svtools/ivctrl.hxx>
-#endif
-#ifndef _TRANSFER_HXX
#include <svtools/transfer.hxx>
-#endif
namespace dbaui
@@ -60,3 +57,4 @@ namespace dbaui
}
#endif // DBAUI_APPICONCONTROL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx
index 0a6fe8ef8..ca3002148 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.cxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,33 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_APPSWAPWINDOW_HXX
#include "AppSwapWindow.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _DBU_APP_HRC_
#include "dbu_app.hrc"
-#endif
-#ifndef DBAUI_APPVIEW_HXX
#include "AppView.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_SYSWIN_HXX
#include <vcl/syswin.hxx>
-#endif
-#ifndef _SV_MENU_HXX
#include <vcl/menu.hxx>
-#endif
-#ifndef _SV_MNEMONIC_HXX
#include <vcl/mnemonic.hxx>
-#endif
#include "IApplicationController.hxx"
#include <memory>
@@ -75,7 +58,6 @@ OApplicationSwapWindow::OApplicationSwapWindow( Window* _pParent, OAppBorderWind
,m_rBorderWin( _rBorderWindow )
{
DBG_CTOR(OApplicationSwapWindow,NULL);
-// SetCompoundControl( sal_True );
ImplInitSettings( sal_True, sal_True, sal_True );
@@ -83,7 +65,6 @@ OApplicationSwapWindow::OApplicationSwapWindow( Window* _pParent, OAppBorderWind
m_aIconControl.setControlActionListener( &m_rBorderWin.getView()->getAppController() );
m_aIconControl.SetHelpId(HID_APP_SWAP_ICONCONTROL);
m_aIconControl.Show();
- //m_aIconControl.Enable(sal_True);
}
// -----------------------------------------------------------------------------
OApplicationSwapWindow::~OApplicationSwapWindow()
@@ -186,7 +167,7 @@ bool OApplicationSwapWindow::onContainerSelected( ElementType _eType )
if ( _eType != E_NONE )
m_eLastType = _eType;
return true;
- } // if ( m_rBorderWin.getView()->getAppController().onContainerSelect( _eType ) )
+ }
PostUserEvent( LINK( this, OApplicationSwapWindow, ChangeToLastSelected ) );
return false;
@@ -230,3 +211,5 @@ void OApplicationSwapWindow::selectContainer(ElementType _eType)
else
onContainerSelected( _eType );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppSwapWindow.hxx b/dbaccess/source/ui/app/AppSwapWindow.hxx
index 625bf4783..4a6783ccd 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.hxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,18 +28,10 @@
#ifndef DBAUI_APPSWAPWINDOW_HXX
#define DBAUI_APPSWAPWINDOW_HXX
-#ifndef DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
#include "IClipBoardTest.hxx"
-#endif
-#ifndef _SV_LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
-#ifndef DBAUI_APPICONCONTROL_HXX
#include "AppIconControl.hxx"
-#endif
-#ifndef DBAUI_APPELEMENTTYPE_HXX
#include "AppElementType.hxx"
-#endif
namespace dbaui
{
@@ -110,3 +103,4 @@ namespace dbaui
// .............................................................
#endif // DBAUI_APPSWAPWINDOW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx
index 4a390295d..e8ec8b3ef 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.cxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,19 +28,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TITLE_WINDOW_HXX
#include "AppTitleWindow.hxx"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
#include "memory"
-#ifndef _SV_SVAPP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
namespace dbaui
{
@@ -60,7 +53,7 @@ OTitleWindow::OTitleWindow(Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits,
ImplInitSettings( sal_True, sal_True, sal_True );
Window* pWindows [] = { &m_aSpace1, &m_aSpace2, &m_aTitle };
- for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i)
+ for (size_t i=0; i < SAL_N_ELEMENTS(pWindows); ++i)
pWindows[i]->Show();
}
// -----------------------------------------------------------------------------
@@ -84,8 +77,7 @@ void OTitleWindow::setChildWindow(Window* _pChild)
// -----------------------------------------------------------------------------
void OTitleWindow::Resize()
{
- //////////////////////////////////////////////////////////////////////
- // Abmessungen parent window
+ // parent window dimension
Size aOutputSize( GetOutputSize() );
long nOutputWidth = aOutputSize.Width();
long nOutputHeight = aOutputSize.Height();
@@ -174,7 +166,7 @@ void OTitleWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_B
Window* pWindows [] = { &m_aSpace1, &m_aSpace2, &m_aTitle};
- for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i)
+ for (size_t i=0; i < SAL_N_ELEMENTS(pWindows); ++i)
{
Font aFont = pWindows[i]->GetFont();
aFont.SetWeight(WEIGHT_BOLD);
@@ -186,3 +178,5 @@ void OTitleWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_B
// .............................................................
} // namespace dbaui
// .............................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppTitleWindow.hxx b/dbaccess/source/ui/app/AppTitleWindow.hxx
index f0d8ec916..42ab6794f 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.hxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBAUI_TITLE_WINDOW_HXX
#define DBAUI_TITLE_WINDOW_HXX
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
namespace dbaui
{
@@ -83,3 +82,4 @@ namespace dbaui
// .............................................................
#endif // DBAUI_TITLE_WINDOW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx
index 34f8e71b5..fd488c6df 100644
--- a/dbaccess/source/ui/app/AppView.cxx
+++ b/dbaccess/source/ui/app/AppView.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,84 +28,32 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_APPVIEW_HXX
#include "AppView.hxx"
-#endif
-#ifndef _DBU_APP_HRC_
#include "dbu_app.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _SV_TOOLBOX_HXX
#include <vcl/toolbox.hxx>
-#endif
-#ifndef _UTL_CONFIGMGR_HXX_
#include <unotools/configmgr.hxx>
-#endif
-#ifndef _SV_WAITOBJ_HXX
#include <vcl/waitobj.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBOARD_XCLIPBOARD_HPP_
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XQUERIESSUPPLIER_HPP_
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
-#endif
-#ifndef INCLUDED_SVTOOLS_SYSLOCALE_HXX
#include <unotools/syslocale.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef DBAUI_APPDETAILVIEW_HXX
#include "AppDetailView.hxx"
-#endif
-#ifndef _DBAUI_TABLETREE_HXX_
#include "tabletree.hxx"
-#endif
-#ifndef DBAUI_APPSWAPWINDOW_HXX
#include "AppSwapWindow.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef DBAUI_APPSWAPWINDOW_HXX
#include "AppSwapWindow.hxx"
-#endif
-#ifndef DBAUI_TITLE_WINDOW_HXX
#include "AppTitleWindow.hxx"
-#endif
-#ifndef _DBAUI_DSNTYPES_HXX_
#include "dsntypes.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef DBAUI_ICONTROLLER_HXX
#include "IController.hxx"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX
#include <unotools/pathoptions.hxx>
-#endif
#include "IApplicationController.hxx"
using namespace ::dbaui;
@@ -152,8 +101,7 @@ OAppBorderWindow::OAppBorderWindow(OApplicationView* _pParent,PreviewMode _ePrev
// -----------------------------------------------------------------------------
OAppBorderWindow::~OAppBorderWindow()
{
- //////////////////////////////////////////////////////////////////////
- // Childs zerstoeren
+ // destroy children
if ( m_pPanel )
{
m_pPanel->Hide();
@@ -178,8 +126,7 @@ void OAppBorderWindow::GetFocus()
// -----------------------------------------------------------------------------
void OAppBorderWindow::Resize()
{
- //////////////////////////////////////////////////////////////////////
- // Abmessungen parent window
+ // parent window dimension
Size aOutputSize( GetOutputSize() );
long nOutputWidth = aOutputSize.Width();
long nOutputHeight = aOutputSize.Height();
@@ -236,10 +183,6 @@ void OAppBorderWindow::ImplInitSettings()
if( true )
SetBackground( rStyleSettings.GetDialogColor() );
-
- /*SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetDialogColor() ) );
- SetFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() );
- SetTextFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() );*/
}
// -----------------------------------------------------------------------------
OApplicationView* OAppBorderWindow::getView() const
@@ -364,11 +307,11 @@ long OApplicationView::PreNotify( NotifyEvent& rNEvt )
{
const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
// give the pane the chance to intercept mnemonic accelerators
- // #i34790# - 2004-09-30 - fs@openoffice.org
+ // #i34790#
if ( getPanel() && getPanel()->interceptKeyInput( *pKeyEvent ) )
return 1L;
// and ditto the detail view
- // #i72799# - 2006-12-20 / frank.schoenheit@sun.com
+ // #i72799#
if ( getDetailView() && getDetailView()->interceptKeyInput( *pKeyEvent ) )
return 1L;
}
@@ -652,8 +595,7 @@ void OApplicationView::ImplInitSettings()
if( true )
SetBackground( rStyleSettings.GetFieldColor() );
- /*SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetDialogColor() ) );
- SetFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() );
- SetTextFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() );*/
}
//-----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/AppView.hxx b/dbaccess/source/ui/app/AppView.hxx
index 085672c07..371a58daf 100644
--- a/dbaccess/source/ui/app/AppView.hxx
+++ b/dbaccess/source/ui/app/AppView.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,33 +28,15 @@
#ifndef DBAUI_APPVIEW_HXX
#define DBAUI_APPVIEW_HXX
-#ifndef DBAUI_DATAVIEW_HXX
#include "dataview.hxx"
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_XCONTENT_HPP_
#include <com/sun/star/ucb/XContent.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_NAMEDDATABASEOBJECT_HPP_
#include <com/sun/star/sdb/application/NamedDatabaseObject.hpp>
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _UNOTOOLS_EVENTLISTENERADAPTER_HXX_
#include <unotools/eventlisteneradapter.hxx>
-#endif
-#ifndef DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
#include "IClipBoardTest.hxx"
-#endif
-#ifndef DBAUI_APPELEMENTTYPE_HXX
#include "AppElementType.hxx"
-#endif
namespace com{ namespace sun { namespace star { namespace beans { class XPropertySet; } } } }
@@ -330,3 +313,4 @@ namespace dbaui
}
#endif // DBAUI_APPVIEW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/IApplicationController.hxx b/dbaccess/source/ui/app/IApplicationController.hxx
index 9e30eb6a1..2dc4ab871 100644
--- a/dbaccess/source/ui/app/IApplicationController.hxx
+++ b/dbaccess/source/ui/app/IApplicationController.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -98,3 +99,5 @@ namespace dbaui
//........................................................................
#endif // DBA30D_IAPPLICATIONCONTROLLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/app.src b/dbaccess/source/ui/app/app.src
index 39cd441f1..92c0e3ebc 100644
--- a/dbaccess/source/ui/app/app.src
+++ b/dbaccess/source/ui/app/app.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -296,43 +296,53 @@ String RID_STR_REPORTS_HELP_TEXT_WIZARD
{
Text [ en-US ] = "The wizard will guide you through the steps necessary to create a report." ;
};
+
String RID_STR_FORMS_HELP_TEXT
{
Text [ en-US ] = "Create a form by specifying the record source, controls, and control properties." ;
};
+
String RID_STR_REPORT_HELP_TEXT
{
Text [ de ] ="Erstellen Sie einen Bericht, indem Sie die Datensatzquelle, Steuerelemente und Steuerelementeigenschaften angeben." ;
Text [ en-US ] = "Create a report by specifying the record source, controls, and control properties." ;
};
+
String RID_STR_FORMS_HELP_TEXT_WIZARD
{
Text [ en-US ] = "The wizard will guide you through the steps necessary to create a form." ;
};
+
String RID_STR_QUERIES_HELP_TEXT
{
- Text [ en-US ] = "Create a query by specifying the filters, input tables, field names, and properties for sorting or grouping." ;
+ Text [ en-US ] = "Create a query by specifying the filters, input tables, field names, and properties for sorting or grouping." ;
};
+
String RID_STR_QUERIES_HELP_TEXT_SQL
{
- Text [ en-US ] = "Create a query entering an SQL statement directly." ;
+ Text [ en-US ] = "Create a query entering an SQL statement directly." ;
};
+
String RID_STR_QUERIES_HELP_TEXT_WIZARD
{
Text [ en-US ] = "The wizard will guide you through the steps necessary to create a query." ;
};
+
String RID_STR_TABLES_HELP_TEXT_DESIGN
{
Text [ en-US ] = "Create a table by specifying the field names and properties, as well as the data types." ;
};
+
String RID_STR_TABLES_HELP_TEXT_WIZARD
{
Text [ en-US ] = "Choose from a selection of business and personal table samples, which you customize to create a table." ;
};
+
String RID_STR_VIEWS_HELP_TEXT_DESIGN
{
Text [ en-US ] = "Create a view by specifying the tables and field names you would like to have visible." ;
};
+
String RID_STR_VIEWS_HELP_TEXT_WIZARD
{
Text [ en-US ] = "Opens the view wizard" ;
@@ -342,28 +352,34 @@ String STR_DATABASE
{
Text [ en-US ] = "Database" ;
};
+
String STR_TASKS
{
Text [ en-US ] = "Tasks" ;
};
+
String STR_DESCRIPTION
{
Text [ en-US ] = "Description" ;
};
+
String STR_PREVIEW
{
Text [ en-US ] = "Preview" ;
};
+
String STR_DISABLEPREVIEW
{
Text [ en-US ] = "Disable Preview" ;
};
+
QueryBox APP_SAVEMODIFIED
{
Buttons = WB_YES_NO_CANCEL ;
DefButton = WB_DEF_YES ;
Message [ en-US ] = "The database has been modified.\nDo you want to save the changes?" ;
};
+
QueryBox APP_CLOSEDOCUMENTS
{
Buttons = WB_YES_NO ;
@@ -404,6 +420,7 @@ Menu RID_MENU_APP_PREVIEW
};
};
};
+
String RID_STR_FORM
{
Text [ en-US ] = "Form";
@@ -413,10 +430,12 @@ String RID_STR_REPORT
{
Text [ en-US ] = "Report";
};
+
String STR_FRM_LABEL
{
Text [ en-US ] = "F~orm name" ;
};
+
String STR_RPT_LABEL
{
Text [ en-US ] = "~Report name" ;
@@ -447,10 +466,12 @@ String RID_STR_EMBEDDED_DATABASE
{
Text [ en-US ] = "Embedded database";
};
+
String RID_STR_NO_DIFF_CAT
{
Text [ en-US ] = "You cannot select different categories.";
};
+
String RID_STR_UNSUPPORTED_OBJECT_TYPE
{
Text [ en-US ] = "Unsupported object type found ($type$).";
diff --git a/dbaccess/source/ui/app/closeveto.cxx b/dbaccess/source/ui/app/closeveto.cxx
index 936c76942..558df26b6 100644
--- a/dbaccess/source/ui/app/closeveto.cxx
+++ b/dbaccess/source/ui/app/closeveto.cxx
@@ -100,7 +100,7 @@ namespace dbaui
throw CloseVetoException();
}
-
+
//------------------------------------------------------------------------------------------------------------------
void SAL_CALL CloseListener_Impl::notifyClosing( const EventObject& i_source ) throw (RuntimeException)
{
diff --git a/dbaccess/source/ui/app/makefile.mk b/dbaccess/source/ui/app/makefile.mk
deleted file mode 100644
index e26927d99..000000000
--- a/dbaccess/source/ui/app/makefile.mk
+++ /dev/null
@@ -1,70 +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=app
-
-# BMP_IN=$(PRJ)$/res
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-# IMGLST_SRS=$(SRS)$/$(TARGET).srs
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES=\
- $(SLO)$/AppDetailView.obj \
- $(SLO)$/AppController.obj \
- $(SLO)$/AppControllerDnD.obj \
- $(SLO)$/AppControllerGen.obj \
- $(SLO)$/AppDetailPageHelper.obj \
- $(SLO)$/AppSwapWindow.obj \
- $(SLO)$/AppTitleWindow.obj \
- $(SLO)$/AppView.obj \
- $(SLO)$/subcomponentmanager.obj \
- $(SLO)$/closeveto.obj
-
-
-SLOFILES =\
- $(SLO)$/AppIconControl.obj \
- $(EXCEPTIONSFILES)
-
-SRS1NAME=$(TARGET)
-SRC1FILES = app.src
-
-
-# --- Targets -------------------------------------------------------
-
-
-.INCLUDE : target.mk
-
-$(SRS)$/$(TARGET).srs: $(SOLARINCDIR)$/svx$/globlmn.hrc
-
-
diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx
index 62474bc64..a377f8394 100644
--- a/dbaccess/source/ui/app/subcomponentmanager.cxx
+++ b/dbaccess/source/ui/app/subcomponentmanager.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -42,9 +43,8 @@
#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
-#include <hash_map>
#include <algorithm>
#include <functional>
@@ -179,7 +179,7 @@ namespace dbaui
//..............................................................................................................
struct SelectSubComponent : public ::std::unary_function< SubComponentDescriptor, Reference< XComponent > >
{
- Reference< XComponent > operator()( const SubComponentDescriptor _desc ) const
+ Reference< XComponent > operator()( const SubComponentDescriptor &_desc ) const
{
if ( _desc.xModel.is() )
return _desc.xModel.get();
@@ -463,7 +463,7 @@ namespace dbaui
//------------------------------------------------------------------------------------------------------------------
sal_Bool SubComponentManager::closeSubComponents()
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_pData->getMutex() );
try
@@ -610,3 +610,5 @@ namespace dbaui
//......................................................................................................................
} // namespace dbaui
//......................................................................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/app/subcomponentmanager.hxx b/dbaccess/source/ui/app/subcomponentmanager.hxx
index a0dd80b65..1a653141e 100644
--- a/dbaccess/source/ui/app/subcomponentmanager.hxx
+++ b/dbaccess/source/ui/app/subcomponentmanager.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -134,3 +135,5 @@ namespace dbaui
//........................................................................
#endif // DBACCESS_SUBCOMPONENTMANAGER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/AsyncronousLink.cxx b/dbaccess/source/ui/browser/AsyncronousLink.cxx
index 02ffb7268..7bb147e73 100644
--- a/dbaccess/source/ui/browser/AsyncronousLink.cxx
+++ b/dbaccess/source/ui/browser/AsyncronousLink.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_ASYNCRONOUSLINK_HXX
#include "AsyncronousLink.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
//==================================================================
//= OAsyncronousLink
@@ -110,3 +105,5 @@ IMPL_LINK(OAsyncronousLink, OnAsyncCall, void*, _pArg)
return 0L;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/bcommon.src b/dbaccess/source/ui/browser/bcommon.src
index 41ccc595f..d5b8401b4 100644
--- a/dbaccess/source/ui/browser/bcommon.src
+++ b/dbaccess/source/ui/browser/bcommon.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,4 +32,3 @@ String RID_STR_TBL_TITLE
{
Text [ en-US ] = "Table #" ;
};
-
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 88419eec2..eba0a5880 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -94,6 +95,7 @@
#include <svx/svxdlg.hxx>
#include <tools/color.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <vcl/msgbox.hxx>
#include <vcl/waitobj.hxx>
@@ -132,7 +134,7 @@ using namespace ::svt;
DBG_UNHANDLED_EXCEPTION(); \
} \
-#define DO_SAFE( action, message ) try { action; } catch(Exception&) { DBG_ERROR(message); } ;
+#define DO_SAFE( action, message ) try { action; } catch(Exception&) { OSL_FAIL(message); } ;
//..................................................................
namespace dbaui
@@ -281,7 +283,7 @@ SbaXDataBrowserController::FormControllerImpl::~FormControllerImpl()
//------------------------------------------------------------------
Reference< runtime::XFormOperations > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getFormOperations() throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::getFormOperations: not supported!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::getFormOperations: not supported!" );
return NULL;
}
@@ -313,27 +315,27 @@ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addChildController(
//------------------------------------------------------------------
Reference< runtime::XFormControllerContext > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getContext() throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::getContext: no support!!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::getContext: no support!!" );
return NULL;
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setContext( const Reference< runtime::XFormControllerContext >& /*_context*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::setContext: no support!!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::setContext: no support!!" );
}
//------------------------------------------------------------------
Reference< XInteractionHandler > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getInteractionHandler() throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::getInteractionHandler: no support!!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::getInteractionHandler: no support!!" );
return NULL;
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setInteractionHandler( const Reference< XInteractionHandler >& /*_interactionHandler*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::setInteractionHandler: no support!!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::setInteractionHandler: no support!!" );
}
//------------------------------------------------------------------
@@ -352,19 +354,19 @@ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setParent( const Re
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::dispose( ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::dispose: no, you do *not* want to do this!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::dispose: no, you do *not* want to do this!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addEventListener( const Reference< XEventListener >& /*xListener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addEventListener: no support!!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::addEventListener: no support!!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeEventListener( const Reference< XEventListener >& /*aListener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeEventListener: no support!!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::removeEventListener: no support!!" );
}
//------------------------------------------------------------------
@@ -403,73 +405,73 @@ Reference< XEnumeration > SAL_CALL SbaXDataBrowserController::FormControllerImpl
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addModifyListener( const Reference< XModifyListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addModifyListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::addModifyListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeModifyListener( const Reference< XModifyListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeModifyListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::removeModifyListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addConfirmDeleteListener( const Reference< XConfirmDeleteListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addConfirmDeleteListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::addConfirmDeleteListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeConfirmDeleteListener( const Reference< XConfirmDeleteListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeConfirmDeleteListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::removeConfirmDeleteListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addSQLErrorListener( const Reference< XSQLErrorListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addSQLErrorListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::addSQLErrorListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeSQLErrorListener( const Reference< XSQLErrorListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeSQLErrorListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::removeSQLErrorListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addRowSetApproveListener( const Reference< XRowSetApproveListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addRowSetApproveListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::addRowSetApproveListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeRowSetApproveListener( const Reference< XRowSetApproveListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeRowSetApproveListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::removeRowSetApproveListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addDatabaseParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addDatabaseParameterListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::addDatabaseParameterListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeDatabaseParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeDatabaseParameterListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::removeDatabaseParameterListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addParameterListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::addParameterListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeParameterListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::removeParameterListener: no support!" );
}
//------------------------------------------------------------------
@@ -502,7 +504,7 @@ Sequence< ::rtl::OUString > SAL_CALL SbaXDataBrowserController::FormControllerIm
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setModel(const Reference< ::com::sun::star::awt::XTabControllerModel > & /*Model*/) throw( RuntimeException )
{
- OSL_ENSURE(sal_False, "SbaXDataBrowserController::FormControllerImpl::setModel : invalid call, can't change my model !");
+ OSL_FAIL("SbaXDataBrowserController::FormControllerImpl::setModel : invalid call, can't change my model !");
}
//------------------------------------------------------------------
@@ -514,7 +516,7 @@ Reference< ::com::sun::star::awt::XTabControllerModel > SAL_CALL SbaXDataBrowse
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setContainer(const Reference< ::com::sun::star::awt::XControlContainer > & /*_Container*/) throw( RuntimeException )
{
- OSL_ENSURE(sal_False, "SbaXDataBrowserController::FormControllerImpl::setContainer : invalid call, can't change my container !");
+ OSL_FAIL("SbaXDataBrowserController::FormControllerImpl::setContainer : invalid call, can't change my container !");
}
//------------------------------------------------------------------
@@ -539,13 +541,13 @@ Sequence< Reference< ::com::sun::star::awt::XControl > > SAL_CALL SbaXDataBrowse
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::autoTabOrder(void) throw( RuntimeException )
{
- OSL_ENSURE(sal_False, "SbaXDataBrowserController::FormControllerImpl::autoTabOrder : nothing to do (always have only one control) !");
+ OSL_FAIL("SbaXDataBrowserController::FormControllerImpl::autoTabOrder : nothing to do (always have only one control) !");
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::activateTabOrder(void) throw( RuntimeException )
{
- OSL_ENSURE(sal_False, "SbaXDataBrowserController::FormControllerImpl::activateTabOrder : nothing to do (always have only one control) !");
+ OSL_FAIL("SbaXDataBrowserController::FormControllerImpl::activateTabOrder : nothing to do (always have only one control) !");
}
//------------------------------------------------------------------
@@ -791,7 +793,7 @@ void SbaXDataBrowserController::initFormatter()
{
// create a new formatter
m_xFormatter = Reference< ::com::sun::star::util::XNumberFormatter > (
- getORB()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatter")), UNO_QUERY);
+ getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatter"))), UNO_QUERY);
if (m_xFormatter.is())
m_xFormatter->attachNumberFormatsSupplier(xSupplier);
}
@@ -878,7 +880,7 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent)
}
catch(Exception&)
{
- DBG_ERROR("SbaXDataBrowserController::Construct : the construction of UnoDataBrowserView failed !");
+ OSL_FAIL("SbaXDataBrowserController::Construct : the construction of UnoDataBrowserView failed !");
}
if (!bSuccess)
@@ -902,7 +904,7 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent)
// set the callbacks for the grid control
SbaGridControl* pVclGrid = getBrowserView()->getVclControl();
- DBG_ASSERT(pVclGrid, "SbaXDataBrowserController::Construct : have no VCL control !");
+ OSL_ENSURE(pVclGrid, "SbaXDataBrowserController::Construct : have no VCL control !");
pVclGrid->SetMasterListener(this);
// --------------------------
@@ -963,14 +965,14 @@ void SbaXDataBrowserController::RemoveColumnListener(const Reference< XPropertyS
Reference< XRowSet > SbaXDataBrowserController::CreateForm()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::CreateForm" );
- return Reference< XRowSet > (getORB()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.form.component.Form")), UNO_QUERY);
+ return Reference< XRowSet > (getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.Form"))), UNO_QUERY);
}
//------------------------------------------------------------------------------
Reference< ::com::sun::star::form::XFormComponent > SbaXDataBrowserController::CreateGridModel()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::CreateGridModel" );
- return Reference< ::com::sun::star::form::XFormComponent > (getORB()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.form.component.GridControl")), UNO_QUERY);
+ return Reference< ::com::sun::star::form::XFormComponent > (getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.GridControl"))), UNO_QUERY);
}
// -------------------------------------------------------------------------
@@ -1095,7 +1097,7 @@ void SAL_CALL SbaXDataBrowserController::focusLost(const FocusEvent& e) throw( R
if (xCommitable.is())
xCommitable->commit();
else
- OSL_ENSURE(sal_False, "SbaXDataBrowserController::focusLost : why is my control not commitable ?");
+ OSL_FAIL("SbaXDataBrowserController::focusLost : why is my control not commitable ?");
}
// -------------------------------------------------------------------------
@@ -1213,7 +1215,7 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t
if (!xSource.is())
return;
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// the IsModified changed to sal_False ?
if ( (evt.PropertyName.equals(PROPERTY_ISMODIFIED))
&& (::comphelper::getBOOL(evt.NewValue) == sal_False)
@@ -1269,7 +1271,7 @@ void SbaXDataBrowserController::modified(const ::com::sun::star::lang::EventObje
void SbaXDataBrowserController::elementInserted(const ::com::sun::star::container::ContainerEvent& evt) throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::elementInserted" );
- DBG_ASSERT(Reference< XInterface >(evt.Source, UNO_QUERY).get() == Reference< XInterface >(getControlModel(), UNO_QUERY).get(),
+ OSL_ENSURE(Reference< XInterface >(evt.Source, UNO_QUERY).get() == Reference< XInterface >(getControlModel(), UNO_QUERY).get(),
"SbaXDataBrowserController::elementInserted: where did this come from (not from the grid model)?!");
Reference< XPropertySet > xNewColumn(evt.Element,UNO_QUERY);
if ( xNewColumn.is() )
@@ -1280,7 +1282,7 @@ void SbaXDataBrowserController::elementInserted(const ::com::sun::star::containe
void SbaXDataBrowserController::elementRemoved(const ::com::sun::star::container::ContainerEvent& evt) throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::elementRemoved" );
- DBG_ASSERT(Reference< XInterface >(evt.Source, UNO_QUERY).get() == Reference< XInterface >(getControlModel(), UNO_QUERY).get(),
+ OSL_ENSURE(Reference< XInterface >(evt.Source, UNO_QUERY).get() == Reference< XInterface >(getControlModel(), UNO_QUERY).get(),
"SbaXDataBrowserController::elementRemoved: where did this come from (not from the grid model)?!");
Reference< XPropertySet > xOldColumn(evt.Element,UNO_QUERY);
if ( xOldColumn.is() )
@@ -1291,7 +1293,7 @@ void SbaXDataBrowserController::elementRemoved(const ::com::sun::star::container
void SbaXDataBrowserController::elementReplaced(const ::com::sun::star::container::ContainerEvent& evt) throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::elementReplaced" );
- DBG_ASSERT(Reference< XInterface >(evt.Source, UNO_QUERY).get() == Reference< XInterface >(getControlModel(), UNO_QUERY).get(),
+ OSL_ENSURE(Reference< XInterface >(evt.Source, UNO_QUERY).get() == Reference< XInterface >(getControlModel(), UNO_QUERY).get(),
"SbaXDataBrowserController::elementReplaced: where did this come from (not from the grid model)?!");
Reference< XPropertySet > xOldColumn(evt.ReplacedElement,UNO_QUERY);
if ( xOldColumn.is() )
@@ -1306,7 +1308,7 @@ void SbaXDataBrowserController::elementReplaced(const ::com::sun::star::containe
sal_Bool SbaXDataBrowserController::suspend(sal_Bool /*bSuspend*/) throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::suspend" );
- DBG_ASSERT(m_nPendingLoadFinished == 0, "SbaXDataBrowserController::suspend : there shouldn't be a pending load !");
+ OSL_ENSURE(m_nPendingLoadFinished == 0, "SbaXDataBrowserController::suspend : there shouldn't be a pending load !");
m_aAsyncGetCellFocus.CancelCall();
m_aAsyncDisplayError.CancelCall();
@@ -1434,7 +1436,7 @@ IMPL_LINK( SbaXDataBrowserController, OnAsyncDisplayError, void*, /* _pNotIntere
//------------------------------------------------------------------------------
void SbaXDataBrowserController::errorOccured(const ::com::sun::star::sdb::SQLErrorEvent& aEvent) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::errorOccured" );
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::errorOccurred" );
::osl::MutexGuard aGuard( getMutex() );
SQLExceptionInfo aInfo( aEvent.Reason );
@@ -1443,7 +1445,7 @@ void SbaXDataBrowserController::errorOccured(const ::com::sun::star::sdb::SQLErr
if ( m_nFormActionNestingLevel )
{
- OSL_ENSURE( !m_aCurrentError.isValid(), "SbaXDataBrowserController::errorOccured: can handle one error per transaction only!" );
+ OSL_ENSURE( !m_aCurrentError.isValid(), "SbaXDataBrowserController::errorOccurred: can handle one error per transaction only!" );
m_aCurrentError = aInfo;
}
else
@@ -1460,19 +1462,12 @@ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::for
if (aEvent.Source != getRowSet())
{
// not my data source -> allow anything
- DBG_ERROR("SbaXDataBrowserController::approveParameter : invalid event source !");
+ OSL_FAIL("SbaXDataBrowserController::approveParameter : invalid event source !");
return sal_True;
}
Reference< ::com::sun::star::container::XIndexAccess > xParameters = aEvent.Parameters;
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
- // this may be executed in a non-main thread and we want to use vcl ...
- Window* pParent = Application::GetDefDialogParent();
- // don't use the content as parent if it isn't visible
- // (and don't use NULL as parent : this may be displayed in the beamer and really shouldn't be task-local)
- // 69297 - FS - 25.10.99
- if (getBrowserView() && getBrowserView()->IsVisible())
- pParent = getBrowserView();
+ SolarMutexGuard aSolarGuard;
// default handling: instantiate an interaction handler and let it handle the parameter request
try
@@ -1505,7 +1500,7 @@ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::for
Sequence< PropertyValue > aFinalValues = pParamValues->getValues();
if (aFinalValues.getLength() != aRequest.Parameters->getCount())
{
- DBG_ERROR("SbaXDataBrowserController::approveParameter: the InteractionHandler returned nonsense!");
+ OSL_FAIL("SbaXDataBrowserController::approveParameter: the InteractionHandler returned nonsense!");
setLoadingCancelled();
return sal_False;
}
@@ -1514,18 +1509,18 @@ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::for
{
Reference< XPropertySet > xParam;
::cppu::extractInterface(xParam, aRequest.Parameters->getByIndex(i));
- DBG_ASSERT(xParam.is(), "SbaXDataBrowserController::approveParameter: one of the parameters is no property set!");
+ OSL_ENSURE(xParam.is(), "SbaXDataBrowserController::approveParameter: one of the parameters is no property set!");
if (xParam.is())
{
#ifdef DBG_UTIL
::rtl::OUString sName;
xParam->getPropertyValue(PROPERTY_NAME) >>= sName;
- DBG_ASSERT(sName.equals(pFinalValues->Name), "SbaXDataBrowserController::approveParameter: suspicious value names!");
+ OSL_ENSURE(sName.equals(pFinalValues->Name), "SbaXDataBrowserController::approveParameter: suspicious value names!");
#endif
try { xParam->setPropertyValue(PROPERTY_VALUE, pFinalValues->Value); }
catch(Exception&)
{
- DBG_ERROR("SbaXDataBrowserController::approveParameter: setting one of the properties failed!");
+ OSL_FAIL("SbaXDataBrowserController::approveParameter: setting one of the properties failed!");
}
}
}
@@ -1550,7 +1545,7 @@ sal_Bool SbaXDataBrowserController::approveReset(const ::com::sun::star::lang::E
void SbaXDataBrowserController::resetted(const ::com::sun::star::lang::EventObject& rEvent) throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::resetted" );
- DBG_ASSERT(rEvent.Source == getControlModel(), "SbaXDataBrowserController::resetted : where did this come from ?");
+ OSL_ENSURE(rEvent.Source == getControlModel(), "SbaXDataBrowserController::resetted : where did this come from ?");
(void)rEvent;
setCurrentModified( sal_False );
}
@@ -1610,7 +1605,7 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const
try
{
Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW );
- OSL_VERIFY( xRowSetProps->getPropertyValue( ::rtl::OUString::createFromAscii( "AllowInserts" ) ) >>= bAllowInsertions );
+ OSL_VERIFY( xRowSetProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AllowInserts")) ) >>= bAllowInsertions );
}
catch( const Exception& )
{
@@ -1629,7 +1624,7 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const
try
{
Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW );
- OSL_VERIFY( xRowSetProps->getPropertyValue( ::rtl::OUString::createFromAscii( "AllowDeletes" ) ) >>= bAllowDeletions );
+ OSL_VERIFY( xRowSetProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AllowDeletes")) ) >>= bAllowDeletions );
OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ROWCOUNT ) >>= nRowCount );
OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ISNEW ) >>= bInsertionRow );
}
@@ -1746,9 +1741,9 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const
break; // no datasource -> no edit mode
sal_Int32 nDataSourcePrivileges = ::comphelper::getINT32(xDataSourceSet->getPropertyValue(PROPERTY_PRIVILEGES));
- sal_Bool bInsertAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::INSERT) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(::rtl::OUString::createFromAscii("AllowInserts")));
- sal_Bool bUpdateAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::UPDATE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(::rtl::OUString::createFromAscii("AllowUpdates")));
- sal_Bool bDeleteAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::DELETE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(::rtl::OUString::createFromAscii("AllowDeletes")));
+ sal_Bool bInsertAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::INSERT) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AllowInserts"))));
+ sal_Bool bUpdateAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::UPDATE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AllowUpdates"))));
+ sal_Bool bDeleteAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::DELETE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AllowDeletes"))));
if (!bInsertAllowedAndPossible && !bUpdateAllowedAndPossible && !bDeleteAllowedAndPossible)
break; // no insert/update/delete -> no edit mode
@@ -1798,7 +1793,7 @@ void SbaXDataBrowserController::applyParserOrder(const ::rtl::OUString& _rOldOrd
Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY);
if (!m_xLoadable.is())
{
- OSL_ENSURE(sal_False, "SbaXDataBrowserController::applyParserOrder: invalid row set!");
+ OSL_FAIL("SbaXDataBrowserController::applyParserOrder: invalid row set!");
return;
}
@@ -1816,7 +1811,6 @@ void SbaXDataBrowserController::applyParserOrder(const ::rtl::OUString& _rOldOrd
if (!bSuccess)
{
xFormSet->setPropertyValue(PROPERTY_ORDER, makeAny(_rOldOrder));
- //DO_SAFE( _xParser->setOrder(_rOldOrder), "SbaXDataBrowserController::applyParserOrder: could not restore the old order of my parser !" );
try
{
@@ -1841,7 +1835,7 @@ void SbaXDataBrowserController::applyParserFilter(const ::rtl::OUString& _rOldFi
Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY);
if (!m_xLoadable.is())
{
- OSL_ENSURE(sal_False, "SbaXDataBrowserController::applyParserFilter: invalid row set!");
+ OSL_FAIL("SbaXDataBrowserController::applyParserFilter: invalid row set!");
return;
}
@@ -1999,11 +1993,11 @@ void SbaXDataBrowserController::ExecuteSearch()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::ExecuteSearch" );
// calculate the control source of the active field
Reference< ::com::sun::star::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY);
- DBG_ASSERT(xGrid.is(), "SbaXDataBrowserController::ExecuteSearch : the control should have an ::com::sun::star::form::XGrid interface !");
+ OSL_ENSURE(xGrid.is(), "SbaXDataBrowserController::ExecuteSearch : the control should have an ::com::sun::star::form::XGrid interface !");
Reference< ::com::sun::star::form::XGridPeer > xGridPeer(getBrowserView()->getGridControl()->getPeer(), UNO_QUERY);
Reference< ::com::sun::star::container::XIndexContainer > xColumns = xGridPeer->getColumns();
- DBG_ASSERT(xGridPeer.is() && xColumns.is(), "SbaXDataBrowserController::ExecuteSearch : invalid peer !");
+ OSL_ENSURE(xGridPeer.is() && xColumns.is(), "SbaXDataBrowserController::ExecuteSearch : invalid peer !");
sal_Int16 nViewCol = xGrid->getCurrentColumnPosition();
sal_Int16 nModelCol = getBrowserView()->View2ModelPos(nViewCol);
@@ -2017,14 +2011,14 @@ void SbaXDataBrowserController::ExecuteSearch()
Reference< XInterface > xCurControl(xColControls->getByIndex(nViewCol),UNO_QUERY);
::rtl::OUString aInitialText;
if (IsSearchableControl(xCurControl, &aInitialText))
- sInitialText = (const sal_Unicode*)aInitialText;
+ sInitialText = aInitialText;
// prohibit the synchronization of the grid's display with the cursor's position
Reference< XPropertySet > xModelSet(getControlModel(), UNO_QUERY);
- DBG_ASSERT(xModelSet.is(), "SbaXDataBrowserController::ExecuteSearch : no model set ?!");
- xModelSet->setPropertyValue(::rtl::OUString::createFromAscii("DisplayIsSynchron"), ::comphelper::makeBoolAny(sal_Bool(sal_False)));
- xModelSet->setPropertyValue(::rtl::OUString::createFromAscii("AlwaysShowCursor"), ::comphelper::makeBoolAny(sal_Bool(sal_True)));
- xModelSet->setPropertyValue(::rtl::OUString::createFromAscii("CursorColor"), makeAny(sal_Int32(COL_LIGHTRED)));
+ OSL_ENSURE(xModelSet.is(), "SbaXDataBrowserController::ExecuteSearch : no model set ?!");
+ xModelSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayIsSynchron")), ::comphelper::makeBoolAny(sal_Bool(sal_False)));
+ xModelSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AlwaysShowCursor")), ::comphelper::makeBoolAny(sal_Bool(sal_True)));
+ xModelSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CursorColor")), makeAny(sal_Int32(COL_LIGHTRED)));
Reference< ::com::sun::star::util::XNumberFormatsSupplier > xNFS(::dbtools::getNumberFormats(::dbtools::getConnection(m_xRowSet), sal_True,getORB()));
@@ -2036,7 +2030,7 @@ void SbaXDataBrowserController::ExecuteSearch()
aContextNames.push_back( String::CreateFromAscii("Standard") );
pDialog = pFact->CreateFmSearchDialog(getBrowserView(), sInitialText, aContextNames, 0, LINK(this, SbaXDataBrowserController, OnSearchContextRequest));
}
- DBG_ASSERT( pDialog, "SbaXDataBrowserController::ExecuteSearch: could not get the search dialog!" );
+ OSL_ENSURE( pDialog, "SbaXDataBrowserController::ExecuteSearch: could not get the search dialog!" );
if ( pDialog )
{
pDialog->SetActiveField( sActiveField );
@@ -2047,9 +2041,9 @@ void SbaXDataBrowserController::ExecuteSearch()
}
// restore the grid's normal operating state
- xModelSet->setPropertyValue(::rtl::OUString::createFromAscii("DisplayIsSynchron"), ::comphelper::makeBoolAny(sal_Bool(sal_True)));
- xModelSet->setPropertyValue(::rtl::OUString::createFromAscii("AlwaysShowCursor"), ::comphelper::makeBoolAny(sal_Bool(sal_False)));
- xModelSet->setPropertyValue(::rtl::OUString::createFromAscii("CursorColor"), Any());
+ xModelSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayIsSynchron")), ::comphelper::makeBoolAny(sal_Bool(sal_True)));
+ xModelSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AlwaysShowCursor")), ::comphelper::makeBoolAny(sal_Bool(sal_False)));
+ xModelSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CursorColor")), Any());
}
//------------------------------------------------------------------------------
@@ -2077,7 +2071,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
break;
case SID_FM_DELETEROWS:
@@ -2149,7 +2143,6 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
// should be intercepted by GetState. Normally.
// Unfortunately ID_BROWSER_PASTE is a 'fast call' slot, which means it may be executed without checking if it is
// enabled. This would be really deadly herein if the current cell has no controller ...
- // (FS - 13.04.99 - #64694#)
return;
Edit& rEdit = (Edit&)xCurrentController->GetWindow();
@@ -2411,7 +2404,7 @@ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor)
}
catch(Exception&)
{
- DBG_ERROR("SbaXDataBrowserController::SaveModified : could not save the current record !");
+ OSL_FAIL("SbaXDataBrowserController::SaveModified : could not save the current record !");
bResult = sal_False;
}
@@ -2498,7 +2491,7 @@ void SbaXDataBrowserController::CellDeactivated()
//------------------------------------------------------------------------------
IMPL_LINK( SbaXDataBrowserController, OnClipboardChanged, void*, EMPTYARG )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return OnInvalidateClipboard( NULL );
}
@@ -2554,9 +2547,9 @@ IMPL_LINK(SbaXDataBrowserController, OnSearchContextRequest, FmSearchContext*, p
// check all grid columns for their control source
Reference< ::com::sun::star::container::XIndexAccess > xModelColumns(getFormComponent(), UNO_QUERY);
- DBG_ASSERT(xModelColumns.is(), "SbaXDataBrowserController::OnSearchContextRequest : there is a grid control without columns !");
+ OSL_ENSURE(xModelColumns.is(), "SbaXDataBrowserController::OnSearchContextRequest : there is a grid control without columns !");
// the case 'no columns' should be indicated with an empty container, I think ...
- DBG_ASSERT(xModelColumns->getCount() >= xPeerContainer->getCount(), "SbaXDataBrowserController::OnSearchContextRequest : impossible : have more view than model columns !");
+ OSL_ENSURE(xModelColumns->getCount() >= xPeerContainer->getCount(), "SbaXDataBrowserController::OnSearchContextRequest : impossible : have more view than model columns !");
String sFieldList;
for (sal_Int32 nViewPos=0; nViewPos<xPeerContainer->getCount(); ++nViewPos)
@@ -2565,15 +2558,15 @@ IMPL_LINK(SbaXDataBrowserController, OnSearchContextRequest, FmSearchContext*, p
if (!xCurrentColumn.is())
continue;
- // can we use this column control fo searching ?
+ // can we use this column control for searching ?
if (!IsSearchableControl(xCurrentColumn))
continue;
sal_uInt16 nModelPos = getBrowserView()->View2ModelPos((sal_uInt16)nViewPos);
Reference< XPropertySet > xCurrentColModel(xModelColumns->getByIndex(nModelPos),UNO_QUERY);
- ::rtl::OUString aName = ::comphelper::getString(xCurrentColModel->getPropertyValue(PROPERTY_CONTROLSOURCE));
+ String aName = ::comphelper::getString(xCurrentColModel->getPropertyValue(PROPERTY_CONTROLSOURCE));
- sFieldList += (const sal_Unicode*)aName;
+ sFieldList += aName;
sFieldList += ';';
pContext->arrFields.push_back(xCurrentColumn);
@@ -2585,7 +2578,7 @@ IMPL_LINK(SbaXDataBrowserController, OnSearchContextRequest, FmSearchContext*, p
// if the cursor is in a mode other than STANDARD -> reset
Reference< XPropertySet > xCursorSet(pContext->xCursor, UNO_QUERY);
- DBG_ASSERT(xCursorSet.is() && !::comphelper::getBOOL(xCursorSet->getPropertyValue(PROPERTY_ISMODIFIED)),
+ OSL_ENSURE(xCursorSet.is() && !::comphelper::getBOOL(xCursorSet->getPropertyValue(PROPERTY_ISMODIFIED)),
"SbaXDataBrowserController::OnSearchContextRequest : please do not call for cursors with modified rows !");
if (xCursorSet.is() && ::comphelper::getBOOL(xCursorSet->getPropertyValue(PROPERTY_ISNEW)))
{
@@ -2599,17 +2592,17 @@ IMPL_LINK(SbaXDataBrowserController, OnSearchContextRequest, FmSearchContext*, p
IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation*, pInfo)
{
Reference< ::com::sun::star::sdbcx::XRowLocate > xCursor(getRowSet(), UNO_QUERY);
- DBG_ASSERT(xCursor.is(), "SbaXDataBrowserController::OnFoundData : shit happens. sometimes. but this is simply impossible !");
+ OSL_ENSURE(xCursor.is(), "SbaXDataBrowserController::OnFoundData : shit happens. sometimes. but this is simply impossible !");
// move the cursor
xCursor->moveToBookmark(pInfo->aPosition);
// let the grid snyc it's display with the cursor
Reference< XPropertySet > xModelSet(getControlModel(), UNO_QUERY);
- DBG_ASSERT(xModelSet.is(), "SbaXDataBrowserController::OnFoundData : no model set ?!");
- Any aOld = xModelSet->getPropertyValue(::rtl::OUString::createFromAscii("DisplayIsSynchron"));
- xModelSet->setPropertyValue(::rtl::OUString::createFromAscii("DisplayIsSynchron"), ::comphelper::makeBoolAny(sal_Bool(sal_True)));
- xModelSet->setPropertyValue(::rtl::OUString::createFromAscii("DisplayIsSynchron"), aOld);
+ OSL_ENSURE(xModelSet.is(), "SbaXDataBrowserController::OnFoundData : no model set ?!");
+ Any aOld = xModelSet->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayIsSynchron")));
+ xModelSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayIsSynchron")), ::comphelper::makeBoolAny(sal_Bool(sal_True)));
+ xModelSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayIsSynchron")), aOld);
// and move to the field
Reference< ::com::sun::star::container::XIndexAccess > aColumnControls(getBrowserView()->getGridControl()->getPeer(), UNO_QUERY);
@@ -2640,7 +2633,7 @@ IMPL_LINK(SbaXDataBrowserController, OnCanceledNotFound, FmFoundRecordInformatio
try
{
- DBG_ASSERT(xCursor.is(), "SbaXDataBrowserController::OnCanceledNotFound : shit happens. sometimes. but this is simply impossible !");
+ OSL_ENSURE(xCursor.is(), "SbaXDataBrowserController::OnCanceledNotFound : shit happens. sometimes. but this is simply impossible !");
// move the cursor
xCursor->moveToBookmark(pInfo->aPosition);
}
@@ -2651,12 +2644,12 @@ IMPL_LINK(SbaXDataBrowserController, OnCanceledNotFound, FmFoundRecordInformatio
try
{
- // let the grid snyc it's display with the cursor
+ // let the grid snyc its display with the cursor
Reference< XPropertySet > xModelSet(getControlModel(), UNO_QUERY);
- DBG_ASSERT(xModelSet.is(), "SbaXDataBrowserController::OnCanceledNotFound : no model set ?!");
- Any aOld = xModelSet->getPropertyValue(::rtl::OUString::createFromAscii("DisplayIsSynchron"));
- xModelSet->setPropertyValue(::rtl::OUString::createFromAscii("DisplayIsSynchron"), ::comphelper::makeBoolAny(sal_Bool(sal_True)));
- xModelSet->setPropertyValue(::rtl::OUString::createFromAscii("DisplayIsSynchron"), aOld);
+ OSL_ENSURE(xModelSet.is(), "SbaXDataBrowserController::OnCanceledNotFound : no model set ?!");
+ Any aOld = xModelSet->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayIsSynchron")));
+ xModelSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayIsSynchron")), ::comphelper::makeBoolAny(sal_Bool(sal_True)));
+ xModelSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayIsSynchron")), aOld);
}
catch( const Exception& )
{
@@ -2769,7 +2762,7 @@ void SbaXDataBrowserController::unloaded(const EventObject& /*aEvent*/) throw( R
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::unloaded" );
m_xParser.clear();
InvalidateAll();
- // do this asynchron, there are other listeners reacting on this message ...
+ // do this asynchronously, there are other listeners reacting on this message ...
// (it's a little hack : the grid columns are listening to this event, too, and their bound field may
// change as a reaction on that event. as we have no chance to be notified of this change (which is
// the one we're interested in) we give them time to do what they want to before invalidating our
@@ -2807,7 +2800,7 @@ void SbaXDataBrowserController::enterFormAction()
//------------------------------------------------------------------------------
void SbaXDataBrowserController::leaveFormAction()
{
- DBG_ASSERT( m_nFormActionNestingLevel > 0, "SbaXDataBrowserController::leaveFormAction : invalid call !" );
+ OSL_ENSURE( m_nFormActionNestingLevel > 0, "SbaXDataBrowserController::leaveFormAction : invalid call !" );
if ( --m_nFormActionNestingLevel > 0 )
return;
@@ -2843,7 +2836,7 @@ sal_Bool SbaXDataBrowserController::isValidCursor() const
{
bIsValid = m_xParser.is();
}
- } // if ( !bIsValid )
+ }
return bIsValid;
}
@@ -2932,7 +2925,7 @@ void LoadFormHelper::implDispose()
void SAL_CALL LoadFormHelper::loaded(const ::com::sun::star::lang::EventObject& /*aEvent*/) throw( RuntimeException )
{
::osl::MutexGuard aGuard(m_aAccessSafety);
- DBG_ASSERT(m_eState == STARTED || m_eState == DISPOSED, "LoadFormHelper::loaded : wrong call !");
+ OSL_ENSURE(m_eState == STARTED || m_eState == DISPOSED, "LoadFormHelper::loaded : wrong call !");
if (m_eState == STARTED)
m_eState = LOADED;
}
@@ -2941,7 +2934,7 @@ void SAL_CALL LoadFormHelper::loaded(const ::com::sun::star::lang::EventObject&
void SAL_CALL LoadFormHelper::unloaded(const ::com::sun::star::lang::EventObject& /*aEvent*/) throw( RuntimeException )
{
::osl::MutexGuard aGuard(m_aAccessSafety);
- DBG_ERROR("LoadFormHelper::unloaded : shouldn't be called !");
+ OSL_FAIL("LoadFormHelper::unloaded : shouldn't be called !");
implDispose();
}
@@ -3085,3 +3078,5 @@ sal_Bool SbaXDataBrowserController::InitializeGridModel(const Reference< ::com::
//..................................................................
} // namespace dbaui
//..................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx
index c437a43dd..6d18c80a9 100644
--- a/dbaccess/source/ui/browser/brwview.cxx
+++ b/dbaccess/source/ui/browser/brwview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,49 +29,25 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _SBA_BWRCTRLR_HXX
#include "brwctrlr.hxx"
-#endif
-#ifndef _SBX_BRWVIEW_HXX
#include "brwview.hxx"
-#endif
-#ifndef _SBA_GRID_HXX
#include "sbagrid.hxx"
-#endif
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/helper/vclunohelper.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _SV_SPLIT_HXX
#include <vcl/split.hxx>
-#endif
-#ifndef DBACCESS_UI_DBTREEVIEW_HXX
#include "dbtreeview.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _DBU_BRW_HRC_
#include "dbu_brw.hrc"
-#endif
-#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_
#include <com/sun/star/form/XLoadable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_XCONTROLCONTAINER_HPP_
#include <com/sun/star/awt/XControlContainer.hpp>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
+#include <osl/diagnose.h>
using namespace dbaui;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::form;
-// using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
@@ -128,7 +105,7 @@ void UnoDataBrowserView::Construct(const Reference< ::com::sun::star::awt::XCont
// create the (UNO-) control
m_xGrid = new SbaXGridControl(getORB());
- DBG_ASSERT(m_xGrid.is(), "UnoDataBrowserView::Construct : could not create a grid control !");
+ OSL_ENSURE(m_xGrid.is(), "UnoDataBrowserView::Construct : could not create a grid control !");
// in design mode (for the moment)
m_xGrid->setDesignMode(sal_True);
@@ -146,9 +123,9 @@ void UnoDataBrowserView::Construct(const Reference< ::com::sun::star::awt::XCont
m_pVclControl = NULL;
getVclControl();
- DBG_ASSERT(m_pVclControl != NULL, "UnoDataBrowserView::Construct : no real grid control !");
+ OSL_ENSURE(m_pVclControl != NULL, "UnoDataBrowserView::Construct : no real grid control !");
}
- catch(Exception&)
+ catch(const Exception&)
{
::comphelper::disposeComponent(m_xGrid);
throw;
@@ -174,7 +151,7 @@ UnoDataBrowserView::~UnoDataBrowserView()
::comphelper::disposeComponent(m_xGrid);
::comphelper::disposeComponent(m_xMe);
}
- catch(Exception)
+ catch(const Exception&)
{}
DBG_DTOR(UnoDataBrowserView,NULL);
@@ -393,3 +370,5 @@ BrowserViewStatusDisplay::~BrowserViewStatusDisplay( )
DBG_DTOR(BrowserViewStatusDisplay,NULL);
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx
index 7468f8eef..ce408d28e 100644
--- a/dbaccess/source/ui/browser/dataview.cxx
+++ b/dbaccess/source/ui/browser/dataview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,34 +29,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_DATAVIEW_HXX
#include "dataview.hxx"
-#endif
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/unohlp.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
#include <comphelper/namedvaluecollection.hxx>
-#ifndef _SFXAPP_HXX //autogen wg. SFX_APP
#include <sfx2/app.hxx>
-#endif
-#ifndef _SFXIMGMGR_HXX
#include <sfx2/imgmgr.hxx>
-#endif
-#ifndef DBAUI_ICONTROLLER_HXX
#include "IController.hxx"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _SFX_HRC
#include <sfx2/sfx.hrc>
-#endif
-#ifndef _SVTOOLS_IMGDEF_HXX
#include <svtools/imgdef.hxx>
-#endif
#include <tools/diagnose_ex.h>
//.........................................................................
@@ -239,3 +222,5 @@ namespace dbaui
}
// namespace dbaui
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/dbexchange.cxx b/dbaccess/source/ui/browser/dbexchange.cxx
index 1fda0ff1b..9c178c0e6 100644
--- a/dbaccess/source/ui/browser/dbexchange.cxx
+++ b/dbaccess/source/ui/browser/dbexchange.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -261,3 +262,4 @@ namespace dbaui
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx
index 2c8365888..982e5a640 100644
--- a/dbaccess/source/ui/browser/dbloader.cxx
+++ b/dbaccess/source/ui/browser/dbloader.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,6 +60,7 @@
#include <tools/diagnose_ex.h>
#include <tools/urlobj.hxx>
#include <vcl/svapp.hxx>
+#include <sal/macros.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -91,7 +93,7 @@ public:
// static methods
static ::rtl::OUString getImplementationName_Static() throw( )
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.DBContentLoader");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.DBContentLoader"));
}
static Sequence< ::rtl::OUString> getSupportedServiceNames_Static(void) throw( );
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
@@ -159,8 +161,8 @@ Sequence< ::rtl::OUString > SAL_CALL DBContentLoader::getSupportedServiceNames(v
Sequence< ::rtl::OUString > DBContentLoader::getSupportedServiceNames_Static(void) throw( )
{
Sequence< ::rtl::OUString > aSNS( 2 );
- aSNS.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.frame.FrameLoader");
- aSNS.getArray()[1] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.ContentLoader");
+ aSNS.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.FrameLoader"));
+ aSNS.getArray()[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ContentLoader"));
return aSNS;
}
// -------------------------------------------------------------------------
@@ -169,17 +171,17 @@ extern "C" void SAL_CALL writeDBLoaderInfo(void* pRegistryKey)
Reference< XRegistryKey> xKey(reinterpret_cast< XRegistryKey*>(pRegistryKey));
// register content loader for dispatch
- ::rtl::OUString aImpl = ::rtl::OUString::createFromAscii("/");
+ ::rtl::OUString aImpl(RTL_CONSTASCII_USTRINGPARAM("/"));
aImpl += DBContentLoader::getImplementationName_Static();
::rtl::OUString aImpltwo = aImpl;
- aImpltwo += ::rtl::OUString::createFromAscii("/UNO/Loader");
+ aImpltwo += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/Loader"));
Reference< XRegistryKey> xNewKey = xKey->createKey( aImpltwo );
aImpltwo = aImpl;
- aImpltwo += ::rtl::OUString::createFromAscii("/Loader");
+ aImpltwo += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Loader"));
Reference< XRegistryKey > xLoaderKey = xKey->createKey( aImpltwo );
- xNewKey = xLoaderKey->createKey( ::rtl::OUString::createFromAscii("Pattern") );
- xNewKey->setAsciiValue( ::rtl::OUString::createFromAscii(".component:DB*") );
+ xNewKey = xLoaderKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Pattern")) );
+ xNewKey->setAsciiValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".component:DB*")) );
}
// -----------------------------------------------------------------------
@@ -216,7 +218,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const ::
Reference< XController2 > xController;
const ::rtl::OUString sComponentURL( aParser.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
- for ( size_t i=0; i < sizeof( aImplementations ) / sizeof( aImplementations[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS( aImplementations ); ++i )
{
if ( sComponentURL.equalsAscii( aImplementations[i].pAsciiServiceName ) )
{
@@ -227,7 +229,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const ::
// if a data source browser is loaded without its tree pane, then we assume it to be a
// table data view, effectively. In this case, we need to adjust the module identifier.
- // 2008-02-05 / i85879 / frank.schoenheit@sun.com
+ // #i85879#
::comphelper::NamedValueCollection aLoadArgs( rArgs );
if ( sComponentURL == URL_COMPONENT_DATASOURCEBROWSER )
@@ -301,11 +303,11 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const ::
}
// init controller
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
try
{
Reference<XInitialization > xIni(xController,UNO_QUERY);
- PropertyValue aFrame(::rtl::OUString::createFromAscii("Frame"),0,makeAny(rFrame),PropertyState_DIRECT_VALUE);
+ PropertyValue aFrame(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Frame")),0,makeAny(rFrame),PropertyState_DIRECT_VALUE);
Sequence< Any > aInitArgs(m_aArgs.getLength()+1);
Any* pBegin = aInitArgs.getArray();
@@ -356,3 +358,4 @@ void DBContentLoader::cancel(void) throw()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/dbtreemodel.cxx b/dbaccess/source/ui/browser/dbtreemodel.cxx
index 83adfff84..669e537c0 100644
--- a/dbaccess/source/ui/browser/dbtreemodel.cxx
+++ b/dbaccess/source/ui/browser/dbtreemodel.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_DBTREEMODEL_HXX
#include "dbtreemodel.hxx"
-#endif
-#ifndef _DBU_RESOURCE_HRC_
#include "dbu_resource.hrc"
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
namespace dbaui
{
@@ -53,3 +48,5 @@ namespace dbaui
DBG_DTOR(DBTreeListUserData,NULL);
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/dbtreemodel.hxx b/dbaccess/source/ui/browser/dbtreemodel.hxx
index 20f60eddb..a2cec18e4 100644
--- a/dbaccess/source/ui/browser/dbtreemodel.hxx
+++ b/dbaccess/source/ui/browser/dbtreemodel.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,21 +29,11 @@
#ifndef DBAUI_DBTREEMODEL_HXX
#define DBAUI_DBTREEMODEL_HXX
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _SVLBOX_HXX
#include <svtools/svlbox.hxx>
-#endif
-#ifndef _SVLBOXITM_HXX
#include <svtools/svlbitm.hxx>
-#endif
-#ifndef _SBA_UNODATBR_HXX_
#include "unodatbr.hxx"
-#endif
-#ifndef _DBAUI_COMMON_TYPES_HXX_
#include "commontypes.hxx"
-#endif
// syntax of the tree userdata
// datasource holds the connection
@@ -77,3 +68,5 @@ namespace dbaui
}
#endif // DBAUI_DBTREEMODEL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/dbtreeview.cxx b/dbaccess/source/ui/browser/dbtreeview.cxx
index f83fe4006..a910eeb35 100644
--- a/dbaccess/source/ui/browser/dbtreeview.cxx
+++ b/dbaccess/source/ui/browser/dbtreeview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBACCESS_UI_DBTREEVIEW_HXX
#include "dbtreeview.hxx"
-#endif
-#ifndef _SVTREEBOX_HXX
#include <svtools/svtreebx.hxx>
-#endif
-#ifndef DBAUI_DBTREELISTBOX_HXX
#include "dbtreelistbox.hxx"
-#endif
-#ifndef DBAUI_DBTREEMODEL_HXX
#include "dbtreemodel.hxx"
-#endif
#include "dbaccess_helpid.hrc"
// .........................................................................
@@ -129,3 +122,4 @@ void DBTreeView::GetFocus()
// .........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/dbtreeview.hxx b/dbaccess/source/ui/browser/dbtreeview.hxx
index fe0ec4ae8..7bcddc2ef 100644
--- a/dbaccess/source/ui/browser/dbtreeview.hxx
+++ b/dbaccess/source/ui/browser/dbtreeview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,13 +29,9 @@
#ifndef DBACCESS_UI_DBTREEVIEW_HXX
#define DBACCESS_UI_DBTREEVIEW_HXX
-#ifndef _SV_WINDOW_HXX //autogen
#include <vcl/window.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
class SvTreeListBox;
class SvLBoxTreeList;
@@ -80,3 +77,4 @@ namespace dbaui
#endif // DBACCESS_UI_DBTREEVIEW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
index 3314a4aa1..d44e21c2d 100644
--- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
+++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,33 +29,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _SBA_UNODATBR_HXX_
#include "unodatbr.hxx"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _DBAUI_LISTVIEWITEMS_HXX_
#include "listviewitems.hxx"
-#endif
-#ifndef DBACCESS_IMAGEPROVIDER_HXX
#include "imageprovider.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef DBACCESS_UI_DBTREEVIEW_HXX
+#include <osl/diagnose.h>
#include "dbtreeview.hxx"
-#endif
-#ifndef DBAUI_DBTREELISTBOX_HXX
#include "dbtreelistbox.hxx"
-#endif
-#ifndef _DBU_BRW_HRC_
#include "dbu_brw.hrc"
-#endif
-#ifndef DBAUI_DBTREEMODEL_HXX
#include "dbtreemodel.hxx"
-#endif
using namespace ::com::sun::star::frame;
using namespace ::dbtools;
@@ -65,9 +48,9 @@ namespace dbaui
{
// .........................................................................
// -----------------------------------------------------------------------------
-SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getChildType( SvLBoxEntry* _pEntry ) const
+SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getChildType( SvLBoxEntry* _pEntry ) const
{
- DBG_ASSERT(isContainer(_pEntry), "SbaTableQueryBrowser::getChildType: invalid entry!");
+ OSL_ENSURE(isContainer(_pEntry), "SbaTableQueryBrowser::getChildType: invalid entry!");
switch (getEntryType(_pEntry))
{
case etTableContainer:
@@ -142,7 +125,7 @@ void SbaTableQueryBrowser::select(SvLBoxEntry* _pEntry, sal_Bool _bSelect)
m_pTreeModel->InvalidateEntry(_pEntry);
}
else {
- DBG_ERROR("SbaTableQueryBrowser::select: invalid entry!");
+ OSL_FAIL("SbaTableQueryBrowser::select: invalid entry!");
}
}
@@ -162,7 +145,7 @@ sal_Bool SbaTableQueryBrowser::isSelected(SvLBoxEntry* _pEntry) const
if (pTextItem)
return static_cast<OBoldListboxString*>(pTextItem)->isEmphasized();
else {
- DBG_ERROR("SbaTableQueryBrowser::isSelected: invalid entry!");
+ OSL_FAIL("SbaTableQueryBrowser::isSelected: invalid entry!");
}
return sal_False;
}
@@ -174,7 +157,7 @@ void SbaTableQueryBrowser::SelectionChanged()
InvalidateFeature(ID_BROWSER_INSERTCOLUMNS);
InvalidateFeature(ID_BROWSER_INSERTCONTENT);
InvalidateFeature(ID_BROWSER_FORMLETTER);
- } // if ( !m_bShowMenu )
+ }
InvalidateFeature(ID_BROWSER_COPY);
InvalidateFeature(ID_BROWSER_CUT);
}
@@ -217,7 +200,7 @@ sal_Int32 SbaTableQueryBrowser::getDatabaseObjectType( EntryType _eType )
default:
break;
}
- OSL_ENSURE( false, "SbaTableQueryBrowser::getDatabaseObjectType: folder types and 'Unknown' not allowed here!" );
+ OSL_FAIL( "SbaTableQueryBrowser::getDatabaseObjectType: folder types and 'Unknown' not allowed here!" );
return DatabaseObject::TABLE;
}
@@ -241,25 +224,21 @@ void SbaTableQueryBrowser::notifyHiContrastChanged()
::std::auto_ptr< ImageProvider > pImageProvider( getImageProviderFor( pEntryLoop ) );
// the images for this entry
- Image aImage, aImageHC;
+ Image aImage;
if ( pData->eType == etDatasource )
- {
- aImage = pImageProvider->getDatabaseImage( false );
- aImageHC = pImageProvider->getDatabaseImage( true );
- }
+ aImage = pImageProvider->getDatabaseImage();
else
{
bool bIsFolder = !isObject( pData->eType );
if ( bIsFolder )
{
sal_Int32 nObjectType( getDatabaseObjectType( pData->eType ) );
- aImage = pImageProvider->getFolderImage( nObjectType, false );
- aImageHC = pImageProvider->getFolderImage( nObjectType, true );
+ aImage = pImageProvider->getFolderImage( nObjectType );
}
else
{
sal_Int32 nObjectType( getDatabaseObjectType( pData->eType ) );
- pImageProvider->getImages( GetEntryText( pEntryLoop ), nObjectType, aImage, aImageHC );
+ pImageProvider->getImages( GetEntryText( pEntryLoop ), nObjectType, aImage );
}
}
@@ -273,10 +252,8 @@ void SbaTableQueryBrowser::notifyHiContrastChanged()
SvLBoxContextBmp* pContextBitmapItem = static_cast< SvLBoxContextBmp* >( pItem );
- pContextBitmapItem->SetBitmap1( aImage, BMP_COLOR_NORMAL );
- pContextBitmapItem->SetBitmap2( aImage, BMP_COLOR_NORMAL );
- pContextBitmapItem->SetBitmap1( aImageHC, BMP_COLOR_HIGHCONTRAST );
- pContextBitmapItem->SetBitmap2( aImageHC, BMP_COLOR_HIGHCONTRAST );
+ pContextBitmapItem->SetBitmap1( aImage );
+ pContextBitmapItem->SetBitmap2( aImage );
break;
}
@@ -289,3 +266,4 @@ void SbaTableQueryBrowser::notifyHiContrastChanged()
} // namespace dbaui
// .........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
index f2ffa0641..6f8aab41e 100644
--- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx
+++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -47,9 +48,9 @@
#include <connectivity/dbexception.hxx>
#include <connectivity/dbtools.hxx>
#include <cppuhelper/exc_hlp.hxx>
-#include <svtools/treelist.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <functional>
// .........................................................................
@@ -136,7 +137,7 @@ namespace dbaui
EntryType eEntryType = getEntryType( pHitEntry );
if (!isContainer(eEntryType))
{
- DBG_ERROR("SbaTableQueryBrowser::executeDrop: what the hell did queryDrop do?");
+ OSL_FAIL("SbaTableQueryBrowser::executeDrop: what the hell did queryDrop do?");
// queryDrop shoud not have allowed us to reach this situation ....
return DND_ACTION_NONE;
}
@@ -241,7 +242,7 @@ namespace dbaui
IMPL_LINK( SbaTableQueryBrowser, OnAsyncDrop, void*, /*NOTINTERESTEDIN*/ )
{
m_nAsyncDrop = 0;
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
if ( m_aAsyncDrop.nType == E_TABLE )
@@ -277,7 +278,7 @@ namespace dbaui
if ( pData->xConnection.is() )
{
- DBG_ASSERT( impl_isDataSourceEntry( pEntryLoop ), "SbaTableQueryBrowser::clearTreeModel: no data source entry, but a connection?" );
+ OSL_ENSURE( impl_isDataSourceEntry( pEntryLoop ), "SbaTableQueryBrowser::clearTreeModel: no data source entry, but a connection?" );
// connections are to be stored *only* at the data source entries
impl_releaseConnection( pData->xConnection );
}
@@ -293,3 +294,4 @@ namespace dbaui
} // namespace dbaui
// .........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx
index f79662deb..8fcd726bf 100644
--- a/dbaccess/source/ui/browser/exsrcbrw.cxx
+++ b/dbaccess/source/ui/browser/exsrcbrw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,39 +29,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _SBA_EXTCTRLR_HXX
#include "exsrcbrw.hxx"
-#endif
-#ifndef _COM_SUN_STAR_FORM_FORMCOMPONENTTYPE_HPP_
#include <com/sun/star/form/FormComponentType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_
#include <com/sun/star/util/XURLTransformer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XGRIDCOLUMNFACTORY_HPP_
#include <com/sun/star/form/XGridColumnFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_
#include <com/sun/star/form/XLoadable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#endif
-#ifndef _SBA_FORMADAPTER_HXX
#include "formadapter.hxx"
-#endif
-#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
#include <comphelper/processfactory.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdb;
@@ -175,7 +154,7 @@ void SbaExternalSourceBrowser::modified(const ::com::sun::star::lang::EventObjec
void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::URL& aURL, const Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) throw(::com::sun::star::uno::RuntimeException)
{
const ::com::sun::star::beans::PropertyValue* pArguments = aArgs.getConstArray();
- if (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/AddGridColumn")))
+ if (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/AddGridColumn"))))
{
// search the argument describing the column to create
::rtl::OUString sControlType;
@@ -184,21 +163,21 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
sal_uInt16 i;
for ( i = 0; i < aArgs.getLength(); ++i, ++pArguments )
{
- if (pArguments->Name.equals(::rtl::OUString::createFromAscii("ColumnType")))
+ if (pArguments->Name.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnType"))))
{
sal_Bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const ::rtl::OUString*)0));
OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnType\" !");
if (bCorrectType)
sControlType = ::comphelper::getString(pArguments->Value);
}
- else if (pArguments->Name.equals(::rtl::OUString::createFromAscii("ColumnPosition")))
+ else if (pArguments->Name.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnPosition"))))
{
sal_Bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const sal_Int16*)0));
OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnPosition\" !");
if (bCorrectType)
nControlPos = ::comphelper::getINT16(pArguments->Value);
}
- else if (pArguments->Name.equals(::rtl::OUString::createFromAscii("ColumnProperties")))
+ else if (pArguments->Name.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnProperties"))))
{
sal_Bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const Sequence< ::com::sun::star::beans::PropertyValue>*)0));
OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnProperties\" !");
@@ -206,12 +185,12 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
aControlProps = *(Sequence< ::com::sun::star::beans::PropertyValue>*)pArguments->Value.getValue();
}
else
- OSL_ENSURE(sal_False, ((ByteString("SbaExternalSourceBrowser::dispatch(AddGridColumn) : unknown argument (") += ByteString((const sal_Unicode*)pArguments->Name, gsl_getSystemTextEncoding()).GetBuffer()) += ") !").GetBuffer());
+ OSL_FAIL(((ByteString("SbaExternalSourceBrowser::dispatch(AddGridColumn) : unknown argument (") += ByteString((const sal_Unicode*)pArguments->Name, gsl_getSystemTextEncoding()).GetBuffer()) += ") !").GetBuffer());
}
if (!sControlType.getLength())
{
- OSL_ENSURE(sal_False, "SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument (ColumnType) !");
- sControlType = ::rtl::OUString::createFromAscii("TextField");
+ OSL_FAIL("SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument (ColumnType) !");
+ sControlType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextField"));
}
OSL_ENSURE(aControlProps.getLength(), "SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument (ColumnProperties) !");
@@ -221,7 +200,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
Reference< XPropertySetInfo > xNewColProperties;
if (xNewCol.is())
xNewColProperties = xNewCol->getPropertySetInfo();
- // set it's properties
+ // set its properties
if (xNewColProperties.is())
{
const ::com::sun::star::beans::PropertyValue* pControlProps = aControlProps.getConstArray();
@@ -234,8 +213,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
}
catch(Exception&)
{
- OSL_ENSURE(sal_False,
- ( ByteString("SbaExternalSourceBrowser::dispatch : could not set a column property (")
+ OSL_FAIL(( ByteString("SbaExternalSourceBrowser::dispatch : could not set a column property (")
+= ByteString(pControlProps->Name.getStr(), (sal_uInt16)pControlProps->Name.getLength(), RTL_TEXTENCODING_ASCII_US)
+= ByteString(")!")).GetBuffer());
}
@@ -253,20 +231,20 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
// append the column
xColContainer->insertByIndex(nControlPos, makeAny(xNewCol));
}
- else if (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/ClearView")))
+ else if (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/ClearView"))))
{
ClearView();
}
- else if (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/AttachToForm")))
+ else if (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/AttachToForm"))))
{
if (!m_pDataSourceImpl)
return;
Reference< XRowSet > xMasterForm;
- // search the arguments for he master form
+ // search the arguments for the master form
for (sal_uInt16 i=0; i<aArgs.getLength(); ++i, ++pArguments)
{
- if ((pArguments->Name.equals(::rtl::OUString::createFromAscii("MasterForm"))) && (pArguments->Value.getValueTypeClass() == TypeClass_INTERFACE))
+ if ((pArguments->Name.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MasterForm")))) && (pArguments->Value.getValueTypeClass() == TypeClass_INTERFACE))
{
xMasterForm = Reference< XRowSet > (*(Reference< XInterface > *)pArguments->Value.getValue(), UNO_QUERY);
break;
@@ -274,7 +252,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
}
if (!xMasterForm.is())
{
- OSL_ENSURE(sal_False, "SbaExternalSourceBrowser::dispatch(FormSlots/AttachToForm) : please specify a form to attach to as argument !");
+ OSL_FAIL("SbaExternalSourceBrowser::dispatch(FormSlots/AttachToForm) : please specify a form to attach to as argument !");
return;
}
@@ -293,22 +271,22 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrows
m_bInQueryDispatch = sal_True;
- if ( (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/AttachToForm")))
+ if ( (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/AttachToForm"))))
// attach a new external form
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/AddGridColumn")))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/AddGridColumn"))))
// add a column to the grid
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/ClearView")))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/ClearView"))))
// clear the grid
)
xReturn = (::com::sun::star::frame::XDispatch*)this;
if ( !xReturn.is()
- && ( (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToFirst")))
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToPrev")))
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToNext")))
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToLast")))
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToNew")))
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/undoRecord")))
+ && ( (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/moveToFirst"))))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/moveToPrev"))))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/moveToNext"))))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/moveToLast"))))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/moveToNew"))))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/undoRecord"))))
)
)
{
@@ -321,7 +299,7 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrows
m_xUrlTransformer->parseStrict( aNewUrl );
// set a new mark
- aNewUrl.Mark = ::rtl::OUString::createFromAscii("DB/FormGridView");
+ aNewUrl.Mark = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DB/FormGridView"));
// this controller is instantiated when somebody dispatches the ".component:DB/FormGridView" in any
// frame, so we use "FormGridView" as mark that a dispatch request came from this view
@@ -446,7 +424,7 @@ void SbaExternalSourceBrowser::Attach(const Reference< XRowSet > & xMaster)
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "SbaExternalSourceBrowser::Attach : couldn't restore the cursor position !");
+ OSL_FAIL("SbaExternalSourceBrowser::Attach : couldn't restore the cursor position !");
}
}
@@ -498,3 +476,5 @@ void SbaExternalSourceBrowser::stopListening()
//==================================================================
//==================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx
index 9bf2933f5..5a1dd208f 100644
--- a/dbaccess/source/ui/browser/formadapter.cxx
+++ b/dbaccess/source/ui/browser/formadapter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,36 +29,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _SBA_FORMADAPTER_HXX
#include "formadapter.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX //autogen
#include <tools/debug.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
+#include <osl/diagnose.h>
#include <comphelper/types.hxx>
-#endif
-#ifndef _COMPHELPER_ENUMHELPER_HXX_
#include <comphelper/enumhelper.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef _DBU_BRW_HRC_
#include "dbu_brw.hrc"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
using namespace dbaui;
using namespace ::com::sun::star::uno;
@@ -211,7 +193,7 @@ void SbaXFormAdapter::AttachForm(const Reference< ::com::sun::star::sdbc::XRowSe
if (xNewMaster == m_xMainForm)
return;
- DBG_ASSERT(xNewMaster.get() != static_cast< ::com::sun::star::sdbc::XRowSet* >(this), "SbaXFormAdapter::AttachForm : invalid argument !");
+ OSL_ENSURE(xNewMaster.get() != static_cast< ::com::sun::star::sdbc::XRowSet* >(this), "SbaXFormAdapter::AttachForm : invalid argument !");
if (m_xMainForm.is())
{
@@ -1097,52 +1079,52 @@ IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, form, SubmitListener, m_aSubm
// -------------------------------------------------------------------------
sal_Bool SAL_CALL SbaXFormAdapter::getGroupControl() throw( RuntimeException )
{
- DBG_ERROR("SAL_CALL SbaXFormAdapter::getGroupControl : not supported !");
+ OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroupControl : not supported !");
return sal_False;
}
// -------------------------------------------------------------------------
void SAL_CALL SbaXFormAdapter::setGroupControl(sal_Bool /*GroupControl*/) throw( RuntimeException )
{
- DBG_ERROR("SAL_CALL SbaXFormAdapter::setGroupControl : not supported !");
+ OSL_FAIL("SAL_CALL SbaXFormAdapter::setGroupControl : not supported !");
}
// -------------------------------------------------------------------------
void SAL_CALL SbaXFormAdapter::setControlModels(const Sequence< Reference< ::com::sun::star::awt::XControlModel > >& /*Controls*/) throw( RuntimeException )
{
- DBG_ERROR("SAL_CALL SbaXFormAdapter::setControlModels : not supported !");
+ OSL_FAIL("SAL_CALL SbaXFormAdapter::setControlModels : not supported !");
}
// -------------------------------------------------------------------------
Sequence< Reference< ::com::sun::star::awt::XControlModel > > SAL_CALL SbaXFormAdapter::getControlModels() throw( RuntimeException )
{
- DBG_ERROR("SAL_CALL SbaXFormAdapter::getControlModels : not supported !");
+ OSL_FAIL("SAL_CALL SbaXFormAdapter::getControlModels : not supported !");
return Sequence< Reference< ::com::sun::star::awt::XControlModel > >();
}
// -------------------------------------------------------------------------
void SAL_CALL SbaXFormAdapter::setGroup(const Sequence< Reference< ::com::sun::star::awt::XControlModel > >& /*_rGroup*/, const ::rtl::OUString& /*GroupName*/) throw( RuntimeException )
{
- DBG_ERROR("SAL_CALL SbaXFormAdapter::setGroup : not supported !");
+ OSL_FAIL("SAL_CALL SbaXFormAdapter::setGroup : not supported !");
}
// -------------------------------------------------------------------------
sal_Int32 SAL_CALL SbaXFormAdapter::getGroupCount() throw( RuntimeException )
{
- DBG_ERROR("SAL_CALL SbaXFormAdapter::getGroupCount : not supported !");
+ OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroupCount : not supported !");
return 0;
}
// -------------------------------------------------------------------------
void SAL_CALL SbaXFormAdapter::getGroup(sal_Int32 /*nGroup*/, Sequence< Reference< ::com::sun::star::awt::XControlModel > >& /*_rGroup*/, ::rtl::OUString& /*Name*/) throw( RuntimeException )
{
- DBG_ERROR("SAL_CALL SbaXFormAdapter::getGroup : not supported !");
+ OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroup : not supported !");
}
// -------------------------------------------------------------------------
void SAL_CALL SbaXFormAdapter::getGroupByName(const ::rtl::OUString& /*Name*/, Sequence< Reference< ::com::sun::star::awt::XControlModel > >& /*_rGroup*/) throw( RuntimeException )
{
- DBG_ERROR("SAL_CALL SbaXFormAdapter::getGroupByName : not supported !");
+ OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroupByName : not supported !");
}
// ::com::sun::star::lang::XComponent
@@ -1207,7 +1189,7 @@ void SAL_CALL SbaXFormAdapter::removeEventListener(const Reference< ::com::sun::
void SAL_CALL SbaXFormAdapter::setFastPropertyValue(sal_Int32 nHandle, const Any& aValue) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, RuntimeException )
{
Reference< ::com::sun::star::beans::XFastPropertySet > xSet(m_xMainForm, UNO_QUERY);
- DBG_ASSERT(xSet.is(), "SAL_CALL SbaXFormAdapter::setFastPropertyValue : have no master form !");
+ OSL_ENSURE(xSet.is(), "SAL_CALL SbaXFormAdapter::setFastPropertyValue : have no master form !");
if (m_nNamePropHandle == nHandle)
{
@@ -1240,7 +1222,7 @@ void SAL_CALL SbaXFormAdapter::setFastPropertyValue(sal_Int32 nHandle, const Any
Any SAL_CALL SbaXFormAdapter::getFastPropertyValue(sal_Int32 nHandle) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, RuntimeException )
{
Reference< ::com::sun::star::beans::XFastPropertySet > xSet(m_xMainForm, UNO_QUERY);
- DBG_ASSERT(xSet.is(), "SAL_CALL SbaXFormAdapter::getFastPropertyValue : have no master form !");
+ OSL_ENSURE(xSet.is(), "SAL_CALL SbaXFormAdapter::getFastPropertyValue : have no master form !");
if (m_nNamePropHandle == nHandle)
return makeAny(m_sName);
@@ -1334,7 +1316,7 @@ Sequence< Any > SAL_CALL SbaXFormAdapter::getPropertyValues(const Sequence< ::rt
// search for (and fake) the NAME property
const ::rtl::OUString* pNames = aPropertyNames.getConstArray();
Any* pValues = aReturn.getArray();
- DBG_ASSERT(aReturn.getLength() == aPropertyNames.getLength(), "SAL_CALL SbaXFormAdapter::getPropertyValues : the main form returned an invalid-length sequence !");
+ OSL_ENSURE(aReturn.getLength() == aPropertyNames.getLength(), "SAL_CALL SbaXFormAdapter::getPropertyValues : the main form returned an invalid-length sequence !");
for (sal_Int32 i=0; i<aPropertyNames.getLength(); ++i, ++pNames, ++pValues)
if (pNames->equals(PROPERTY_NAME))
{
@@ -1516,7 +1498,7 @@ void SbaXFormAdapter::implInsert(const Any& aElement, sal_Int32 nIndex, const ::
if (sal::static_int_cast< sal_uInt32 >(nIndex) > m_aChildren.size())
nIndex = m_aChildren.size();
- DBG_ASSERT(m_aChildren.size() == m_aChildNames.size(), "SAL_CALL SbaXFormAdapter::implInsert : inconsistent container state !");
+ OSL_ENSURE(m_aChildren.size() == m_aChildNames.size(), "SAL_CALL SbaXFormAdapter::implInsert : inconsistent container state !");
m_aChildren.insert(m_aChildren.begin() + nIndex, xElement);
m_aChildNames.insert(m_aChildNames.begin() + nIndex, sName);
@@ -1635,7 +1617,7 @@ void SAL_CALL SbaXFormAdapter::removeByIndex(sal_Int32 _rIndex) throw( ::com::su
Reference< ::com::sun::star::form::XFormComponent > xAffected = *(m_aChildren.begin() + _rIndex);
- DBG_ASSERT(m_aChildren.size() == m_aChildNames.size(), "SAL_CALL SbaXFormAdapter::removeByIndex : inconsistent container state !");
+ OSL_ENSURE(m_aChildren.size() == m_aChildNames.size(), "SAL_CALL SbaXFormAdapter::removeByIndex : inconsistent container state !");
m_aChildren.erase(m_aChildren.begin() + _rIndex);
m_aChildNames.erase(m_aChildNames.begin() + _rIndex);
@@ -1694,7 +1676,7 @@ void SAL_CALL SbaXFormAdapter::replaceByIndex(sal_Int32 _rIndex, const Any& Elem
Reference< ::com::sun::star::form::XFormComponent > xOld = *(m_aChildren.begin() + _rIndex);
- DBG_ASSERT(m_aChildren.size() == m_aChildNames.size(), "SAL_CALL SbaXFormAdapter::replaceByIndex : inconsistent container state !");
+ OSL_ENSURE(m_aChildren.size() == m_aChildNames.size(), "SAL_CALL SbaXFormAdapter::replaceByIndex : inconsistent container state !");
*(m_aChildren.begin() + _rIndex) = xElement;
*(m_aChildNames.begin() + _rIndex) = sName;
@@ -1769,7 +1751,7 @@ void SAL_CALL SbaXFormAdapter::propertyChange(const ::com::sun::star::beans::Pro
if(aIter != m_aChildren.end())
{
sal_Int32 nPos = aIter - m_aChildren.begin();
- DBG_ASSERT(*(m_aChildNames.begin() + nPos) == ::comphelper::getString(evt.OldValue), "SAL_CALL SbaXFormAdapter::propertyChange : object has a wrong name !");
+ OSL_ENSURE(*(m_aChildNames.begin() + nPos) == ::comphelper::getString(evt.OldValue), "SAL_CALL SbaXFormAdapter::propertyChange : object has a wrong name !");
*(m_aChildNames.begin() + nPos) = ::comphelper::getString(evt.NewValue);
}
}
@@ -1792,3 +1774,4 @@ void SAL_CALL SbaXFormAdapter::disposing(const ::com::sun::star::lang::EventObje
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index bea7d2f4d..92e3f8b38 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,106 +28,44 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_GENERICCONTROLLER_HXX
#include "genericcontroller.hxx"
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_
#include <toolkit/awt/vclxwindow.hxx>
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/helper/vclunohelper.hxx>
-#endif
-#ifndef DBAUI_DATAVIEW_HXX
#include "dataview.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
+#include <osl/diagnose.h>
#include "dbustrings.hrc"
-#endif
-#ifndef _VCL_STDTEXT_HXX
#include <vcl/stdtext.hxx>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
#include <framework/titlehelper.hxx>
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_
#include <com/sun/star/sdbc/XDataSource.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XCOMPLETEDCONNECTION_HPP_
#include <com/sun/star/sdb/XCompletedConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_
#include <com/sun/star/task/XInteractionHandler.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XCLOSEABLE_HPP_
#include <com/sun/star/util/XCloseable.hpp>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _DBAUI_COMMON_TYPES_HXX_
#include "commontypes.hxx"
-#endif
-#ifndef _SV_WAITOBJ_HXX
+#include <sal/macros.h>
#include <vcl/waitobj.hxx>
-#endif
-#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
-#endif
-#ifndef SVTOOLS_URIHELPER_HXX
#include <svl/urihelper.hxx>
-#endif
-#ifndef _DBAUI_DATASOURCECONNECTOR_HXX_
#include "datasourceconnector.hxx"
-#endif
-#ifndef INCLUDED_SVTOOLS_MODULEOPTIONS_HXX
#include <unotools/moduleoptions.hxx>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_STATUS_VISIBILITY_HPP_
#include <com/sun/star/frame/status/Visibility.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XMODIFIABLE_HPP_
#include <com/sun/star/util/XModifiable.hpp>
-#endif
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
-#endif
-#ifndef _RTL_LOGFILE_HXX_
#include <rtl/logfile.hxx>
-#endif
#include <algorithm>
-#include <hash_map>
+#include <o3tl/compat_functional.hxx>
+#include <boost/unordered_map.hpp>
#include <cppuhelper/implbase1.hxx>
#include <limits>
@@ -152,7 +91,7 @@ using namespace ::comphelper;
#define LAST_USER_DEFINED_FEATURE ( ::std::numeric_limits< sal_uInt16 >::max() )
// -------------------------------------------------------------------------
-typedef ::std::hash_map< sal_Int16, sal_Int16 > CommandHashMap;
+typedef ::boost::unordered_map< sal_Int16, sal_Int16 > CommandHashMap;
typedef ::std::list< DispatchInformation > DispatchInfoList;
@@ -213,7 +152,7 @@ void UserDefinedFeatures::execute( const URL& _rFeatureURL, const Sequence< Prop
if ( xDispatch == xController )
{
- OSL_ENSURE( false, "UserDefinedFeatures::execute: the controller shouldn't be the dispatcher here!" );
+ OSL_FAIL( "UserDefinedFeatures::execute: the controller shouldn't be the dispatcher here!" );
xDispatch.clear();
}
@@ -271,7 +210,7 @@ OGenericUnoController::OGenericUnoController(const Reference< XMultiServiceFacto
try
{
- m_xUrlTransformer = Reference< XURLTransformer > (_rM->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer")), UNO_QUERY);
+ m_xUrlTransformer = Reference< XURLTransformer > (_rM->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer"))), UNO_QUERY);
}
catch(Exception&)
{
@@ -294,7 +233,7 @@ OGenericUnoController::OGenericUnoController()
,m_bReadOnly(sal_False)
,m_bCurrentlyModified(sal_False)
{
- OSL_ENSURE( false, "OGenericUnoController::OGenericUnoController: illegal call!" );
+ OSL_FAIL( "OGenericUnoController::OGenericUnoController: illegal call!" );
// This ctor only exists because the MSVC compiler complained about an unresolved external
// symbol. It should not be used at all. Since using it yields strange runtime problems,
// we simply abort here.
@@ -324,14 +263,14 @@ sal_Bool OGenericUnoController::Construct(Window* /*pParent*/)
fillSupportedFeatures();
// create the database context
- DBG_ASSERT(getORB().is(), "OGenericUnoController::Construct need a service factory!");
+ OSL_ENSURE(getORB().is(), "OGenericUnoController::Construct need a service factory!");
try
{
m_xDatabaseContext = Reference< XNameAccess >(getORB()->createInstance(SERVICE_SDB_DATABASECONTEXT), UNO_QUERY);
}
catch(Exception&)
{
- DBG_ERROR("OGenericUnoController::Construct: could not create (or start listening at) the database context!");
+ OSL_FAIL("OGenericUnoController::Construct: could not create (or start listening at) the database context!");
}
if (!m_xDatabaseContext.is())
@@ -354,7 +293,7 @@ void OGenericUnoController::impl_initialize()
// -------------------------------------------------------------------------
void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArguments ) throw(Exception, RuntimeException)
{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
Reference< XWindow > xParent;
@@ -370,12 +309,6 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen
{
xFrame.set(aValue.Value,UNO_QUERY_THROW);
}
- /* #i42316#
- else if ( ( *pIter >>= aValue ) && ( 0 == aValue.Name.compareToAscii( "ReadOnly" ) ) )
- {
- aValue.Value >>= m_bReadOnly;
- }
- */
else if ( ( *pIter >>= aValue ) && ( 0 == aValue.Name.compareToAscii( "Preview" ) ) )
{
aValue.Value >>= m_bPreview;
@@ -392,7 +325,7 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen
Window* pParentWin = pParentComponent ? pParentComponent->GetWindow() : NULL;
if (!pParentWin)
{
- throw IllegalArgumentException( ::rtl::OUString::createFromAscii( "Parent window is null" ), *this, 1 );
+ throw IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Parent window is null")), *this, 1 );
}
m_aInitParameters.assign( aArguments );
@@ -400,7 +333,7 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen
ODataView* pView = getView();
if ( !pView )
- throw RuntimeException( ::rtl::OUString::createFromAscii( "unable to create a view" ), *this );
+ throw RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("unable to create a view")), *this );
if ( m_bReadOnly || m_bPreview )
pView->EnableInput( sal_False );
@@ -487,7 +420,7 @@ Sequence< PropertyValue > SAL_CALL OGenericUnoController::getCreationArguments()
// -----------------------------------------------------------------------
void OGenericUnoController::attachFrame( const Reference< XFrame >& _rxFrame ) throw( RuntimeException )
{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
stopFrameListening( m_aCurrentFrame.getFrame() );
@@ -545,7 +478,6 @@ namespace
// #i67882# is the bug which was caused by the real fix which we did in framework
// #i68216# is the bug which requests to fix the code in Draw which relies on
// framework's implementation details
- // 2006-08-07 / frank.schoenheit@sun.com
if ( !!_rFeatureState.sTitle )
_out_rStates.push_back( makeAny( *_rFeatureState.sTitle ) );
if ( !!_rFeatureState.bChecked )
@@ -607,7 +539,6 @@ void OGenericUnoController::ImplBroadcastFeatureState(const ::rtl::OUString& _rF
// it is possible that listeners are registered or revoked while
// we are notifying them, so we must use a copy of m_arrStatusListener, not
// m_arrStatusListener itself
- // #121276# / 2005-05-19 / frank.schoenheit@sun.com
Dispatch aNotifyLoop( m_arrStatusListener );
DispatchIterator iterSearch = aNotifyLoop.begin();
DispatchIterator iterEnd = aNotifyLoop.end();
@@ -681,7 +612,7 @@ void OGenericUnoController::InvalidateFeature_Impl()
::rtl::OString sMessage( "OGenericUnoController::InvalidateFeature_Impl: feature id " );
sMessage += ::rtl::OString::valueOf( aNextFeature.nId );
sMessage += ::rtl::OString( " has been invalidated, but is not supported!" );
- OSL_ENSURE( false, sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
}
#endif
if ( m_aSupportedFeatures.end() != aFeaturePos )
@@ -748,7 +679,7 @@ void OGenericUnoController::InvalidateAll()
void OGenericUnoController::InvalidateAll_Impl()
{
// ---------------------------------
- // invalidate all aupported features
+ // invalidate all supported features
for ( SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.begin();
aIter != m_aSupportedFeatures.end();
@@ -758,7 +689,7 @@ void OGenericUnoController::InvalidateAll_Impl()
{
::osl::MutexGuard aGuard( m_aFeatureMutex);
- DBG_ASSERT(m_aFeaturesToInvalidate.size(), "OGenericUnoController::InvalidateAll_Impl: to be called from within InvalidateFeature_Impl only!");
+ OSL_ENSURE(m_aFeaturesToInvalidate.size(), "OGenericUnoController::InvalidateAll_Impl: to be called from within InvalidateFeature_Impl only!");
m_aFeaturesToInvalidate.pop_front();
if(!m_aFeaturesToInvalidate.empty())
m_aAsyncInvalidateAll.Call();
@@ -841,13 +772,13 @@ void OGenericUnoController::setMasterDispatchProvider(const Reference< XDispatch
// -----------------------------------------------------------------------
void OGenericUnoController::dispatch(const URL& _aURL, const Sequence< PropertyValue >& aArgs) throw(RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- // Since the fix for #123967#, the SolarMutex is not locked anymore when the framework calls into
+ SolarMutexGuard aSolarGuard;
+ // The SolarMutex is not locked anymore when the framework calls into
// here. So, lock it ourself. The real solution would be to lock it only in the places
// where it's needed, but a) this might turn out difficult, since we then also need to care
// for locking in the proper order (SolarMutex and m_aMutex), and b) this would be too many places
// for the time frame of the fix.
- // #i52602# / frank.schoenheit@sun.com / 2005-07-29
+ // #i52602#
#ifdef TIMELOG
::rtl::OString sLog( "OGenericUnoController::dispatch( '" );
@@ -867,12 +798,12 @@ void OGenericUnoController::addStatusListener(const Reference< XStatusListener >
if ( m_xUrlTransformer.is() )
m_xUrlTransformer->parseStrict( aParsedURL );
- // remeber the listener together with the URL
+ // remember the listener together with the URL
m_arrStatusListener.insert( m_arrStatusListener.end(), DispatchTarget( aParsedURL, aListener ) );
// initially broadcast the state
ImplBroadcastFeatureState( aParsedURL.Complete, aListener, sal_True );
- // force the new state to be broadcasted to the new listener
+ // force the new state to be broadcast to the new listener
}
// -----------------------------------------------------------------------
@@ -997,7 +928,7 @@ void OGenericUnoController::implDescribeSupportedFeature( const sal_Char* _pAsci
sal_uInt16 _nFeatureId, sal_Int16 _nCommandGroup )
{
#ifdef DBG_UTIL
- DBG_ASSERT( m_bDescribingSupportedFeatures, "OGenericUnoController::implDescribeSupportedFeature: bad timing for this call!" );
+ OSL_ENSURE( m_bDescribingSupportedFeatures, "OGenericUnoController::implDescribeSupportedFeature: bad timing for this call!" );
#endif
OSL_PRECOND( _nFeatureId < FIRST_USER_DEFINED_FEATURE, "OGenericUnoController::implDescribeSupportedFeature: invalid feature id!" );
@@ -1239,7 +1170,7 @@ Reference< XFrame > SAL_CALL OGenericUnoController::getFrame(void) throw( Runtim
// -----------------------------------------------------------------------------
sal_Bool SAL_CALL OGenericUnoController::attachModel(const Reference< XModel > & /*xModel*/) throw( RuntimeException )
{
- OSL_ENSURE( false, "OGenericUnoController::attachModel: not supported!" );
+ OSL_FAIL( "OGenericUnoController::attachModel: not supported!" );
return sal_False;
}
@@ -1327,11 +1258,11 @@ namespace
"com.sun.star.formula.FormularProperties", "smath",
"com.sun.star.chart.ChartDocument", "schart"
};
- OSL_ENSURE( ( sizeof( pTransTable ) / sizeof( pTransTable[0] ) ) % 2 == 0,
+ OSL_ENSURE( ( SAL_N_ELEMENTS( pTransTable ) ) % 2 == 0,
"lcl_getModuleHelpModuleName: odd size of translation table!" );
// loop through the table
- sal_Int32 nTableEntries = ( sizeof( pTransTable ) / sizeof( pTransTable[0] ) ) / 2;
+ sal_Int32 nTableEntries = ( SAL_N_ELEMENTS( pTransTable ) ) / 2;
const sal_Char** pDocumentService = pTransTable;
const sal_Char** pHelpModuleName = pTransTable + 1;
for ( sal_Int32 j=0; j<nTableEntries; ++j )
@@ -1370,7 +1301,7 @@ namespace
pReturn = "sbasic";
else
{
- OSL_ENSURE( sal_False, "lcl_getModuleHelpModuleName: no installed module found" );
+ OSL_FAIL( "lcl_getModuleHelpModuleName: no installed module found" );
}
}
}
@@ -1391,7 +1322,7 @@ namespace
void OGenericUnoController::openHelpAgent(rtl::OUString const& _suHelpStringURL )
{
rtl::OUString suURL(_suHelpStringURL);
- rtl::OUString sLanguage = rtl::OUString::createFromAscii("Language=");
+ rtl::OUString sLanguage(RTL_CONSTASCII_USTRINGPARAM("Language="));
if (suURL.indexOf(sLanguage) == -1)
{
AppendConfigToken(suURL, sal_False /* sal_False := add '&' */ );
@@ -1454,7 +1385,7 @@ Reference< awt::XWindow> OGenericUnoController::getTopMostContainerWindow() cons
// -----------------------------------------------------------------------------
Reference< XTitle > OGenericUnoController::impl_getTitleHelper_throw()
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
if ( ! m_xTitleHelper.is ())
@@ -1488,7 +1419,7 @@ Reference< XTitle > OGenericUnoController::impl_getTitleHelper_throw()
void SAL_CALL OGenericUnoController::setTitle(const ::rtl::OUString& sTitle)
throw (RuntimeException)
{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
m_bExternalTitle = sal_True;
impl_getTitleHelper_throw()->setTitle (sTitle);
@@ -1571,7 +1502,7 @@ sal_uInt16 OGenericUnoController::registerCommandURL( const ::rtl::OUString& _rC
++nFeatureId;
if ( nFeatureId == LAST_USER_DEFINED_FEATURE )
{
- OSL_ENSURE( false, "OGenericUnoController::registerCommandURL: no more space for user defined features!" );
+ OSL_FAIL( "OGenericUnoController::registerCommandURL: no more space for user defined features!" );
return 0L;
}
@@ -1642,12 +1573,22 @@ Sequence< ::sal_Int16 > SAL_CALL OGenericUnoController::getSupportedCommandGroup
::std::transform( aCmdHashMap.begin(),
aCmdHashMap.end(),
aCommandGroups.getArray(),
- ::std::select1st< CommandHashMap::value_type >()
+ ::o3tl::select1st< CommandHashMap::value_type >()
);
return aCommandGroups;
}
+namespace
+{
+ //Current c++0x draft (apparently) has std::identity, but not operator()
+ template<typename T> struct SGI_identity : public std::unary_function<T,T>
+ {
+ T& operator()(T& x) const { return x; }
+ const T& operator()(const T& x) const { return x; }
+ };
+}
+
// -----------------------------------------------------------------------------
Sequence< DispatchInformation > SAL_CALL OGenericUnoController::getConfigurableDispatchInformation( ::sal_Int16 CommandGroup ) throw (RuntimeException)
{
@@ -1669,7 +1610,7 @@ Sequence< DispatchInformation > SAL_CALL OGenericUnoController::getConfigurableD
::std::transform( aInformationList.begin(),
aInformationList.end(),
aInformation.getArray(),
- ::std::identity< DispatchInformation >()
+ SGI_identity< DispatchInformation >()
);
return aInformation;
@@ -1690,8 +1631,9 @@ void OGenericUnoController::fillSupportedFeatures()
void SAL_CALL OGenericUnoController::dispose() throw(::com::sun::star::uno::RuntimeException)
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
OGenericUnoController_Base::dispose();
}
} // namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/makefile.mk b/dbaccess/source/ui/browser/makefile.mk
deleted file mode 100644
index a7dbd7413..000000000
--- a/dbaccess/source/ui/browser/makefile.mk
+++ /dev/null
@@ -1,71 +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=browser
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES=\
- $(SLO)$/genericcontroller.obj \
- $(SLO)$/dsbrowserDnD.obj \
- $(SLO)$/dataview.obj \
- $(SLO)$/dbexchange.obj \
- $(SLO)$/dbloader.obj \
- $(SLO)$/sbagrid.obj \
- $(SLO)$/formadapter.obj \
- $(SLO)$/brwview.obj \
- $(SLO)$/brwctrlr.obj \
- $(SLO)$/unodatbr.obj \
- $(SLO)$/sbamultiplex.obj \
- $(SLO)$/exsrcbrw.obj \
- $(SLO)$/dbtreemodel.obj \
- $(SLO)$/dsEntriesNoExp.obj \
- $(SLO)$/dbtreeview.obj
-
-SLOFILES =\
- $(EXCEPTIONSFILES)\
- $(SLO)$/AsyncronousLink.obj
-
-SRS1NAME=$(TARGET)
-SRC1FILES = sbabrw.src \
- sbagrid.src
-
-# --- Targets -------------------------------------------------------
-
-
-.INCLUDE : target.mk
-
-$(SRS)$/$(TARGET).srs: $(SOLARINCDIR)$/svx$/globlmn.hrc
-
-
diff --git a/dbaccess/source/ui/browser/sbabrw.src b/dbaccess/source/ui/browser/sbabrw.src
index 168167b8f..49d61fccc 100644
--- a/dbaccess/source/ui/browser/sbabrw.src
+++ b/dbaccess/source/ui/browser/sbabrw.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,7 +33,6 @@
#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
#endif
-// #include <sfx2/sfx.hrc>
#ifndef _GLOBLMN_HRC
#include <svx/globlmn.hrc>
#endif
@@ -43,14 +42,12 @@ QueryBox QUERY_BRW_SAVEMODIFIED
{
Buttons = WB_YES_NO_CANCEL ;
DefButton = WB_DEF_YES ;
- /* ### ACHTUNG: Neuer Text in Resource? Soll der geänderte Datensatz gespeichert werden? : Soll der geänderte Datensatz gespeichert werden? */
Message [ en-US ] = "The current record has been changed.\nDo you want to save the changes?" ;
};
QueryBox QUERY_BRW_DELETE_ROWS
{
Buttons = WB_YES_NO ;
- /* ### ACHTUNG: Neuer Text in Resource? Sollen die selektierten Daten gelöscht werden? : Sollen die selektierten Daten gel÷scht werden? */
Message [ en-US ] = "Do you want to delete the selected data?" ;
};
@@ -63,6 +60,7 @@ String SBA_BROWSER_SETTING_ORDER
{
Text [ en-US ] = "Error setting the sort criteria";
};
+
String SBA_BROWSER_SETTING_FILTER
{
Text [ en-US ] = "Error setting the filter criteria";
@@ -140,13 +138,13 @@ QueryBox QUERY_BRW_DELETE_QUERY_CONFIRM
{
Buttons = WB_YES_NO ;
Message [ en-US ] = "The query already exists. Do you want to delete it?" ;
- };
+};
QueryBox QUERY_CONNECTION_LOST
{
Buttons = WB_YES_NO ;
Message [ en-US ] = "The connection to the database has been lost. Do you want to reconnect?" ;
- };
+};
String STR_OPENTABLES_WARNINGS
{
@@ -161,22 +159,22 @@ String STR_OPENTABLES_WARNINGS_DETAILS
String STR_CONNECTING_DATASOURCE
{
Text [ en-US ] = "Connecting to \"$name$\" ...";
- };
+};
String STR_LOADING_QUERY
{
Text [ en-US ] = "Loading query $name$ ...";
- };
+};
String STR_LOADING_TABLE
{
Text [ en-US ] = "Loading table $name$ ...";
- };
+};
String STR_NO_TABLE_FORMAT_INSIDE
{
Text [ en-US ] = "No table format could be found." ;
- };
+};
String STR_COULDNOTCONNECT_DATASOURCE
{
@@ -200,4 +198,3 @@ Menu RID_MENU_REFRESH_DATA
};
};
};
-
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 7f6047f7b..2ecb7f745 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,206 +29,88 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBACCESS_SBA_GRID_HRC
#include "sbagrid.hrc"
-#endif
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#define ITEMID_HORJUSTIFY SID_ATTR_ALIGN_HOR_JUSTIFY
#define ITEMID_VERJUSTIFY SID_ATTR_ALIGN_VER_JUSTIFY
-//#define ITEMID_ORIENTATION SID_ATTR_ALIGN_ORIENTATION
#define ITEMID_LINEBREAK SID_ATTR_ALIGN_LINEBREAK
#define ITEMID_MARGIN SID_ATTR_ALIGN_MARGIN
#define ITEMID_NUMBERINFO SID_ATTR_NUMBERFORMAT_INFO
#define _ZFORLIST_DECLARE_TABLE
-#ifndef _SVX_NUMINF_HXX
#include <svx/numinf.hxx>
-#endif
-#ifndef _SVX_DBAEXCHANGE_HXX_
#include <svx/dbaexchange.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UI_DIALOGS_XEXECUTABLEDIALOG_HPP_
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#endif
-#ifndef _SBA_GRID_HXX
#include "sbagrid.hxx"
-#endif
-#ifndef DBAUI_SBATTRDLG_HXX
#include "dlgattr.hxx"
-#endif
-#ifndef _DBAUI_DLGSIZE_HXX
#include "dlgsize.hxx"
-#endif
-#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_
#include <com/sun/star/form/XLoadable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
#include <com/sun/star/sdb/CommandType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSERFACTORY_HPP_
#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XRESULTSETACCESS_HPP_
#include <com/sun/star/sdb/XResultSetAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XFORM_HPP_
#include <com/sun/star/form/XForm.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXCONTAINER_HPP_
#include <com/sun/star/container/XIndexContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_NUMBERFORMAT_HPP_
#include <com/sun/star/util/NumberFormat.hpp>
-#endif
-#ifndef _COM_SUN_STAR_VIEW_XSELECTIONSUPPLIER_HPP_
#include <com/sun/star/view/XSelectionSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_DATASELECTIONTYPE_HPP_
#include <com/sun/star/form/DataSelectionType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_TEXTALIGN_HPP_
#include <com/sun/star/awt/TextAlign.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_XTEXTCOMPONENT_HPP_
#include <com/sun/star/awt/XTextComponent.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_DATE_HPP_
#include <com/sun/star/util/Date.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_TIME_HPP_
#include <com/sun/star/util/Time.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_DATETIME_HPP_
#include <com/sun/star/util/DateTime.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETUPDATE_HPP_
#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
-#endif
-#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _SFXINTITEM_HXX
#include <svl/intitem.hxx>
-#endif
-#ifndef _SVX_ALGITEM_HXX //autogen
#include <svx/algitem.hxx>
-#endif
-#ifndef _SV_MULTISEL_HXX //autogen
#include <tools/multisel.hxx>
-#endif
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
-#ifndef _NUMUNO_HXX
#include <svl/numuno.hxx>
-#endif
-#ifndef _SFXITEMPOOL_HXX //autogen wg. SfxItemInfo
#include <svl/itempool.hxx>
-#endif
-#ifndef _SFXITEMSET_HXX //autogen wg. SfxItemSet
#include <svl/itemset.hxx>
-#endif
-#ifndef _SFXRNGITEM_HXX
#include <svl/rngitem.hxx>
-#endif
-#ifndef _SV_WAITOBJ_HXX
#include <vcl/waitobj.hxx>
-#endif
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/helper/vclunohelper.hxx>
-#endif
-#ifndef _ZFORLIST_HXX
#include <svl/zforlist.hxx>
-#endif
-#ifndef _CPPUHELPER_QUERYINTERFACE_HXX_
#include <cppuhelper/queryinterface.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _DBHELPER_DBCONVERSION_HXX_
#include <connectivity/dbconversion.hxx>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _RTL_UUID_H_
-#include <rtl/uuid.h>
-#endif
-#ifndef _RTL_MEMORY_H_
#include <rtl/memory.h>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
+#include <comphelper/servicehelper.hxx>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _SVX_DBEXCH_HRC
#include <svx/dbexch.hrc>
-#endif
-#ifndef _DBU_BRW_HRC_
#include "dbu_brw.hrc"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef DBAUI_DBEXCHANGE_HXX
#include "dbexchange.hxx"
-#endif
-#ifndef DBAUI_TABLEROW_EXCHANGE_HXX
#include "TableRowExchange.hxx"
-#endif
-#ifndef DBAUI_TABLEROW_HXX
#include "TableRow.hxx"
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
#include "FieldDescriptions.hxx"
-#endif
-#ifndef _SVTOOLS_STRINGTRANSFER_HXX_
#include <svtools/stringtransfer.hxx>
-#endif
-#ifndef _VCL_STDTEXT_HXX
#include <vcl/stdtext.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef DBAUI_TOKENWRITER_HXX
#include "TokenWriter.hxx"
-#endif
+#include <osl/diagnose.h>
using namespace ::com::sun::star::ui::dialogs;
using namespace ::com::sun::star::uno;
@@ -278,16 +161,16 @@ Reference< XInterface > SAL_CALL SbaXGridControl::Create(const Reference<XMultiS
//------------------------------------------------------------------------------
::rtl::OUString SbaXGridControl::getImplementationName_Static() throw( RuntimeException )
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.dbu.SbaXGridControl");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.dbu.SbaXGridControl"));
}
//------------------------------------------------------------------------------
Sequence< ::rtl::OUString> SbaXGridControl::getSupportedServiceNames_Static(void) throw( RuntimeException )
{
Sequence< ::rtl::OUString> aSupported(3);
- aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.form.control.InteractionGridControl");
- aSupported[1] = ::rtl::OUString::createFromAscii("com.sun.star.form.control.GridControl");
- aSupported[2] = ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControl");
+ aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.control.InteractionGridControl"));
+ aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.control.GridControl"));
+ aSupported[2] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControl"));
return aSupported;
}
DBG_NAME(SbaXGridControl );
@@ -369,14 +252,11 @@ void SAL_CALL SbaXGridControl::createPeer(const Reference< ::com::sun::star::awt
{
FmXGridControl::createPeer(rToolkit, rParentPeer);
- DBG_ASSERT(/*(0 == m_nPeerCreationLevel) && */!mbCreatingPeer, "FmXGridControl::createPeer : recursion!");
+ OSL_ENSURE(!mbCreatingPeer, "FmXGridControl::createPeer : recursion!");
// see the base class' createPeer for a comment on this
- // 14.05.2001 - 86836 - frank.schoenheit@germany.sun.com
// TODO: why the hell this whole class does not use any mutex?
-// if (0 == m_nPeerCreationLevel)
- {
Reference< ::com::sun::star::frame::XDispatch > xDisp(getPeer(), UNO_QUERY);
for ( StatusMultiplexerArray::iterator aIter = m_aStatusMultiplexer.begin();
aIter != m_aStatusMultiplexer.end();
@@ -385,7 +265,6 @@ void SAL_CALL SbaXGridControl::createPeer(const Reference< ::com::sun::star::awt
if ((*aIter).second && (*aIter).second->getLength())
xDisp->addStatusListener((*aIter).second, (*aIter).first);
}
- }
}
//---------------------------------------------------------------------------------------
@@ -447,7 +326,7 @@ void SAL_CALL SbaXGridControl::removeStatusListener(const Reference< ::com::sun:
//---------------------------------------------------------------------------------------
void SAL_CALL SbaXGridControl::dispose(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
EventObject aEvt;
aEvt.Source = *this;
@@ -541,10 +420,10 @@ Any SAL_CALL SbaXGridPeer::queryInterface(const Type& _rType) throw (RuntimeExce
//---------------------------------------------------------------------------------------
Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaXGridPeer::queryDispatch(const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( RuntimeException )
{
- if ( (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/BrowserAttribs")))
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/RowHeight")))
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/ColumnAttribs")))
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/ColumnWidth")))
+ if ( (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:GridSlots/BrowserAttribs"))))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:GridSlots/RowHeight"))))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:GridSlots/ColumnAttribs"))))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:GridSlots/ColumnWidth"))))
)
{
return (::com::sun::star::frame::XDispatch*)this;
@@ -559,7 +438,7 @@ IMPL_LINK( SbaXGridPeer, OnDispatchEvent, void*, /*NOTINTERESTEDIN*/ )
SbaGridControl* pGrid = static_cast< SbaGridControl* >( GetWindow() );
if ( pGrid ) // if this fails, we were disposing before arriving here
{
- if ( Application::GetMainThreadIdentifier() != ::vos::OThread::getCurrentIdentifier() )
+ if ( Application::GetMainThreadIdentifier() != ::osl::Thread::getCurrentIdentifier() )
{
// still not in the main thread (see SbaXGridPeer::dispatch). post an event, again
// without moving the special even to the back of the queue
@@ -581,13 +460,13 @@ IMPL_LINK( SbaXGridPeer, OnDispatchEvent, void*, /*NOTINTERESTEDIN*/ )
SbaXGridPeer::DispatchType SbaXGridPeer::classifyDispatchURL( const URL& _rURL )
{
DispatchType eURLType = dtUnknown;
- if ( _rURL.Complete.equalsAscii( ".uno:GridSlots/BrowserAttribs" ) )
+ if ( _rURL.Complete.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GridSlots/BrowserAttribs" ) ) )
eURLType = dtBrowserAttribs;
- else if ( _rURL.Complete.equalsAscii( ".uno:GridSlots/RowHeight" ) )
+ else if ( _rURL.Complete.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GridSlots/RowHeight" ) ) )
eURLType = dtRowHeight;
- else if ( _rURL.Complete.equalsAscii( ".uno:GridSlots/ColumnAttribs" ) )
+ else if ( _rURL.Complete.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GridSlots/ColumnAttribs" ) ) )
eURLType = dtColumnAttribs;
- else if ( _rURL.Complete.equalsAscii( ".uno:GridSlots/ColumnWidth" ) )
+ else if ( _rURL.Complete.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GridSlots/ColumnWidth" ) ) )
eURLType = dtColumnWidth;
return eURLType;
}
@@ -599,7 +478,7 @@ void SAL_CALL SbaXGridPeer::dispatch(const URL& aURL, const Sequence< PropertyVa
if (!pGrid)
return;
- if ( Application::GetMainThreadIdentifier() != ::vos::OThread::getCurrentIdentifier() )
+ if ( Application::GetMainThreadIdentifier() != ::osl::Thread::getCurrentIdentifier() )
{
// we're not in the main thread. This is bad, as we want to raise windows here,
// and VCL does not like windows to be opened in non-main threads (at least on Win32).
@@ -622,22 +501,22 @@ void SAL_CALL SbaXGridPeer::dispatch(const URL& aURL, const Sequence< PropertyVa
return;
}
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nColId = -1;
const PropertyValue* pArgs = aArgs.getConstArray();
for (sal_uInt16 i=0; i<aArgs.getLength(); ++i, ++pArgs)
{
- if (pArgs->Name == ::rtl::OUString::createFromAscii("ColumnViewPos"))
+ if (pArgs->Name == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnViewPos")))
{
nColId = pGrid->GetColumnIdFromViewPos(::comphelper::getINT16(pArgs->Value));
break;
}
- if (pArgs->Name == ::rtl::OUString::createFromAscii("ColumnModelPos"))
+ if (pArgs->Name == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnModelPos")))
{
nColId = pGrid->GetColumnIdFromModelPos(::comphelper::getINT16(pArgs->Value));
break;
}
- if (pArgs->Name == ::rtl::OUString::createFromAscii("ColumnId"))
+ if (pArgs->Name == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnId")))
{
nColId = ::comphelper::getINT16(pArgs->Value);
break;
@@ -665,7 +544,7 @@ void SAL_CALL SbaXGridPeer::dispatch(const URL& aURL, const Sequence< PropertyVa
case dtColumnAttribs:
{
- DBG_ASSERT(nColId != -1, "SbaXGridPeer::dispatch : invalid parameter !");
+ OSL_ENSURE(nColId != -1, "SbaXGridPeer::dispatch : invalid parameter !");
if (nColId != -1)
break;
pGrid->SetColAttrs(nColId);
@@ -674,7 +553,7 @@ void SAL_CALL SbaXGridPeer::dispatch(const URL& aURL, const Sequence< PropertyVa
case dtColumnWidth:
{
- DBG_ASSERT(nColId != -1, "SbaXGridPeer::dispatch : invalid parameter !");
+ OSL_ENSURE(nColId != -1, "SbaXGridPeer::dispatch : invalid parameter !");
if (nColId != -1)
break;
pGrid->SetColWidth(nColId);
@@ -710,24 +589,16 @@ void SAL_CALL SbaXGridPeer::removeStatusListener(const Reference< ::com::sun::st
pCont->removeInterface(xControl);
}
-//---------------------------------------------------------------------------------------
+namespace
+{
+ class theSbaXGridPeerUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSbaXGridPeerUnoTunnelId > {};
+}
+
const Sequence< sal_Int8 > & SbaXGridPeer::getUnoTunnelId()
{
- static Sequence< sal_Int8 > * pSeq = 0;
- if( !pSeq )
- {
- ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !pSeq )
- {
- static Sequence< sal_Int8 > aSeq( 16 );
- rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0,sal_True );
- pSeq = &aSeq;
- }
- }
- return *pSeq;
+ return theSbaXGridPeerUnoTunnelId::get().getSeq();
}
-//---------------------------------------------------------------------------------------
Sequence< Type > SAL_CALL SbaXGridPeer::getTypes() throw (RuntimeException)
{
Sequence< Type > aTypes = FmXGridPeer::getTypes();
@@ -778,7 +649,7 @@ SbaGridHeader::SbaGridHeader(BrowseBox* pParent, WinBits nWinBits)
//---------------------------------------------------------------------------------------
void SbaGridHeader::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// in the new DnD API, the solar mutex is not locked when StartDrag get's called
ImplStartColumnDrag( _nAction, _rPosPixel );
@@ -793,10 +664,6 @@ void SbaGridHeader::MouseButtonDown( const MouseEvent& _rMEvt )
// the base class will start a column move here, which we don't want to allow
// (at the moment. If we store relative positions with the columns, we can allow column moves ....)
-// sal_uInt16 nPos(0);
-// sal_uInt16 nHitTest = ImplHitTest( _rMEvt.GetPosPixel(), mnMouseOff, nPos );
-// if (!nHitTest & HEAD_HITTEST_DIVIDER)
-// return;
}
FmGridHeader::MouseButtonDown(_rMEvt);
@@ -981,7 +848,7 @@ void SbaGridControl::PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu)
rMenu.InsertItem(ID_BROWSER_ROWHEIGHT, aNewItems.GetItemText(ID_BROWSER_ROWHEIGHT), 0, nPos++);
rMenu.SetHelpId(ID_BROWSER_ROWHEIGHT, aNewItems.GetHelpId(ID_BROWSER_ROWHEIGHT));
rMenu.InsertSeparator(nPos++);
- } // if (!IsReadOnlyDB())
+ }
if ( GetSelectRowCount() > 0 )
{
@@ -1076,7 +943,7 @@ void SbaGridControl::SetRowHeight()
}
catch(Exception&)
{
- OSL_ENSURE(0,"setPropertyValue: PROPERTY_ROW_HEIGHT throws a exception");
+ OSL_FAIL("setPropertyValue: PROPERTY_ROW_HEIGHT throws a exception");
}
}
}
@@ -1112,13 +979,13 @@ void SbaGridControl::SetBrowserAttrs()
try
{
PropertyValue aArg;
- aArg.Name = ::rtl::OUString::createFromAscii("IntrospectedObject");
+ aArg.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IntrospectedObject"));
aArg.Value <<= xGridModel;
Sequence< Any > aDialogArgs(1);
aDialogArgs[0] <<= aArg;
Reference< XInterface > xDialog = getServiceManager()->createInstanceWithArguments(
- ::rtl::OUString::createFromAscii("com.sun.star.form.ControlFontDialog"),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.ControlFontDialog")),
aDialogArgs
);
if (!xDialog.is())
@@ -1234,11 +1101,11 @@ Reference< XPropertySet > SbaGridControl::getField(sal_uInt16 nModelPos)
xEmptyReturn.set(xCol->getPropertyValue(PROPERTY_BOUNDFIELD),UNO_QUERY);
}
else
- OSL_ENSURE(0,"SbaGridControl::getField getColumns returns NULL or ModelPos is > than count!");
+ OSL_FAIL("SbaGridControl::getField getColumns returns NULL or ModelPos is > than count!");
}
catch(Exception&)
{
- OSL_ENSURE(0,"SbaGridControl::getField Exception occured!");
+ OSL_FAIL("SbaGridControl::getField Exception occurred!");
}
return xEmptyReturn;
@@ -1290,7 +1157,7 @@ void SbaGridControl::MouseButtonDown( const BrowserMouseEvent& rMEvt)
//---------------------------------------------------------------------------------------
void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// in the new DnD API, the solar mutex is not locked when StartDrag get's called
sal_Bool bHandled = sal_False;
@@ -1322,16 +1189,16 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
sal_Bool bHitHandle = (nColPos == 0);
// check which kind of dragging has to be initiated
- if ( bHitHandle // the handle column
+ if ( bHitHandle // the handle column
// AND
- && ( GetSelectRowCount() // at least one row is selected
- // OR
- || ( (nRow >= 0) // a row below the header
- && !bCurrentRowVirtual // we aren't appending a new record
- && (nRow != GetCurrentPos()) // a row which is not the current one
- ) // OR
- || ( (0 == GetSelectRowCount()) // no rows selected
- && (-1 == nRow) // hit the header
+ && ( GetSelectRowCount() // at least one row is selected
+ // OR
+ || ( (nRow >= 0) // a row below the header
+ && !bCurrentRowVirtual // we aren't appending a new record
+ && (nRow != GetCurrentPos()) // a row which is not the current one
+ ) // OR
+ || ( (0 == GetSelectRowCount()) // no rows selected
+ && (-1 == nRow) // hit the header
)
)
)
@@ -1391,7 +1258,7 @@ void SbaGridControl::Command(const CommandEvent& rEvt)
void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos)
{
Reference< XPropertySet > xDataSource(getDataSource(), UNO_QUERY);
- DBG_ASSERT(xDataSource.is(), "SbaGridControl::DoColumnDrag : invalid data source !");
+ OSL_ENSURE(xDataSource.is(), "SbaGridControl::DoColumnDrag : invalid data source !");
Reference< XPropertySet > xAffectedCol;
Reference< XPropertySet > xAffectedField;
@@ -1414,7 +1281,7 @@ void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos)
}
catch(Exception&)
{
- DBG_ERROR("SbaGridControl::DoColumnDrag : something went wrong while getting the column");
+ OSL_FAIL("SbaGridControl::DoColumnDrag : something went wrong while getting the column");
}
if (0 == sField.getLength())
return;
@@ -1427,7 +1294,7 @@ void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos)
// -----------------------------------------------------------------------
void SbaGridControl::CopySelectedRowsToClipboard()
{
- DBG_ASSERT( GetSelectRowCount() > 0, "SbaGridControl::CopySelectedRowsToClipboard: invalid call!" );
+ OSL_ENSURE( GetSelectRowCount() > 0, "SbaGridControl::CopySelectedRowsToClipboard: invalid call!" );
implTransferSelectedRows( (sal_Int16)FirstSelectedRow(), true );
}
@@ -1441,7 +1308,7 @@ void SbaGridControl::DoRowDrag( sal_Int16 nRowPos )
void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfClipboardFalseIfDrag )
{
Reference< XPropertySet > xForm( getDataSource(), UNO_QUERY );
- DBG_ASSERT( xForm.is(), "SbaGridControl::implTransferSelectedRows: invalid form!" );
+ OSL_ENSURE( xForm.is(), "SbaGridControl::implTransferSelectedRows: invalid form!" );
// build the sequence of numbers of selected rows
Sequence< Any > aSelectedRows;
@@ -1497,7 +1364,7 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos)
}
catch(Exception&)
{
- DBG_ERROR("SbaGridControl::DoFieldDrag : could not retrieve the cell's contents !");
+ OSL_FAIL("SbaGridControl::DoFieldDrag : could not retrieve the cell's contents !");
return;
}
@@ -1515,13 +1382,11 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos)
{
switch (_aType.mnSotId)
{
-// case SOT_FORMAT_RTF: // RTF data descriptions
-// case SOT_FORMATSTR_ID_HTML: // HTML data descriptions
case SOT_FORMATSTR_ID_DBACCESS_TABLE: // table descriptor
case SOT_FORMATSTR_ID_DBACCESS_QUERY: // query descriptor
case SOT_FORMATSTR_ID_DBACCESS_COMMAND: // SQL command
return true;
- }
+ }
return false;
}
};
@@ -1658,7 +1523,7 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt )
if (IsCurrentAppending())
--nCorrectRowCount; // the current data record doesn't really exist, we are appending a new one
- DBG_ASSERT((nCol != BROWSER_INVALIDID) && (nRow < nCorrectRowCount), "SbaGridControl::Drop : dropped on an invalid position !");
+ OSL_ENSURE((nCol != BROWSER_INVALIDID) && (nRow < nCorrectRowCount), "SbaGridControl::Drop : dropped on an invalid position !");
// AcceptDrop should have caught this
// from now we work with ids instead of positions
@@ -1770,7 +1635,7 @@ IMPL_LINK(SbaGridControl, AsynchDropEvent, void*, /*EMPTY_ARG*/)
::rtl::OUString sRet;
if ( ::svt::BBTYPE_BROWSEBOX == eObjType )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sRet = String(ModuleRes(STR_DATASOURCE_GRIDCONTROL_DESC));
}
else
@@ -1784,3 +1649,4 @@ void SbaGridControl::DeleteSelectedRows()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/sbagrid.src b/dbaccess/source/ui/browser/sbagrid.src
index 6c53941d0..b3fd77757 100644
--- a/dbaccess/source/ui/browser/sbagrid.src
+++ b/dbaccess/source/ui/browser/sbagrid.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -102,10 +102,12 @@ String STR_QRY_TITLE
{
Text [ en-US ] = "Query #" ;
};
+
String STR_TBL_TITLE
{
Text [ en-US ] = "Table #" ;
};
+
String STR_VIEW_TITLE
{
Text [ en-US ] = "View #" ;
@@ -122,7 +124,7 @@ String STR_NO_COLUMNNAME_MATCHING
Text [ en-US ] = "No matching column names were found.";
};
-String STR_ERROR_OCCURED_WHILE_COPYING
+String STR_ERROR_OCCURRED_WHILE_COPYING
{
Text [ en-US ] = "An error occurred. Do you want to continue copying?";
};
@@ -136,4 +138,3 @@ String STR_DATASOURCE_GRIDCONTROL_DESC
{
Text [ en-US ] = "Shows the selected table or query.";
};
-
diff --git a/dbaccess/source/ui/browser/sbamultiplex.cxx b/dbaccess/source/ui/browser/sbamultiplex.cxx
index b10f56680..9586a100c 100644
--- a/dbaccess/source/ui/browser/sbamultiplex.cxx
+++ b/dbaccess/source/ui/browser/sbamultiplex.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _SBA_MULTIPLEX_HXX
#include "sbamultiplex.hxx"
-#endif
using namespace dbaui;
//==================================================================
@@ -109,3 +108,4 @@ void SbaXPropertiesChangeMultiplexer::propertiesChange(const ::com::sun::star::u
((::com::sun::star::beans::XPropertiesChangeListener*)aIt.next())->propertiesChange(aMulti);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 92c94934a..ea256fc39 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -122,9 +123,9 @@
#include <svx/algitem.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <svx/databaseregistrationui.hxx>
-#include <svx/gridctrl.hxx>
#include <toolkit/unohlp.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <tools/multisel.hxx>
#include <tools/urlobj.hxx>
#include <unotools/confignode.hxx>
@@ -207,19 +208,19 @@ void SafeRemovePropertyListener(const Reference< XPropertySet > & xSet, const ::
// -------------------------------------------------------------------------
::rtl::OUString SbaTableQueryBrowser::getImplementationName_Static() throw(RuntimeException)
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.ODatasourceBrowser");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.ODatasourceBrowser"));
}
//-------------------------------------------------------------------------
::comphelper::StringSequence SbaTableQueryBrowser::getSupportedServiceNames_Static() throw(RuntimeException)
{
::comphelper::StringSequence aSupported(1);
- aSupported.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.DataSourceBrowser");
+ aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.DataSourceBrowser"));
return aSupported;
}
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL SbaTableQueryBrowser::Create(const Reference<XMultiServiceFactory >& _rxFactory)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return *(new SbaTableQueryBrowser(_rxFactory));
}
@@ -250,7 +251,7 @@ SbaTableQueryBrowser::~SbaTableQueryBrowser()
DBG_DTOR(SbaTableQueryBrowser,NULL);
if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
{
- OSL_ENSURE(0,"Please check who doesn't dispose this component!");
+ OSL_FAIL("Please check who doesn't dispose this component!");
// increment ref count to prevent double call of Dtor
osl_incrementInterlockedCount( &m_refCount );
dispose();
@@ -316,7 +317,7 @@ Sequence< sal_Int8 > SAL_CALL SbaTableQueryBrowser::getImplementationId( ) thro
//------------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::disposing()
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// doin' a lot of VCL stuff here -> lock the SolarMutex
// kiss our listeners goodbye
@@ -370,19 +371,19 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent)
xDatabaseRegistrations->addDatabaseRegistrationsListener( this );
// the collator for the string compares
- m_xCollator = Reference< XCollator >( getORB()->createInstance(::rtl::OUString::createFromAscii( "com.sun.star.i18n.Collator" ) ), UNO_QUERY_THROW );
+ m_xCollator = Reference< XCollator >( getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.Collator")) ), UNO_QUERY_THROW );
m_xCollator->loadDefaultCollator( Application::GetSettings().GetLocale(), 0 );
}
- catch(Exception&)
+ catch(const Exception&)
{
- DBG_ERROR("SbaTableQueryBrowser::Construct: could not create (or start listening at) the database context!");
+ OSL_FAIL("SbaTableQueryBrowser::Construct: could not create (or start listening at) the database context!");
}
// some help ids
if (getBrowserView() && getBrowserView()->getVclControl())
{
// create controls and set sizes
- const long nFrameWidth = getBrowserView()->LogicToPixel( ::Size( 3, 0 ), MAP_APPFONT ).Width();
+ const long nFrameWidth = getBrowserView()->LogicToPixel( ::Size( 3, 0 ), MAP_APPFONT ).Width();
m_pSplitter = new Splitter(getBrowserView(),WB_HSCROLL);
m_pSplitter->SetPosSizePixel( ::Point(0,0), ::Size(nFrameWidth,0) );
@@ -525,7 +526,7 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow()
// 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
+ // So, what really would be handy, is some
// XNormalizedFilter getNormalizedFilter();
// with
// interface XDisjunctiveFilterExpression
@@ -659,38 +660,38 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
Any* pValueIter = aValues.getArray();
if ( m_bPreview )
{
- *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AlwaysShowCursor"));
- *pValueIter++ <<= sal_False;
- *pStringIter++ = PROPERTY_BORDER;
- *pValueIter++ <<= sal_Int16(0);
+ *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AlwaysShowCursor"));
+ *pValueIter++ <<= sal_False;
+ *pStringIter++ = PROPERTY_BORDER;
+ *pValueIter++ <<= sal_Int16(0);
}
- *pStringIter++ = PROPERTY_FONT;
- *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_FONT);
- *pStringIter++ = PROPERTY_TEXTEMPHASIS;
- *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTEMPHASIS);
- *pStringIter++ = PROPERTY_TEXTRELIEF;
- *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTRELIEF);
+ *pStringIter++ = PROPERTY_FONT;
+ *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_FONT);
+ *pStringIter++ = PROPERTY_TEXTEMPHASIS;
+ *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTEMPHASIS);
+ *pStringIter++ = PROPERTY_TEXTRELIEF;
+ *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTRELIEF);
if ( m_bPreview )
{
- *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasNavigationBar"));
- *pValueIter++ <<= sal_False;
- *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasRecordMarker"));
- *pValueIter++ <<= sal_False;
+ *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasNavigationBar"));
+ *pValueIter++ <<= sal_False;
+ *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasRecordMarker"));
+ *pValueIter++ <<= sal_False;
}
- *pStringIter++ = PROPERTY_ROW_HEIGHT;
- *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_ROW_HEIGHT);
+ *pStringIter++ = PROPERTY_ROW_HEIGHT;
+ *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_ROW_HEIGHT);
if ( m_bPreview )
{
- *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tabstop"));
- *pValueIter++ <<= sal_False;
+ *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tabstop"));
+ *pValueIter++ <<= sal_False;
}
- *pStringIter++ = PROPERTY_TEXTCOLOR;
- *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTCOLOR);
- *pStringIter++ = PROPERTY_TEXTLINECOLOR;
- *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTLINECOLOR);
+ *pStringIter++ = PROPERTY_TEXTCOLOR;
+ *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTCOLOR);
+ *pStringIter++ = PROPERTY_TEXTLINECOLOR;
+ *pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTLINECOLOR);
- Reference< XMultiPropertySet > xFormMultiSet(xGrid, UNO_QUERY);
+ Reference< XMultiPropertySet > xFormMultiSet(xGrid, UNO_QUERY);
xFormMultiSet->setPropertyValues(aProperties, aValues);
}
@@ -711,10 +712,10 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
// insert the column into the gridcontrol so that we see something :-)
::rtl::OUString aCurrentModelType;
Reference<XColumnsSupplier> xSupCols(getRowSet(),UNO_QUERY);
- Reference<XNameAccess> xColumns = xSupCols->getColumns();
- Sequence< ::rtl::OUString> aNames = xColumns->getElementNames();
- const ::rtl::OUString* pIter = aNames.getConstArray();
- const ::rtl::OUString* pEnd = pIter + aNames.getLength();
+ Reference<XNameAccess> xColumns = xSupCols->getColumns();
+ Sequence< ::rtl::OUString> aNames = xColumns->getElementNames();
+ const ::rtl::OUString* pIter = aNames.getConstArray();
+ const ::rtl::OUString* pEnd = pIter + aNames.getLength();
::rtl::OUString sDefaultProperty;
Reference< XPropertySet > xColumn;
@@ -732,7 +733,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
continue;
// use the result set column's type to determine the type of grid column to create
- sal_Bool bFormattedIsNumeric = sal_True;
+ sal_Bool bFormattedIsNumeric = sal_True;
sal_Int32 nType = ::comphelper::getINT32( xColumn->getPropertyValue( PROPERTY_TYPE ) );
::std::vector< NamedValue > aInitialValues;
@@ -744,7 +745,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
case DataType::BIT:
case DataType::BOOLEAN:
{
- aCurrentModelType = ::rtl::OUString::createFromAscii("CheckBox");
+ aCurrentModelType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CheckBox"));
aInitialValues.push_back( NamedValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VisualEffect" ) ), makeAny( VisualEffect::FLAT ) ) );
sDefaultProperty = PROPERTY_DEFAULTSTATE;
@@ -766,7 +767,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
case DataType::BINARY:
case DataType::VARBINARY:
case DataType::LONGVARBINARY:
- aCurrentModelType = ::rtl::OUString::createFromAscii("TextField");
+ aCurrentModelType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextField"));
sDefaultProperty = PROPERTY_DEFAULTTEXT;
break;
@@ -775,12 +776,12 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
bFormattedIsNumeric = sal_False;
// NO break!
default:
- aCurrentModelType = ::rtl::OUString::createFromAscii("FormattedField");
+ aCurrentModelType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FormattedField"));
sDefaultProperty = PROPERTY_EFFECTIVEDEFAULT;
if ( xSupplier.is() )
- aInitialValues.push_back( NamedValue( ::rtl::OUString::createFromAscii( "FormatsSupplier" ), makeAny( xSupplier ) ) );
- aInitialValues.push_back( NamedValue( ::rtl::OUString::createFromAscii( "TreatAsNumber" ), makeAny( (sal_Bool)bFormattedIsNumeric ) ) );
+ aInitialValues.push_back( NamedValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FormatsSupplier")), makeAny( xSupplier ) ) );
+ aInitialValues.push_back( NamedValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TreatAsNumber")), makeAny( (sal_Bool)bFormattedIsNumeric ) ) );
aCopyProperties.push_back( PROPERTY_FORMATKEY );
break;
}
@@ -825,7 +826,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
aDescription >>= sTemp;
if ( !sTemp.getLength() )
xColumn->getPropertyValue( PROPERTY_DESCRIPTION ) >>= sTemp;
-
+
aDescription <<= sTemp;
aInitialValues.push_back( NamedValue( PROPERTY_HELPTEXT, aDescription ) );
@@ -858,7 +859,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
}
}
}
- catch(Exception&)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
return sal_False;
@@ -910,7 +911,7 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw(
// one of the many properties which require us to update the definition ?
// a column's width ?
else if (evt.PropertyName.equals(PROPERTY_WIDTH))
- { // a column width has changed -> update the model
+ { // a column width has changed -> update the model
// (the update of the view is done elsewhere)
Reference<XPropertySet> xProp = getColumnHelper(m_pCurrentlyDisplayed,xSource);
if(xProp.is())
@@ -957,8 +958,8 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw(
}
// a column's format ?
- else if ( (evt.PropertyName.equals(PROPERTY_FORMATKEY))
- && (TypeClass_LONG == evt.NewValue.getValueTypeClass())
+ else if ( (evt.PropertyName.equals(PROPERTY_FORMATKEY))
+ && (TypeClass_LONG == evt.NewValue.getValueTypeClass())
)
{
// update the model (means the definition object)
@@ -984,15 +985,15 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw(
}
}
- else if ( evt.PropertyName.equals(PROPERTY_FONT) // the font ?
- || evt.PropertyName.equals(PROPERTY_TEXTCOLOR) // the text color ?
- || evt.PropertyName.equals(PROPERTY_FILTER) // the filter ?
- || evt.PropertyName.equals(PROPERTY_HAVING_CLAUSE) // the having clause ?
- || evt.PropertyName.equals(PROPERTY_ORDER) // the sort ?
- || evt.PropertyName.equals(PROPERTY_APPLYFILTER) // the appliance of the filter ?
- || evt.PropertyName.equals(PROPERTY_TEXTLINECOLOR) // the text line color ?
- || evt.PropertyName.equals(PROPERTY_TEXTEMPHASIS) // the text emphasis ?
- || evt.PropertyName.equals(PROPERTY_TEXTRELIEF) // the text relief ?
+ else if ( evt.PropertyName.equals(PROPERTY_FONT) // the font ?
+ || evt.PropertyName.equals(PROPERTY_TEXTCOLOR) // the text color ?
+ || evt.PropertyName.equals(PROPERTY_FILTER) // the filter ?
+ || evt.PropertyName.equals(PROPERTY_HAVING_CLAUSE) // the having clause ?
+ || evt.PropertyName.equals(PROPERTY_ORDER) // the sort ?
+ || evt.PropertyName.equals(PROPERTY_APPLYFILTER) // the appliance of the filter ?
+ || evt.PropertyName.equals(PROPERTY_TEXTLINECOLOR) // the text line color ?
+ || evt.PropertyName.equals(PROPERTY_TEXTEMPHASIS) // the text emphasis ?
+ || evt.PropertyName.equals(PROPERTY_TEXTRELIEF) // the text relief ?
)
{
transferChangedControlProperty(evt.PropertyName, evt.NewValue);
@@ -1007,7 +1008,7 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw(
// -----------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::suspend(sal_Bool bSuspend) throw( RuntimeException )
{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
if ( getView() && getView()->IsInModalMode() )
return sal_False;
@@ -1041,7 +1042,7 @@ void SAL_CALL SbaTableQueryBrowser::statusChanged( const FeatureStateEvent& _rEv
{
if ( _rEvent.FeatureURL.Complete == aLoop->second.aURL.Complete)
{
- DBG_ASSERT( xSource.get() == aLoop->second.xDispatcher.get(), "SbaTableQueryBrowser::statusChanged: inconsistent!" );
+ OSL_ENSURE( xSource.get() == aLoop->second.xDispatcher.get(), "SbaTableQueryBrowser::statusChanged: inconsistent!" );
// update the enabled state
aLoop->second.bEnabled = _rEvent.IsEnabled;
@@ -1079,7 +1080,7 @@ void SAL_CALL SbaTableQueryBrowser::statusChanged( const FeatureStateEvent& _rEv
}
}
- DBG_ASSERT(aLoop != m_aExternalFeatures.end(), "SbaTableQueryBrowser::statusChanged: don't know who sent this!");
+ OSL_ENSURE(aLoop != m_aExternalFeatures.end(), "SbaTableQueryBrowser::statusChanged: don't know who sent this!");
}
// -------------------------------------------------------------------------
@@ -1092,14 +1093,14 @@ void SbaTableQueryBrowser::checkDocumentDataSource()
if (!bKnownDocDataSource)
{
if (NULL != pDataSourceEntry)
- { // at least the data source is know
+ { // at least the data source is known
if (NULL != pContainerEntry)
bKnownDocDataSource = sal_True; // assume we know it.
// TODO: should we expand the object container? This may be too expensive just for checking ....
else
{
if ((NULL == pObjectEntry) && m_aDocumentDataSource.has(daCommandType) && m_aDocumentDataSource.has(daCommand))
- { // maybe we have a command to be displayed ?
+ { // maybe we have a command to be displayed ?
sal_Int32 nCommandType = CommandType::TABLE;
m_aDocumentDataSource[daCommandType] >>= nCommandType;
@@ -1143,7 +1144,6 @@ namespace
if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
{
_rDisplayName = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET);
- // _rDisplayName = aURL.getName(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET);
_rUniqueId = aURL.GetMainURL( INetURLObject::NO_DECODE );
return true;
}
@@ -1173,11 +1173,11 @@ namespace
// -------------------------------------------------------------------------
String SbaTableQueryBrowser::getDataSourceAcessor( SvLBoxEntry* _pDataSourceEntry ) const
{
- DBG_ASSERT( _pDataSourceEntry, "SbaTableQueryBrowser::getDataSourceAcessor: invalid entry!" );
+ OSL_ENSURE( _pDataSourceEntry, "SbaTableQueryBrowser::getDataSourceAcessor: invalid entry!" );
DBTreeListUserData* pData = static_cast< DBTreeListUserData* >( _pDataSourceEntry->GetUserData() );
- DBG_ASSERT( pData, "SbaTableQueryBrowser::getDataSourceAcessor: invalid entry data!" );
- DBG_ASSERT( pData->eType == etDatasource, "SbaTableQueryBrowser::getDataSourceAcessor: entry does not denote a data source!" );
+ OSL_ENSURE( pData, "SbaTableQueryBrowser::getDataSourceAcessor: invalid entry data!" );
+ OSL_ENSURE( pData->eType == etDatasource, "SbaTableQueryBrowser::getDataSourceAcessor: entry does not denote a data source!" );
return pData->sAccessor.Len() ? pData->sAccessor : GetEntryText( _pDataSourceEntry );
}
@@ -1198,7 +1198,7 @@ SvLBoxEntry* SbaTableQueryBrowser::getObjectEntry(const ::rtl::OUString& _rDataS
String sDisplayName, sDataSourceId;
bool bIsDataSourceURL = getDataSourceDisplayName_isURL( _rDataSource, sDisplayName, sDataSourceId );
// the display name may differ from the URL for readability reasons
- // #i33699# - 2004-09-24 - fs@openoffice.org
+ // #i33699#
FilterByEntryDataId aFilter( sDataSourceId );
SvLBoxEntry* pDataSource = m_pTreeView->getListBox().GetEntryPosByName( sDisplayName, NULL, &aFilter );
@@ -1210,7 +1210,7 @@ SvLBoxEntry* SbaTableQueryBrowser::getObjectEntry(const ::rtl::OUString& _rDataS
// add new entries to the list box model
implAddDatasource( _rDataSource, _rxConnection );
pDataSource = m_pTreeView->getListBox().GetEntryPosByName( sDisplayName, NULL, &aFilter );
- DBG_ASSERT( pDataSource, "SbaTableQueryBrowser::getObjectEntry: hmm - did not find it again!" );
+ OSL_ENSURE( pDataSource, "SbaTableQueryBrowser::getObjectEntry: hmm - did not find it again!" );
}
}
if (_ppDataSourceEntry)
@@ -1280,13 +1280,12 @@ SvLBoxEntry* SbaTableQueryBrowser::getObjectEntry(const ::rtl::OUString& _rDataS
}
}
}
- catch(Exception&)
+ catch(const Exception&)
{
- DBG_ERROR("SbaTableQueryBrowser::populateTree: could not fill the tree");
+ OSL_FAIL("SbaTableQueryBrowser::populateTree: could not fill the tree");
}
}
}
- // m_pTreeView->getListBox().Expand(pCommandType);
}
while ( nIndex >= 0 );
}
@@ -1313,8 +1312,8 @@ SvLBoxEntry* SbaTableQueryBrowser::getObjectEntry(const ::svx::ODataAccessDescri
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::connectExternalDispatches()
{
- Reference< XDispatchProvider > xProvider( getFrame(), UNO_QUERY );
- DBG_ASSERT(xProvider.is(), "SbaTableQueryBrowser::connectExternalDispatches: no DispatchProvider !");
+ Reference< XDispatchProvider > xProvider( getFrame(), UNO_QUERY );
+ OSL_ENSURE(xProvider.is(), "SbaTableQueryBrowser::connectExternalDispatches: no DispatchProvider !");
if (xProvider.is())
{
if ( m_aExternalFeatures.empty() )
@@ -1332,7 +1331,7 @@ void SbaTableQueryBrowser::connectExternalDispatches()
ID_BROWSER_INSERTCONTENT
};
- for ( size_t i=0; i < sizeof( pURLs ) / sizeof( pURLs[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS( pURLs ); ++i )
{
URL aURL;
aURL.Complete = ::rtl::OUString::createFromAscii( pURLs[i] );
@@ -1348,12 +1347,12 @@ void SbaTableQueryBrowser::connectExternalDispatches()
)
{
feature->second.xDispatcher = xProvider->queryDispatch(
- feature->second.aURL, ::rtl::OUString::createFromAscii("_parent"), FrameSearchFlag::PARENT
+ feature->second.aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_parent")), FrameSearchFlag::PARENT
);
if ( feature->second.xDispatcher.get() == static_cast< XDispatch* >( this ) )
{
- OSL_ENSURE( sal_False, "SbaTableQueryBrowser::connectExternalDispatches: this should not happen anymore!" );
+ OSL_FAIL( "SbaTableQueryBrowser::connectExternalDispatches: this should not happen anymore!" );
// (nowadays, the URLs aren't in our SupportedFeatures list anymore, so we should
// not supply a dispatcher for this)
feature->second.xDispatcher.clear();
@@ -1436,7 +1435,7 @@ void SAL_CALL SbaTableQueryBrowser::disposing( const ::com::sun::star::lang::Eve
{
Reference<XConnection> xCon(_rSource.Source, UNO_QUERY);
if ( xCon.is() && m_pTreeView )
- { // our connection is in dispose so we have to find the entry equal with this connection
+ { // our connection is in dispose so we have to find the entry equal with this connection
// and close it what means to collapse the entry
// get the top-level representing the removed data source
SvLBoxEntry* pDSLoop = m_pTreeView->getListBox().FirstChild(NULL);
@@ -1445,7 +1444,7 @@ void SAL_CALL SbaTableQueryBrowser::disposing( const ::com::sun::star::lang::Eve
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pDSLoop->GetUserData());
if ( pData && pData->xConnection == xCon )
{
- // we set the conenction to null to avoid a second disposing of the connection
+ // we set the connection to null to avoid a second disposing of the connection
pData->xConnection.clear();
closeConnection(pDSLoop,sal_False);
break;
@@ -1477,7 +1476,7 @@ void SbaTableQueryBrowser::implRemoveStatusListeners()
}
catch (Exception&)
{
- DBG_ERROR("SbaTableQueryBrowser::implRemoveStatusListeners: could not remove a status listener!");
+ OSL_FAIL("SbaTableQueryBrowser::implRemoveStatusListeners: could not remove a status listener!");
}
}
}
@@ -1487,7 +1486,7 @@ void SbaTableQueryBrowser::implRemoveStatusListeners()
// -------------------------------------------------------------------------
sal_Bool SAL_CALL SbaTableQueryBrowser::select( const Any& _rSelection ) throw (IllegalArgumentException, RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// doin' a lot of VCL stuff here -> lock the SolarMutex
Sequence< PropertyValue > aDescriptorSequence;
@@ -1502,7 +1501,7 @@ sal_Bool SAL_CALL SbaTableQueryBrowser::select( const Any& _rSelection ) throw (
}
catch(const Exception&)
{
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::select: could not extract the descriptor!");
+ OSL_FAIL("SbaTableQueryBrowser::select: could not extract the descriptor!");
}
// check the precense of the props we need
@@ -1565,7 +1564,7 @@ void SbaTableQueryBrowser::attachFrame(const Reference< ::com::sun::star::frame:
Reference< XFrame > xCurrentFrame( getFrame() );
if ( xCurrentFrame.is() )
{
- m_xCurrentFrameParent = xCurrentFrame->findFrame(::rtl::OUString::createFromAscii("_parent"),FrameSearchFlag::PARENT);
+ m_xCurrentFrameParent = xCurrentFrame->findFrame(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_parent")),FrameSearchFlag::PARENT);
if ( m_xCurrentFrameParent.is() )
m_xCurrentFrameParent->addFrameActionListener((::com::sun::star::frame::XFrameActionListener*)this);
@@ -1689,7 +1688,7 @@ void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch)
if (isValid() && !loadingCancelled())
{
// did we load a query?
- sal_Bool bTemporary; // needed because we m_bQueryEscapeProcessing is only one bit wide (and we want to pass it by reference)
+ sal_Bool bTemporary; // needed because we m_bQueryEscapeProcessing is only one bit wide (and we want to pass it by reference)
if ( implGetQuerySignature( m_sQueryCommand, bTemporary ) )
m_bQueryEscapeProcessing = bTemporary;
}
@@ -1755,8 +1754,8 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
SvLBoxEntry* pDataSourceEntry = m_pTreeView->getListBox().GetRootLevelParent( pCurrentEntry );
DBTreeListUserData* pDSData
= pDataSourceEntry
- ? static_cast< DBTreeListUserData* >( pDataSourceEntry->GetUserData() )
- : NULL;
+ ? static_cast< DBTreeListUserData* >( pDataSourceEntry->GetUserData() )
+ : NULL;
if ( nId == ID_TREE_CLOSE_CONN )
{
@@ -1822,7 +1821,6 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
aReturn.bEnabled = aReturn.bEnabled && getBrowserView()->getVclControl()->GetSelectRowCount();
// disabled for native queries which are not saved within the database
- // 67706 - 23.08.99 - FS
Reference< XPropertySet > xDataSource(getRowSet(), UNO_QUERY);
try
{
@@ -1836,7 +1834,7 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
}
catch(DisposedException&)
{
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::GetState: object already disposed!");
+ OSL_FAIL("SbaTableQueryBrowser::GetState: object already disposed!");
}
catch( const Exception& )
{
@@ -1859,7 +1857,7 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
case CommandType::COMMAND:
sTitle = String(ModuleRes(STR_QRY_TITLE)); break;
default:
- DBG_ASSERT(sal_False, "SbaTableQueryBrowser::GetState: unknown command type!");
+ OSL_FAIL("SbaTableQueryBrowser::GetState: unknown command type!");
}
::rtl::OUString aName;
xProp->getPropertyValue(PROPERTY_COMMAND) >>= aName;
@@ -1875,7 +1873,7 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
case ID_BROWSER_COLATTRSET:
case ID_BROWSER_COLWIDTH:
aReturn.bEnabled = getBrowserView() && getBrowserView()->getVclControl() && isValid() && isValidCursor();
- // aReturn.bEnabled &= getDefinition() && !getDefinition()->GetDatabase()->IsReadOnly();
+ // aReturn.bEnabled &= getDefinition() && !getDefinition()->GetDatabase()->IsReadOnly();
break;
case ID_BROWSER_COPY:
@@ -1887,7 +1885,7 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
{
aReturn.bEnabled = m_aCurrentFrame.isActive();
break;
- } // if ( getBrowserView()->getVclControl()->GetSelectRowCount() )
+ }
else
aReturn.bEnabled = pControl->canCopyCellText(pControl->GetCurRow(), pControl->GetCurColumnId());
break;
@@ -2010,9 +2008,9 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue
MultiSelection* pSelection = (MultiSelection*)pGrid->GetSelection();
Sequence< Any > aSelection;
if ( !pGrid->IsAllSelected() )
- { // transfer the selected rows only if not all rows are selected
+ { // transfer the selected rows only if not all rows are selected
// (all rows means the whole table)
- // i3832 - 03.04.2002 - fs@openoffice.org
+ // #i3832#
if (pSelection != NULL)
{
aSelection.realloc(pSelection->GetSelectCount());
@@ -2035,11 +2033,11 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue
}
catch(DisposedException&)
{
- OSL_ENSURE(0,"Object already disposed!");
+ OSL_FAIL("Object already disposed!");
}
- catch(Exception&)
+ catch(const Exception&)
{
- DBG_ERROR("SbaTableQueryBrowser::Execute(ID_BROWSER_?): could not clone the cursor!");
+ OSL_FAIL("SbaTableQueryBrowser::Execute(ID_BROWSER_?): could not clone the cursor!");
}
Reference<XPropertySet> xProp(getRowSet(),UNO_QUERY);
@@ -2051,14 +2049,14 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue
xProp->getPropertyValue(PROPERTY_DATASOURCENAME) >>= sDataSourceName;
aDescriptor.setDataSource(sDataSourceName);
- aDescriptor[daCommand] = xProp->getPropertyValue(PROPERTY_COMMAND);
- aDescriptor[daCommandType] = xProp->getPropertyValue(PROPERTY_COMMAND_TYPE);
- aDescriptor[daConnection] = xProp->getPropertyValue(PROPERTY_ACTIVE_CONNECTION);
- aDescriptor[daCursor] <<= xCursorClone;
+ aDescriptor[daCommand] = xProp->getPropertyValue(PROPERTY_COMMAND);
+ aDescriptor[daCommandType] = xProp->getPropertyValue(PROPERTY_COMMAND_TYPE);
+ aDescriptor[daConnection] = xProp->getPropertyValue(PROPERTY_ACTIVE_CONNECTION);
+ aDescriptor[daCursor] <<= xCursorClone;
if ( aSelection.getLength() )
{
- aDescriptor[daSelection] <<= aSelection;
- aDescriptor[daBookmarkSelection] <<= sal_False;
+ aDescriptor[daSelection] <<= aSelection;
+ aDescriptor[daBookmarkSelection] <<= sal_False;
// these are selection indicies
// before we change this, all clients have to be adjusted
// so that they recognize the new BookmarkSelection property!
@@ -2108,7 +2106,7 @@ void SbaTableQueryBrowser::implAddDatasource(const String& _rDbName, Image& _rDb
String& _rQueryName, Image& _rQueryImage, String& _rTableName, Image& _rTableImage,
const SharedConnection& _rxConnection)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
// initialize the names/images if necessary
if (!_rQueryName.Len())
_rQueryName = String(ModuleRes(RID_STR_QUERIES_CONTAINER));
@@ -2117,16 +2115,16 @@ void SbaTableQueryBrowser::implAddDatasource(const String& _rDbName, Image& _rDb
ImageProvider aImageProvider;
if (!_rQueryImage)
- _rQueryImage = aImageProvider.getFolderImage( DatabaseObject::QUERY, isHiContrast() );
+ _rQueryImage = aImageProvider.getFolderImage( DatabaseObject::QUERY );
if (!_rTableImage)
- _rTableImage = aImageProvider.getFolderImage( DatabaseObject::TABLE, isHiContrast() );
+ _rTableImage = aImageProvider.getFolderImage( DatabaseObject::TABLE );
if (!_rDbImage)
- _rDbImage = aImageProvider.getDatabaseImage( isHiContrast() );
+ _rDbImage = aImageProvider.getDatabaseImage();
// add the entry for the data source
// special handling for data sources denoted by URLs - we do not want to display this ugly URL, do we?
- // #i33699# - 2004-09-24 - fs@openoffice.org
+ // #i33699#
String sDSDisplayName, sDataSourceId;
getDataSourceDisplayName_isURL( _rDbName, sDSDisplayName, sDataSourceId );
@@ -2168,8 +2166,8 @@ void SbaTableQueryBrowser::initializeTreeModel()
// fill the model with the names of the registered datasources
Sequence< ::rtl::OUString > aDatasources = m_xDatabaseContext->getElementNames();
- const ::rtl::OUString* pIter = aDatasources.getConstArray();
- const ::rtl::OUString* pEnd = pIter + aDatasources.getLength();
+ const ::rtl::OUString* pIter = aDatasources.getConstArray();
+ const ::rtl::OUString* pEnd = pIter + aDatasources.getLength();
for (; pIter != pEnd; ++pIter)
implAddDatasource( *pIter, aDBImage, sQueriesName, aQueriesImage, sTablesName, aTablesImage, SharedConnection() );
}
@@ -2186,8 +2184,8 @@ void SbaTableQueryBrowser::populateTree(const Reference<XNameAccess>& _xNameAcce
try
{
Sequence< ::rtl::OUString > aNames = _xNameAccess->getElementNames();
- const ::rtl::OUString* pIter = aNames.getConstArray();
- const ::rtl::OUString* pEnd = pIter + aNames.getLength();
+ const ::rtl::OUString* pIter = aNames.getConstArray();
+ const ::rtl::OUString* pEnd = pIter + aNames.getLength();
for (; pIter != pEnd; ++pIter)
{
if( !m_pTreeView->getListBox().GetEntryPosByName(*pIter,_pParent))
@@ -2203,9 +2201,9 @@ void SbaTableQueryBrowser::populateTree(const Reference<XNameAccess>& _xNameAcce
}
}
}
- catch(Exception&)
+ catch(const Exception&)
{
- DBG_ERROR("SbaTableQueryBrowser::populateTree: could not fill the tree");
+ OSL_FAIL("SbaTableQueryBrowser::populateTree: could not fill the tree");
}
}
@@ -2214,15 +2212,13 @@ SvLBoxEntry* SbaTableQueryBrowser::implAppendEntry( SvLBoxEntry* _pParent, const
{
::std::auto_ptr< ImageProvider > pImageProvider( getImageProviderFor( _pParent ) );
- Image aImage, aImageHC;
- pImageProvider->getImages( _rName, getDatabaseObjectType( _eEntryType ), aImage, aImageHC );
+ Image aImage;
+ pImageProvider->getImages( _rName, getDatabaseObjectType( _eEntryType ), aImage );
SvLBoxEntry* pNewEntry = m_pTreeView->getListBox().InsertEntry( _rName, _pParent, _eEntryType == etQueryContainer , LIST_APPEND, _pUserData );
- m_pTreeView->getListBox().SetExpandedEntryBmp( pNewEntry, aImage, BMP_COLOR_NORMAL );
- m_pTreeView->getListBox().SetCollapsedEntryBmp( pNewEntry, aImage, BMP_COLOR_NORMAL );
- m_pTreeView->getListBox().SetExpandedEntryBmp( pNewEntry, aImageHC, BMP_COLOR_HIGHCONTRAST );
- m_pTreeView->getListBox().SetCollapsedEntryBmp( pNewEntry, aImageHC, BMP_COLOR_HIGHCONTRAST );
+ m_pTreeView->getListBox().SetExpandedEntryBmp( pNewEntry, aImage );
+ m_pTreeView->getListBox().SetCollapsedEntryBmp( pNewEntry, aImage );
return pNewEntry;
}
@@ -2304,7 +2300,7 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvLBoxEntry*, _pParent)
if(e.TargetException >>= aSql)
aInfo = aSql;
else
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::OnExpandEntry: something strange happended!");
+ OSL_FAIL("SbaTableQueryBrowser::OnExpandEntry: something strange happended!");
}
catch( const Exception& )
{
@@ -2315,10 +2311,10 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvLBoxEntry*, _pParent)
}
else
return 0L;
- // 0 indicates that an error occured
+ // 0 indicates that an error occurred
}
else
- { // we have to expand the queries or bookmarks
+ { // we have to expand the queries or bookmarks
if (ensureEntryObject(_pParent))
{
DBTreeListUserData* pParentData = static_cast< DBTreeListUserData* >( _pParent->GetUserData() );
@@ -2332,7 +2328,7 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvLBoxEntry*, _pParent)
//------------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvLBoxEntry* _pEntry )
{
- DBG_ASSERT(_pEntry, "SbaTableQueryBrowser::ensureEntryObject: invalid argument!");
+ OSL_ENSURE(_pEntry, "SbaTableQueryBrowser::ensureEntryObject: invalid argument!");
if (!_pEntry)
return sal_False;
@@ -2373,7 +2369,7 @@ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvLBoxEntry* _pEntry )
{
DBG_UNHANDLED_EXCEPTION();
}
-
+
bSuccess = pEntryData->xContainer.is();
}
else
@@ -2394,7 +2390,7 @@ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvLBoxEntry* _pEntry )
bSuccess = pEntryData->xContainer.is();
}
else {
- DBG_ERROR("SbaTableQueryBrowser::ensureEntryObject: no XQueryDefinitionsSupplier interface!");
+ OSL_FAIL("SbaTableQueryBrowser::ensureEntryObject: no XQueryDefinitionsSupplier interface!");
}
}
catch( const Exception& )
@@ -2406,7 +2402,7 @@ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvLBoxEntry* _pEntry )
break;
default:
- DBG_ERROR("SbaTableQueryBrowser::ensureEntryObject: ooops ... missing some implementation here!");
+ OSL_FAIL("SbaTableQueryBrowser::ensureEntryObject: ooops ... missing some implementation here!");
// TODO ...
break;
}
@@ -2434,7 +2430,7 @@ sal_Bool SbaTableQueryBrowser::implLoadAnything(const ::rtl::OUString& _rDataSou
try
{
Reference<XPropertySet> xProp( getRowSet(), UNO_QUERY_THROW );
- Reference< XLoadable > xLoadable( xProp, 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())
@@ -2503,7 +2499,7 @@ sal_Bool SbaTableQueryBrowser::implLoadAnything(const ::rtl::OUString& _rDataSou
DBG_UNHANDLED_EXCEPTION();
}
}
- catch(Exception&)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -2545,7 +2541,7 @@ sal_Bool SbaTableQueryBrowser::implSelect(const ::rtl::OUString& _rDataSourceNam
else if (!pCommandType)
{
if ( m_pCurrentlyDisplayed )
- { // tell the old entry (if any) it has been deselected
+ { // tell the old entry (if any) it has been deselected
selectPath(m_pCurrentlyDisplayed, sal_False);
m_pCurrentlyDisplayed = NULL;
}
@@ -2611,7 +2607,7 @@ bool SbaTableQueryBrowser::implSelect( SvLBoxEntry* _pEntry )
sal_Int32 nOldType = 0;
xRowSetProps->getPropertyValue(PROPERTY_COMMAND_TYPE) >>= nOldType;
Reference<XConnection> xOldConnection(xRowSetProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION),UNO_QUERY);
-
+
// the name of the table or query
SvLBoxString* pString = (SvLBoxString*)_pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING);
OSL_ENSURE(pString,"There must be a string item!");
@@ -2631,16 +2627,16 @@ bool SbaTableQueryBrowser::implSelect( SvLBoxEntry* _pEntry )
}
::rtl::OUString aName = sNameBuffer.makeStringAndClear();
- sal_Int32 nCommandType = ( etTableContainer == pContainerData->eType)
- ? CommandType::TABLE
- : CommandType::QUERY;
+ sal_Int32 nCommandType = ( etTableContainer == pContainerData->eType)
+ ? CommandType::TABLE
+ : CommandType::QUERY;
// check if need to rebuild the rowset
sal_Bool bRebuild = ( xOldConnection != pConData->xConnection )
|| ( nOldType != nCommandType )
|| ( aName != aOldName );
- Reference< ::com::sun::star::form::XLoadable > xLoadable = getLoadable();
+ Reference< ::com::sun::star::form::XLoadable > xLoadable = getLoadable();
bRebuild |= !xLoadable->isLoaded();
bool bSuccess = true;
if ( bRebuild )
@@ -2760,7 +2756,7 @@ bool SbaTableQueryBrowser::implSelect( SvLBoxEntry* _pEntry )
String sDataSourceName( getDataSourceAcessor( pConnection ) );
bSuccess = implLoadAnything( sDataSourceName, aName, nCommandType, bEscapeProcessing, pConData->xConnection );
if ( !bSuccess )
- { // clean up
+ { // clean up
criticalFail();
}
}
@@ -2777,12 +2773,12 @@ bool SbaTableQueryBrowser::implSelect( SvLBoxEntry* _pEntry )
if(e.TargetException >>= aSql)
showError(SQLExceptionInfo(aSql));
else
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::implSelect: something strange happended!");
+ OSL_FAIL("SbaTableQueryBrowser::implSelect: something strange happended!");
// reset the values
xRowSetProps->setPropertyValue(PROPERTY_DATASOURCENAME,Any());
xRowSetProps->setPropertyValue(PROPERTY_ACTIVE_CONNECTION,Any());
}
- catch(Exception&)
+ catch(const Exception&)
{
// reset the values
xRowSetProps->setPropertyValue(PROPERTY_DATASOURCENAME,Any());
@@ -2800,18 +2796,18 @@ SvLBoxEntry* SbaTableQueryBrowser::getEntryFromContainer(const Reference<XNameAc
SvLBoxEntry* pDSLoop = rListBox.FirstChild(NULL);
while (pDSLoop)
{
- pContainer = rListBox.GetEntry(pDSLoop, CONTAINER_QUERIES);
+ pContainer = rListBox.GetEntry(pDSLoop, CONTAINER_QUERIES);
DBTreeListUserData* pQueriesData = static_cast<DBTreeListUserData*>(pContainer->GetUserData());
if ( pQueriesData && pQueriesData->xContainer == _rxNameAccess )
break;
- pContainer = rListBox.GetEntry(pDSLoop, CONTAINER_TABLES);
+ pContainer = rListBox.GetEntry(pDSLoop, CONTAINER_TABLES);
DBTreeListUserData* pTablesData = static_cast<DBTreeListUserData*>(pContainer->GetUserData());
if ( pTablesData && pTablesData->xContainer == _rxNameAccess )
break;
- pDSLoop = rListBox.NextSibling(pDSLoop);
- pContainer = NULL;
+ pDSLoop = rListBox.NextSibling(pDSLoop);
+ pContainer = NULL;
}
return pContainer;
}
@@ -2819,13 +2815,13 @@ SvLBoxEntry* SbaTableQueryBrowser::getEntryFromContainer(const Reference<XNameAc
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::elementInserted( const ContainerEvent& _rEvent ) throw(RuntimeException)
{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
Reference< XNameAccess > xNames(_rEvent.Source, UNO_QUERY);
// first search for a definition container where we can insert this element
SvLBoxEntry* pEntry = getEntryFromContainer(xNames);
- if(pEntry) // found one
+ if(pEntry) // found one
{
// insert the new entry into the tree
DBTreeListUserData* pContainerData = static_cast<DBTreeListUserData*>(pEntry->GetUserData());
@@ -2857,14 +2853,14 @@ void SAL_CALL SbaTableQueryBrowser::elementInserted( const ContainerEvent& _rEve
sal_Bool SbaTableQueryBrowser::isCurrentlyDisplayedChanged(const String& _sName,SvLBoxEntry* _pContainer)
{
return m_pCurrentlyDisplayed
- && getEntryType(m_pCurrentlyDisplayed) == getChildType(_pContainer)
- && m_pTreeView->getListBox().GetParent(m_pCurrentlyDisplayed) == _pContainer
- && m_pTreeView->getListBox().GetEntryText(m_pCurrentlyDisplayed) == _sName;
+ && getEntryType(m_pCurrentlyDisplayed) == getChildType(_pContainer)
+ && m_pTreeView->getListBox().GetParent(m_pCurrentlyDisplayed) == _pContainer
+ && m_pTreeView->getListBox().GetEntryText(m_pCurrentlyDisplayed) == _sName;
}
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEvent ) throw(RuntimeException)
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
Reference< XNameAccess > xNames(_rEvent.Source, UNO_QUERY);
// get the top-level representing the removed data source
@@ -2875,7 +2871,7 @@ void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEven
String aName = ::comphelper::getString(_rEvent.Accessor).getStr();
if ( isCurrentlyDisplayedChanged( aName, pContainer) )
- { // the element displayed currently has been replaced
+ { // the element displayed currently has been replaced
// we need to remember the old value
SvLBoxEntry* pTemp = m_pCurrentlyDisplayed;
@@ -2917,16 +2913,16 @@ void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEven
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEvent ) throw(RuntimeException)
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
Reference< XNameAccess > xNames(_rEvent.Source, UNO_QUERY);
SvLBoxEntry* pContainer = getEntryFromContainer(xNames);
if ( pContainer )
- { // a table or query as been replaced
+ { // a table or query as been replaced
String aName = ::comphelper::getString(_rEvent.Accessor).getStr();
if ( isCurrentlyDisplayedChanged( aName, pContainer) )
- { // the element displayed currently has been replaced
+ { // the element displayed currently has been replaced
// we need to remember the old value
SvLBoxEntry* pTemp = m_pCurrentlyDisplayed;
@@ -2977,8 +2973,8 @@ void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEve
checkDocumentDataSource();
}
else if (xNames.get() == m_xDatabaseContext.get())
- { // a datasource has been replaced in the context
- DBG_ERROR("SbaTableQueryBrowser::elementReplaced: no support for replaced data sources!");
+ { // a datasource has been replaced in the context
+ OSL_FAIL("SbaTableQueryBrowser::elementReplaced: no support for replaced data sources!");
// very suspicious: the database context should not allow to replace data source, only to register
// and revoke them
}
@@ -3017,8 +3013,8 @@ void SbaTableQueryBrowser::impl_releaseConnection( SharedConnection& _rxConnecti
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::disposeConnection( SvLBoxEntry* _pDSEntry )
{
- DBG_ASSERT( _pDSEntry, "SbaTableQueryBrowser::disposeConnection: invalid entry (NULL)!" );
- DBG_ASSERT( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::disposeConnection: invalid entry (not top-level)!" );
+ OSL_ENSURE( _pDSEntry, "SbaTableQueryBrowser::disposeConnection: invalid entry (NULL)!" );
+ OSL_ENSURE( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::disposeConnection: invalid entry (not top-level)!" );
if ( _pDSEntry )
{
@@ -3031,8 +3027,8 @@ void SbaTableQueryBrowser::disposeConnection( SvLBoxEntry* _pDSEntry )
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::closeConnection(SvLBoxEntry* _pDSEntry,sal_Bool _bDisposeConnection)
{
- DBG_ASSERT(_pDSEntry, "SbaTableQueryBrowser::closeConnection: invalid entry (NULL)!");
- DBG_ASSERT( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::closeConnection: invalid entry (not top-level)!");
+ OSL_ENSURE(_pDSEntry, "SbaTableQueryBrowser::closeConnection: invalid entry (NULL)!");
+ OSL_ENSURE( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::closeConnection: invalid entry (not top-level)!");
// if one of the entries of the given DS is displayed currently, unload the form
if (m_pCurrentlyDisplayed && (m_pTreeView->getListBox().GetRootLevelParent(m_pCurrentlyDisplayed) == _pDSEntry))
@@ -3116,11 +3112,11 @@ void SbaTableQueryBrowser::unloadAndCleanup( sal_Bool _bDisposeConnection )
if(e.TargetException >>= aSql)
showError(SQLExceptionInfo(aSql));
else
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::unloadAndCleanup: something strange happended!");
+ OSL_FAIL("SbaTableQueryBrowser::unloadAndCleanup: something strange happended!");
}
- catch(Exception&)
+ catch(const Exception&)
{
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::unloadAndCleanup: could not reset the form");
+ OSL_FAIL("SbaTableQueryBrowser::unloadAndCleanup: could not reset the form");
}
}
@@ -3154,7 +3150,7 @@ namespace
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::impl_initialize()
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// doin' a lot of VCL stuff here -> lock the SolarMutex
// first initialize the parent
@@ -3212,24 +3208,24 @@ void SbaTableQueryBrowser::impl_initialize()
::rtl::OUString* pStringIter = aProperties.getArray();
Any* pValueIter = aValues.getArray();
- *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AlwaysShowCursor"));
- *pValueIter++ <<= sal_False;
- *pStringIter++ = PROPERTY_BORDER;
- *pValueIter++ <<= sal_Int16(0);
+ *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AlwaysShowCursor"));
+ *pValueIter++ <<= sal_False;
+ *pStringIter++ = PROPERTY_BORDER;
+ *pValueIter++ <<= sal_Int16(0);
- *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasNavigationBar"));
- *pValueIter++ <<= sal_False;
- *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasRecordMarker"));
- *pValueIter++ <<= sal_False;
+ *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasNavigationBar"));
+ *pValueIter++ <<= sal_False;
+ *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasRecordMarker"));
+ *pValueIter++ <<= sal_False;
- *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tabstop"));
- *pValueIter++ <<= sal_False;
+ *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tabstop"));
+ *pValueIter++ <<= sal_False;
- Reference< XMultiPropertySet > xFormMultiSet(getFormComponent(), UNO_QUERY);
+ Reference< XMultiPropertySet > xFormMultiSet(getFormComponent(), UNO_QUERY);
if ( xFormMultiSet.is() )
xFormMultiSet->setPropertyValues(aProperties, aValues);
}
- catch(Exception)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -3281,7 +3277,7 @@ void SbaTableQueryBrowser::impl_initialize()
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "SbaTableQueryBrowser::impl_initialize: a connection parent which does not have a 'Name'!??" );
+ OSL_FAIL( "SbaTableQueryBrowser::impl_initialize: a connection parent which does not have a 'Name'!??" );
}
}
}
@@ -3318,7 +3314,7 @@ void SbaTableQueryBrowser::impl_initialize()
}
catch(const Exception&)
{
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::impl_initialize: could not set the update related names!");
+ OSL_FAIL("SbaTableQueryBrowser::impl_initialize: could not set the update related names!");
}
}
@@ -3368,8 +3364,8 @@ sal_Bool SbaTableQueryBrowser::ensureConnection(SvLBoxEntry* _pAnyEntry, SharedC
SvLBoxEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent(_pAnyEntry);
DBTreeListUserData* pDSData =
pDSEntry
- ? static_cast<DBTreeListUserData*>(pDSEntry->GetUserData())
- : NULL;
+ ? static_cast<DBTreeListUserData*>(pDSEntry->GetUserData())
+ : NULL;
return ensureConnection( pDSEntry, pDSData, _rConnection );
}
@@ -3390,14 +3386,14 @@ sal_Bool SbaTableQueryBrowser::getExistentConnectionFor( SvLBoxEntry* _pAnyEntry
SvLBoxEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent( _pAnyEntry );
DBTreeListUserData* pDSData =
pDSEntry
- ? static_cast< DBTreeListUserData* >( pDSEntry->GetUserData() )
- : NULL;
+ ? static_cast< DBTreeListUserData* >( pDSEntry->GetUserData() )
+ : NULL;
if ( pDSData )
_rConnection = pDSData->xConnection;
return _rConnection.is();
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
// -----------------------------------------------------------------------------
bool SbaTableQueryBrowser::impl_isDataSourceEntry( SvLBoxEntry* _pEntry ) const
{
@@ -3408,7 +3404,7 @@ bool SbaTableQueryBrowser::impl_isDataSourceEntry( SvLBoxEntry* _pEntry ) const
// -----------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::ensureConnection( SvLBoxEntry* _pDSEntry, void* pDSData, SharedConnection& _rConnection )
{
- DBG_ASSERT( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::ensureConnection: this entry does not denote a data source!" );
+ OSL_ENSURE( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::ensureConnection: this entry does not denote a data source!" );
if(_pDSEntry)
{
DBTreeListUserData* pTreeListData = static_cast<DBTreeListUserData*>(pDSData);
@@ -3447,7 +3443,7 @@ IMPL_LINK( SbaTableQueryBrowser, OnTreeEntryCompare, const SvSortData*, _pSortDa
{
SvLBoxEntry* pLHS = static_cast<SvLBoxEntry*>(_pSortData->pLeft);
SvLBoxEntry* pRHS = static_cast<SvLBoxEntry*>(_pSortData->pRight);
- DBG_ASSERT(pLHS && pRHS, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid tree entries!");
+ OSL_ENSURE(pLHS && pRHS, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid tree entries!");
// we want the table entry and the end so we have to do a check
if (isContainer(pRHS))
@@ -3477,18 +3473,18 @@ IMPL_LINK( SbaTableQueryBrowser, OnTreeEntryCompare, const SvSortData*, _pSortDa
if ( ( eLeft == etQueryContainer ) && ( eRight == etTableContainer ) )
return COMPARE_LESS;
- OSL_ENSURE( false, "SbaTableQueryBrowser::OnTreeEntryCompare: unexpected case!" );
+ OSL_FAIL( "SbaTableQueryBrowser::OnTreeEntryCompare: unexpected case!" );
return COMPARE_EQUAL;
}
SvLBoxString* pLeftTextItem = static_cast<SvLBoxString*>(pLHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
SvLBoxString* pRightTextItem = static_cast<SvLBoxString*>(pRHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
- DBG_ASSERT(pLeftTextItem && pRightTextItem, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid text items!");
+ OSL_ENSURE(pLeftTextItem && pRightTextItem, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid text items!");
String sLeftText = pLeftTextItem->GetText();
String sRightText = pRightTextItem->GetText();
- sal_Int32 nCompareResult = 0; // equal by default
+ sal_Int32 nCompareResult = 0; // equal by default
if (m_xCollator.is())
{
@@ -3496,7 +3492,7 @@ IMPL_LINK( SbaTableQueryBrowser, OnTreeEntryCompare, const SvSortData*, _pSortDa
{
nCompareResult = m_xCollator->compareString(sLeftText, sRightText);
}
- catch(Exception&)
+ catch(const Exception&)
{
}
}
@@ -3633,7 +3629,7 @@ Any SbaTableQueryBrowser::getCurrentSelection( Control& _rControl ) const
break;
default:
- OSL_ENSURE( false, "SbaTableQueryBrowser::getCurrentSelection: invalid (unexpected) object type!" );
+ OSL_FAIL( "SbaTableQueryBrowser::getCurrentSelection: invalid (unexpected) object type!" );
break;
}
@@ -3648,15 +3644,15 @@ sal_Bool SbaTableQueryBrowser::implGetQuerySignature( ::rtl::OUString& _rCommand
try
{
- // ontain the dss (data source signature) of the form
+ // contain the dss (data source signature) of the form
::rtl::OUString sDataSourceName;
::rtl::OUString sCommand;
- sal_Int32 nCommandType = CommandType::COMMAND;
+ sal_Int32 nCommandType = CommandType::COMMAND;
Reference< XPropertySet > xRowsetProps( getRowSet(), UNO_QUERY );
ODataAccessDescriptor aDesc( xRowsetProps );
sDataSourceName = aDesc.getDataSource();
- aDesc[ daCommand ] >>= sCommand;
- aDesc[ daCommandType ] >>= nCommandType;
+ aDesc[ daCommand ] >>= sCommand;
+ aDesc[ daCommandType ] >>= nCommandType;
// do we need to do anything?
if ( CommandType::QUERY != nCommandType )
@@ -3707,8 +3703,8 @@ void SbaTableQueryBrowser::clearGridColumns(const Reference< XNameContainer >& _
{
// first we have to clear the grid
Sequence< ::rtl::OUString > aNames = _xColContainer->getElementNames();
- const ::rtl::OUString* pIter = aNames.getConstArray();
- const ::rtl::OUString* pEnd = pIter + aNames.getLength();
+ const ::rtl::OUString* pIter = aNames.getConstArray();
+ const ::rtl::OUString* pEnd = pIter + aNames.getLength();
Reference< XInterface > xColumn;
for (; pIter != pEnd;++pIter)
{
@@ -3718,14 +3714,6 @@ void SbaTableQueryBrowser::clearGridColumns(const Reference< XNameContainer >& _
}
}
// -----------------------------------------------------------------------------
-sal_Bool SbaTableQueryBrowser::isHiContrast() const
-{
- sal_Bool bRet = sal_False;
- if ( m_pTreeView )
- bRet = m_pTreeView->getListBox().GetSettings().GetStyleSettings().GetHighContrastMode();
- return bRet;
-}
-// -----------------------------------------------------------------------------
void SbaTableQueryBrowser::loadMenu(const Reference< XFrame >& _xFrame)
{
if ( m_bShowMenu )
@@ -3762,7 +3750,7 @@ void SbaTableQueryBrowser::loadMenu(const Reference< XFrame >& _xFrame)
sTitle = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET);
if ( sName.getLength() )
{
- sName += ::rtl::OUString::createFromAscii(" - ");
+ sName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - "));
sName += sTitle;
sTitle = sName;
}
@@ -3803,7 +3791,6 @@ void SbaTableQueryBrowser::postReloadForm()
{
InitializeGridModel(getFormComponent());
LoadFinished(sal_True);
- //updateTitle();
}
//------------------------------------------------------------------------------
@@ -3849,7 +3836,7 @@ void SAL_CALL SbaTableQueryBrowser::releaseContextMenuInterceptor( const Referen
//------------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::registeredDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
implAddDatasource( _Event.Name, SharedConnection() );
}
@@ -3871,7 +3858,7 @@ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const String& _rDataSour
return;
if ( isSelected( pDataSourceEntry ) )
- { // a table or query belonging to the deleted data source is currently beeing displayed.
+ { // a table or query belonging to the deleted data source is currently beeing displayed.
OSL_ENSURE( m_pTreeView->getListBox().GetRootLevelParent( m_pCurrentlyDisplayed ) == pDataSourceEntry,
"SbaTableQueryBrowser::impl_cleanupDataSourceEntry: inconsistence (1)!" );
unloadAndCleanup( sal_True );
@@ -3879,20 +3866,19 @@ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const String& _rDataSour
else
OSL_ENSURE(
( NULL == m_pCurrentlyDisplayed )
- || ( m_pTreeView->getListBox().GetRootLevelParent( m_pCurrentlyDisplayed ) != pDataSourceEntry ),
+ || ( m_pTreeView->getListBox().GetRootLevelParent( m_pCurrentlyDisplayed ) != pDataSourceEntry ),
"SbaTableQueryBrowser::impl_cleanupDataSourceEntry: inconsistence (2)!");
// delete any user data of the child entries of the to-be-removed entry
SvTreeEntryList* pList = m_pTreeModel->GetChildList( pDataSourceEntry );
if ( pList )
{
- SvLBoxEntry* pEntryLoop = static_cast<SvLBoxEntry*>( pList->First() );
- while ( pEntryLoop )
+ for ( size_t i = 0, n = pList->size(); i < n; ++i )
{
+ SvLBoxEntry* pEntryLoop = static_cast<SvLBoxEntry*>((*pList)[ i ]);
DBTreeListUserData* pData = static_cast< DBTreeListUserData* >( pEntryLoop->GetUserData() );
pEntryLoop->SetUserData( NULL );
delete pData;
- pEntryLoop = static_cast< SvLBoxEntry* >( pList->Next() );
}
}
@@ -3906,7 +3892,7 @@ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const String& _rDataSour
//------------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::revokedDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
impl_cleanupDataSourceEntry( _Event.Name );
@@ -3917,7 +3903,7 @@ void SAL_CALL SbaTableQueryBrowser::revokedDatabaseLocation( const DatabaseRegis
//------------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::changedDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
// in case the data source was expanded, and connected, we need to clean it up
// for simplicity, just do as if the data source were completely removed and re-added
@@ -3927,7 +3913,8 @@ void SAL_CALL SbaTableQueryBrowser::changedDatabaseLocation( const DatabaseRegis
// .........................................................................
-} // namespace dbaui
+} // namespace dbaui
// .........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx
index 3835e1874..a040b4e13 100644
--- a/dbaccess/source/ui/control/ColumnControlWindow.cxx
+++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,24 +28,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_COLUMNCONTROLWINDOW_HXX
#include "ColumnControlWindow.hxx"
-#endif
-#ifndef DBAUI_FIELDCONTROLS_HXX
#include "FieldControls.hxx"
-#endif
-#ifndef INCLUDED_SVTOOLS_SYSLOCALE_HXX
#include <unotools/syslocale.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _DBU_RESOURCE_HRC_
#include "dbu_resource.hrc"
-#endif
using namespace ::dbaui;
@@ -84,7 +73,6 @@ void OColumnControlWindow::ActivateAggregate( EControlType eType )
{
case tpFormat:
case tpDefault:
-// case tpAutoIncrement:
case tpColumnName:
break;
default:
@@ -98,7 +86,6 @@ void OColumnControlWindow::DeactivateAggregate( EControlType eType )
{
case tpFormat:
case tpDefault:
-// case tpAutoIncrement:
case tpColumnName:
break;
default:
@@ -196,3 +183,5 @@ TOTypeInfoSP OColumnControlWindow::getDefaultTyp() const
return m_pTypeInfo;
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index baba2116d..478aaa4dd 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,13 +31,11 @@
#define ITEMID_HORJUSTIFY SID_ATTR_ALIGN_HOR_JUSTIFY
#define ITEMID_VERJUSTIFY SID_ATTR_ALIGN_VER_JUSTIFY
-//#define ITEMID_ORIENTATION SID_ATTR_ALIGN_ORIENTATION
#define ITEMID_LINEBREAK SID_ATTR_ALIGN_LINEBREAK
#define ITEMID_MARGIN SID_ATTR_ALIGN_MARGIN
#include "FieldDescControl.hxx"
#include "FieldControls.hxx"
-#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
#include "TableDesignHelpBar.hxx"
#include <vcl/scrbar.hxx>
@@ -71,6 +70,7 @@
#include <memory>
#include "dbu_control.hrc"
#include "dbu_tbl.hrc"
+#include <osl/diagnose.h>
using namespace dbaui;
@@ -312,7 +312,7 @@ String OFieldDescControl::BoolStringUI(const String& rPersistentString) const
static String aOne('1');
static String aNone(ModuleRes(STR_VALUE_NONE));
- // FS - 66161 - 14.05.1999 - aeltere Versionen haben eventuell einen sprachabhaengigen String als Default gespeichert
+ // aeltere Versionen haben eventuell einen sprachabhaengigen String als Default gespeichert
if (rPersistentString.Equals(aYes) || rPersistentString.Equals(aNo))
return rPersistentString;
@@ -367,7 +367,7 @@ void OFieldDescControl::CheckScrollBars()
// horizontal :
long lMaxXPosition = 0;
Control* ppAggregates[] = { pRequired, pNumType, pAutoIncrement, pDefault, pTextLen, pLength, pScale, pFormat, m_pColumnName, m_pType,m_pAutoIncrementValue};
- for (sal_uInt16 i=0; i<sizeof(ppAggregates)/sizeof(ppAggregates[0]); ++i)
+ for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(ppAggregates); ++i)
getMaxXPosition(ppAggregates[i],lMaxXPosition);
if (m_pHorzScroll)
@@ -410,7 +410,6 @@ void OFieldDescControl::CheckScrollBars()
{
m_pVertScroll->Show();
m_pVertScroll->SetRangeMax(nActive - nLastVisible);
-// m_pVertScroll->SetThumbPos(0);
m_pVertScroll->SetPosSizePixel( Point(nNewHWidth, 0), Size(nVScrollWidth, szOverallSize.Height()) );
}
@@ -425,7 +424,6 @@ void OFieldDescControl::CheckScrollBars()
{
m_pHorzScroll->Show();
m_pHorzScroll->SetRangeMax((lMaxXPosition - lMaxXAvailable + HSCROLL_STEP - 1 )/HSCROLL_STEP);
-// m_pHorzScroll->SetThumbPos(0);
m_pHorzScroll->SetPosSizePixel( Point(0, nNewVHeight), Size(bNeedVScrollBar ? nNewHWidth : szOverallSize.Width(), nHScrollHeight) );
}
@@ -485,9 +483,9 @@ void OFieldDescControl::ScrollAllAggregates()
, pTextLenText, pLengthText
, pScaleText, m_pColumnNameText
, m_pTypeText, m_pAutoIncrementValueText};
- OSL_ENSURE(sizeof(ppAggregates)/sizeof(ppAggregates[0]) == sizeof(ppAggregatesText)/sizeof(ppAggregatesText[0]),"Lists are not identical!");
+ OSL_ENSURE(SAL_N_ELEMENTS(ppAggregates) == SAL_N_ELEMENTS(ppAggregatesText),"Lists are not identical!");
- for (sal_uInt16 i=0; i<sizeof(ppAggregates)/sizeof(ppAggregates[0]); ++i)
+ for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(ppAggregates); ++i)
ScrollAggregate(ppAggregatesText[i],ppAggregates[i],NULL,nDeltaX, nDeltaY);
ScrollAggregate(pFormatText,pFormatSample,pFormat,nDeltaX, nDeltaY);
@@ -499,7 +497,7 @@ sal_uInt16 OFieldDescControl::CountActiveAggregates() const
{
Control* ppAggregates[] = { pRequired, pNumType, pAutoIncrement, pDefault, pTextLen, pLength, pScale, pFormat, m_pColumnName, m_pType,m_pAutoIncrementValue};
sal_uInt16 nVisibleAggregates = 0;
- for (sal_uInt16 i=0; i<sizeof(ppAggregates)/sizeof(ppAggregates[0]); ++i)
+ for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(ppAggregates); ++i)
if (ppAggregates[i])
++nVisibleAggregates;
return nVisibleAggregates;
@@ -509,14 +507,14 @@ sal_Int32 OFieldDescControl::GetMaxControlHeight() const
{
Size aHeight;
Control* ppAggregates[] = { pRequired, pNumType, pAutoIncrement, pDefault, pTextLen, pLength, pScale, pFormat, m_pColumnName, m_pType,m_pAutoIncrementValue};
- for (sal_uInt16 i=0; i<sizeof(ppAggregates)/sizeof(ppAggregates[0]); ++i)
+ for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(ppAggregates); ++i)
{
if ( ppAggregates[i] )
{
const Size aTemp( ppAggregates[i]->GetOptimalSize(WINDOWSIZE_PREFERRED) );
if ( aTemp.Height() > aHeight.Height() )
aHeight.Height() = aTemp.Height();
- } // if ( ppAggregates[i] )
+ }
}
return aHeight.Height();
@@ -540,9 +538,9 @@ void OFieldDescControl::SetReadOnly( sal_Bool bReadOnly )
, m_pTypeText, m_pAutoIncrementValueText
, pFormatText};
- OSL_ENSURE(sizeof(ppAggregates)/sizeof(ppAggregates[0]) == sizeof(ppAggregatesText)/sizeof(ppAggregatesText[0]),"Lists are not identical!");
+ OSL_ENSURE(SAL_N_ELEMENTS(ppAggregates) == SAL_N_ELEMENTS(ppAggregatesText),"Lists are not identical!");
- for (sal_uInt16 i=0; i<sizeof(ppAggregates)/sizeof(ppAggregates[0]); ++i)
+ for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(ppAggregates); ++i)
{
if ( ppAggregatesText[i] )
ppAggregatesText[i]->Enable( !bReadOnly );
@@ -834,7 +832,7 @@ void OFieldDescControl::ArrangeAggregates()
};
long nMaxWidth = 0;
- for (size_t i=0; i<sizeof(adAggregates)/sizeof(adAggregates[0]); i++)
+ for (size_t i=0; i < SAL_N_ELEMENTS(adAggregates); i++)
{
if (adAggregates[i].pctrlTextControl)
{
@@ -847,7 +845,7 @@ void OFieldDescControl::ArrangeAggregates()
// und los ...
int nCurrentControlPos = 0;
Control* pZOrderPredecessor = NULL;
- for (size_t i=0; i<sizeof(adAggregates)/sizeof(adAggregates[0]); i++)
+ for (size_t i=0; i < SAL_N_ELEMENTS(adAggregates); i++)
{
if (adAggregates[i].pctrlInputControl)
{
@@ -1194,7 +1192,7 @@ void OFieldDescControl::SetPosSize( Control** ppControl, long nRow, sal_uInt16 n
case 4:
aSize.Width() = CONTROL_WIDTH_4;
break;
- } // switch( nCol )
+ }
}
@@ -1426,7 +1424,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
break;
default:
- OSL_ENSURE(0,"Unknown type");
+ OSL_FAIL("Unknown type");
}
m_pPreviousType = pFieldType;
}
@@ -1520,7 +1518,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
if( pNumType )
{
- OSL_ENSURE(sal_False, "OFieldDescControl::DisplayData: invalid num type!");
+ OSL_FAIL("OFieldDescControl::DisplayData: invalid num type!");
}
if( pLength )
@@ -1733,7 +1731,7 @@ void OFieldDescControl::GetFocus()
void OFieldDescControl::implFocusLost(Window* _pWhich)
{
DBG_CHKTHIS(OFieldDescControl,NULL);
- DBG_ASSERT(!_pWhich || IsChild(_pWhich), "OFieldDescControl::implFocusLost : invalid window !");
+ OSL_ENSURE(!_pWhich || IsChild(_pWhich), "OFieldDescControl::implFocusLost : invalid window !");
//////////////////////////////////////////////////////////////////////
// Das aktive Control merken
@@ -1879,7 +1877,7 @@ String OFieldDescControl::getControlDefault( const OFieldDescription* _pFieldDes
Reference<XPropertySet> xFormSet = xNumberFormatter->getNumberFormatsSupplier()->getNumberFormats()->getByKey(nFormatKey);
OSL_ENSURE(xFormSet.is(),"XPropertySet is null!");
::rtl::OUString sFormat;
- xFormSet->getPropertyValue(::rtl::OUString::createFromAscii("FormatString")) >>= sFormat;
+ xFormSet->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FormatString"))) >>= sFormat;
if ( !bTextFormat )
{
@@ -1911,3 +1909,5 @@ String OFieldDescControl::getControlDefault( const OFieldDescription* _pFieldDes
return sDefault;
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index abc960d00..f78ef0519 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,58 +28,23 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_RELATIONCONTROL_HXX
#include "RelationControl.hxx"
-#endif
-#ifndef DBACCESS_SOURCE_UI_INC_RELATIONCONTROL_HRC
#include "RelationControl.hrc"
-#endif
-#ifndef _SVTOOLS_EDITBROWSEBOX_HXX_
#include <svtools/editbrowsebox.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef DBAUI_RELCONTROLIFACE_HXX
#include "RelControliFace.hxx"
-#endif
-#ifndef _DBU_CONTROL_HRC_
#include "dbu_control.hrc"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
+#include <osl/diagnose.h>
#include <algorithm>
@@ -167,7 +133,7 @@ namespace dbaui
DBG_NAME(ORelationControl)
//------------------------------------------------------------------------
ORelationControl::ORelationControl( OTableListBoxControl* pParent ,const OJoinTableView::OTableWindowMap* _pTableMap)
- :EditBrowseBox( pParent, EBBF_SMART_TAB_TRAVEL | EBBF_NOROWPICTURE, WB_TABSTOP | /*WB_3DLOOK | */WB_BORDER | BROWSER_AUTOSIZE_LASTCOL)
+ :EditBrowseBox( pParent, EBBF_SMART_TAB_TRAVEL | EBBF_NOROWPICTURE, WB_TABSTOP | WB_BORDER | BROWSER_AUTOSIZE_LASTCOL)
,m_pTableMap(_pTableMap)
,m_pBoxControl(pParent)
,m_xSourceDef( NULL )
@@ -529,7 +495,7 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
// -----------------------------------------------------------------------------
void OTableListBoxControl::fillListBoxes()
{
- DBG_ASSERT( !m_pTableMap->empty(), "OTableListBoxControl::fillListBoxes: no table window!");
+ OSL_ENSURE( !m_pTableMap->empty(), "OTableListBoxControl::fillListBoxes: no table window!");
OTableWindow* pInitialLeft = NULL;
OTableWindow* pInitialRight = NULL;
@@ -551,7 +517,7 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
pInitialRight = aIter->second;
m_strCurrentRight = aIter->first;
}
- } // for(;aIter != m_pTableMap->end();++aIter)
+ }
if ( !pInitialRight )
{
@@ -616,7 +582,7 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
OTableWindow* pLoop = NULL;
if( aFind != m_pTableMap->end() )
pLoop = aFind->second;
- DBG_ASSERT(pLoop != NULL, "ORelationDialog::OnTableChanged : ungueltiger Eintrag in ListBox !");
+ OSL_ENSURE(pLoop != NULL, "ORelationDialog::OnTableChanged : ungueltiger Eintrag in ListBox !");
// da ich die ListBoxen selber mit eben diesen Tabellennamen, mit denen ich sie jetzt vergleiche, gefuellt habe,
// MUSS ich strSelected finden
if (pListBox == &m_lmbLeftTable)
@@ -701,7 +667,6 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
{
_pTableSeparator->SetZOrder(&m_lmbRightTable, WINDOW_ZORDER_BEHIND);
m_pRC_Tables->SetZOrder(_pTableSeparator, WINDOW_ZORDER_BEHIND);
- //aDlgPoint = m_pTableSeparator->GetPosPixel() + Point(0,aSize.Height()) + LogicToPixel( Point(0,6), MAP_APPFONT );
_pTableSeparator->SetPosPixel(Point(0,m_aFL_InvolvedFields.GetPosPixel().Y()));
const Size aSize = _pTableSeparator->GetSizePixel();
aDlgPoint.Y() = _pTableSeparator->GetPosPixel().Y() + aSize.Height();
@@ -749,3 +714,4 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/ScrollHelper.cxx b/dbaccess/source/ui/control/ScrollHelper.cxx
index 34bee2181..43763f017 100644
--- a/dbaccess/source/ui/control/ScrollHelper.cxx
+++ b/dbaccess/source/ui/control/ScrollHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,12 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_SCROLLHELPER_HXX
#include "ScrollHelper.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
#define LISTBOX_SCROLLING_AREA 12
namespace dbaui
@@ -79,3 +76,4 @@ DBG_NAME(OScrollHelper)
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/SqlNameEdit.cxx b/dbaccess/source/ui/control/SqlNameEdit.cxx
index efed4d810..07e1430f5 100644
--- a/dbaccess/source/ui/control/SqlNameEdit.cxx
+++ b/dbaccess/source/ui/control/SqlNameEdit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_SQLNAMEEDIT_HXX
#include "SqlNameEdit.hxx"
-#endif
namespace dbaui
{
//------------------------------------------------------------------
@@ -98,3 +97,4 @@ namespace dbaui
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx
index 6a1a61362..8b4f81b9a 100644
--- a/dbaccess/source/ui/control/TableGrantCtrl.cxx
+++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,33 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEGRANTCONTROL_HXX
#include "TableGrantCtrl.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_PRIVILEGE_HPP_
#include <com/sun/star/sdbcx/Privilege.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_PRIVILEGEOBJECT_HPP_
#include <com/sun/star/sdbcx/PrivilegeObject.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XUSERSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XUsersSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAUTHORIZABLE_HPP_
#include <com/sun/star/sdbcx/XAuthorizable.hpp>
-#endif
-#ifndef _DBU_CONTROL_HRC_
#include "dbu_control.hrc"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
using namespace ::com::sun::star::accessibility;
using namespace ::com::sun::star::container;
@@ -514,3 +497,4 @@ Reference< XAccessible > OTableGrantControl::CreateAccessibleCell( sal_Int32 _nR
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/TableGrantCtrl.src b/dbaccess/source/ui/control/TableGrantCtrl.src
index 9ed55e529..8b870e492 100644
--- a/dbaccess/source/ui/control/TableGrantCtrl.src
+++ b/dbaccess/source/ui/control/TableGrantCtrl.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,6 +53,7 @@ String STR_TABLE_PRIV_ALTER
{
Text [ en-US ] = "Alter structure";
};
+
String STR_TABLE_PRIV_SELECT
{
Text [ en-US ] = "Read data";
@@ -67,30 +68,3 @@ String STR_TABLE_PRIV_DROP
{
Text [ en-US ] = "Drop structure";
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dbaccess/source/ui/control/VertSplitView.cxx b/dbaccess/source/ui/control/VertSplitView.cxx
index 9d7666e94..1d403579f 100644
--- a/dbaccess/source/ui/control/VertSplitView.cxx
+++ b/dbaccess/source/ui/control/VertSplitView.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,13 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_VERTSPLITVIEW_HXX
#include "VertSplitView.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
#define SPLITTER_WIDTH 80
@@ -218,3 +215,5 @@ void OSplitterView::setSplitter(Splitter* _pSplitter)
LINK( this, OSplitterView, SplitHdl ).Call(m_pSplitter);
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/charsetlistbox.cxx b/dbaccess/source/ui/control/charsetlistbox.cxx
index f7bcd25da..c35b66ea9 100644
--- a/dbaccess/source/ui/control/charsetlistbox.cxx
+++ b/dbaccess/source/ui/control/charsetlistbox.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,6 +36,7 @@
#include <svl/itemset.hxx>
#include <svl/stritem.hxx>
+#include <osl/diagnose.h>
//........................................................................
namespace dbaui
@@ -72,7 +74,7 @@ namespace dbaui
OCharsetDisplay::const_iterator aFind = m_aCharSets.findIanaName( _rIanaName );
if (aFind == m_aCharSets.end())
{
- DBG_ERROR( "CharSetListBox::SelectEntryByIanaName: unknown charset falling back to system language!" );
+ OSL_FAIL( "CharSetListBox::SelectEntryByIanaName: unknown charset falling back to system language!" );
aFind = m_aCharSets.findEncoding( RTL_TEXTENCODING_DONTKNOW );
}
@@ -88,7 +90,7 @@ namespace dbaui
// in our settings, there was an encoding selected which is not valid for the current
// data source type
// This is worth at least an assertion.
- DBG_ERROR( "CharSetListBox::SelectEntryByIanaName: invalid character set!" );
+ OSL_FAIL( "CharSetListBox::SelectEntryByIanaName: invalid character set!" );
sDisplayName = String();
}
@@ -103,7 +105,7 @@ namespace dbaui
if ( GetSelectEntryPos() != GetSavedValue() )
{
OCharsetDisplay::const_iterator aFind = m_aCharSets.findDisplayName( GetSelectEntry() );
- DBG_ASSERT( aFind != m_aCharSets.end(), "CharSetListBox::StoreSelectedCharSet: could not translate the selected character set!" );
+ OSL_ENSURE( aFind != m_aCharSets.end(), "CharSetListBox::StoreSelectedCharSet: could not translate the selected character set!" );
if ( aFind != m_aCharSets.end() )
{
_rSet.Put( SfxStringItem( _nItemId, (*aFind).getIanaName() ) );
@@ -116,3 +118,5 @@ namespace dbaui
//........................................................................
} // namespace dbaui
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx
index deda4d104..c6f076b41 100644
--- a/dbaccess/source/ui/control/curledit.cxx
+++ b/dbaccess/source/ui/control/curledit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,12 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_CURLEDIT_HXX_
#include "curledit.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
+#include <osl/diagnose.h>
//.........................................................................
namespace dbaui
@@ -66,7 +64,7 @@ OConnectionURLEdit::~OConnectionURLEdit()
//-------------------------------------------------------------------------
void OConnectionURLEdit::SetTextNoPrefix(const String& _rText)
{
- DBG_ASSERT(GetSubEdit(), "OConnectionURLEdit::SetTextNoPrefix: have no current type, not changing the text!");
+ OSL_ENSURE(GetSubEdit(), "OConnectionURLEdit::SetTextNoPrefix: have no current type, not changing the text!");
if (GetSubEdit())
GetSubEdit()->SetText(_rText);
}
@@ -156,3 +154,4 @@ void OConnectionURLEdit::ShowPrefix(sal_Bool _bShowPrefix)
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index ad67547ea..4bce0d3b8 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,56 +29,24 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_DBTREELISTBOX_HXX
#include "dbtreelistbox.hxx"
-#endif
-#ifndef _DBU_RESOURCE_HRC_
#include "dbu_resource.hrc"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _DBAUI_LISTVIEWITEMS_HXX_
#include "listviewitems.hxx"
-#endif
-#ifndef _DBACCESS_UI_CALLBACKS_HXX_
#include "callbacks.hxx"
-#endif
-#ifndef _COM_SUN_STAR_DATATRANSFER_DND_XDRAGGESTURELISTENER_HDL_
#include <com/sun/star/datatransfer/dnd/XDragGestureListener.hdl>
-#endif
-#ifndef _COM_SUN_STAR_DATATRANSFER_DND_XDRAGGESTURERECOGNIZER_HPP_
#include <com/sun/star/datatransfer/dnd/XDragGestureRecognizer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_XCONTEXTMENUINTERCEPTOR_HPP_
#include <com/sun/star/ui/XContextMenuInterceptor.hpp>
-#endif
#include <com/sun/star/frame/XFrame.hpp>
-#ifndef _COM_SUN_STAR_UTIL_URL_HPP_
#include <com/sun/star/util/URL.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
-#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
#include <cppuhelper/interfacecontainer.hxx>
-#endif
-#ifndef _SV_HELP_HXX
#include <vcl/help.hxx>
-#endif
-#ifndef _DBAUI_TABLETREE_HRC_
#include "tabletree.hrc"
-#endif
-#ifndef DBAUI_ICONTROLLER_HXX
#include "IController.hxx"
-#endif
-#ifndef __FRAMEWORK_HELPER_ACTIONTRIGGERHELPER_HXX_
#include <framework/actiontriggerhelper.hxx>
-#endif
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/helper/vclunohelper.hxx>
-#endif
#include <framework/imageproducer.hxx>
#include <vcl/svapp.hxx>
#include <memory>
@@ -97,7 +66,7 @@ using namespace ::com::sun::star::ui;
using namespace ::com::sun::star::view;
DBG_NAME(DBTreeListBox)
-#define SPACEBETWEENENTRIES 4
+#define SPACEBETWEENENTRIES 4
//========================================================================
// class DBTreeListBox
//========================================================================
@@ -123,7 +92,7 @@ DBTreeListBox::DBTreeListBox( Window* pParent, const Reference< XMultiServiceFac
,m_xORB(_rxORB)
{
DBG_CTOR(DBTreeListBox,NULL);
- init();
+ init();
}
// -----------------------------------------------------------------------------
void DBTreeListBox::init()
@@ -152,15 +121,15 @@ DBTreeListBox::~DBTreeListBox()
//------------------------------------------------------------------------
SvLBoxEntry* DBTreeListBox::GetEntryPosByName( const String& aName, SvLBoxEntry* pStart, const IEntryFilter* _pFilter ) const
{
- SvLBoxTreeList* myModel = GetModel();
+ SvLBoxTreeList* myModel = GetModel();
SvTreeEntryList* pChilds = myModel->GetChildList(pStart);
SvLBoxEntry* pEntry = NULL;
if ( pChilds )
{
- sal_uLong nCount = pChilds->Count();
- for (sal_uLong i=0; i < nCount; ++i)
+ size_t nCount = pChilds->size();
+ for (size_t i = 0; i < nCount; ++i)
{
- pEntry = static_cast<SvLBoxEntry*>(pChilds->GetObject(i));
+ pEntry = static_cast<SvLBoxEntry*>((*pChilds)[ i ]);
SvLBoxString* pItem = (SvLBoxString*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
if ( pItem->GetText().Equals(aName) )
{
@@ -188,7 +157,7 @@ void DBTreeListBox::RequestingChilds( SvLBoxEntry* pParent )
{
if (!m_aPreExpandHandler.Call(pParent))
{
- // an error occured. The method calling us will reset the entry flags, so it can't be expanded again.
+ // an error occurred. The method calling us will reset the entry flags, so it can't be expanded again.
// But we want that the user may do a second try (i.e. because he misstypes a password in this try), so
// we have to reset these flags controlling the expand ability
PostUserEvent(LINK(this, DBTreeListBox, OnResetEntry), pParent);
@@ -382,7 +351,7 @@ void DBTreeListBox::RequestHelp( const HelpEvent& rHEvt )
void DBTreeListBox::KeyInput( const KeyEvent& rKEvt )
{
KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction();
- sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
sal_Bool bHandled = sal_False;
if(eFunc != KEYFUNC_DONTKNOW)
@@ -436,11 +405,9 @@ void DBTreeListBox::KeyInput( const KeyEvent& rKEvt )
// is used by the document will raise a similar bug once somebody discovers it.
// If this is the case, we should discuss a real solution with the framework (SFX) and the
// applications.
- //
- // 2002-12-02 - 105831 - fs@openoffice.org
}
- if ( !bHandled )
+ if ( !bHandled )
SvTreeListBox::KeyInput(rKEvt);
}
// -----------------------------------------------------------------------------
@@ -460,7 +427,7 @@ sal_Bool DBTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewT
m_aSelectedEntries.erase( pEntry );
}
SetEntryText(pEntry,aEntry.aNewText);
-
+
return sal_False; // we never want that the base change our text
}
@@ -548,7 +515,7 @@ namespace
{
lcl_adjustMenuItemIDs( *pPopup, _rCommandController );
continue;
- } // if ( pPopup )
+ }
const sal_uInt16 nCommandId = _rCommandController.registerCommandURL( aCommand );
_rMenu.InsertItem( nCommandId, _rMenu.GetItemText( nId ), _rMenu.GetItemImage( nId ),
@@ -566,8 +533,6 @@ namespace
}
void lcl_insertMenuItemImages( Menu& _rMenu, IController& _rCommandController )
{
- const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- const sal_Bool bHiContrast = rSettings.GetHighContrastMode();
uno::Reference< frame::XController > xController = _rCommandController.getXController();
uno::Reference< frame::XFrame> xFrame;
if ( xController.is() )
@@ -586,10 +551,10 @@ namespace
{
lcl_insertMenuItemImages( *pPopup, _rCommandController );
continue;
- } // if ( pPopup )
+ }
if ( xFrame.is() )
- _rMenu.SetItemImage(nId,framework::GetImageFromURL(xFrame,aCommand,sal_False,bHiContrast));
+ _rMenu.SetItemImage(nId,framework::GetImageFromURL(xFrame,aCommand,sal_False));
}
}
// =========================================================================
@@ -625,24 +590,24 @@ namespace
throw IllegalArgumentException();
// API bug: this should be a NoSupportException
}
-
+
//--------------------------------------------------------------------
Any SAL_CALL SelectionSupplier::getSelection( ) throw (RuntimeException)
{
return m_aSelection;
}
-
+
//--------------------------------------------------------------------
void SAL_CALL SelectionSupplier::addSelectionChangeListener( const Reference< XSelectionChangeListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SelectionSupplier::removeSelectionChangeListener: no support!" );
+ OSL_FAIL( "SelectionSupplier::removeSelectionChangeListener: no support!" );
// API bug: this should be a NoSupportException
}
-
+
//--------------------------------------------------------------------
void SAL_CALL SelectionSupplier::removeSelectionChangeListener( const Reference< XSelectionChangeListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SelectionSupplier::removeSelectionChangeListener: no support!" );
+ OSL_FAIL( "SelectionSupplier::removeSelectionChangeListener: no support!" );
// API bug: this should be a NoSupportException
}
}
@@ -702,7 +667,7 @@ PopupMenu* DBTreeListBox::CreateContextMenu( void )
break;
default:
- DBG_ERROR( "DBTreeListBox::CreateContextMenu: unexpected return value of the interceptor call!" );
+ OSL_FAIL( "DBTreeListBox::CreateContextMenu: unexpected return value of the interceptor call!" );
case ContextMenuInterceptorAction_IGNORED:
break;
@@ -727,7 +692,7 @@ PopupMenu* DBTreeListBox::CreateContextMenu( void )
// the interceptors only know command URLs, but our menus primarily work
// with IDs -> we need to translate the commands to IDs
lcl_adjustMenuItemIDs( *pModifiedMenu, m_pContextMenuProvider->getCommandController() );
- } // if ( bModifiedMenu )
+ }
return pContextMenu.release();
}
@@ -744,7 +709,7 @@ IMPL_LINK(DBTreeListBox, OnTimeOut, void*, /*EMPTY_ARG*/)
{
implStopSelectionTimer();
- m_aSelChangeHdl.Call( NULL );
+ m_aSelChangeHdl.Call( NULL );
return 0L;
}
// -----------------------------------------------------------------------------
@@ -754,5 +719,7 @@ void DBTreeListBox::StateChanged( StateChangedType nStateChange )
implStopSelectionTimer();
}
// .........................................................................
-} // namespace dbaui
+} // namespace dbaui
// .........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/listviewitems.cxx b/dbaccess/source/ui/control/listviewitems.cxx
index c6b2ac805..760c6146b 100644
--- a/dbaccess/source/ui/control/listviewitems.cxx
+++ b/dbaccess/source/ui/control/listviewitems.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_LISTVIEWITEMS_HXX_
#include "listviewitems.hxx"
-#endif
//........................................................................
namespace dbaui
{
@@ -82,3 +81,4 @@ namespace dbaui
} // namespace dbaui
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/makefile.mk b/dbaccess/source/ui/control/makefile.mk
deleted file mode 100644
index 76857497c..000000000
--- a/dbaccess/source/ui/control/makefile.mk
+++ /dev/null
@@ -1,78 +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=uicontrols
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files -------------------------------------
-
-# ... resource files ............................
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- TableGrantCtrl.src \
- undosqledit.src \
- tabletree.src
-
-# ... exception files .........................
-
-EXCEPTIONSFILES=\
- $(SLO)$/statusbarontroller.obj \
- $(SLO)$/RelationControl.obj \
- $(SLO)$/toolboxcontroller.obj \
- $(SLO)$/tabletree.obj \
- $(SLO)$/TableGrantCtrl.obj \
- $(SLO)$/dbtreelistbox.obj \
- $(SLO)$/sqledit.obj \
- $(SLO)$/ColumnControlWindow.obj \
- $(SLO)$/FieldDescControl.obj \
- $(SLO)$/opendoccontrols.obj
-
-# ... object files ............................
-
-SLOFILES= \
- $(EXCEPTIONSFILES) \
- $(SLO)$/ScrollHelper.obj \
- $(SLO)$/VertSplitView.obj \
- $(SLO)$/SqlNameEdit.obj \
- $(SLO)$/listviewitems.obj \
- $(SLO)$/undosqledit.obj \
- $(SLO)$/marktree.obj \
- $(SLO)$/curledit.obj \
- $(SLO)$/charsetlistbox.obj
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/dbaccess/source/ui/control/marktree.cxx b/dbaccess/source/ui/control/marktree.cxx
index 4f761b2d1..587a28b2d 100644
--- a/dbaccess/source/ui/control/marktree.cxx
+++ b/dbaccess/source/ui/control/marktree.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_MARKTREE_HXX_
#include "marktree.hxx"
-#endif
-#ifndef _DBU_CONTROL_HRC_
#include "dbu_control.hrc"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
//.........................................................................
namespace dbaui
@@ -157,10 +152,9 @@ SvButtonState OMarkableTreeListBox::implDetermineState(SvLBoxEntry* _pEntry)
// we did not finish the loop because at least one of the children is in tristate
eState = SV_BUTTON_TRISTATE;
- // but this means that we did not finish all the siblings of pChildLoop, so their checking may be
- // incorrect at the moment
+ // but this means that we did not finish all the siblings of pChildLoop,
+ // so their checking may be incorrect at the moment
// -> correct this
- // 88485 - 20.06.2001 - frank.schoenheit@sun.com
while (pChildLoop)
{
implDetermineState(pChildLoop);
@@ -168,9 +162,9 @@ SvButtonState OMarkableTreeListBox::implDetermineState(SvLBoxEntry* _pEntry)
}
}
else
- // none if the children is in tristate
+ // none if the children are in tristate
if (nCheckedChildren)
- // we have at least one chil checked
+ // we have at least one child checked
if (nCheckedChildren != nChildrenOverall)
// not all children are checked
eState = SV_BUTTON_TRISTATE;
@@ -245,3 +239,4 @@ void OMarkableTreeListBox::checkedButton_noBroadcast(SvLBoxEntry* _pEntry)
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx
index e389a1010..dc88dfb55 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,58 +29,27 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBACCESS_SOURCE_UI_INC_OPENDOCCONTROLS_HXX
#include "opendoccontrols.hxx"
-#endif
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_XMODULEUICONFIGURATIONMANAGERSUPPLIER_HPP_
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_XUICONFIGURATIONMANAGER_HPP_
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
-#endif
-#ifndef _COM_SUN_STAR_GRAPHIC_XGRAPHIC_HPP_
#include <com/sun/star/graphic/XGraphic.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_XIMAGEMANAGER_HPP_
#include <com/sun/star/ui/XImageManager.hpp>
-#endif
/** === end UNO includes === **/
-#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
#include <comphelper/processfactory.hxx>
-#endif
-#ifndef _SV_GRAPH_HXX
#include <vcl/graph.hxx>
-#endif
-#ifndef _SV_HELP_HXX
#include <vcl/help.hxx>
-#endif
-#ifndef INCLUDED_SVTOOLS_HISTORYOPTIONS_HXX
#include <unotools/historyoptions.hxx>
-#endif
-#ifndef _COMPHELPER_SEQUENCEASHASHMAP_HXX_
#include <comphelper/sequenceashashmap.hxx>
-#endif
-#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
-#endif
-#ifndef SVTOOLS_FILENOTATION_HXX
#include <svl/filenotation.hxx>
-#endif
+#include <osl/diagnose.h>
//........................................................................
namespace dbaui
@@ -137,7 +107,7 @@ namespace dbaui
for ( sal_Int32 i=0; i<nCount; ++i )
{
::rtl::OUString sPropertyName( aProperties[i].Name );
- if ( sPropertyName.equalsAscii("Label" ) )
+ if ( sPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Label" ) ) )
{
aProperties[i].Value >>= sLabel;
break;
@@ -216,7 +186,7 @@ namespace dbaui
//--------------------------------------------------------------------
void OpenDocumentButton::impl_init( const sal_Char* _pAsciiModuleName )
{
- DBG_ASSERT( _pAsciiModuleName, "OpenDocumentButton::impl_init: invalid module name!" );
+ OSL_ENSURE( _pAsciiModuleName, "OpenDocumentButton::impl_init: invalid module name!" );
m_sModule = ::rtl::OUString::createFromAscii( _pAsciiModuleName );
// our label should equal the UI text of the "Open" command
@@ -226,7 +196,7 @@ namespace dbaui
SetText( sLabel );
// Place icon left of text and both centered in the button.
- SetModeImage( GetCommandIcon( ".uno:Open", m_sModule ), BMP_COLOR_NORMAL );
+ SetModeImage( GetCommandIcon( ".uno:Open", m_sModule ) );
EnableImageDisplay( sal_True );
EnableTextDisplay( sal_True );
SetImageAlign( IMAGEALIGN_LEFT );
@@ -246,7 +216,7 @@ namespace dbaui
//--------------------------------------------------------------------
void OpenDocumentListBox::impl_init( const sal_Char* _pAsciiModuleName )
{
- DBG_ASSERT( _pAsciiModuleName, "OpenDocumentListBox::impl_init: invalid module name!" );
+ OSL_ENSURE( _pAsciiModuleName, "OpenDocumentListBox::impl_init: invalid module name!" );
Sequence< Sequence< PropertyValue> > aHistory = SvtHistoryOptions().GetList( ePICKLIST );
Reference< XNameAccess > xFilterFactory;
@@ -322,7 +292,7 @@ namespace dbaui
OpenDocumentListBox::StringPair OpenDocumentListBox::impl_getDocumentAtIndex( sal_uInt16 _nListIndex, bool _bSystemNotation ) const
{
MapIndexToStringPair::const_iterator pos = m_aURLs.find( _nListIndex );
- DBG_ASSERT( pos != m_aURLs.end(), "OpenDocumentListBox::impl_getDocumentAtIndex: invalid index!" );
+ OSL_ENSURE( pos != m_aURLs.end(), "OpenDocumentListBox::impl_getDocumentAtIndex: invalid index!" );
StringPair aDocumentDescriptor;
if ( pos != m_aURLs.end() )
@@ -361,3 +331,5 @@ namespace dbaui
//........................................................................
} // namespace dbaui
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 529afcea3..9f1778d9e 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -222,3 +223,5 @@ void OSqlEdit::ImplSetFont()
SetSettings(aSettings);
}
//==============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/statusbarontroller.cxx b/dbaccess/source/ui/control/statusbarontroller.cxx
index ab4ba9217..3f7205681 100644
--- a/dbaccess/source/ui/control/statusbarontroller.cxx
+++ b/dbaccess/source/ui/control/statusbarontroller.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
#include "statusbarontroller.hxx"
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
extern "C" void SAL_CALL createRegistryInfo_OStatusbarController()
{
@@ -48,3 +47,5 @@ namespace dbaui
IMPLEMENT_SERVICE_INFO1_STATIC(OStatusbarController,"com.sun.star.sdb.ApplicationStatusbarController","com.sun.star.frame.StatusbarController")
IMPLEMENT_FORWARD_XINTERFACE2(OStatusbarController,StatusbarController,OStatusbarController_BASE)
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index 8249bb37b..ef3f88953 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,75 +29,33 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_TABLETREE_HXX_
#include "tabletree.hxx"
-#endif
-#ifndef _DBAUI_TABLETREE_HRC_
#include "tabletree.hrc"
-#endif
-#ifndef DBACCESS_IMAGEPROVIDER_HXX
#include "imageprovider.hxx"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _DBU_CONTROL_HRC_
#include "dbu_control.hrc"
-#endif
-#ifndef _SV_MENU_HXX
#include <vcl/menu.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_DATABASEOBJECT_HPP_
#include <com/sun/star/sdb/application/DatabaseObject.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_DATABASEOBJECTFOLDER_HPP_
#include <com/sun/star/sdb/application/DatabaseObjectContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDRIVERACCESS_HPP_
#include <com/sun/star/sdbc/XDriverAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADEFINITIONSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XDataDefinitionSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XVIEWSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _DBAUI_COMMON_TYPES_HXX_
#include "commontypes.hxx"
-#endif
-#ifndef _DBAUI_LISTVIEWITEMS_HXX_
#include "listviewitems.hxx"
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _RTL_USTRBUF_HXX_
+#include <osl/diagnose.h>
#include <rtl/ustrbuf.hxx>
-#endif
#include <connectivity/dbmetadata.hxx>
#include <algorithm>
+#include <o3tl/compat_functional.hxx>
//.........................................................................
namespace dbaui
@@ -148,10 +107,8 @@ OTableTreeListBox::~OTableTreeListBox()
void OTableTreeListBox::implSetDefaultImages()
{
ImageProvider aImageProvider;
- SetDefaultExpandedEntryBmp( aImageProvider.getFolderImage( DatabaseObject::TABLE, false ), BMP_COLOR_NORMAL );
- SetDefaultExpandedEntryBmp( aImageProvider.getFolderImage( DatabaseObject::TABLE, true ), BMP_COLOR_HIGHCONTRAST );
- SetDefaultCollapsedEntryBmp( aImageProvider.getFolderImage( DatabaseObject::TABLE, false ), BMP_COLOR_NORMAL );
- SetDefaultCollapsedEntryBmp( aImageProvider.getFolderImage( DatabaseObject::TABLE, true ), BMP_COLOR_HIGHCONTRAST );
+ SetDefaultExpandedEntryBmp( aImageProvider.getFolderImage( DatabaseObject::TABLE ) );
+ SetDefaultCollapsedEntryBmp( aImageProvider.getFolderImage( DatabaseObject::TABLE ) );
}
// -----------------------------------------------------------------------------
@@ -182,25 +139,19 @@ void OTableTreeListBox::notifyHiContrastChanged()
{
SvLBoxContextBmp* pContextBitmapItem = static_cast< SvLBoxContextBmp* >( pItem );
- Image aImage, aImageHC;
+ Image aImage;
if ( isFolderEntry( pEntryLoop ) )
{
- aImage = m_pImageProvider->getFolderImage( DatabaseObject::TABLE, false );
- aImageHC = m_pImageProvider->getFolderImage( DatabaseObject::TABLE, true );
+ aImage = m_pImageProvider->getFolderImage( DatabaseObject::TABLE );
}
else
{
String sCompleteName( getQualifiedTableName( pEntryLoop ) );
- m_pImageProvider->getImages( sCompleteName, DatabaseObject::TABLE, aImage, aImageHC );
+ m_pImageProvider->getImages( sCompleteName, DatabaseObject::TABLE, aImage );
}
- pContextBitmapItem->SetBitmap1( aImage, BMP_COLOR_NORMAL );
- pContextBitmapItem->SetBitmap2( aImage, BMP_COLOR_NORMAL );
- pContextBitmapItem->SetBitmap1( aImageHC, BMP_COLOR_HIGHCONTRAST );
- pContextBitmapItem->SetBitmap2( aImageHC, BMP_COLOR_HIGHCONTRAST );
- // TODO: Now that we give both images to the entry item, it is not necessary anymore
- // to do this anytime HC changes - the tree control will do this itself now.
- // We would only need to properly initialize newly inserted entries.
+ pContextBitmapItem->SetBitmap1( aImage );
+ pContextBitmapItem->SetBitmap2( aImage );
break;
}
}
@@ -242,7 +193,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn
}
catch(RuntimeException&)
{
- DBG_ERROR("OTableTreeListBox::UpdateTableList : caught an RuntimeException!");
+ OSL_FAIL("OTableTreeListBox::UpdateTableList : caught an RuntimeException!");
}
catch ( const SQLException& )
{
@@ -250,7 +201,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn
}
catch(Exception&)
{
- // a non-SQLException exception occured ... simply throw an SQLException
+ // a non-SQLException exception occurred ... simply throw an SQLException
SQLException aInfo;
aInfo.Message = sCurrentActionError;
throw aInfo;
@@ -333,15 +284,13 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn
try
{
- // the root entry saying "all objects"
- SvLBoxEntry* pAllObjects = NULL;
if (haveVirtualRoot())
{
String sRootEntryText;
TNames::const_iterator aViews = ::std::find_if(_rTables.begin(),_rTables.end(),
- ::std::compose1(::std::bind2nd(::std::equal_to<sal_Bool>(),sal_False),::std::select2nd<TNames::value_type>()));
+ ::o3tl::compose1(::std::bind2nd(::std::equal_to<sal_Bool>(),sal_False),::o3tl::select2nd<TNames::value_type>()));
TNames::const_iterator aTables = ::std::find_if(_rTables.begin(),_rTables.end(),
- ::std::compose1(::std::bind2nd(::std::equal_to<sal_Bool>(),sal_True),::std::select2nd<TNames::value_type>()));
+ ::o3tl::compose1(::std::bind2nd(::std::equal_to<sal_Bool>(),sal_True),::o3tl::select2nd<TNames::value_type>()));
if ( aViews == _rTables.end() )
sRootEntryText = String(ModuleRes(STR_ALL_TABLES));
@@ -349,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));
- pAllObjects = InsertEntry( sRootEntryText, NULL, sal_False, LIST_APPEND, reinterpret_cast< void* >( DatabaseObjectContainer::TABLES ) );
+ InsertEntry( sRootEntryText, NULL, sal_False, LIST_APPEND, reinterpret_cast< void* >( DatabaseObjectContainer::TABLES ) );
}
if ( _rTables.empty() )
@@ -435,22 +384,21 @@ void OTableTreeListBox::checkedButton_noBroadcast(SvLBoxEntry* _pEntry)
{
OMarkableTreeListBox::checkedButton_noBroadcast(_pEntry);
- // if an entry has children, it makes a difference if the entry is checked because alls children are checked
- // or if the user checked it explicitly.
+ // if an entry has children, it makes a difference if the entry is checked
+ // because all children are checked or if the user checked it explicitly.
// So we track explicit (un)checking
SvButtonState eState = GetCheckButtonState(_pEntry);
- DBG_ASSERT(SV_BUTTON_TRISTATE != eState, "OTableTreeListBox::CheckButtonHdl: user action which lead to TRISTATE?");
+ OSL_ENSURE(SV_BUTTON_TRISTATE != eState, "OTableTreeListBox::CheckButtonHdl: user action which lead to TRISTATE?");
implEmphasize(_pEntry, SV_BUTTON_CHECKED == eState);
}
//------------------------------------------------------------------------
void OTableTreeListBox::implEmphasize(SvLBoxEntry* _pEntry, sal_Bool _bChecked, sal_Bool _bUpdateDescendants, sal_Bool _bUpdateAncestors)
{
- DBG_ASSERT(_pEntry, "OTableTreeListBox::implEmphasize: invalid entry (NULL)!");
+ OSL_ENSURE(_pEntry, "OTableTreeListBox::implEmphasize: invalid entry (NULL)!");
// special emphasizing handling for the "all objects" entry
- // 89709 - 16.07.2001 - frank.schoenheit@sun.com
sal_Bool bAllObjectsEntryAffected = haveVirtualRoot() && (getAllObjectsEntry() == _pEntry);
if ( GetModel()->HasChilds(_pEntry) // the entry has children
|| bAllObjectsEntryAffected // or it is the "all objects" entry
@@ -491,9 +439,9 @@ void OTableTreeListBox::InitEntry(SvLBoxEntry* _pEntry, const XubString& _rStrin
// replace the text item with our own one
SvLBoxItem* pTextItem = _pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING);
- DBG_ASSERT(pTextItem, "OTableTreeListBox::InitEntry: no text item!?");
+ OSL_ENSURE(pTextItem, "OTableTreeListBox::InitEntry: no text item!?");
sal_uInt16 nTextPos = _pEntry->GetPos(pTextItem);
- DBG_ASSERT(((sal_uInt16)-1) != nTextPos, "OTableTreeListBox::InitEntry: no text item pos!");
+ OSL_ENSURE(((sal_uInt16)-1) != nTextPos, "OTableTreeListBox::InitEntry: no text item pos!");
_pEntry->ReplaceItem(new OBoldListboxString(_pEntry, 0, _rString), nTextPos);
}
@@ -550,13 +498,11 @@ SvLBoxEntry* OTableTreeListBox::implAddEntry(
{
pRet = InsertEntry( sName, pParentEntry, sal_False, LIST_APPEND );
- Image aImage, aImageHC;
- m_pImageProvider->getImages( _rTableName, DatabaseObject::TABLE, aImage, aImageHC );
+ Image aImage;
+ m_pImageProvider->getImages( _rTableName, DatabaseObject::TABLE, aImage );
- SetExpandedEntryBmp( pRet, aImage, BMP_COLOR_NORMAL );
- SetCollapsedEntryBmp( pRet, aImage, BMP_COLOR_NORMAL );
- SetExpandedEntryBmp( pRet, aImageHC, BMP_COLOR_HIGHCONTRAST );
- SetCollapsedEntryBmp( pRet, aImageHC, BMP_COLOR_HIGHCONTRAST );
+ SetExpandedEntryBmp( pRet, aImage );
+ SetCollapsedEntryBmp( pRet, aImage );
}
return pRet;
}
@@ -736,3 +682,4 @@ void OTableTreeListBox::removedTable( const ::rtl::OUString& _rName )
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/tabletree.src b/dbaccess/source/ui/control/tabletree.src
index 26342fe28..71f3945e2 100644
--- a/dbaccess/source/ui/control/tabletree.src
+++ b/dbaccess/source/ui/control/tabletree.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,7 +33,6 @@
#endif
#include "browserids.hxx"
-
Menu MENU_TABLETREE_POPUP
{
ItemList =
@@ -65,24 +64,28 @@ String STR_COULDNOTCONNECT
{
Text [ en-US ] = "No connection could be established for the URL #connurl#.";
};
+
String STR_COULDNOTCONNECT_PLEASECHECK
{
Text [ en-US ] = "Please check the current settings, for example user name and password.";
};
+
String STR_NOTABLEINFO
{
Text [ en-US ] = "Successfully connected, but information about database tables is not available.";
};
+
String STR_ALL_TABLES
{
Text [ en-US ] = "All tables";
};
+
String STR_ALL_VIEWS
{
Text [ en-US ] = "All views";
};
+
String STR_ALL_TABLES_AND_VIEWS
{
Text [ en-US ] = "All tables and views";
};
-
diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx
index 40feaf0f1..2c5d84bd2 100644
--- a/dbaccess/source/ui/control/toolboxcontroller.cxx
+++ b/dbaccess/source/ui/control/toolboxcontroller.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,66 +28,26 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBACCESS_TOOLBOXCONTROLLER_HXX
#include "toolboxcontroller.hxx"
-#endif
-#ifndef _COM_SUN_STAR_UI_IMAGETYPE_HPP_
#include <com/sun/star/ui/ImageType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_
#include <com/sun/star/frame/XDispatchProvider.hpp>
-#endif
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/helper/vclunohelper.hxx>
-#endif
-#ifndef _SV_MENU_HXX
#include <vcl/menu.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UI_XUICONFIGURATIONMANAGER_HPP_
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_XMODULEUICONFIGURATIONMANAGERSUPPLIER_HPP_
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_XIMAGEMANAGER_HPP_
#include <com/sun/star/ui/XImageManager.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_IMAGETYPE_HPP_
#include <com/sun/star/ui/ImageType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_GRAPHIC_XGRAPHIC_HPP_
#include <com/sun/star/graphic/XGraphic.hpp>
-#endif
-#ifndef _SV_SVAPP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_TOOLBOX_HXX
#include <vcl/toolbox.hxx>
-#endif
-#ifndef _DBU_RESOURCE_HRC_
#include "dbu_resource.hrc"
-#endif
-#ifndef INCLUDED_SVTOOLS_MISCOPT_HXX
#include <svtools/miscopt.hxx>
-#endif
-#ifndef INCLUDED_SVTOOLS_MODULEOPTIONS_HXX
#include <unotools/moduleoptions.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef INCLUDED_SVTOOLS_MENUOPTIONS_HXX
#include <svtools/menuoptions.hxx>
-#endif
-#ifndef _VOS_MUTEX_HXX_
-#include <vos/mutex.hxx>
-#endif
-#ifndef _DBU_REGHELPER_HXX_
+#include <osl/mutex.hxx>
#include "dbu_reghelper.hxx"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
extern "C" void SAL_CALL createRegistryInfo_OToolboxController()
@@ -151,10 +112,10 @@ namespace dbaui
void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments ) throw (Exception, RuntimeException)
{
ToolboxController::initialize(_rArguments);
- vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarMutexGuard;
::osl::MutexGuard aGuard(m_aMutex);
- if ( m_aCommandURL.equalsAscii(".uno:DBNewForm") )
+ if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:DBNewForm")) )
{
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewForm")) ,sal_True));
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewView")) ,sal_True));
@@ -197,7 +158,7 @@ namespace dbaui
// -----------------------------------------------------------------------------
void SAL_CALL OToolboxController::statusChanged( const FeatureStateEvent& Event ) throw ( RuntimeException )
{
- vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarMutexGuard;
::osl::MutexGuard aGuard(m_aMutex);
TCommandState::iterator aFind = m_aStates.find( Event.FeatureURL.Complete );
if ( aFind != m_aStates.end() )
@@ -231,8 +192,6 @@ namespace dbaui
{
pMenu.reset( new PopupMenu( ModuleRes( RID_MENU_APP_NEW ) ) );
- sal_Bool bHighContrast = isHighContrast();
-
try
{
Reference<XModuleUIConfigurationManagerSupplier> xModuleCfgMgrSupplier(getServiceManager()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"))),UNO_QUERY);
@@ -241,8 +200,6 @@ namespace dbaui
short nImageType = hasBigImages() ? ImageType::SIZE_LARGE : ImageType::SIZE_DEFAULT;
- if ( bHighContrast )
- nImageType |= ImageType::COLOR_HIGHCONTRAST;
Sequence< ::rtl::OUString> aSeq(1);
sal_uInt16 nCount = pMenu->GetItemCount();
@@ -279,7 +236,7 @@ namespace dbaui
Reference< ::com::sun::star::awt::XWindow > SAL_CALL OToolboxController::createPopupWindow() throw (RuntimeException)
{
// execute the menu
- vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarMutexGuard;
::osl::MutexGuard aGuard(m_aMutex);
ToolBox* pToolBox = static_cast<ToolBox*>(VCLUnoHelper::GetWindow(getParent()));
@@ -319,3 +276,4 @@ namespace dbaui
//..........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/undosqledit.cxx b/dbaccess/source/ui/control/undosqledit.cxx
index c72bb112d..d69acc0c3 100644
--- a/dbaccess/source/ui/control/undosqledit.cxx
+++ b/dbaccess/source/ui/control/undosqledit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,12 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_GENERALUNDO_HXX
#include "undosqledit.hxx"
-#endif
-#ifndef DBAUI_SQLEDIT_HXX
#include "sqledit.hxx"
-#endif
namespace dbaui
{
@@ -48,3 +45,4 @@ void OSqlEditUndoAct::ToggleText()
} // namespace
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/control/undosqledit.src b/dbaccess/source/ui/control/undosqledit.src
index 09884a24b..aab44ad5e 100644
--- a/dbaccess/source/ui/control/undosqledit.src
+++ b/dbaccess/source/ui/control/undosqledit.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,34 +33,3 @@ String STR_QUERY_UNDO_MODIFYSQLEDIT
{
Text [ en-US ] = "Modify SQL statement(s)" ;
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dbaccess/source/ui/dlg/AdabasStat.cxx b/dbaccess/source/ui/dlg/AdabasStat.cxx
index 07bccff1c..6f29f4646 100644
--- a/dbaccess/source/ui/dlg/AdabasStat.cxx
+++ b/dbaccess/source/ui/dlg/AdabasStat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,51 +29,21 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _DBAUI_ADASTAT_HXX_
+#include <osl/diagnose.h>
#include "AdabasStat.hxx"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XSTATEMENT_HPP_
#include <com/sun/star/sdbc/XStatement.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_
#include <com/sun/star/sdbc/XResultSet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef DBAUI_ADABASSTAT_HRC
#include "AdabasStat.hrc"
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
using namespace dbaui;
DBG_NAME(OAdabasStatistics)
@@ -113,7 +84,7 @@ OAdabasStatistics::OAdabasStatistics( Window* pParent,
FreeResource();
- DBG_ASSERT(m_xConnection.is(),"No connection");
+ OSL_ENSURE(m_xConnection.is(),"No connection");
if(m_xConnection.is())
{
Reference<XStatement> xStmt;
@@ -128,14 +99,14 @@ OAdabasStatistics::OAdabasStatistics( Window* pParent,
try
{
xMetaData = m_xConnection->getMetaData();
- bCanSelect = checkSystemTable(::rtl::OUString::createFromAscii("SERVERDBSTATISTICS"),sSchema);
+ bCanSelect = checkSystemTable(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SERVERDBSTATISTICS")), sSchema);
if(bCanSelect)
{
- aStmt = ::rtl::OUString::createFromAscii("SELECT SERVERDBSIZE, UNUSEDPAGES FROM ");
+ aStmt = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT SERVERDBSIZE, UNUSEDPAGES FROM "));
aStmt += ::dbtools::quoteTableName(xMetaData,sSchema,::dbtools::eInDataManipulation);
- aStmt += ::rtl::OUString::createFromAscii(".\"SERVERDBSTATISTICS\"");
+ aStmt += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".\"SERVERDBSTATISTICS\""));
xStmt = m_xConnection->createStatement();
xRes = xStmt->executeQuery(aStmt);
@@ -182,14 +153,14 @@ OAdabasStatistics::OAdabasStatistics( Window* pParent,
{
try
{
- bCanSelect = checkSystemTable(::rtl::OUString::createFromAscii("DATADEVSPACES"),sSchema);
+ bCanSelect = checkSystemTable(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATADEVSPACES")), sSchema);
if(bCanSelect)
{
// then the db files
- aStmt = ::rtl::OUString::createFromAscii("SELECT DEVSPACENAME FROM ");
+ aStmt = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT DEVSPACENAME FROM "));
aStmt += ::dbtools::quoteTableName(xMetaData,sSchema,::dbtools::eInDataManipulation);
- aStmt += ::rtl::OUString::createFromAscii(".\"DATADEVSPACES\"");
+ aStmt += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".\"DATADEVSPACES\""));
xStmt = m_xConnection->createStatement();
xRes = xStmt->executeQuery(aStmt);
@@ -226,13 +197,13 @@ OAdabasStatistics::OAdabasStatistics( Window* pParent,
{
try
{
- bCanSelect = checkSystemTable(::rtl::OUString::createFromAscii("CONFIGURATION"),sSchema);
+ bCanSelect = checkSystemTable(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CONFIGURATION")), sSchema);
if(bCanSelect)
{
- aStmt = ::rtl::OUString::createFromAscii("SELECT * FROM ");
+ aStmt = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT * FROM "));
aStmt += ::dbtools::quoteTableName(xMetaData,sSchema,::dbtools::eInDataManipulation);
- aStmt += ::rtl::OUString::createFromAscii(".CONFIGURATION WHERE DESCRIPTION LIKE 'SYS%DEVSPACE%NAME'");
+ aStmt += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".CONFIGURATION WHERE DESCRIPTION LIKE 'SYS%DEVSPACE%NAME'"));
xStmt = m_xConnection->createStatement();
xRes = xStmt->executeQuery(aStmt);
if(xRes.is() && xRes->next())
@@ -243,9 +214,9 @@ OAdabasStatistics::OAdabasStatistics( Window* pParent,
else
showError();
- aStmt = ::rtl::OUString::createFromAscii("SELECT * FROM ");
+ aStmt = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT * FROM "));
aStmt += ::dbtools::quoteTableName(xMetaData,sSchema,::dbtools::eInDataManipulation);
- aStmt += ::rtl::OUString::createFromAscii(".CONFIGURATION WHERE DESCRIPTION = 'TRANSACTION LOG NAME'");
+ aStmt += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".CONFIGURATION WHERE DESCRIPTION = 'TRANSACTION LOG NAME'"));
xRes = xStmt->executeQuery(aStmt);
if(xRes.is() && xRes->next())
{
@@ -297,11 +268,11 @@ sal_Bool OAdabasStatistics::checkSystemTable(const ::rtl::OUString& _rsSystemTab
Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData();
if ( xMeta.is() )
{
- Reference<XResultSet> xRes = xMeta->getTablePrivileges(Any(),::rtl::OUString::createFromAscii("%"), _rsSystemTable);
+ Reference<XResultSet> xRes = xMeta->getTablePrivileges(Any(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")), _rsSystemTable);
if(xRes.is())
{
Reference<XRow> xRow(xRes,UNO_QUERY);
- static const ::rtl::OUString sSelect = ::rtl::OUString::createFromAscii("SELECT");
+ static const ::rtl::OUString sSelect(RTL_CONSTASCII_USTRINGPARAM("SELECT"));
// first the db sizes
while( xRow.is() && xRes->next() )
{
@@ -331,3 +302,4 @@ void OAdabasStatistics::showError()
// -----------------------------------------------------------------------------
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/AdabasStat.hxx b/dbaccess/source/ui/dlg/AdabasStat.hxx
index b9e7bcdb1..f9cec381c 100644
--- a/dbaccess/source/ui/dlg/AdabasStat.hxx
+++ b/dbaccess/source/ui/dlg/AdabasStat.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,27 +28,13 @@
#ifndef _DBAUI_ADASTAT_HXX_
#define _DBAUI_ADASTAT_HXX_
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
-#ifndef _SV_DIALOG_HXX
#include <vcl/dialog.hxx>
-#endif
-#ifndef DBAUI_FIELDCONTROLS_HXX
#include "FieldControls.hxx"
-#endif
-#ifndef _PRGSBAR_HXX
#include <svtools/prgsbar.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
namespace dbaui
@@ -96,3 +83,4 @@ namespace dbaui
#endif //_DBAUI_ADASTAT_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/AdabasStat.src b/dbaccess/source/ui/dlg/AdabasStat.src
index 95932e67f..bb083ade5 100644
--- a/dbaccess/source/ui/dlg/AdabasStat.src
+++ b/dbaccess/source/ui/dlg/AdabasStat.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -206,33 +206,3 @@ String STR_ADABAS_ERROR_SYSTEMTABLES
{
Text [ en-US ] = "No information could be displayed because no access rights exist for the required system tables.";
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dbaccess/source/ui/dlg/AutoControls.src b/dbaccess/source/ui/dlg/AutoControls.src
index 9036489b3..e43e2a13a 100644
--- a/dbaccess/source/ui/dlg/AutoControls.src
+++ b/dbaccess/source/ui/dlg/AutoControls.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -69,13 +69,11 @@ String STR_MSACCESS_MDB_FILE
Text[ en-US ] = "Microsoft Access database file";
};
-
String STR_NO_ADDITIONAL_SETTINGS
{
Text[ en-US ] = "No more settings are necessary. To verify that the connection is working, click the '%test' button.";
};
-
String STR_COMMONURL
{
Text [ en-US ] = "Datasource URL" ;
@@ -85,18 +83,15 @@ String STR_HOSTNAME
{
Text[ en-US ] = "~Host name";
};
+
String STR_MOZILLA_PROFILE_NAME
{
Text[ en-US ] = "~Mozilla profile name";
};
+
String STR_THUNDERBIRD_PROFILE_NAME
{
Text[ en-US ] = "~Thunderbird profile name";
};
-
// -------------------------------------------------------------------------------------------------
-
-
-
-
diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx
index 3203535f8..a6f0c824b 100644
--- a/dbaccess/source/ui/dlg/CollectionView.cxx
+++ b/dbaccess/source/ui/dlg/CollectionView.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,90 +28,34 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_COLLECTIONVIEW_HXX
#include "CollectionView.hxx"
-#endif
-#ifndef DBAUI_COLLECTIONVIEW_HRC
#include "CollectionView.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _COMPHELPER_INTERACTION_HXX_
#include <comphelper/interaction.hxx>
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/helper/vclunohelper.hxx>
-#endif
-#ifndef SVT_QUERYFOLDER_HXX
#include <svtools/QueryFolderName.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
#include <com/sun/star/lang/XInitialization.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
#include <com/sun/star/container/XChild.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XHIERARCHICALNAMECONTAINER_HPP_
#include <com/sun/star/container/XHierarchicalNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_INTERACTIVEAUGMENTEDIOEXCEPTION_HPP_
#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_IOERRORCODE_HPP_
#include <com/sun/star/ucb/IOErrorCode.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_
#include <com/sun/star/task/XInteractionHandler.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_INTERACTIONCLASSIFICATION_HPP_
#include <com/sun/star/task/InteractionClassification.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_SQLEXCEPTION_HPP_
#include <com/sun/star/sdbc/SQLException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
#include <com/sun/star/awt/XWindow.hpp>
-#endif
-#ifndef INCLUDED_SVTOOLS_VIEWOPTIONS_HXX
#include <unotools/viewoptions.hxx>
-#endif
-#ifndef _OSL_THREAD_H_
#include <osl/thread.h>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
#define FILEDIALOG_DEF_IMAGEBORDER 10
//.........................................................................
@@ -162,9 +107,7 @@ OCollectionView::OCollectionView( Window * pParent
m_aNewFolder.SetStyle( m_aNewFolder.GetStyle() | WB_NOPOINTERFOCUS );
m_aUp.SetModeImage(ModuleRes(IMG_NAVIGATION_BTN_UP_SC));
- m_aUp.SetModeImage(ModuleRes(IMG_NAVIGATION_BTN_UP_SCH),BMP_COLOR_HIGHCONTRAST);
m_aNewFolder.SetModeImage(ModuleRes(IMG_NAVIGATION_CREATEFOLDER_SC));
- m_aNewFolder.SetModeImage(ModuleRes(IMG_NAVIGATION_CREATEFOLDER_SCH),BMP_COLOR_HIGHCONTRAST);
m_aView.SetDoubleClickHdl( LINK( this, OCollectionView, Dbl_Click_FileView ) );
m_aView.EnableAutoResize();
@@ -268,7 +211,6 @@ IMPL_LINK( OCollectionView, Save_Click, PushButton*, EMPTYARG )
QueryBox aBox( this, WB_YES_NO, ModuleRes( STR_ALREADYEXISTOVERWRITE ) );
if ( aBox.Execute() != RET_YES )
return 0;
- // xNameContainer->removeByName(sName);
}
m_aName.SetText(sName);
EndDialog( sal_True );
@@ -395,3 +337,4 @@ void OCollectionView::initCurrentPath()
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/CollectionView.src b/dbaccess/source/ui/dlg/CollectionView.src
index ac5cecec1..bdb50859a 100644
--- a/dbaccess/source/ui/dlg/CollectionView.src
+++ b/dbaccess/source/ui/dlg/CollectionView.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,19 +43,17 @@
#define FIXEDLINE_HEIGHT 1
#define IMG_SIZE 15
-
ModalDialog DLG_COLLECTION_VIEW
{
OutputSize = TRUE ;
SVLook = TRUE ;
Moveable = TRUE ;
Closeable = TRUE ;
- //Sizeable = TRUE;
HelpId = HID_EXPLORERDLG_COLLECTION ;
Size = MAP_APPFONT ( WIN_X , WIN_Y ) ;
Text [ en-US ] = "Save" ;
-
+
FixedText FT_EXPLORERFILE_CURRENTPATH
{
Pos = MAP_APPFONT ( UNRELATED_CONTROLS , UNRELATED_CONTROLS ) ;
@@ -78,7 +76,7 @@ ModalDialog DLG_COLLECTION_VIEW
Size = MAP_APPFONT ( IMG_SIZE , IMG_SIZE ) ;
QuickHelpText [ en-US ] = "Up One Level" ;
};
-
+
Control CTRL_VIEW
{
TabStop = TRUE ;
@@ -101,13 +99,13 @@ ModalDialog DLG_COLLECTION_VIEW
Border = TRUE ;
TabStop = TRUE ;
};
-
+
FixedLine FL_1
{
Pos = MAP_APPFONT ( 0 , WIN_Y - 2*UNRELATED_CONTROLS - BUTTON_HEIGHT - FIXEDLINE_HEIGHT) ;
Size = MAP_APPFONT ( WIN_X , FIXEDLINE_HEIGHT ) ;
};
-
+
PushButton BTN_EXPLORERFILE_SAVE
{
HelpID = "dbaccess:PushButton:DLG_COLLECTION_VIEW:BTN_EXPLORERFILE_SAVE";
@@ -117,22 +115,21 @@ ModalDialog DLG_COLLECTION_VIEW
TabStop = TRUE ;
Text [ en-US ] = "Save" ;
};
-
+
CancelButton PB_CANCEL
{
TabStop = TRUE ;
- Pos = MAP_APPFONT ( WIN_X - 2*UNRELATED_CONTROLS - 100, WIN_Y - UNRELATED_CONTROLS - BUTTON_HEIGHT ) ;
+ Pos = MAP_APPFONT ( WIN_X - 2*UNRELATED_CONTROLS - 100, WIN_Y - UNRELATED_CONTROLS - BUTTON_HEIGHT ) ;
Size = MAP_APPFONT ( 50 , BUTTON_HEIGHT ) ;
};
-
+
HelpButton PB_HELP
{
TabStop = TRUE ;
- Pos = MAP_APPFONT ( WIN_X - UNRELATED_CONTROLS - 50, WIN_Y - UNRELATED_CONTROLS - BUTTON_HEIGHT ) ;
+ Pos = MAP_APPFONT ( WIN_X - UNRELATED_CONTROLS - 50, WIN_Y - UNRELATED_CONTROLS - BUTTON_HEIGHT ) ;
Size = MAP_APPFONT ( 50 , BUTTON_HEIGHT ) ;
};
-
-
+
String STR_PATHNAME
{
Text [ en-US ] = "~Path:" ;
@@ -143,29 +140,20 @@ String STR_NEW_FOLDER
{
Text [ en-US ] = "Folder" ;
};
+
Image IMG_NAVIGATION_BTN_UP_SC
{
- ImageBitmap = Bitmap { File = "fp010"; };
- MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
-};
-Image IMG_NAVIGATION_BTN_UP_SCH
-{
- ImageBitmap = Bitmap { File = "fph010"; };
+ ImageBitmap = Bitmap { File = "fp010"; };
MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
};
+
Image IMG_NAVIGATION_CREATEFOLDER_SC
{
ImageBitmap = Bitmap { File = "fp015"; };
MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
};
-Image IMG_NAVIGATION_CREATEFOLDER_SCH
-{
- ImageBitmap = Bitmap { File = "fph015"; };
- MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
-};
String STR_ALREADYEXISTOVERWRITE
{
Text [ en-US ] = "The file already exists. Overwrite?" ;
};
-
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 2bc63154a..17fb0ee2f 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,6 @@
#include "dsnItem.hxx"
#include "ConnectionHelper.hxx"
-#include "AutoControlsDef.hrc"
#include "dbu_dlg.hrc"
#include "dbu_misc.hrc"
#include <svl/itemset.hxx>
@@ -44,6 +44,7 @@
#include "dbaccess_helpid.hrc"
#include "localresaccess.hxx"
#include <osl/process.h>
+#include <osl/diagnose.h>
#include <vcl/msgbox.hxx>
#include <sfx2/filedlghelper.hxx>
#include "dbadmin.hxx"
@@ -57,7 +58,6 @@
#include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/awt/XWindow.hpp>
-// #106016# ------------------------------------
#include <com/sun/star/task/XInteractionHandler.hpp>
#include <com/sun/star/ucb/XProgressHandler.hpp>
#include "UITools.hxx"
@@ -69,27 +69,13 @@
#include <tools/urlobj.hxx>
#include <tools/diagnose_ex.h>
#include <sfx2/docfilt.hxx>
-#if !defined(WINDOWS_VISTA_PSDK) && defined(WNT)
-#define _ADO_DATALINK_BROWSE_
-#endif
#ifdef _ADO_DATALINK_BROWSE_
-#if defined( WNT )
- #include <tools/prewin.h>
- #include <windows.h>
- #include <tools/postwin.h>
-#endif
-#ifndef _SV_SYSDATA_HXX
#include <vcl/sysdata.hxx>
-#endif
-#ifndef _DBAUI_ADO_DATALINK_HXX_
#include "adodatalinks.hxx"
-#endif
#endif //_ADO_DATALINK_BROWSE_
-#ifndef _COM_SUN_STAR_MOZILLA_XMOZILLABOOTSTRAP_HPP_
#include <com/sun/star/mozilla/XMozillaBootstrap.hpp>
-#endif
#include <unotools/processfactory.hxx>
@@ -125,7 +111,7 @@ DBG_NAME(OConnectionHelper)
if (pCollectionItem)
m_pCollection = pCollectionItem->getCollection();
m_aPB_Connection.SetClickHdl(LINK(this, OConnectionHelper, OnBrowseConnections));
- DBG_ASSERT(m_pCollection, "OConnectionHelper::OConnectionHelper : really need a DSN type collection !");
+ OSL_ENSURE(m_pCollection, "OConnectionHelper::OConnectionHelper : really need a DSN type collection !");
m_aConnectionURL.SetTypeCollection(m_pCollection);
}
@@ -189,7 +175,7 @@ DBG_NAME(OConnectionHelper)
{
try
{
- ::rtl::OUString sFolderPickerService = ::rtl::OUString::createFromAscii(SERVICE_UI_FOLDERPICKER);
+ ::rtl::OUString sFolderPickerService(SERVICE_UI_FOLDERPICKER);
Reference< XFolderPicker > xFolderPicker(m_xORB->createInstance(sFolderPickerService), UNO_QUERY);
if (!xFolderPicker.is())
{
@@ -333,7 +319,6 @@ DBG_NAME(OConnectionHelper)
if (RET_OK == aSelector.Execute())
{
setURLNoPrefix(aSelector.GetSelected());
- // checkCreateDatabase( ::dbaccess::DST_ADABAS);
SetRoadmapStateValue(sal_True);
callModifiedHdl();
}
@@ -411,7 +396,7 @@ DBG_NAME(OConnectionHelper)
aProfiles.insert(pArray[index]);
- // excute the select dialog
+ // execute the select dialog
ODatasourceSelectDialog aSelector(GetParent(), aProfiles, eType);
::rtl::OUString sOldProfile=getURLNoPrefix();
@@ -445,13 +430,13 @@ DBG_NAME(OConnectionHelper)
void OConnectionHelper::impl_setURL( const String& _rURL, sal_Bool _bPrefix )
{
String sURL( _rURL );
- DBG_ASSERT( m_pCollection, "OConnectionHelper::impl_setURL: have no interpreter for the URLs!" );
+ OSL_ENSURE( m_pCollection, "OConnectionHelper::impl_setURL: have no interpreter for the URLs!" );
if ( m_pCollection && sURL.Len() )
{
if ( m_pCollection->isFileSystemBased( m_eType ) )
{
- // get the tow parts: prefix and file URL
+ // get the two parts: prefix and file URL
String sTypePrefix, sFileURLEncoded;
if ( _bPrefix )
{
@@ -491,13 +476,13 @@ DBG_NAME(OConnectionHelper)
// get the pure text
String sURL = _bPrefix ? m_aConnectionURL.GetText() : m_aConnectionURL.GetTextNoPrefix();
- DBG_ASSERT( m_pCollection, "OConnectionHelper::impl_getURL: have no interpreter for the URLs!" );
+ OSL_ENSURE( m_pCollection, "OConnectionHelper::impl_getURL: have no interpreter for the URLs!" );
if ( m_pCollection && sURL.Len() )
{
if ( m_pCollection->isFileSystemBased( m_eType ) )
{
- // get the tow parts: prefix and file URL
+ // get the two parts: prefix and file URL
String sTypePrefix, sFileURLDecoded;
if ( _bPrefix )
{
@@ -589,7 +574,6 @@ DBG_NAME(OConnectionHelper)
break;
case RET_NO:
- // SetRoadmapStateValue(sal_False);
callModifiedHdl();
return RET_OK;
@@ -658,7 +642,7 @@ DBG_NAME(OConnectionHelper)
}
catch(Exception&)
{
- DBG_ERROR("OConnectionHelper::getInstalledAdabasDBDirs: could not enumerate the adabas config files!");
+ OSL_FAIL("OConnectionHelper::getInstalledAdabasDBDirs: could not enumerate the adabas config files!");
}
}
@@ -702,7 +686,7 @@ DBG_NAME(OConnectionHelper)
}
return aInstalledDBs;
}
- // #106016# -------------------------------------------------------------------
+ // -----------------------------------------------------------------------------
IS_PATH_EXIST OConnectionHelper::pathExists(const ::rtl::OUString& _rURL, sal_Bool bIsFile) const
{
::ucbhelper::Content aCheckExistence;
@@ -747,7 +731,7 @@ DBG_NAME(OConnectionHelper)
return 1L; // handled
}
break;
- } // switch (_rNEvt.GetType())
+ }
}
return OGenericAdministrationPage::PreNotify( _rNEvt );
@@ -768,7 +752,6 @@ DBG_NAME(OConnectionHelper)
::std::vector< ::rtl::OUString > aToBeCreated; // the to-be-created levels
// search a level which exists
- // #106016# ---------------------
IS_PATH_EXIST eParentExists = PATH_NOT_EXIST;
while ( eParentExists == PATH_NOT_EXIST && aParser.getSegmentCount())
{
@@ -790,18 +773,18 @@ DBG_NAME(OConnectionHelper)
::rtl::OUString sContentType;
if ( INET_PROT_FILE == eProtocol )
{
- sContentType = ::rtl::OUString::createFromAscii( "application/vnd.sun.staroffice.fsys-folder" );
+ sContentType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.staroffice.fsys-folder"));
// the file UCP currently does not support the ContentType property
}
else
{
- Any aContentType = aParent.getPropertyValue( ::rtl::OUString::createFromAscii( "ContentType" ) );
+ Any aContentType = aParent.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")) );
aContentType >>= sContentType;
}
// the properties which need to be set on the new content
Sequence< ::rtl::OUString > aNewDirectoryProperties(1);
- aNewDirectoryProperties[0] = ::rtl::OUString::createFromAscii("Title");
+ aNewDirectoryProperties[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title"));
// the values to be set
Sequence< Any > aNewDirectoryAttributes(1);
@@ -861,7 +844,7 @@ DBG_NAME(OConnectionHelper)
const ::dbaccess::DATASOURCE_TYPE eType = m_pCollection->determineType(m_eType);
if ( ( ::dbaccess::DST_CALC == eType) || ( ::dbaccess::DST_MSACCESS == eType) || ( ::dbaccess::DST_MSACCESS_2007 == eType) )
- { // #106016# --------------------------
+ {
if( pathExists(sURL, sal_True) == PATH_NOT_EXIST )
{
String sFile = String( ModuleRes( STR_FILE_DOES_NOT_EXIST ) );
@@ -914,3 +897,5 @@ DBG_NAME(OConnectionHelper)
//.........................................................................
} // namespace dbaui
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.hxx b/dbaccess/source/ui/dlg/ConnectionHelper.hxx
index f843dabef..f553c24bc 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,10 @@
#ifndef DBAUI_CONNECTIONHELPER_HXX
#define DBAUI_CONNECTIONHELPER_HXX
-#ifndef _DBAUI_ADMINPAGES_HXX_
#include "adminpages.hxx"
-#endif
-#ifndef _UCBHELPER_CONTENT_HXX
#include <ucbhelper/content.hxx>
-#endif
-#ifndef _DBAUI_CURLEDIT_HXX_
#include "curledit.hxx"
-#endif
-#ifndef _SFX_FILEDLGHELPER_HXX
#include <sfx2/filedlghelper.hxx>
-#endif
#define FILL_STRING_ITEM(editcontrol, itemset, itemid, modifiedflag) \
@@ -54,7 +47,6 @@ namespace dbaui
{
//.........................................................................
- // #106016# --------------
enum IS_PATH_EXIST
{
PATH_NOT_EXIST = 0,
@@ -138,3 +130,5 @@ namespace dbaui
//.........................................................................
#endif // DBAUI_CONNECTIONHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index 72d30085a..71a5b26cd 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,147 +29,55 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_CONNECTIONPAGE_HXX
#include "ConnectionPage.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONPAGE_HRC
#include "ConnectionPage.hrc"
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef DBACCESS_DSMETA_HXX
#include "dsmeta.hxx"
-#endif
-#ifndef _SFXITEMSET_HXX
#include <svl/itemset.hxx>
-#endif
-#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX
#include <unotools/pathoptions.hxx>
-#endif
-#ifndef _SFXSTRITEM_HXX
#include <svl/stritem.hxx>
-#endif
-#ifndef _SFXENUMITEM_HXX
#include <svl/eitem.hxx>
-#endif
-#ifndef _SFXINTITEM_HXX
#include <svl/intitem.hxx>
-#endif
-#ifndef INCLUDED_SVTOOLS_MODULEOPTIONS_HXX
#include <unotools/moduleoptions.hxx>
-#endif
-#ifndef _DBAUI_DATASOURCEITEMS_HXX_
#include "dsitems.hxx"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _DBAUI_LOCALRESACCESS_HXX_
#include "localresaccess.hxx"
-#endif
-#ifndef _OSL_PROCESS_H_
#include <osl/process.h>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _FILEDLGHELPER_HXX
#include <sfx2/filedlghelper.hxx>
-#endif
-#ifndef _DBAUI_DBADMIN_HXX_
#include "dbadmin.hxx"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _VCL_STDTEXT_HXX
#include <vcl/stdtext.hxx>
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef _DBAUI_ODBC_CONFIG_HXX_
#include "odbcconfig.hxx"
-#endif
-#ifndef _DBAUI_DSSELECT_HXX_
#include "dsselect.hxx"
-#endif
-#ifndef SVTOOLS_FILENOTATION_HXX_
#include <svl/filenotation.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_UI_DIALOGS_XFOLDERPICKER_HPP_
#include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
#include <com/sun/star/awt/XWindow.hpp>
-#endif
-// #106016# ------------------------------------
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_
#include <com/sun/star/task/XInteractionHandler.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XPROGRESSHANDLER_HPP_
#include <com/sun/star/ucb/XProgressHandler.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_DIALOGS_EXTENDEDFILEPICKERELEMENTIDS_HPP_
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKERCONTROLACCESS_HPP_
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _UNOTOOLS_LOCALFILEHELPER_HXX
#include <unotools/localfilehelper.hxx>
-#endif
-#ifndef _UNOTOOLS_UCBHELPER_HXX
#include <unotools/ucbhelper.hxx>
-#endif
-#ifndef _UCBHELPER_COMMANDENVIRONMENT_HXX
#include <ucbhelper/commandenvironment.hxx>
-#endif
-#ifndef DBAUI_FILEPICKER_INTERACTION_HXX
#include "finteraction.hxx"
-#endif
-#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
#include <connectivity/CommonTools.hxx>
-#endif
-#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
-#endif
-#ifndef _SFX_DOCFILT_HACK_HXX
#include <sfx2/docfilt.hxx>
-#endif
#include "dsnItem.hxx"
#if defined(WNT)
#define _ADO_DATALINK_BROWSE_
#endif
#ifdef _ADO_DATALINK_BROWSE_
-#if defined( WNT )
- #include <tools/prewin.h>
- #include <windows.h>
- #include <tools/postwin.h>
-#endif
-#ifndef _SV_SYSDATA_HXX
#include <vcl/sysdata.hxx>
-#endif
-#ifndef _DBAUI_ADO_DATALINK_HXX_
#include "adodatalinks.hxx"
-#endif
#endif //_ADO_DATALINK_BROWSE_
#include "AutoControlsDef.hrc"
@@ -355,7 +264,7 @@ namespace dbaui
m_aJavaDriver.SetText(sDefaultJdbcDriverName);
m_aJavaDriver.SetModifyFlag();
}
- } // if ( !pJdbcDrvItem->GetValue().Len() )
+ }
else
m_aJavaDriver.SetText(pJdbcDrvItem->GetValue());
@@ -466,3 +375,4 @@ namespace dbaui
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hxx b/dbaccess/source/ui/dlg/ConnectionPage.hxx
index 30f7e7ade..b0c29ca3f 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,10 @@
#ifndef DBAUI_CONNECTIONPAGE_HXX
#define DBAUI_CONNECTIONPAGE_HXX
-#ifndef DBAUI_CONNECTIONHELPER_HXX
#include "ConnectionHelper.hxx"
-#endif
-#ifndef _DBAUI_ADMINPAGES_HXX_
#include "adminpages.hxx"
-#endif
-#ifndef _UCBHELPER_CONTENT_HXX
#include <ucbhelper/content.hxx>
-#endif
-#ifndef _DBAUI_CURLEDIT_HXX_
#include "curledit.hxx"
-#endif
//.........................................................................
namespace dbaui
@@ -112,3 +105,5 @@ namespace dbaui
//.........................................................................
#endif // _DBAUI_DETAILPAGES_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.src b/dbaccess/source/ui/dlg/ConnectionPage.src
index 9cc27916c..63c400b0a 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.src
+++ b/dbaccess/source/ui/dlg/ConnectionPage.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,10 +55,8 @@ TabPage PAGE_CONNECTION
Text[ en-US ] = "General";
};
-
AUTO_BROWSECONTROLGROUP( 6, UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + RELATED_CONTROLS, PAGE_X, HID_DSADMIN_URL_GENERAL, HID_DSADMIN_BROWSECONN)
-
FixedText FT_NO_ADDITIONAL_SETTINGS
{
Hide = TRUE;
@@ -67,7 +65,6 @@ TabPage PAGE_CONNECTION
Size = MAP_APPFONT ( PAGE_X - 12 , 3*FIXEDTEXT_HEIGHT ) ;
};
-
FixedText FT_HOSTNAME
{
Hide = TRUE;
@@ -76,7 +73,6 @@ TabPage PAGE_CONNECTION
Text[ en-US ] = "~Host name";
};
-
FixedLine FL_SEPARATOR2
{
Pos = MAP_APPFONT ( 4 , 3*FIXEDTEXT_HEIGHT + 3*UNRELATED_CONTROLS + RELATED_CONTROLS ) ;
@@ -90,6 +86,7 @@ TabPage PAGE_CONNECTION
Size = MAP_APPFONT ( 90 - 12 , FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "~User name" ;
};
+
Edit ET_USERNAME
{
HelpID = "dbaccess:Edit:PAGE_CONNECTION:ET_USERNAME";
@@ -98,6 +95,7 @@ TabPage PAGE_CONNECTION
Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ;
TabStop = TRUE ;
};
+
CheckBox CB_PASSWORD_REQUIRED
{
HelpID = "dbaccess:CheckBox:PAGE_CONNECTION:CB_PASSWORD_REQUIRED";
@@ -121,6 +119,7 @@ TabPage PAGE_CONNECTION
Size = MAP_APPFONT ( 90 - 12 , FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "~JDBC driver class" ;
};
+
Edit ET_JDBCDRIVERCLASS
{
Border = TRUE ;
@@ -189,4 +188,3 @@ String STR_MSACCESS_2007_FILTERNAME
{
Text [ en-US ] = "MS Access 2007 file";
};
-
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
index f82ec0c42..bfe147193 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_CONNECTIONPAGESETUP_HXX
#include "ConnectionPageSetup.hxx"
-#endif
#include "AutoControlsDef.hrc"
#include "dbadminsetup.hrc"
#include "dbu_dlg.hrc"
@@ -57,7 +56,6 @@
#include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/awt/XWindow.hpp>
-// #106016# ------------------------------------
#include <com/sun/star/task/XInteractionHandler.hpp>
#include <com/sun/star/ucb/XProgressHandler.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
@@ -204,7 +202,7 @@ namespace dbaui
//{
// String sDisplayName = m_pCollection->getTypeDisplayName(m_eType);
// FixedText* ppTextControls[] ={&m_aFT_Connection};
- // for (size_t i = 0; i < sizeof(ppTextControls)/sizeof(ppTextControls[0]); ++i)
+ // for (size_t i = 0; i < SAL_N_ELEMENTS(ppTextControls); ++i)
// {
// ppTextControls[i]->SetText(sDisplayName);
// }
@@ -243,3 +241,4 @@ namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
index bc3d7ce83..2cb23923a 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,37 +29,19 @@
#ifndef DBAUI_CONNECTIONPAGESETUP_HXX
#define DBAUI_CONNECTIONPAGESETUP_HXX
-#ifndef DBAUI_CONNECTIONHELPER_HXX
#include "ConnectionHelper.hxx"
-#endif
-#ifndef _DBAUI_ADMINPAGES_HXX_
#include "adminpages.hxx"
-#endif
-#ifndef _UCBHELPER_CONTENT_HXX
#include <ucbhelper/content.hxx>
-#endif
-#ifndef _DBAUI_CURLEDIT_HXX_
#include "curledit.hxx"
-#endif
-#ifndef _SV_FIELD_HXX
#include <vcl/field.hxx>
-#endif
//.........................................................................
namespace dbaui
{
//.........................................................................
-/* // #106016# --------------
- enum IS_PATH_EXIST
- {
- PATH_NOT_EXIST = 0,
- PATH_EXIST,
- PATH_NOT_KNOWN
- };
- */
class IDatabaseSettingsDialog;
//=========================================================================
@@ -115,3 +98,5 @@ namespace dbaui
//.........................................................................
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index 4b384df7b..bce6c2303 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,76 +28,33 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_DBSETUPCONNECTIONPAGES_HXX
#include "DBSetupConnectionPages.hxx"
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef _DBU_RESOURCE_HRC_
#include "dbu_resource.hrc"
-#endif
#include "AutoControlsDef.hrc"
-#ifndef _DBAUI_DBADMINSETUP_HRC_
#include "dbadminsetup.hrc"
-#endif
-#ifndef _SFXITEMSET_HXX
#include <svl/itemset.hxx>
-#endif
-#ifndef _SFXSTRITEM_HXX
#include <svl/stritem.hxx>
-#endif
-#ifndef _SFXENUMITEM_HXX
#include <svl/eitem.hxx>
-#endif
-#ifndef _SFXINTITEM_HXX
#include <svl/intitem.hxx>
-#endif
-#ifndef _DBAUI_DATASOURCEITEMS_HXX_
#include "dsitems.hxx"
-#endif
#include "dsnItem.hxx"
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _DBAUI_LOCALRESACCESS_HXX_
#include "localresaccess.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _SV_MNEMONIC_HXX
#include <vcl/mnemonic.hxx>
-#endif
-#ifndef _SVTOOLS_CJKOPTIONS_HXX
#include <svl/cjkoptions.hxx>
-#endif
#include <jvmaccess/virtualmachine.hxx>
-#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
#include <connectivity/CommonTools.hxx>
-#endif
-#ifndef DBAUI_DRIVERSETTINGS_HXX
#include "DriverSettings.hxx"
-#endif
-#ifndef _DBAUI_DBADMIN_HXX_
#include "dbadmin.hxx"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UI_DIALOGS_XFOLDERPICKER_HPP_
#include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
-#endif
-// #106016# ------------------------------------
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_
#include <com/sun/star/task/XInteractionHandler.hpp>
-#endif
#include <com/sun/star/sdbc/XDriverAccess.hpp>
#include "dbustrings.hrc"
-#ifndef SVTOOLS_FILENOTATION_HXX_
#include <svl/filenotation.hxx>
-#endif
#include <unotools/localfilehelper.hxx>
#include <unotools/ucbhelper.hxx>
@@ -107,6 +65,7 @@
#include <unotools/pathoptions.hxx>
#include <svtools/roadmapwizard.hxx>
#include "TextConnectionHelper.hxx"
+#include <osl/diagnose.h>
//.........................................................................
@@ -114,14 +73,6 @@ namespace dbaui
{
//.........................................................................
using namespace ::com::sun::star;
-// using namespace ::com::sun::star::ucb;
-// using namespace ::com::sun::star::ui::dialogs;
-// using namespace ::com::sun::star::sdbc;
-// using namespace ::com::sun::star::beans;
-// using namespace ::com::sun::star::lang;
-// using namespace ::com::sun::star::container;
-// using namespace ::dbtools;
-// using namespace ::svt;
OGenericAdministrationPage* OTextConnectionPageSetup::CreateTextTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
{
@@ -251,7 +202,7 @@ DBG_NAME(OTextConnectionPageSetup)
::dbaccess::ODsnTypeCollection* pCollection = NULL;
if (pCollectionItem)
pCollection = pCollectionItem->getCollection();
- DBG_ASSERT(pCollection, "OLDAPConnectionPageSetup::FillItemSet : really need a DSN type collection !");
+ OSL_ENSURE(pCollection, "OLDAPConnectionPageSetup::FillItemSet : really need a DSN type collection !");
String sUrl = pCollection->getPrefix( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:ldap:")));
sUrl += m_aETHostServer.GetText();
@@ -259,7 +210,6 @@ DBG_NAME(OTextConnectionPageSetup)
bChangedSomething = sal_True;
}
- // fillString(_rSet,&m_aETHostServer, DSID_CONNECTURL, bChangedSomething);
fillBool(_rSet,&m_aCBUseSSL,DSID_CONN_LDAP_USESSL,bChangedSomething);
return bChangedSomething;
}
@@ -385,7 +335,7 @@ DBG_NAME(OMySQLIntroPageSetup)
// -----------------------------------------------------------------------
sal_Bool OMySQLIntroPageSetup::FillItemSet(SfxItemSet& /*_rSet*/)
{
- OSL_ENSURE(sal_False,"Who called me?! Please ask oj for more information.");
+ OSL_FAIL("Who called me?! Please ask oj for more information.");
return sal_True;
}
@@ -705,8 +655,8 @@ DBG_NAME(OMySQLIntroPageSetup)
{
m_aETDriverClass.SetText(sDefaultJdbcDriverName);
m_aETDriverClass.SetModifyFlag();
- } // if ( sDefaultJdbcDriverName.Len() )
- } // if ( !pJdbcDrvItem->GetValue().Len() )
+ }
+ }
else
{
m_aETDriverClass.SetText(pDrvItem->GetValue());
@@ -727,7 +677,6 @@ DBG_NAME(OMySQLIntroPageSetup)
sal_Bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0);
bEnableTestConnection = bEnableTestConnection && (m_aETDriverClass.GetText().Len() != 0);
return bEnableTestConnection;
-// m_aTestConnection.Enable(bEnableTestConnection);
}
@@ -943,7 +892,7 @@ DBG_NAME(OFinalDBPageSetup)
Point aPos(m_aFTFinalHeader.GetPosPixel());
Size aStart(m_aFTFinalHeader.GetSizePixel());
aPos.Y() += aStart.Height() + nUnrelatedHeight;
- sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]);
+ sal_Int32 nCount = SAL_N_ELEMENTS(pWindows);
for (sal_Int32 i=0; i < nCount; ++i)
{
aPos.X() = pWindows[i].first->GetPosPixel().X();
@@ -1025,3 +974,5 @@ DBG_NAME(OFinalDBPageSetup)
}
// namespace dbaui
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index ab275574e..f758015ed 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef DBAUI_DBSETUPCONNECTIONPAGES_HXX
#define DBAUI_DBSETUPCONNECTIONPAGES_HXX
-#ifndef DBAUI_CONNECTIONPAGESETUP_HXX
#include "ConnectionPageSetup.hxx"
-#endif
#include "adminpages.hxx"
#include "admincontrols.hxx"
@@ -49,7 +48,6 @@ namespace dbaui
//.........................................................................
class IDatabaseSettingsDialog;
-// static OGenericAdministrationPage* CreateDbaseTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
//========================================================================
@@ -342,3 +340,5 @@ namespace dbaui
//.........................................................................
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index a9a1b6e2c..25d0fd6e1 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,15 +76,18 @@
#include <svl/stritem.hxx>
#include <tools/urlobj.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <typelib/typedescription.hxx>
#include <vcl/svapp.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/stdtext.hxx>
#include <vcl/waitobj.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <algorithm>
#include <functional>
+#include <o3tl/compat_functional.hxx>
+
//.........................................................................
namespace dbaui
{
@@ -109,7 +113,7 @@ namespace
sal_Bool bCorrectType = sal_False;
SfxItemPool* pPool = _rSet.GetPool();
- DBG_ASSERT( pPool, "implCheckItemType: invalid item pool!" );
+ OSL_ENSURE( pPool, "implCheckItemType: invalid item pool!" );
if ( pPool )
{
const SfxPoolItem& rDefItem = pPool->GetDefaultItem( _nId );
@@ -127,11 +131,11 @@ namespace
}
catch(Exception&)
{
- #ifdef DBG_UTIL
+ #if OSL_DEBUG_LEVEL > 0
::rtl::OString sMessage("ODbAdminDialog::implTranslateProperty: could not set the property ");
sMessage += ::rtl::OString(_rName.getStr(), _rName.getLength(), RTL_TEXTENCODING_ASCII_US);
sMessage += ::rtl::OString("!");
- DBG_ERROR(sMessage.getStr());
+ OSL_FAIL(sMessage.getStr());
#endif
}
@@ -208,18 +212,18 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_MAX_ROW_SCAN, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MaxRowScan" ) ) ) );
// special settings for adabas
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_SHUTSERVICE, ::rtl::OUString::createFromAscii("ShutdownDatabase")));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_DATAINC, ::rtl::OUString::createFromAscii("DataCacheSizeIncrement")));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_CACHESIZE, ::rtl::OUString::createFromAscii("DataCacheSize")));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_CTRLUSER, ::rtl::OUString::createFromAscii("ControlUser")));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_CTRLPWD, ::rtl::OUString::createFromAscii("ControlPassword")));
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_SHUTSERVICE, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShutdownDatabase"))));
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_DATAINC, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataCacheSizeIncrement"))));
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_CACHESIZE, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataCacheSize"))));
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_CTRLUSER, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlUser"))));
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_CTRLPWD, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlPassword"))));
// extra settings for odbc
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_USECATALOG, INFO_USECATALOG));
// extra settings for a ldap address book
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_LDAP_BASEDN, INFO_CONN_LDAP_BASEDN));
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_LDAP_ROWCOUNT, INFO_CONN_LDAP_ROWCOUNT));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_LDAP_USESSL, ::rtl::OUString::createFromAscii("UseSSL")));
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_LDAP_USESSL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseSSL"))));
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_DOCUMENT_URL, PROPERTY_URL));
// oracle
@@ -239,12 +243,12 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer
ShowServiceNotAvailableError(_pParent->GetParent(), String(SERVICE_SDB_DATABASECONTEXT), sal_True);
}
- DBG_ASSERT(m_xDynamicContext.is(), "ODbAdminDialog::ODbAdminDialog : no XNamingService interface !");
+ OSL_ENSURE(m_xDynamicContext.is(), "ODbAdminDialog::ODbAdminDialog : no XNamingService interface !");
}
//-------------------------------------------------------------------------
sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyValue >& _rDriverParam)
{
- DBG_ASSERT(m_pItemSetHelper->getOutputSet(), "ODbDataSourceAdministrationHelper::getCurrentSettings : not to be called without an example set!");
+ OSL_ENSURE(m_pItemSetHelper->getOutputSet(), "ODbDataSourceAdministrationHelper::getCurrentSettings : not to be called without an example set!");
if (!m_pItemSetHelper->getOutputSet())
return sal_False;
@@ -324,7 +328,7 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert
// handle the request
try
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
// release the mutex when calling the handler, it may need to lock the SolarMutex
xHandler->handle(xRequest);
}
@@ -357,7 +361,7 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert
//-------------------------------------------------------------------------
void ODbDataSourceAdministrationHelper::successfullyConnected()
{
- DBG_ASSERT(m_pItemSetHelper->getOutputSet(), "ODbDataSourceAdministrationHelper::successfullyConnected: not to be called without an example set!");
+ OSL_ENSURE(m_pItemSetHelper->getOutputSet(), "ODbDataSourceAdministrationHelper::successfullyConnected: not to be called without an example set!");
if (!m_pItemSetHelper->getOutputSet())
return;
@@ -423,7 +427,7 @@ Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const ::rtl::O
try
{
xDriverManager = Reference< XDriverAccess >(getORB()->createInstance(SERVICE_SDBC_CONNECTIONPOOL), UNO_QUERY);
- DBG_ASSERT(xDriverManager.is(), "ODbDataSourceAdministrationHelper::getDriver: could not instantiate the driver manager, or it does not provide the necessary interface!");
+ OSL_ENSURE(xDriverManager.is(), "ODbDataSourceAdministrationHelper::getDriver: could not instantiate the driver manager, or it does not provide the necessary interface!");
}
catch (Exception& e)
{
@@ -478,16 +482,16 @@ Reference< XPropertySet > ODbDataSourceAdministrationHelper::getCurrentDataSourc
}
- DBG_ASSERT(m_xDatasource.is(), "ODbDataSourceAdministrationHelper::getCurrentDataSource: no data source!");
+ OSL_ENSURE(m_xDatasource.is(), "ODbDataSourceAdministrationHelper::getCurrentDataSource: no data source!");
return m_xDatasource;
}
//-------------------------------------------------------------------------
::rtl::OUString ODbDataSourceAdministrationHelper::getDatasourceType( const SfxItemSet& _rSet )
{
SFX_ITEMSET_GET( _rSet, pConnectURL, SfxStringItem, DSID_CONNECTURL, sal_True );
- DBG_ASSERT( pConnectURL , "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!" );
+ OSL_ENSURE( pConnectURL , "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!" );
SFX_ITEMSET_GET(_rSet, pTypeCollection, DbuTypeCollectionItem, DSID_TYPECOLLECTION, sal_True);
- DBG_ASSERT(pTypeCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!");
+ OSL_ENSURE(pTypeCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!");
::dbaccess::ODsnTypeCollection* pCollection = pTypeCollection->getCollection();
return pCollection->getType(pConnectURL->GetValue());
}
@@ -508,9 +512,9 @@ String ODbDataSourceAdministrationHelper::getConnectionURL() const
SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pTypeCollection, DbuTypeCollectionItem, DSID_TYPECOLLECTION, sal_True);
OSL_ENSURE(pUrlItem,"Connection URL is NULL. -> GPF!");
- DBG_ASSERT(pTypeCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!");
+ OSL_ENSURE(pTypeCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!");
::dbaccess::ODsnTypeCollection* pCollection = pTypeCollection->getCollection();
- DBG_ASSERT(pCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid type collection!");
+ OSL_ENSURE(pCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid type collection!");
switch( pCollection->determineType(eType) )
{
@@ -587,7 +591,6 @@ String ODbDataSourceAdministrationHelper::getConnectionURL() const
break;
case ::dbaccess::DST_LDAP:
{
- // SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pHostName, SfxStringItem, DSID_CONN_HOSTNAME, sal_True);
SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pPortNumber, SfxInt32Item, DSID_CONN_LDAP_PORTNUMBER, sal_True);
sNewUrl = pCollection->cutPrefix(pUrlItem->GetValue());
sNewUrl += lcl_createHostWithPort(NULL,pPortNumber);
@@ -638,11 +641,11 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr
}
catch(Exception&)
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
::rtl::OString aMessage("ODbDataSourceAdministrationHelper::translateProperties: could not extract the property ");
aMessage += ::rtl::OString(aDirect->second.getStr(), aDirect->second.getLength(), RTL_TEXTENCODING_ASCII_US);
aMessage += ::rtl::OString("!");
- DBG_ERROR(aMessage.getStr());
+ OSL_FAIL(aMessage.getStr());
#endif
}
// transfer it into an item
@@ -665,7 +668,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr
if (0 == pAdditionalInfo->Name.compareToAscii("JDBCDRV"))
{ // compatibility
PropertyValue aCompatibility(*pAdditionalInfo);
- aCompatibility.Name = ::rtl::OUString::createFromAscii("JavaDriverClass");
+ aCompatibility.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JavaDriverClass"));
aInfos.insert(aCompatibility);
}
else
@@ -701,14 +704,14 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr
}
catch(Exception&)
{
- OSL_ENSURE(0,"IsReadOnly throws an exception!");
+ OSL_FAIL("IsReadOnly throws an exception!");
}
}
//-------------------------------------------------------------------------
void ODbDataSourceAdministrationHelper::translateProperties(const SfxItemSet& _rSource, const Reference< XPropertySet >& _rxDest)
{
- DBG_ASSERT(_rxDest.is(), "ODbDataSourceAdministrationHelper::translateProperties: invalid property set!");
+ OSL_ENSURE(_rxDest.is(), "ODbDataSourceAdministrationHelper::translateProperties: invalid property set!");
if (!_rxDest.is())
return;
@@ -834,14 +837,13 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
// * are known as indirect properties
// * but not relevant for the current data source type
// These settings have to be removed: If they're not relevant, we have no UI for changing them.
- // 25.06.2001 - 88004/87182 - frank.schoenheit@sun.com
// for this, we need a string-controlled quick access to m_aIndirectPropTranslator
StringSet aIndirectProps;
::std::transform(m_aIndirectPropTranslator.begin(),
m_aIndirectPropTranslator.end(),
::std::insert_iterator<StringSet>(aIndirectProps,aIndirectProps.begin()),
- ::std::select2nd<MapInt2String::value_type>());
+ ::o3tl::select2nd<MapInt2String::value_type>());
// now check the to-be-preserved props
::std::vector< sal_Int32 > aRemoveIndexes;
@@ -854,7 +856,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
{
if (aIndirectProps.end() != aIndirectProps.find(aPreserved->second))
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
const ::rtl::OUString sName = aPreserved->second;
#endif
aRemoveIndexes.push_back(aPreserved->first - nPositionCorrector);
@@ -868,7 +870,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
++aRemoveIndex
)
::comphelper::removeElementAt(_rInfo, *aRemoveIndex);
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
const PropertyValue* pWhatsLeft = _rInfo.getConstArray();
const PropertyValue* pWhatsLeftEnd = pWhatsLeft + _rInfo.getLength();
for (; pWhatsLeft != pWhatsLeftEnd; ++pWhatsLeft)
@@ -949,7 +951,7 @@ Any ODbDataSourceAdministrationHelper::implTranslateProperty(const SfxPoolItem*
}
else
{
- DBG_ERROR("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported item type!");
+ OSL_FAIL("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported item type!");
return aValue;
}
@@ -961,7 +963,8 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty(const Reference< X
Any aValue = implTranslateProperty(_pItem);
lcl_putProperty(_rxSet, _rName,aValue);
}
-#ifdef DBG_UTIL
+
+#if OSL_DEBUG_LEVEL > 0
//-------------------------------------------------------------------------
::rtl::OString ODbDataSourceAdministrationHelper::translatePropertyId( sal_Int32 _nId )
{
@@ -997,7 +1000,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
_rSet.Put(SfxStringItem(_nId, sValue.getStr()));
}
else {
- DBG_ERROR(
+ OSL_FAIL(
( ::rtl::OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" )
+= ::rtl::OString( translatePropertyId( _nId ) )
+= ::rtl::OString( " should be no string)!" )
@@ -1027,7 +1030,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
_rSet.Put( aItem );
}
else {
- DBG_ERROR(
+ OSL_FAIL(
( ::rtl::OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" )
+= ::rtl::OString( translatePropertyId( _nId ) )
+= ::rtl::OString( " should be no boolean)!" )
@@ -1044,7 +1047,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
_rSet.Put( SfxInt32Item( _nId, nValue ) );
}
else {
- DBG_ERROR(
+ OSL_FAIL(
( ::rtl::OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" )
+= ::rtl::OString( translatePropertyId( _nId ) )
+= ::rtl::OString( " should be no int)!" )
@@ -1060,7 +1063,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
TypeDescription aTD(_rValue.getValueType());
typelib_IndirectTypeDescription* pSequenceTD =
reinterpret_cast< typelib_IndirectTypeDescription* >(aTD.get());
- DBG_ASSERT(pSequenceTD && pSequenceTD->pType, "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid sequence type!");
+ OSL_ENSURE(pSequenceTD && pSequenceTD->pType, "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid sequence type!");
Type aElementType(pSequenceTD->pType);
switch (aElementType.getTypeClass())
@@ -1073,11 +1076,11 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
}
break;
default:
- DBG_ERROR("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported property value type!");
+ OSL_FAIL("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported property value type!");
}
}
else {
- DBG_ERROR(
+ OSL_FAIL(
( ::rtl::OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" )
+= ::rtl::OString( translatePropertyId( _nId ) )
+= ::rtl::OString( " should be no string sequence)!" )
@@ -1091,7 +1094,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
break;
default:
- DBG_ERROR("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported property value type!");
+ OSL_FAIL("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported property value type!");
}
}
@@ -1113,14 +1116,13 @@ void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest)
SFX_ITEMSET_GET(_rDest, pTypeCollection, DbuTypeCollectionItem, DSID_TYPECOLLECTION, sal_True);
OSL_ENSURE(pUrlItem,"Connection URL is NULL. -> GPF!");
- DBG_ASSERT(pTypeCollection, "ODbAdminDialog::getDatasourceType: invalid items in the source set!");
+ OSL_ENSURE(pTypeCollection, "ODbAdminDialog::getDatasourceType: invalid items in the source set!");
::dbaccess::ODsnTypeCollection* pCollection = pTypeCollection->getCollection();
- DBG_ASSERT(pCollection, "ODbAdminDialog::getDatasourceType: invalid type collection!");
+ OSL_ENSURE(pCollection, "ODbAdminDialog::getDatasourceType: invalid type collection!");
sal_uInt16 nPortNumberId = 0;
sal_Int32 nPortNumber = -1;
String sNewHostName;
- //String sUrl = pCollection->cutPrefix(pUrlItem->GetValue());
String sUrlPart;
pCollection->extractHostNamePort(pUrlItem->GetValue(),sUrlPart,sNewHostName,nPortNumber);
@@ -1178,7 +1180,7 @@ sal_Bool ODbDataSourceAdministrationHelper::saveChanges(const SfxItemSet& _rSour
// -----------------------------------------------------------------------------
void ODbDataSourceAdministrationHelper::setDataSourceOrName( const Any& _rDataSourceOrName )
{
- DBG_ASSERT( !m_aDataSourceOrName.hasValue(), "ODbDataSourceAdministrationHelper::setDataSourceOrName: already have one!" );
+ OSL_ENSURE( !m_aDataSourceOrName.hasValue(), "ODbDataSourceAdministrationHelper::setDataSourceOrName: already have one!" );
// hmm. We could reset m_xDatasource/m_xModel, probably, and continue working
m_aDataSourceOrName = _rDataSourceOrName;
}
@@ -1219,3 +1221,4 @@ SfxPoolItem* DbuTypeCollectionItem::Clone(SfxItemPool* /*_pPool*/) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.hxx b/dbaccess/source/ui/dlg/DbAdminImpl.hxx
index f470bd5c1..ad27050f0 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.hxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,39 +29,17 @@
#ifndef _DBAUI_DBADMINIMPL_HXX_
#define _DBAUI_DBADMINIMPL_HXX_
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UNO_XNAMINGSERVICE_HPP_
#include <com/sun/star/uno/XNamingService.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDRIVER_HPP_
#include <com/sun/star/sdbc/XDriver.hpp>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _DBAUI_DSNTYPES_HXX_
#include "dsntypes.hxx"
-#endif
-#ifndef _SFXITEMSET_HXX
#include <svl/itemset.hxx>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
#include <com/sun/star/frame/XModel.hpp>
-#endif
#include <svl/poolitem.hxx>
class Window;
@@ -203,7 +182,7 @@ namespace dbaui
*/
sal_Bool hasAuthentication(const SfxItemSet& _rSet) const;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
::rtl::OString translatePropertyId( sal_Int32 _nId );
#endif
};
@@ -214,3 +193,4 @@ namespace dbaui
#endif // _DBAUI_DBADMINIMPL_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/DriverSettings.cxx b/dbaccess/source/ui/dlg/DriverSettings.cxx
index 044230736..e1c19c7f2 100644
--- a/dbaccess/source/ui/dlg/DriverSettings.cxx
+++ b/dbaccess/source/ui/dlg/DriverSettings.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -114,3 +115,5 @@ void ODriversSettings::getSupportedIndirectSettings( const ::rtl::OUString& _sUR
_out_rDetailsIds.push_back(pProps->first);
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/DriverSettings.hxx b/dbaccess/source/ui/dlg/DriverSettings.hxx
index 61d4f1c9a..754b391b4 100644
--- a/dbaccess/source/ui/dlg/DriverSettings.hxx
+++ b/dbaccess/source/ui/dlg/DriverSettings.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBAUI_DRIVERSETTINGS_HXX
#define DBAUI_DRIVERSETTINGS_HXX
-#ifndef _DBAUI_DSNTYPES_HXX_
#include "dsntypes.hxx"
-#endif
#include <svl/poolitem.hxx>
#include <vector>
@@ -110,3 +109,4 @@ namespace dbaui
#endif // DBAUI_DRIVERSETTINGS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/RelationDlg.cxx b/dbaccess/source/ui/dlg/RelationDlg.cxx
index 84eff8f58..936e8e6d8 100644
--- a/dbaccess/source/ui/dlg/RelationDlg.cxx
+++ b/dbaccess/source/ui/dlg/RelationDlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,60 +28,25 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-//#ifndef _SVX_TABWIN_HXX
-//#include "tabwin.hxx"
-//#endif
-#ifndef DBAUI_RELATIONDIALOG_HRC
#include "RelationDlg.hrc"
-#endif
-#ifndef DBAUI_RELATIONDIALOG_HXX
#include "RelationDlg.hxx"
-#endif
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_KEYRULE_HPP_
#include <com/sun/star/sdbc/KeyRule.hpp>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef DBAUI_JOINDESIGNVIEW_HXX
#include "JoinDesignView.hxx"
-#endif
-#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef DBAUI_RTABLECONNECTIONDATA_HXX
#include "RTableConnectionData.hxx"
-#endif
-#ifndef DBAUI_RELATIONCONTROL_HXX
#include "RelationControl.hxx"
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
#include <algorithm>
@@ -301,3 +267,4 @@ void ORelationDialog::notifyConnectionChange()
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/RelationDlg.src b/dbaccess/source/ui/dlg/RelationDlg.src
index e29eec5ff..90602e37c 100644
--- a/dbaccess/source/ui/dlg/RelationDlg.src
+++ b/dbaccess/source/ui/dlg/RelationDlg.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,7 +33,6 @@
#endif
#include "dbaccess_helpid.hrc"
-
ModalDialog DLG_REL_PROPERTIES
{
HelpID = "dbaccess:ModalDialog:DLG_REL_PROPERTIES";
@@ -44,7 +43,6 @@ ModalDialog DLG_REL_PROPERTIES
Moveable = TRUE ;
Closeable = TRUE ;
-
Window WND_CONTROL
{
Pos = MAP_APPFONT( 0, 0 );
@@ -87,9 +85,6 @@ ModalDialog DLG_REL_PROPERTIES
};
};
-
-
-
FixedLine FL_CASC_UPD
{
Pos = MAP_APPFONT ( 6 , 114 ) ;
@@ -125,7 +120,6 @@ ModalDialog DLG_REL_PROPERTIES
HelpId = HID_DLG_REL_CASC_UPD_DEFAULT ;
Text [ en-US ] = "Set ~default" ;
};
-// zweite FixedLine
FixedLine FL_CASC_DEL
{
Pos = MAP_APPFONT ( 96 , 114 ) ;
@@ -183,4 +177,3 @@ ModalDialog DLG_REL_PROPERTIES
};
};
-
diff --git a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx
index b6738d937..af2c0d9ad 100644
--- a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx
+++ b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,25 +29,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_TABLESSINGLEDLG_HXX_
#include "TablesSingleDlg.hxx"
-#endif
-#ifndef _DBAUI_DBADMINIMPL_HXX_
#include "DbAdminImpl.hxx"
-#endif
-#ifndef _DBAUI_TABLESPAGE_HXX_
#include "tablespage.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _DBAUI_DATASOURCEITEMS_HXX_
#include "dsitems.hxx"
-#endif
-#ifndef _DBAUI_PROPERTYSETITEM_HXX_
#include "propertysetitem.hxx"
-#endif
#include "dbu_dlg.hrc"
@@ -148,3 +137,4 @@ SfxItemSet* OTableSubscriptionDialog::getWriteOutputSet()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
index 9efa98f55..d6f4bb32c 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,122 +27,53 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef DBAUI_TEXTCONNECTIONHELPER_HXX
#include "TextConnectionHelper.hxx"
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _DBU_RESOURCE_HRC_
#include "dbu_resource.hrc"
-#endif
#include "AutoControlsDef.hrc"
-#ifndef _SFXITEMSET_HXX
#include <svl/itemset.hxx>
-#endif
-#ifndef _SFXSTRITEM_HXX
#include <svl/stritem.hxx>
-#endif
-#ifndef _SFXENUMITEM_HXX
#include <svl/eitem.hxx>
-#endif
-#ifndef _SFXINTITEM_HXX
#include <svl/intitem.hxx>
-#endif
-#ifndef _DBAUI_DATASOURCEITEMS_HXX_
#include "dsitems.hxx"
-#endif
-#ifndef _DBAUI_DBFINDEX_HXX_
#include "dbfindex.hxx"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _DBAUI_LOCALRESACCESS_HXX_
#include "localresaccess.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _SV_MNEMONIC_HXX
#include <vcl/mnemonic.hxx>
-#endif
-#ifndef _SVTOOLS_CJKOPTIONS_HXX
#include <svl/cjkoptions.hxx>
-#endif
#include <jvmaccess/virtualmachine.hxx>
-#ifndef _DBAUI_ADASTAT_HXX_
#include "AdabasStat.hxx"
-#endif
-#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
#include <connectivity/CommonTools.hxx>
-#endif
-#ifndef DBAUI_DRIVERSETTINGS_HXX
#include "DriverSettings.hxx"
-#endif
-#ifndef _DBAUI_DBADMIN_HXX_
#include "dbadmin.hxx"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UI_DIALOGS_XFOLDERPICKER_HPP_
#include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
-#endif
-// #106016# ------------------------------------
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_
#include <com/sun/star/task/XInteractionHandler.hpp>
-#endif
-#ifndef SVTOOLS_FILENOTATION_HXX_
#include <svl/filenotation.hxx>
-#endif
-#ifndef _UNOTOOLS_LOCALFILEHELPER_HXX
#include <unotools/localfilehelper.hxx>
-#endif
-#ifndef _UNOTOOLS_UCBHELPER_HXX
#include <unotools/ucbhelper.hxx>
-#endif
-#ifndef _UCBHELPER_COMMANDENVIRONMENT_HXX
#include <ucbhelper/commandenvironment.hxx>
-#endif
-#ifndef DBAUI_FILEPICKER_INTERACTION_HXX
#include "finteraction.hxx"
-#endif
-#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
#include <connectivity/CommonTools.hxx>
-#endif
-#ifndef DBAUI_DBSETUPCONNECTIONPAGES_HXX
#include "DBSetupConnectionPages.hxx"
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX
#include <unotools/pathoptions.hxx>
-#endif
-#ifndef SVTOOLS_INC_ROADMAPWIZARD_HXX
#include <svtools/roadmapwizard.hxx>
-#endif
namespace dbaui
@@ -220,7 +152,7 @@ DBG_NAME(OTextConnectionHelper)
{ 0, NULL }
};
- for ( size_t section=0; section < sizeof( aSections ) / sizeof( aSections[0] ) - 1; ++section )
+ for ( size_t section=0; section < SAL_N_ELEMENTS( aSections ) - 1; ++section )
{
if ( ( m_nAvailableSections & aSections[section].nFlag ) != 0 )
{
@@ -402,9 +334,6 @@ DBG_NAME(OTextConnectionHelper)
String sExtension = GetExtension();
String aErrorText;
Control* pErrorWin = NULL;
- // if (!m_aFieldSeparator.GetText().Len())
- // bug (#42168) if this line is compiled under OS2 (in a product environent)
- // -> use a temporary variable
String aDelText(m_aFieldSeparator.GetText());
if(!aDelText.Len())
{ // Kein FeldTrenner
@@ -613,3 +542,5 @@ DBG_NAME(OTextConnectionHelper)
//.........................................................................
} // namespace dbaui
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
index f4c6bff6f..c178e3a68 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,33 +29,15 @@
#ifndef DBAUI_TEXTCONNECTIONHELPER_HXX
#define DBAUI_TEXTCONNECTIONHELPER_HXX
-#ifndef DBAUI_CONNECTIONPAGESETUP_HXX
#include "ConnectionPageSetup.hxx"
-#endif
-#ifndef _DBAUI_ADMINPAGES_HXX_
#include "adminpages.hxx"
-#endif
-#ifndef CHARSETLISTBOX_HXX
#include "charsetlistbox.hxx"
-#endif
-#ifndef _UCBHELPER_CONTENT_HXX
#include <ucbhelper/content.hxx>
-#endif
-#ifndef _DBAUI_CURLEDIT_HXX_
#include "curledit.hxx"
-#endif
-#ifndef SVTOOLS_INC_ROADMAPWIZARD_HXX
#include <svtools/roadmapwizard.hxx>
-#endif
-#ifndef _SV_FIELD_HXX
#include <vcl/field.hxx>
-#endif
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
-#endif
-#ifndef _SV_LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
//.........................................................................
@@ -138,3 +121,4 @@ namespace dbaui
#endif // DBAUI_DBWIZ2_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx
index d937006cc..eb16e2741 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.cxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,69 +29,27 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_USERADMIN_HXX
#include "UserAdmin.hxx"
-#endif
-#ifndef DBAUI_USERADMIN_HRC
#include "UserAdmin.hrc"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADEFINITIONSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XDataDefinitionSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XUSERSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XUsersSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDROP_HPP_
#include <com/sun/star/sdbcx/XDrop.hpp>
-#endif
-#ifndef _UCBHELPER_INTERATIONREQUEST_HXX
#include <ucbhelper/interactionrequest.hxx>
-#endif
-#ifndef _UCBHELPER_SIMPLEAUTHENTICATIONREQUEST_HXX
#include <ucbhelper/simpleauthenticationrequest.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XUSER_HPP_
#include <com/sun/star/sdbcx/XUser.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _DBAUI_DBADMIN_HXX_
#include "dbadmin.hxx"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _SFX_PASSWD_HXX
#include <sfx2/passwd.hxx>
-#endif
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
@@ -391,3 +350,5 @@ void OUserAdmin::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue)
OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/UserAdmin.hxx b/dbaccess/source/ui/dlg/UserAdmin.hxx
index c205cbe49..45995bc20 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.hxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,33 +28,15 @@
#ifndef DBAUI_USERADMIN_HXX
#define DBAUI_USERADMIN_HXX
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_FIELD_HXX
#include <vcl/field.hxx>
-#endif
-#ifndef _SV_LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
-#ifndef _SV_DIALOG_HXX
#include <vcl/dialog.hxx>
-#endif
-#ifndef _SV_GROUP_HXX
#include <vcl/group.hxx>
-#endif
-#ifndef DBAUI_TABLEGRANTCONTROL_HXX
#include "TableGrantCtrl.hxx"
-#endif
-#ifndef _DBAUI_ADMINPAGES_HXX_
#include "adminpages.hxx"
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
FORWARD_DECLARE_INTERFACE(sdbc,XConnection)
@@ -105,3 +88,5 @@ public:
};
}
#endif // DBAUI_USERADMIN_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/UserAdmin.src b/dbaccess/source/ui/dlg/UserAdmin.src
index 8ff941f5d..e717f90ec 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.src
+++ b/dbaccess/source/ui/dlg/UserAdmin.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -71,7 +71,6 @@ TabPage TAB_PAGE_USERADMIN
HelpId = HID_TAB_PAGE_LBUSER ;
};
-
PushButton PB_NEWUSER
{
Pos = MAP_APPFONT ( 12 , 29 ) ;
@@ -150,7 +149,6 @@ ModalDialog DLG_PASSWORD
Size = MAP_APPFONT ( WIN_X - 3 - 6 - 6 - 50 , 8 ) ;
Text [ en-US ] = "User \"$name$: $\"";
};
-
FixedText FT_OLDPASSWORD
{
Pos = MAP_APPFONT ( 6 , 17 ) ;
@@ -184,7 +182,7 @@ ModalDialog DLG_PASSWORD
{
Pos = MAP_APPFONT ( 6 , 52 ) ;
Size = MAP_APPFONT ( FT_SIZE_X , 10 ) ;
- Text [ en-US ] = "~Confirm password";
+ Text [ en-US ] = "~Confirm password";
};
Edit ED_PASSWORD_REPEAT
{
@@ -194,7 +192,7 @@ ModalDialog DLG_PASSWORD
Size = MAP_APPFONT ( EDIT_SIZE_X , 12 ) ;
PassWord = TRUE ;
};
-
+
OKButton BTN_PASSWORD_OK
{
Pos = MAP_APPFONT ( WIN_X - 56 , 6 ) ;
@@ -210,7 +208,7 @@ ModalDialog DLG_PASSWORD
{
Pos = MAP_APPFONT ( WIN_X - 56 , 43 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
- };
+ };
Text [ en-US ] = "Change Password";
};
@@ -218,28 +216,3 @@ String STR_ERROR_PASSWORDS_NOT_IDENTICAL
{
Text [ en-US ] = "The passwords do not match. Please enter the password again.";
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.cxx b/dbaccess/source/ui/dlg/UserAdminDlg.cxx
index 1fd4fb83e..41fdcad78 100644
--- a/dbaccess/source/ui/dlg/UserAdminDlg.cxx
+++ b/dbaccess/source/ui/dlg/UserAdminDlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,11 +96,15 @@ DBG_NAME(OUserAdminDlg)
OUserAdminDlg::~OUserAdminDlg()
{
if ( m_bOwnConnection )
+ {
try
{
::comphelper::disposeComponent(m_xConnection);
}
- catch(Exception){}
+ catch(const Exception&)
+ {
+ }
+ }
SetInputSet(NULL);
DELETEZ(pExampleSet);
@@ -118,12 +123,12 @@ DBG_NAME(OUserAdminDlg)
throw SQLException(sError,NULL,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")) ,0,Any());
}
}
- catch(const SQLException& e)
+ catch(const SQLException&)
{
::dbaui::showError( ::dbtools::SQLExceptionInfo( ::cppu::getCaughtException() ), GetParent(), getORB() );
return RET_CANCEL;
}
- catch( const Exception& )
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -204,3 +209,5 @@ DBG_NAME(OUserAdminDlg)
//.........................................................................
} // namespace dbaui
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.src b/dbaccess/source/ui/dlg/UserAdminDlg.src
index 71d9026b2..5b07b4309 100644
--- a/dbaccess/source/ui/dlg/UserAdminDlg.src
+++ b/dbaccess/source/ui/dlg/UserAdminDlg.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,16 +35,15 @@
#include "dbu_dlg.hrc"
#endif
-
TabDialog DLG_DATABASE_USERADMIN
-{
+{
OutputSize = TRUE ;
SVLook = TRUE ;
Moveable = TRUE ;
Closeable = TRUE ;
Hide = TRUE;
HelpId = HID_DSADMIN_USERADMIN;
-
+
TabControl 1
{
OutputSize = TRUE ;
@@ -54,6 +53,6 @@ TabDialog DLG_DATABASE_USERADMIN
{
Text[ en-US ] = "User Settings";
};
-
+
Text [ en-US ] = "User administration" ;
};
diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx
index 6ae956359..e758d675f 100755..100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -107,7 +108,7 @@ namespace dbaui
break;
default:
- OSL_ENSURE( false, "TextResetOperator::operateOn: unexpected event ID!" );
+ OSL_FAIL( "TextResetOperator::operateOn: unexpected event ID!" );
// all those IDs should have been filtered out by payAttentionTo
break;
}
@@ -309,3 +310,5 @@ namespace dbaui
//........................................................................
} // namespace dbaui
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/admincontrols.hxx b/dbaccess/source/ui/dlg/admincontrols.hxx
index 61a8a67cb..b6402f00a 100755..100644
--- a/dbaccess/source/ui/dlg/admincontrols.hxx
+++ b/dbaccess/source/ui/dlg/admincontrols.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -80,3 +81,5 @@ namespace dbaui
//........................................................................
#endif // DBACCESS_ADMINCONTROLS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/admincontrols.src b/dbaccess/source/ui/dlg/admincontrols.src
index 5e5ceda60..5e5ceda60 100755..100644
--- a/dbaccess/source/ui/dlg/admincontrols.src
+++ b/dbaccess/source/ui/dlg/admincontrols.src
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index 1f736edd9..a54fb543a 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -162,7 +163,7 @@ namespace dbaui
else
{
aEnumeration.getDatasourceNames(aOdbcDatasources);
- // excute the select dialog
+ // execute the select dialog
ODatasourceSelectDialog aSelector(GetParent(), aOdbcDatasources, false);
if (_sCurr.getLength())
aSelector.Select(_sCurr);
@@ -352,3 +353,4 @@ namespace dbaui
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx
index 7bb422511..5353791d2 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,24 +29,12 @@
#ifndef _DBAUI_ADMINPAGES_HXX_
#define _DBAUI_ADMINPAGES_HXX_
-#ifndef _SFXTABDLG_HXX
#include <sfx2/tabdlg.hxx>
-#endif
-#ifndef _DBAUI_DSNTYPES_HXX_
#include "dsntypes.hxx"
-#endif
-#ifndef _DBAUI_COMMON_TYPES_HXX_
#include "commontypes.hxx"
-#endif
-#ifndef _SVTOOLS_WIZARDMACHINE_HXX_
#include <svtools/wizardmachine.hxx>
-#endif
-#ifndef _SV_FIELD_HXX
#include <vcl/field.hxx>
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
class NumericField;
@@ -162,7 +151,7 @@ namespace dbaui
@param _sReturn
<OUT/> contains the selected name.
@return
- <FALSE/> if an error occured, otherwise <TRUE/>
+ <FALSE/> if an error occurred, otherwise <TRUE/>
*/
sal_Bool getSelectedDataSource(::rtl::OUString& _sReturn,::rtl::OUString& _sCurr);
@@ -301,3 +290,4 @@ namespace dbaui
#endif // _DBAUI_ADMINPAGES_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/adodatalinks.cxx b/dbaccess/source/ui/dlg/adodatalinks.cxx
index f61ad4366..350ee6b86 100644
--- a/dbaccess/source/ui/dlg/adodatalinks.cxx
+++ b/dbaccess/source/ui/dlg/adodatalinks.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,9 +45,7 @@
#include <adoid.h> // needed for CLSID_CADOConnection
#include <adoint.h> // needed for ADOConnection
-#ifndef _DBAUI_ADO_DATALINK_HXX_
#include "adodatalinks.hxx"
-#endif
BSTR PromptEdit(long hWnd,BSTR connstr);
BSTR PromptNew(long hWnd);
@@ -209,3 +208,5 @@ BSTR PromptEdit(long hWnd,BSTR connstr)
return _result;
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/adodatalinks.hxx b/dbaccess/source/ui/dlg/adodatalinks.hxx
index c2b3a9b97..e7c08b3e1 100644
--- a/dbaccess/source/ui/dlg/adodatalinks.hxx
+++ b/dbaccess/source/ui/dlg/adodatalinks.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,12 +29,9 @@
#ifndef _DBAUI_ADO_DATALINK_HXX_
#define _DBAUI_ADO_DATALINK_HXX_
-#ifndef _OSL_MODULE_H_
#include <osl/module.h>
-#endif
-#ifndef _DBAUI_COMMON_TYPES_HXX_
#include "commontypes.hxx"
-#endif
::rtl::OUString getAdoDatalink(long hWnd,::rtl::OUString& oldLink);
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index 5751c0161..f01725894 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -80,7 +81,7 @@ class TableListFacade : public ::cppu::BaseMutex
{
OTableTreeListBox& m_rTableList;
Reference< XConnection > m_xConnection;
- ::rtl::Reference< comphelper::OContainerListenerAdapter>
+ ::rtl::Reference< comphelper::OContainerListenerAdapter>
m_pContainerListener;
bool m_bAllowViews;
@@ -93,7 +94,7 @@ public:
{
}
virtual ~TableListFacade();
-
+
private:
virtual void updateTableObjectList( bool _bAllowViews );
@@ -132,8 +133,8 @@ String TableListFacade::getSelectedName( String& _out_rAliasName ) const
try
{
Reference< XDatabaseMetaData > xMeta( m_xConnection->getMetaData(), UNO_QUERY_THROW );
- if ( !aCatalog.getLength()
- && aSchema.getLength()
+ if ( !aCatalog.getLength()
+ && aSchema.getLength()
&& xMeta->supportsCatalogsInDataManipulation()
&& !xMeta->supportsSchemasInDataManipulation() )
{
@@ -174,7 +175,7 @@ void TableListFacade::updateTableObjectList( bool _bAllowViews )
try
{
Reference< XTablesSupplier > xTableSupp( m_xConnection, UNO_QUERY_THROW );
-
+
Reference< XViewsSupplier > xViewSupp;
Reference< XNameAccess > xTables, xViews;
Sequence< ::rtl::OUString > sTables, sViews;
@@ -189,7 +190,7 @@ void TableListFacade::updateTableObjectList( bool _bAllowViews )
m_pContainerListener = new ::comphelper::OContainerListenerAdapter(this,xContainer);
}
sTables = xTables->getElementNames();
- } // if ( xTables.is() )
+ }
xViewSupp.set( xTableSupp, UNO_QUERY );
if ( xViewSupp.is() )
@@ -248,7 +249,7 @@ class QueryListFacade : public ::cppu::BaseMutex
{
SvTreeListBox& m_rQueryList;
Reference< XConnection > m_xConnection;
- ::rtl::Reference< comphelper::OContainerListenerAdapter>
+ ::rtl::Reference< comphelper::OContainerListenerAdapter>
m_pContainerListener;
public:
@@ -297,13 +298,10 @@ void QueryListFacade::updateTableObjectList( bool /*_bAllowViews*/ )
try
{
ImageProvider aImageProvider( m_xConnection );
- Image aQueryImage( aImageProvider.getDefaultImage( DatabaseObject::QUERY, false ) );
- Image aQueryImageHC( aImageProvider.getDefaultImage( DatabaseObject::QUERY, true ) );
+ Image aQueryImage( aImageProvider.getDefaultImage( DatabaseObject::QUERY ) );
- m_rQueryList.SetDefaultExpandedEntryBmp( aQueryImage, BMP_COLOR_NORMAL );
- m_rQueryList.SetDefaultCollapsedEntryBmp( aQueryImage, BMP_COLOR_NORMAL );
- m_rQueryList.SetDefaultExpandedEntryBmp( aQueryImageHC, BMP_COLOR_HIGHCONTRAST );
- m_rQueryList.SetDefaultCollapsedEntryBmp( aQueryImageHC, BMP_COLOR_HIGHCONTRAST );
+ m_rQueryList.SetDefaultExpandedEntryBmp( aQueryImage );
+ m_rQueryList.SetDefaultCollapsedEntryBmp( aQueryImage );
Reference< XQueriesSupplier > xSuppQueries( m_xConnection, UNO_QUERY_THROW );
Reference< XNameAccess > xQueries( xSuppQueries->getQueries(), UNO_QUERY_THROW );
@@ -531,3 +529,4 @@ String OAddTableDlg::getDialogTitleForContext( IAddTableDialogContext& _rContext
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/adtabdlg.src b/dbaccess/source/ui/dlg/adtabdlg.src
index 13ce2e2ab..deb914dd8 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.src
+++ b/dbaccess/source/ui/dlg/adtabdlg.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -69,6 +69,7 @@ ModelessDialog DLG_JOIN_TABADD
Hide = TRUE;
Group = TRUE;
};
+
PushButton PB_ADDTABLE
{
HelpID = "dbaccess:PushButton:DLG_JOIN_TABADD:PB_ADDTABLE";
@@ -78,6 +79,7 @@ ModelessDialog DLG_JOIN_TABADD
TabStop = TRUE ;
DefButton = TRUE ;
};
+
CancelButton PB_CLOSE
{
Pos = MAP_APPFONT ( 123 , 22 ) ;
@@ -86,6 +88,7 @@ ModelessDialog DLG_JOIN_TABADD
Text [ en-US ] = "~Close" ;
TabStop = TRUE ;
};
+
HelpButton PB_HELP
{
Pos = MAP_APPFONT ( 123 , 43 ) ;
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index 976657440..4d2efe259 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -313,7 +314,7 @@ namespace dbaui
aValue = PTR_CAST( OptionalBoolItem, pItem )->GetFullValue();
}
else
- DBG_ERROR( "SpecialSettingsPage::implInitControls: unknown boolean item type!" );
+ OSL_FAIL( "SpecialSettingsPage::implInitControls: unknown boolean item type!" );
if ( !aValue )
{
@@ -602,3 +603,5 @@ namespace dbaui
//........................................................................
} // namespace dbaui
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx b/dbaccess/source/ui/dlg/advancedsettings.hxx
index a826c9691..e5e9cfcf9 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.hxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -154,3 +155,5 @@ namespace dbaui
//........................................................................
#endif // DBACCESS_ADVANCEDSETTINGS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index 861f3ff4d..c19ad6d92 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -148,7 +149,6 @@ void ODbAdminDialog::impl_selectDataSource(const ::com::sun::star::uno::Any& _aD
{
case ::dbaccess::DST_DBASE:
addDetailPage(PAGE_DBASE, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateDbase);
- // bResetPasswordRequired = sal_True;
break;
case ::dbaccess::DST_ADO:
@@ -157,7 +157,6 @@ void ODbAdminDialog::impl_selectDataSource(const ::com::sun::star::uno::Any& _aD
case ::dbaccess::DST_FLAT:
addDetailPage(PAGE_TEXT, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateText);
- // bResetPasswordRequired = sal_True;
break;
case ::dbaccess::DST_ODBC:
@@ -414,7 +413,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp
*pCounter++ = new SfxBoolItem( DSID_RESPECTRESULTSETTYPE,sal_False );
// create the pool
- static SfxItemInfo __READONLY_DATA aItemInfos[DSID_LAST_ITEM_ID - DSID_FIRST_ITEM_ID + 1] =
+ static SfxItemInfo const aItemInfos[DSID_LAST_ITEM_ID - DSID_FIRST_ITEM_ID + 1] =
{
{0,0},
{0,0},
@@ -479,7 +478,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp
{0,0}
};
- OSL_ENSURE(sizeof(aItemInfos)/sizeof(aItemInfos[0]) == DSID_LAST_ITEM_ID,"Invalid Ids!");
+ OSL_ENSURE(SAL_N_ELEMENTS(aItemInfos) == DSID_LAST_ITEM_ID,"Invalid Ids!");
_rpPool = new SfxItemPool(String::CreateFromAscii("DSAItemPool"), DSID_FIRST_ITEM_ID, DSID_LAST_ITEM_ID,
aItemInfos, _rppDefaults);
_rpPool->FreezeIdRanges();
@@ -517,3 +516,4 @@ void ODbAdminDialog::destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool,
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dbadmin.src b/dbaccess/source/ui/dlg/dbadmin.src
index 4c1166071..53e979a0b 100644
--- a/dbaccess/source/ui/dlg/dbadmin.src
+++ b/dbaccess/source/ui/dlg/dbadmin.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -82,7 +82,6 @@
Pos = MAP_APPFONT ( EDIT_X , AUTO_Y ) ; \
Size = MAP_APPFONT ( 97 , EDIT_HEIGHT ) ; \
}; \
- \
FixedText FT_PORTNUMBER \
{ \
Pos = MAP_APPFONT ( 6 , AUTO_Y + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 2 ) ; \
@@ -336,7 +335,7 @@ TabPage PAGE_DBASE
WordBreak = TRUE;
Pos = MAP_APPFONT ( 6 , 3*UNRELATED_CONTROLS + 2*RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT + CHECKBOX_HEIGHT) ;
Size = MAP_APPFONT ( PAGE_X - 12 , 2*FIXEDTEXT_HEIGHT ) ;
- Text [ en-US ] = "Note: When deleted, and thus inactive, records are displayed, you will not be able to delete records from the data source." ;
+ Text [ en-US ] = "Note: When deleted, and thus inactive, records are displayed, you will not be able to delete records from the data source." ;
};
PushButton PB_INDICIES
@@ -743,8 +742,8 @@ TabPage PAGE_TEXT
HelpId = HID_DSADMIN_PAGE_TEXT;
AUTO_SEPARATORCONTROLGROUP(UNRELATED_CONTROLS, PAGE_X)
-
};
+
//.........................................................................
TabPage PAGE_USERDRIVER
{
diff --git a/dbaccess/source/ui/dlg/dbadmin2.src b/dbaccess/source/ui/dlg/dbadmin2.src
index 9cc6ba2f3..c7afa2119 100644
--- a/dbaccess/source/ui/dlg/dbadmin2.src
+++ b/dbaccess/source/ui/dlg/dbadmin2.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -62,6 +62,11 @@ String STR_COULD_NOT_CREATE_DIRECTORY
Text [ en-US ] = "The directory $name$ could not be created.";
};
+
+
+
+
+
#define EDIT_SIZE_X 50
#define FT_SIZE_X 90
#define WIN_X 220
@@ -107,7 +112,7 @@ ModalDialog DLG_DOMAINPASSWORD
{
Pos = MAP_APPFONT ( WIN_X - 56 , 43 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
- };
+ };
};
#define PAGE_X_T (PAGE_X -80)
@@ -120,7 +125,7 @@ TabPage PAGE_TABLESUBSCRIPTION
Pos = MAP_APPFONT ( 0 , 0 ) ;
Size = MAP_APPFONT ( PAGE_X_T, PAGE_Y_T) ;
HelpId = HID_DSADMIN_TABLE_SUBSCRIPTION;
-
+
Text [ en-US ] = "Tables Filter" ;
FixedLine FL_SEPARATOR1
@@ -147,4 +152,3 @@ TabPage PAGE_TABLESUBSCRIPTION
Text [ en-US ] = "Mark the tables that should be visible for the applications.";
};
};
-
diff --git a/dbaccess/source/ui/dlg/dbadminsetup.hrc b/dbaccess/source/ui/dlg/dbadminsetup.hrc
index 0725772ad..282557af2 100644
--- a/dbaccess/source/ui/dlg/dbadminsetup.hrc
+++ b/dbaccess/source/ui/dlg/dbadminsetup.hrc
@@ -72,7 +72,6 @@
#define STR_DEFAULTLDAPPORTNUMBER 60
#define STR_ADABASNAME 61
-//#define STR_ADOURL 62
#define STR_ODBCDATASOURCENAME 63
#define STR_SPREADSHEETPATH 64
#define STR_DBLOCATIONLABEL 65
diff --git a/dbaccess/source/ui/dlg/dbadminsetup.src b/dbaccess/source/ui/dlg/dbadminsetup.src
index 4d0c8df3d..f8f8dac62 100644
--- a/dbaccess/source/ui/dlg/dbadminsetup.src
+++ b/dbaccess/source/ui/dlg/dbadminsetup.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -141,7 +141,6 @@ ModalDialog DLG_DATABASE_WIZARD
};
};
-
String STR_DATABASEDEFAULTNAME
{
Text[ en-US ] = "New Database" ;
@@ -164,7 +163,6 @@ TabPage PAGE_DBWIZARD_MYSQL_INTRO
WordBreak = TRUE;
};
-
FixedText FT_MYSQL_HELPTEXT
{
Pos = MAP_APPFONT (START_X , 27 ) ;
@@ -203,7 +201,6 @@ TabPage PAGE_DBWIZARD_MYSQL_INTRO
Text[ en-US ] = "Connect directly" ;
Hide = TRUE ;
};
-
};
#define AUTHENTEDIT_X (EDIT_X - 10)
@@ -216,7 +213,7 @@ TabPage PAGE_DBWIZARD_AUTHENTIFICATION
Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ;
Hide = TRUE ;
- FixedText FT_AUTHENTIFICATIONHEADERTEXT
+ FixedText FT_AUTHENTIFICATIONHEADERTEXT
{
Pos = MAP_APPFONT ( START_X , 8 ) ;
Size = MAP_APPFONT ( (WIZARD_PAGE_X - START_X) - 12 , 2 * FIXEDTEXT_HEIGHT ) ;
@@ -224,7 +221,6 @@ TabPage PAGE_DBWIZARD_AUTHENTIFICATION
WordBreak = TRUE;
};
-
FixedText FT_AUTHENTIFICATIONHELPTEXT\
{
Pos = MAP_APPFONT (START_X , 27 ) ;
@@ -263,7 +259,6 @@ TabPage PAGE_DBWIZARD_AUTHENTIFICATION
Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
Text[ en-US ] = "~Test Connection" ;
};
-
};
@@ -275,7 +270,6 @@ TabPage PAGE_DBWIZARD_FINAL
Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ;
Hide = TRUE ;
-
FixedText FT_FINALHEADER
{
Pos = MAP_APPFONT ( START_X , 8 ) ;
@@ -292,7 +286,6 @@ TabPage PAGE_DBWIZARD_FINAL
WordBreak = TRUE ;
};
-
RadioButton RB_REGISTERDATASOURCE
{
HelpId = HID_PAGE_DBWIZARD_FINAL_RB_REGISTERDATASOURCE;
@@ -302,7 +295,6 @@ TabPage PAGE_DBWIZARD_FINAL
Text[ en-US ] = "~Yes, register the database for me" ;
};
-
RadioButton RB_DONTREGISTERDATASOURCE
{
HelpId = HID_PAGE_DBWIZARD_FINAL_RB_DONTREGISTERDATASOURCE ;
@@ -352,7 +344,6 @@ TabPage PAGE_DBWIZARD_MYSQL_JDBC
Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ;
Hide = TRUE ;
-
String STR_MYSQLJDBC_HEADERTEXT
{
Text[ en-US ] = "Set up connection to a MySQL database using JDBC" ;
@@ -392,7 +383,7 @@ TabPage PAGE_DBWIZARD_MYSQL_NATIVE
Text[ en-US ] = "Set up connection to a MySQL database" ;
WordBreak = TRUE;
};
-
+
FixedText FT_SETUP_WIZARD_HELP
{
Pos = MAP_APPFONT ( START_X , INIT_Y ) ;
@@ -416,7 +407,6 @@ TabPage PAGE_DBWIZARD_DBASE
Text[ en-US ] = "Set up a connection to dBASE files" ;
};
-
String STR_DBASE_HELPTEXT
{
Text[ en-US ] = "Select the folder where the dBASE files are stored." ;
@@ -425,34 +415,27 @@ TabPage PAGE_DBWIZARD_DBASE
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" ;
};
-
String STR_TEXT_HELPTEXT
{
Text[ en-US ] = "Select the folder where the CSV (Comma Separated Values) text files are stored. %PRODUCTNAME Base will open these files in read-only mode." ;
};
-
String STR_TEXT_PATH_OR_FILE{
Text[ en-US ] = "Path to text files";
};
-
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";
@@ -466,17 +449,14 @@ TabPage PAGE_DBWIZARD_MSACCESS
Text[ en-US ] = "Set up a connection to a Microsoft Access database" ;
};
-
String STR_MSACCESS_HELPTEXT
{
Text[ en-US ] = "Please select the Microsoft Access file you want to access.";
};
AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_MSACCESS_ET_MSACCESSLOCATION, HID_PAGE_DBWIZARD_MSACCESS_PB_MSACCESSLOCATION)
-// FT_MSACCESS_MDB_FILE
};
-
TabPage PAGE_DBWIZARD_LDAP
{
HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_LDAP";
@@ -493,7 +473,6 @@ TabPage PAGE_DBWIZARD_LDAP
WordBreak = TRUE;
};
-
FixedText FT_LDAP_HELPTEXT
{
Pos = MAP_APPFONT (START_X , 27 ) ;
@@ -518,7 +497,6 @@ TabPage PAGE_DBWIZARD_LDAP
};
};
-
TabPage PAGE_DBWIZARD_ADABAS
{
HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_ADABAS";
@@ -532,7 +510,6 @@ TabPage PAGE_DBWIZARD_ADABAS
Text[ en-US ] = "Set up a connection to an Adabas D database" ;
};
-
String STR_ADABAS_HELPTEXT{
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." ;
};
@@ -540,7 +517,6 @@ TabPage PAGE_DBWIZARD_ADABAS
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";
@@ -559,7 +535,6 @@ TabPage PAGE_DBWIZARD_ADO
};
AUTO_HELP_BROWSECONTROLGROUP(5, HID_PAGE_DBWIZARD_ADO_ET_ADOURL, HID_PAGE_DBWIZARD_ADO_PB_ADOURL)
-
};
@@ -594,8 +569,6 @@ TabPage PAGE_DBWIZARD_USERDEFINED
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";
@@ -637,12 +610,10 @@ TabPage PAGE_DBWIZARD_ORACLE
Text[ en-US ] = "Default: 1521" ;
};
-
String STR_ORACLE_DRIVERCLASSTEXT{
Text [ en-US ] = "Oracle JDBC ~driver class";
};
-
String STR_ORACLE_HELPTEXT{
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." ;
};
@@ -664,12 +635,10 @@ TabPage PAGE_DBWIZARD_SPREADSHEET
Text[ en-US ] = "Set up a connection to spreadsheets";
};
-
String STR_SPREADSHEET_HELPTEXT{
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,HID_PAGE_DBWIZARD_SPREADSHEET_PB_SPREADSHEETPATH )
String STR_SPREADSHEETPATH{
@@ -685,5 +654,3 @@ TabPage PAGE_DBWIZARD_SPREADSHEET
Text[ en-US ] = "~Password required" ;
};
};
-
-
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index 734d98e3f..52d33ce03 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,43 +29,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_DBFINDEX_HXX_
#include "dbfindex.hxx"
-#endif
-#ifndef _CONFIG_HXX
#include <tools/config.hxx>
-#endif
-#ifndef _SFXAPP_HXX //autogen
#include <sfx2/app.hxx>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _DBAUI_DBF_INDEXES_HRC_
#include "dbfindex.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef _UNOTOOLS_LOCALFILEHELPER_HXX
+#include <osl/diagnose.h>
#include <unotools/localfilehelper.hxx>
-#endif
-#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
-#endif
-#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX
#include <unotools/pathoptions.hxx>
-#endif
-#ifndef _UCBHELPER_CONTENT_HXX
#include <ucbhelper/content.hxx>
-#endif
-#ifndef SVTOOLS_FILENOTATION_HXX_
#include <svl/filenotation.hxx>
-#endif
//.........................................................................
@@ -117,12 +94,6 @@ ODbaseIndexDialog::ODbaseIndexDialog( Window * pParent, String aDataSrcName )
Init();
SetCtrls();
FreeResource();
-
- // set Hi contrast bitmaps
- aIB_Add.SetModeImage( ModuleRes(IMG_ONE_LEFT_H),BMP_COLOR_HIGHCONTRAST);
- aIB_AddAll.SetModeImage( ModuleRes(IMG_ALL_LEFT_H),BMP_COLOR_HIGHCONTRAST);
- aIB_Remove.SetModeImage( ModuleRes(IMG_ONE_RIGHT_H),BMP_COLOR_HIGHCONTRAST);
- aIB_RemoveAll.SetModeImage( ModuleRes(IMG_ALL_RIGHT_H),BMP_COLOR_HIGHCONTRAST);
}
//-------------------------------------------------------------------------
@@ -195,7 +166,7 @@ OTableIndex ODbaseIndexDialog::implRemoveIndex(const String& _rName, TableIndexL
}
(void)_bMustExist;
- DBG_ASSERT(!_bMustExist || (aSearch != _rList.end()), "ODbaseIndexDialog::implRemoveIndex : did not find the index!");
+ OSL_ENSURE(!_bMustExist || (aSearch != _rList.end()), "ODbaseIndexDialog::implRemoveIndex : did not find the index!");
return aReturn;
}
@@ -377,8 +348,8 @@ void ODbaseIndexDialog::Init()
Sequence< ::rtl::OUString> aFolderContent( ::utl::LocalFileHelper::GetFolderContents(m_aDSN,bFolder));
- ::rtl::OUString aIndexExt = ::rtl::OUString::createFromAscii("ndx");
- ::rtl::OUString aTableExt = ::rtl::OUString::createFromAscii("dbf");
+ ::rtl::OUString aIndexExt(RTL_CONSTASCII_USTRINGPARAM("ndx"));
+ ::rtl::OUString aTableExt(RTL_CONSTASCII_USTRINGPARAM("dbf"));
::std::vector< String > aUsedIndexes;
@@ -564,7 +535,7 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const
try
{
::ucbhelper::Content aContent(aURL.GetURLNoPass(),Reference<XCommandEnvironment>());
- aContent.executeCommand( rtl::OUString::createFromAscii( "delete" ),makeAny( sal_Bool( sal_True ) ) );
+ aContent.executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")),makeAny( sal_Bool( sal_True ) ) );
}
catch (const Exception& e )
{
@@ -572,7 +543,6 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const
// simply silent this. The strange algorithm here does a lot of things even if no files at all were
// created or accessed, so it's possible that the file we're trying to delete does not even exist,
// and this is a valid condition.
- // 2003-05-15 - #109677# - fs@openoffice.org
}
}
}
@@ -581,3 +551,4 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dbfindex.hxx b/dbaccess/source/ui/dlg/dbfindex.hxx
index 7bbcf1a43..d65397e76 100644
--- a/dbaccess/source/ui/dlg/dbfindex.hxx
+++ b/dbaccess/source/ui/dlg/dbfindex.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,27 +29,15 @@
#ifndef _DBAUI_DBFINDEX_HXX_
#define _DBAUI_DBFINDEX_HXX_
-#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _COMBOBOX_HXX //autogen
#include <vcl/combobox.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
#ifndef __SGI_STL_LIST
#include <list>
#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
//.........................................................................
namespace dbaui
@@ -164,3 +153,4 @@ public:
#endif // _DBAUI_DBFINDEX_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dbfindex.src b/dbaccess/source/ui/dlg/dbfindex.src
index b0d91a94f..c6a03ff9b 100644
--- a/dbaccess/source/ui/dlg/dbfindex.src
+++ b/dbaccess/source/ui/dlg/dbfindex.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,62 +35,6 @@
#define WIN_X 264
#define WIN_Y 149
-Image IMG_ONE_LEFT_H
-{
- ImageBitmap = Bitmap
- {
- File = "one_left_h.bmp" ;
- };
- MaskColor = Color
- {
- Red = 0xFFFF ;
- Green = 0x0000 ;
- Blue = 0xFFFF ;
- };
-};
-
-Image IMG_ALL_LEFT_H
-{
- ImageBitmap = Bitmap
- {
- File = "all_left_h.bmp" ;
- };
- MaskColor = Color
- {
- Red = 0xFFFF ;
- Green = 0x0000 ;
- Blue = 0xFFFF ;
- };
-};
-
-Image IMG_ONE_RIGHT_H
-{
- ImageBitmap = Bitmap
- {
- File = "one_right_h.bmp" ;
- };
- MaskColor = Color
- {
- Red = 0xFFFF ;
- Green = 0x0000 ;
- Blue = 0xFFFF ;
- };
-};
-
-Image IMG_ALL_RIGHT_H
-{
- ImageBitmap = Bitmap
- {
- File = "all_right_h.bmp" ;
- };
- MaskColor = Color
- {
- Red = 0xFFFF ;
- Green = 0x0000 ;
- Blue = 0xFFFF ;
- };
-};
-
ModalDialog DLG_DBASE_INDEXES
{
HelpID = "dbaccess:ModalDialog:DLG_DBASE_INDEXES";
@@ -180,7 +124,7 @@ ModalDialog DLG_DBASE_INDEXES
{
ImageBitmap = Bitmap
{
- File = "one_left.bmp" ;
+ File = "one_left.png" ;
};
MaskColor = Color
{
@@ -200,7 +144,7 @@ ModalDialog DLG_DBASE_INDEXES
{
ImageBitmap = Bitmap
{
- File = "all_left.bmp" ;
+ File = "all_left.png" ;
};
MaskColor = Color
{
@@ -220,7 +164,7 @@ ModalDialog DLG_DBASE_INDEXES
{
ImageBitmap = Bitmap
{
- File = "one_right.bmp" ;
+ File = "one_right.png" ;
};
MaskColor = Color
{
@@ -240,7 +184,7 @@ ModalDialog DLG_DBASE_INDEXES
{
ImageBitmap = Bitmap
{
- File = "all_right.bmp" ;
+ File = "all_right.png" ;
};
MaskColor = Color
{
@@ -250,5 +194,4 @@ ModalDialog DLG_DBASE_INDEXES
};
};
};
-
};
diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx
index 769799579..1f590e6bf 100644
--- a/dbaccess/source/ui/dlg/dbwiz.cxx
+++ b/dbaccess/source/ui/dlg/dbwiz.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,64 +29,26 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_DBWIZ_HXX
#include "dbwiz.hxx"
-#endif
-#ifndef _DBAUI_DBADMIN_HRC_
#include "dbadmin.hrc"
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _DBAUI_DATASOURCEITEMS_HXX_
#include "dsitems.hxx"
-#endif
#include "dsnItem.hxx"
-#ifndef _SFXSTRITEM_HXX
#include <svl/stritem.hxx>
-#endif
-#ifndef _SFXENUMITEM_HXX
#include <svl/eitem.hxx>
-#endif
-#ifndef _SFXINTITEM_HXX
#include <svl/intitem.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _DBAUI_ADMINPAGES_HXX_
#include "adminpages.hxx"
-#endif
-#ifndef _DBAUI_GENERALPAGE_HXX_
#include "generalpage.hxx"
-#endif
-#ifndef _DBAUI_LOCALRESACCESS_HXX_
#include "localresaccess.hxx"
-#endif
-#ifndef _DBAUI_STRINGLISTITEM_HXX_
#include "stringlistitem.hxx"
-#endif
-#ifndef _DBAUI_PROPERTYSETITEM_HXX_
#include "propertysetitem.hxx"
-#endif
-#ifndef _UNOTOOLS_CONFIGNODE_HXX_
#include <unotools/confignode.hxx>
-#endif
-#ifndef DBAUI_CONNECTIONPAGE_HXX
#include "ConnectionPage.hxx"
-#endif
-#ifndef DBAUI_DRIVERSETTINGS_HXX
#include "DriverSettings.hxx"
-#endif
-#ifndef _DBAUI_DBADMINIMPL_HXX_
#include "DbAdminImpl.hxx"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
//.........................................................................
namespace dbaui
@@ -347,7 +310,7 @@ TabPage* ODbTypeWizDialog::createPage(WizardState _nState)
pPage = ODriversSettings::CreateUser(this,*m_pOutSet);
break;
default:
- OSL_ENSURE(0,"Wrong state!");
+ OSL_FAIL("Wrong state!");
break;
}
@@ -384,7 +347,7 @@ void ODbTypeWizDialog::enableConfirmSettings( bool _bEnable )
{
enableButtons( WZB_FINISH, _bEnable );
// TODO:
- // this is hacky. At the moment, this method is used in only one case (#b6532894#).
+ // this is hacky. At the moment, this method is used in only one case.
// As soon as it is to be used more wide-spread, we should find a proper concept
// for enabling both the Next and Finish buttons, depending on the current page state.
// Plus, the concept must also care for the case where those pages are embedded into
@@ -419,3 +382,5 @@ sal_Bool ODbTypeWizDialog::onFinish()
//.........................................................................
} // namespace dbaui
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index ce1988ad5..48f5ec294 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,63 +61,25 @@
#include <cppuhelper/exc_hlp.hxx>
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_FRAME_XSTORABLE_HPP_
#include <com/sun/star/frame/XStorable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UNO_XNAMINGSERVICE_HPP_
#include <com/sun/star/uno/XNamingService.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_
#include <com/sun/star/sdbc/XDataSource.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XDOCUMENTDATASOURCE_HPP_
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
#include <com/sun/star/frame/XComponentLoader.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
#include <com/sun/star/frame/XModel.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_XSIMPLEFILEACCESS_HPP_
#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XJOBEXECUTOR_HPP_
#include <com/sun/star/task/XJobExecutor.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
#include <com/sun/star/lang/XInitialization.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
#include <com/sun/star/sdb/CommandType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_INTERACTIVEIOEXCEPTION_HPP_
#include <com/sun/star/ucb/InteractiveIOException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_IOEXCEPTION_HPP_
#include <com/sun/star/io/IOException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XTERMINATELISTENER_HPP_
#include <com/sun/star/frame/XTerminateListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XDESKTOP_HPP_
#include <com/sun/star/frame/XDesktop.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDRIVERACCESS_HPP_
#include <com/sun/star/sdbc/XDriverAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DOCUMENT_MACROEXECMODE_HPP_
#include <com/sun/star/document/MacroExecMode.hpp>
-#endif
#include <com/sun/star/ucb/IOErrorCode.hpp>
#include <com/sun/star/task/XInteractionHandler2.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
@@ -129,6 +92,7 @@
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <connectivity/DriversConfig.hxx>
#include <memory>
@@ -160,40 +124,8 @@ using namespace ::cppu;
#define START_PAGE 0
#define CONNECTION_PAGE 1
-
-
-
-//#define DBASE_PATH 1
-//#define TEXT_PATH 2
-//#define MSACCESS_PATH 3
-//#define LDAP_PATH 4
-//#define ADABAS_PATH 5
-//#define ADO_PATH 6
-//#define JDBC_PATH 7
-//#define ORACLE_PATH 8
-//#define MYSQL_JDBC_PATH 9
-//#define MYSQL_ODBC_PATH 10
-//#define ODBC_PATH 11
-//#define SPREADSHEET_PATH 12
-//#define OUTLOOKEXP_PATH 13
-//#define OUTLOOK_PATH 14
-//#define MOZILLA_PATH 15
-//#define EVOLUTION_PATH 16
-//#define EVOLUTION_PATH_GROUPWISE 17
-//#define EVOLUTION_PATH_LDAP 18
-//#define KAB_PATH 19
-//#define MACAB_PATH 20
-//#define THUNDERBIRD_PATH 21
-//#define CREATENEW_PATH 22
-//#define USERDEFINED_PATH 23
-//#define OPEN_DOC_PATH 24
-//#define MSACCESS2007_PATH 25
-//#define MYSQL_NATIVE_PATH 26
-
OFinalDBPageSetup* pFinalPage;
-
-
DBG_NAME(ODbTypeWizDialogSetup)
//=========================================================================
//= ODbTypeWizDialogSetup
@@ -240,7 +172,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent
if (pCollectionItem)
m_pCollection = pCollectionItem->getCollection();
- DBG_ASSERT(m_pCollection, "ODbTypeWizDialogSetup::ODbTypeWizDialogSetup : really need a DSN type collection !");
+ OSL_ENSURE(m_pCollection, "ODbTypeWizDialogSetup::ODbTypeWizDialogSetup : really need a DSN type collection !");
FreeResource();
@@ -250,7 +182,6 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent
m_pOutSet = new SfxItemSet( *_pItems->GetPool(), _pItems->GetRanges() );
m_pImpl->translateProperties(xDatasource, *m_pOutSet);
-// eType = m_pImpl->getDatasourceType(*m_pOutSet);
SetPageSizePixel(LogicToPixel(::Size(WIZARD_PAGE_X, WIZARD_PAGE_Y), MAP_APPFONT));
ShowButtonFixedLine(sal_True);
@@ -298,7 +229,7 @@ void ODbTypeWizDialogSetup::declareAuthDepPath( const ::rtl::OUString& _sURL, Pa
{
if ( bHasAuthentication || ( *aIter != PAGE_DBSETUPWIZARD_AUTHENTIFICATION ) )
aPath.push_back( *aIter );
- } // for(;aIter != aEnd;++aIter)
+ }
// call base method
::svt::RoadmapWizard::declarePath( _nPathId, aPath );
@@ -428,7 +359,7 @@ void ODbTypeWizDialogSetup::activateDatabasePath()
{
sal_Int32 nCreateNewDBIndex = m_pCollection->getIndexOf( m_pCollection->getEmbeddedDatabase() );
if ( nCreateNewDBIndex == -1 )
- nCreateNewDBIndex = m_pCollection->getIndexOf( ::rtl::OUString::createFromAscii( "sdbc:dbase:" ) );
+ nCreateNewDBIndex = m_pCollection->getIndexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:dbase:")) );
OSL_ENSURE( nCreateNewDBIndex != -1, "ODbTypeWizDialogSetup::activateDatabasePath: the GeneralPage should have prevented this!" );
activatePath( static_cast< PathId >( nCreateNewDBIndex + 1 ), sal_True );
@@ -457,7 +388,7 @@ void ODbTypeWizDialogSetup::activateDatabasePath()
}
break;
default:
- DBG_ERROR( "ODbTypeWizDialogSetup::activateDatabasePath: unknown creation mode!" );
+ OSL_FAIL( "ODbTypeWizDialogSetup::activateDatabasePath: unknown creation mode!" );
}
enableButtons( WZB_NEXT, m_pGeneralPage->GetDatabaseCreationMode() != OGeneralPage::eOpenExisting );
@@ -724,7 +655,7 @@ IMPL_LINK(ODbTypeWizDialogSetup, ImplClickHdl, OMySQLIntroPageSetup*, _pMySQLInt
case OMySQLIntroPageSetup::VIA_NATIVE:
sURLPrefix = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:mysql:mysqlc:"));
break;
- } // switch( _pMySQLIntroPageSetup->getMySQLMode() )
+ }
activatePath( static_cast<PathId>(m_pCollection->getIndexOf(sURLPrefix) + 1), sal_True);
return sal_True;
}
@@ -795,7 +726,7 @@ sal_Bool ODbTypeWizDialogSetup::leaveState(WizardState _nState)
// -----------------------------------------------------------------------------
void ODbTypeWizDialogSetup::setTitle(const ::rtl::OUString& /*_sTitle*/)
{
- DBG_ERROR( "ODbTypeWizDialogSetup::setTitle: not implemented!" );
+ OSL_FAIL( "ODbTypeWizDialogSetup::setTitle: not implemented!" );
// why?
}
@@ -929,15 +860,13 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
}
else if ( m_pCollection->isFileSystemBased(eType) )
{
- Reference< XSimpleFileAccess > xSimpleFileAccess(getORB()->createInstance(::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" )), UNO_QUERY);
+ Reference< XSimpleFileAccess > xSimpleFileAccess(getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))), UNO_QUERY);
INetURLObject aDBPathURL(m_sWorkPath);
aDBPathURL.Append(m_aDocURL.getBase());
createUniqueFolderName(&aDBPathURL);
::rtl::OUString sPrefix = eType;
sUrl = aDBPathURL.GetMainURL( INetURLObject::NO_DECODE);
xSimpleFileAccess->createFolder(sUrl);
- //OFileNotation aFileNotation(sUrl);
- //sUrl = aFileNotation.get(OFileNotation::N_SYSTEM);
sUrl = sPrefix.concat(sUrl);
}
m_pOutSet->Put(SfxStringItem(DSID_CONNECTURL, sUrl));
@@ -998,7 +927,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
//-------------------------------------------------------------------------
void ODbTypeWizDialogSetup::createUniqueFolderName(INetURLObject* pURL)
{
- Reference< XSimpleFileAccess > xSimpleFileAccess(getORB()->createInstance(::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" )), UNO_QUERY);
+ Reference< XSimpleFileAccess > xSimpleFileAccess(getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))), UNO_QUERY);
:: rtl::OUString sLastSegmentName = pURL->getName();
sal_Bool bFolderExists = sal_True;
sal_Int32 i = 1;
@@ -1016,7 +945,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
//-------------------------------------------------------------------------
String ODbTypeWizDialogSetup::createUniqueFileName(const INetURLObject& _rURL)
{
- Reference< XSimpleFileAccess > xSimpleFileAccess(getORB()->createInstance(::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" )), UNO_QUERY);
+ Reference< XSimpleFileAccess > xSimpleFileAccess(getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))), UNO_QUERY);
:: rtl::OUString sFilename = _rURL.getName();
::rtl::OUString BaseName = _rURL.getBase();
::rtl::OUString sExtension = _rURL.getExtension();
@@ -1207,3 +1136,4 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index 0aa8ea6ee..c4f5d57fa 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,46 +43,20 @@
#include "dbu_dlg.hrc"
#include "dbadmin.hrc"
-#ifndef _SFXITEMSET_HXX
#include <svl/itemset.hxx>
-#endif
-#ifndef _SFXSTRITEM_HXX
#include <svl/stritem.hxx>
-#endif
-#ifndef _SFXENUMITEM_HXX
#include <svl/eitem.hxx>
-#endif
-#ifndef _SFXINTITEM_HXX
#include <svl/intitem.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _SV_MNEMONIC_HXX
#include <vcl/mnemonic.hxx>
-#endif
-#ifndef _SVTOOLS_CJKOPTIONS_HXX
#include <svl/cjkoptions.hxx>
-#endif
#include <jvmaccess/virtualmachine.hxx>
-#ifndef DBAUI_ADABASPAGE_HRC
#include "AdabasPage.hrc"
-#endif
-#ifndef _DBAUI_ADASTAT_HXX_
#include "AdabasStat.hxx"
-#endif
-#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
#include <connectivity/CommonTools.hxx>
-#endif
-#ifndef DBAUI_DRIVERSETTINGS_HXX
#include "DriverSettings.hxx"
-#endif
-#ifndef _DBAUI_DBADMIN_HXX_
#include "dbadmin.hxx"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
#include "AutoControlsDef.hrc"
//.........................................................................
@@ -139,7 +114,7 @@ namespace dbaui
m_pAutoIncrementLabel, m_pAutoIncrement,
m_pAutoRetrievingLabel, m_pAutoRetrieving };
- sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]);
+ sal_Int32 nCount = SAL_N_ELEMENTS(pWindows);
for (sal_Int32 i=1; i < nCount; ++i)
{
if ( pWindows[i] )
@@ -392,7 +367,7 @@ namespace dbaui
,m_pOptionsLabel,m_pOptions,&m_aUseCatalog
};
- sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]);
+ sal_Int32 nCount = SAL_N_ELEMENTS(pWindows);
for (sal_Int32 i=1; i < nCount; ++i)
pWindows[i]->SetZOrder(pWindows[i-1], WINDOW_ZORDER_BEHIND);
}
@@ -573,7 +548,7 @@ namespace dbaui
&m_aFTDriverClass, &m_aEDDriverClass,&m_aTestJavaDriver,
m_pCharsetLabel, m_pCharset};
- sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]);
+ sal_Int32 nCount = SAL_N_ELEMENTS(pWindows);
for (sal_Int32 i=1; i < nCount; ++i)
pWindows[i]->SetZOrder(pWindows[i-1], WINDOW_ZORDER_BEHIND);
@@ -705,7 +680,7 @@ namespace dbaui
Window* pWindows[] = { &m_aMySQLSettings, &m_aSeparator2, &m_aUserNameLabel, &m_aUserName,
&m_aPasswordRequired, m_pCharsetLabel, m_pCharset};
- sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]);
+ sal_Int32 nCount = SAL_N_ELEMENTS(pWindows);
for (sal_Int32 i=1; i < nCount; ++i)
pWindows[i]->SetZOrder(pWindows[i-1], WINDOW_ZORDER_BEHIND);
@@ -845,7 +820,7 @@ namespace dbaui
,&m_CB_SHUTDB
,m_pCharsetLabel, m_pCharset,&m_PB_STAT};
- sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]);
+ sal_Int32 nCount = SAL_N_ELEMENTS(pWindows);
for (sal_Int32 i=1; i < nCount; ++i)
pWindows[i]->SetZOrder(pWindows[i-1], WINDOW_ZORDER_BEHIND);
}
@@ -1149,3 +1124,5 @@ namespace dbaui
//.........................................................................
} // namespace dbaui
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx
index 9279baf46..a6615445d 100644
--- a/dbaccess/source/ui/dlg/detailpages.hxx
+++ b/dbaccess/source/ui/dlg/detailpages.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,33 +29,15 @@
#ifndef _DBAUI_DETAILPAGES_HXX_
#define _DBAUI_DETAILPAGES_HXX_
-#ifndef _DBAUI_ADMINPAGES_HXX_
#include "adminpages.hxx"
-#endif
-#ifndef _DBAUI_CHARSETS_HXX_
#include "charsets.hxx"
-#endif
-#ifndef CHARSETLISTBOX_HXX
#include "charsetlistbox.hxx"
-#endif
-#ifndef _SV_FIELD_HXX
#include <vcl/field.hxx>
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _SV_EDIT_HXX
#include <vcl/edit.hxx>
-#endif
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
-#ifndef DBAUI_TEXTCONNECTIONHELPER_HXX
#include "TextConnectionHelper.hxx"
-#endif
#include "admincontrols.hxx"
#include <svtools/dialogcontrolling.hxx>
@@ -386,3 +369,5 @@ namespace dbaui
//.........................................................................
#endif // _DBAUI_DETAILPAGES_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx
index 6a9f26e3a..e43140636 100644
--- a/dbaccess/source/ui/dlg/directsql.cxx
+++ b/dbaccess/source/ui/dlg/directsql.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,33 +29,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBACCESS_UI_DIRECTSQL_HXX_
#include "directsql.hxx"
-#endif
-#ifndef _DBACCESS_UI_DIRECTSQL_HRC_
#include "directsql.hrc"
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _VOS_MUTEX_HXX_
-#include <vos/mutex.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
+#include <osl/mutex.hxx>
#include <tools/diagnose_ex.h>
-#endif
//........................................................................
namespace dbaui
@@ -151,7 +134,7 @@ DBG_NAME(DirectSQLDialog)
//--------------------------------------------------------------------
void DirectSQLDialog::_disposing( const EventObject& _rSource )
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
OSL_ENSURE(Reference< XConnection >(_rSource.Source, UNO_QUERY).get() == m_xConnection.get(),
@@ -325,7 +308,7 @@ DBG_NAME(DirectSQLDialog)
m_aSQL.SetSelection(Selection(sStatement.Len(), sStatement.Len()));
}
else
- OSL_ENSURE(sal_False, "DirectSQLDialog::switchToHistory: invalid position!");
+ OSL_FAIL("DirectSQLDialog::switchToHistory: invalid position!");
}
//--------------------------------------------------------------------
@@ -365,3 +348,4 @@ DBG_NAME(DirectSQLDialog)
} // namespace dbaui
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/directsql.src b/dbaccess/source/ui/dlg/directsql.src
index 4a6d3fd85..c5beb0a0c 100644
--- a/dbaccess/source/ui/dlg/directsql.src
+++ b/dbaccess/source/ui/dlg/directsql.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -137,4 +137,3 @@ String STR_DIRECTSQL_CONNECTIONLOST
{
Text [ en-US ] = "The connection to the database has been lost. This dialog will be closed.";
};
-
diff --git a/dbaccess/source/ui/dlg/dlgattr.cxx b/dbaccess/source/ui/dlg/dlgattr.cxx
index 419f4f007..a35d05192 100644
--- a/dbaccess/source/ui/dlg/dlgattr.cxx
+++ b/dbaccess/source/ui/dlg/dlgattr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,54 +30,23 @@
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_SBATTRDLG_HXX
#include "dlgattr.hxx"
-#endif
-#ifndef _SFXTABDLG_HXX //autogen
#include <sfx2/tabdlg.hxx>
-#endif
-#ifndef _SVX_NUMINF_HXX //autogen
#include <svx/numinf.hxx>
-#endif
-//CHINA001 #ifndef _SVX_CHARDLG_HXX //autogen
-//CHINA001 #include <svx/chardlg.hxx>
-//CHINA001 #endif
-
-//CHINA001 #ifndef _SVX_NUMFMT_HXX //autogen
-//CHINA001 #include <svx/numfmt.hxx>
-//CHINA001 #endif
-#ifndef _SVX_NUMINF_HXX
#include <svx/numinf.hxx>
-#endif
-
-//CHINA001 #ifndef _SVX_ALIGN_HXX //autogen
-//CHINA001 #include <svx/align.hxx>
-//CHINA001 #endif
-#ifndef _SVX_DIALOGS_HRC
#include <svx/dialogs.hrc>
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _SFXITEMSET_HXX
#include <svl/itemset.hxx>
-#endif
#define _ZFORLIST_DECLARE_TABLE
-#ifndef _ZFORLIST_HXX
#include <svl/zforlist.hxx>
-#endif
-#include <svx/svxids.hrc> //CHINA001
-#include <svx/flagsdef.hxx> //CHINA001
-#ifndef _SFXINTITEM_HXX //CHINA001
-#include <svl/intitem.hxx> //CHINA001
-#endif //CHINA001
-#ifndef _DBAUI_MODULE_DBU_HXX_
+#include <svx/svxids.hrc>
+#include <svx/flagsdef.hxx>
+#include <svl/intitem.hxx>
#include "moduledbu.hxx"
-#endif
using namespace dbaui;
DBG_NAME(SbaSbAttrDlg)
@@ -93,13 +63,12 @@ SbaSbAttrDlg::SbaSbAttrDlg(Window* pParent, const SfxItemSet* pCellAttrs, SvNumb
SetText(aTitle);
if( nFlags & TP_ATTR_CHAR )
{
-// AddTabPage( RID_SVXPAGE_CHAR_STD,String(ModuleRes(TP_ATTR_CHAR)),SvxCharStdPage::Create, 0 );
- DBG_ERROR( "found flag TP_ATTR_CHAR" );
+ OSL_FAIL( "found flag TP_ATTR_CHAR" );
}
if( nFlags & TP_ATTR_NUMBER )
- AddTabPage( RID_SVXPAGE_NUMBERFORMAT,String(ModuleRes(TP_ATTR_NUMBER)) ); //CHINA001 AddTabPage( RID_SVXPAGE_NUMBERFORMAT,String(ModuleRes(TP_ATTR_NUMBER)),SvxNumberFormatTabPage::Create, 0 );
+ AddTabPage( RID_SVXPAGE_NUMBERFORMAT,String(ModuleRes(TP_ATTR_NUMBER)) );
if( nFlags & TP_ATTR_ALIGN )
- AddTabPage( RID_SVXPAGE_ALIGNMENT,String(ModuleRes(TP_ATTR_ALIGN)) );//CHINA001 AddTabPage( RID_SVXPAGE_ALIGNMENT,String(ModuleRes(TP_ATTR_ALIGN)),SvxAlignmentTabPage::Create, 0 );
+ AddTabPage( RID_SVXPAGE_ALIGNMENT,String(ModuleRes(TP_ATTR_ALIGN)) );
FreeResource();
}
@@ -119,8 +88,6 @@ void SbaSbAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
{
case RID_SVXPAGE_NUMBERFORMAT:
{
- //CHINA001 ((SvxNumberFormatTabPage&)rTabPage).
- //CHINA001 SetNumberFormatList( *pNumberInfoItem );
aSet.Put (SvxNumberInfoItem( pNumberInfoItem->GetNumberFormatter(), (const sal_uInt16)SID_ATTR_NUMBERFORMAT_INFO));
rTabPage.PageCreated(aSet);
}
@@ -128,15 +95,11 @@ void SbaSbAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
case RID_SVXPAGE_CHAR_STD:
{
- // ((SvxCharStdPage&)rTabPage).SetFontList(SBA_MOD_EXT()->FontListItem());
}
break;
case RID_SVXPAGE_ALIGNMENT:
{
- //CHINA001 ((SvxAlignmentTabPage&)rTabPage).SetFlags(WBA_NO_ORIENTATION|WBA_NO_LINEBREAK|WBA_NO_GRIDLINES|WBA_NO_VERTICAL|WBA_NO_LEFTINDENT);
-// aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, WBA_NO_ORIENTATION|WBA_NO_LINEBREAK|WBA_NO_GRIDLINES|WBA_NO_VERTICAL|WBA_NO_LEFTINDENT));
-// rTabPage.PageCreated(aSet);
}
break;
@@ -146,3 +109,4 @@ void SbaSbAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dlgattr.src b/dbaccess/source/ui/dlg/dlgattr.src
index 6c793ac52..4ed8c1c56 100644
--- a/dbaccess/source/ui/dlg/dlgattr.src
+++ b/dbaccess/source/ui/dlg/dlgattr.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,6 +36,7 @@
#ifndef DBAUI_SBATTRDLG_HRC
#include "dlgattr.hrc"
#endif
+
//================================================
// Der Attributdialog:
TabDialog DLG_ATTR
@@ -73,7 +74,6 @@ TabDialog DLG_ATTR
};
String TP_ATTR_CHAR
{
- /* ### ACHTUNG: Neuer Text in Resource? Schrift : Zeichen */
Text [ en-US ] = "Font" ;
};
String TP_ATTR_NUMBER
@@ -89,34 +89,3 @@ TabDialog DLG_ATTR
Text [ en-US ] = "Table Format" ;
};
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx
index 04ef02d96..f55ed2fec 100644
--- a/dbaccess/source/ui/dlg/dlgsave.cxx
+++ b/dbaccess/source/ui/dlg/dlgsave.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,66 +29,26 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_DLGSAVE_HXX
#include "dlgsave.hxx"
-#endif
-#ifndef DBAUI_DLGSAVE_HRC
#include "dlgsave.hrc"
-#endif
-#ifndef _SV_MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
#include <com/sun/star/sdb/CommandType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef DBAUI_SQLNAMEEDIT_HXX
#include "SqlNameEdit.hxx"
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XHIERARCHICALNAMEACCESS_HPP_
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef DBACCESS_SOURCE_UI_INC_OBJECTNAMECHECK_HXX
#include "objectnamecheck.hxx"
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
using namespace dbaui;
@@ -348,7 +309,7 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent,
break;
default:
- OSL_ENSURE( false, "OSaveAsDlg::OSaveAsDlg: Type not supported yet!" );
+ OSL_FAIL( "OSaveAsDlg::OSaveAsDlg: Type not supported yet!" );
}
implInit();
@@ -484,3 +445,4 @@ String OSaveAsDlg::getName() const { return m_pImpl->m_aName; }
String OSaveAsDlg::getCatalog() const { return m_pImpl->m_aCatalog.IsVisible() ? m_pImpl->m_aCatalog.GetText() : String(); }
String OSaveAsDlg::getSchema() const { return m_pImpl->m_aSchema.IsVisible() ? m_pImpl->m_aSchema.GetText() : String(); }
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dlgsave.src b/dbaccess/source/ui/dlg/dlgsave.src
index 547630c71..6276093df 100644
--- a/dbaccess/source/ui/dlg/dlgsave.src
+++ b/dbaccess/source/ui/dlg/dlgsave.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -141,4 +141,3 @@ ModalDialog DLG_SAVE_AS
Text [ en-US ] = "Insert as";
};
};
-
diff --git a/dbaccess/source/ui/dlg/dlgsize.cxx b/dbaccess/source/ui/dlg/dlgsize.cxx
index 49c3379e8..d33d9bf53 100644
--- a/dbaccess/source/ui/dlg/dlgsize.cxx
+++ b/dbaccess/source/ui/dlg/dlgsize.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,18 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_DLGSIZE_HRC
#include "dlgsize.hrc"
-#endif
-#ifndef _DBAUI_DLGSIZE_HXX
#include "dlgsize.hxx"
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
//.........................................................................
namespace dbaui
@@ -128,3 +121,4 @@ IMPL_LINK( DlgSize, CbClickHdl, Button *, pButton )
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dlgsize.src b/dbaccess/source/ui/dlg/dlgsize.src
index fe9019b38..556c53974 100644
--- a/dbaccess/source/ui/dlg/dlgsize.src
+++ b/dbaccess/source/ui/dlg/dlgsize.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -149,34 +149,3 @@ ModalDialog DLG_COLWIDTH
};
Text [ en-US ] = "Column Width" ;
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dbaccess/source/ui/dlg/dsnItem.hxx b/dbaccess/source/ui/dlg/dsnItem.hxx
index 24a46d193..eb9aa07d7 100644
--- a/dbaccess/source/ui/dlg/dsnItem.hxx
+++ b/dbaccess/source/ui/dlg/dsnItem.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,4 @@ namespace dbaui
#endif // _DBAUI_DSNITEM_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dsselect.cxx b/dbaccess/source/ui/dlg/dsselect.cxx
index 7d41f0c28..8a46652c2 100644
--- a/dbaccess/source/ui/dlg/dsselect.cxx
+++ b/dbaccess/source/ui/dlg/dsselect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,70 +29,29 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_DSSELECT_HXX_
#include "dsselect.hxx"
-#endif
-#ifndef _DBAUI_DSSELECT_HRC_
#include "dsselect.hrc"
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _DBAUI_LOCALRESACCESS_HXX_
#include "localresaccess.hxx"
-#endif
-#ifndef _TOOLS_RCID_H
#include <tools/rcid.h>
-#endif
+#include <sal/macros.h>
-#ifndef _COM_SUN_STAR_SDBCX_XCREATECATALOG_HPP_
#include <com/sun/star/sdbcx/XCreateCatalog.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_
#include <com/sun/star/beans/XPropertySetInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_DIALOGS_XEXECUTABLEDIALOG_HPP_
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
#include <com/sun/star/awt/XWindow.hpp>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/helper/vclunohelper.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
#include <comphelper/processfactory.hxx>
-#endif
-#ifndef _DBAUI_DATASOURCEITEMS_HXX_
#include "dsitems.hxx"
-#endif
-#ifndef _SFXSTRITEM_HXX
#include <svl/stritem.hxx>
-#endif
-#ifndef _SFXINTITEM_HXX
#include <svl/intitem.hxx>
-#endif
-#ifndef _SFXENUMITEM_HXX
#include <svl/eitem.hxx>
-#endif
-#ifndef _SFXITEMSET_HXX
#include <svl/itemset.hxx>
-#endif
//.........................................................................
namespace dbaui
@@ -141,7 +101,7 @@ ODatasourceSelectDialog::ODatasourceSelectDialog(Window* _pParent, const StringB
// move the buttons
PushButton* pButtons[] = { &m_aOk, &m_aCancel, &m_aHelp ,&m_aCreateAdabasDB};
- for (size_t i=0; i<sizeof(pButtons)/sizeof(pButtons[0]); ++i)
+ for (size_t i=0; i < SAL_N_ELEMENTS(pButtons); ++i)
{
Point aOldPos = pButtons[i]->GetPosPixel();
pButtons[i]->SetPosPixel(Point(aOldPos.X() - nLostPixels, aOldPos.Y()));
@@ -189,7 +149,7 @@ IMPL_LINK( ODatasourceSelectDialog, CreateDBClickHdl, PushButton*, /*pButton*/ )
if ( xCatalog.is() && m_pOutputSet )
{
Sequence< Any > aArgs(2);
- aArgs[0] <<= PropertyValue(::rtl::OUString::createFromAscii("CreateCatalog"), 0,makeAny(xCatalog) , PropertyState_DIRECT_VALUE);
+ aArgs[0] <<= PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateCatalog")), 0, makeAny(xCatalog), PropertyState_DIRECT_VALUE);
aArgs[1] <<= PropertyValue(PROPERTY_PARENTWINDOW, 0, makeAny(VCLUnoHelper::GetInterface(this)), PropertyState_DIRECT_VALUE);
Reference< XExecutableDialog > xDialog(
@@ -316,3 +276,4 @@ void ODatasourceSelectDialog::fillListBox(const StringBag& _rDatasources)
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dsselect.hxx b/dbaccess/source/ui/dlg/dsselect.hxx
index bda904b9b..face8a6c8 100644
--- a/dbaccess/source/ui/dlg/dsselect.hxx
+++ b/dbaccess/source/ui/dlg/dsselect.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,4 @@ protected:
#endif // _DBAUI_DSSELECT_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dsselect.src b/dbaccess/source/ui/dlg/dsselect.src
index 1b030ee1c..d6a885555 100644
--- a/dbaccess/source/ui/dlg/dsselect.src
+++ b/dbaccess/source/ui/dlg/dsselect.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,7 +59,7 @@ ModalDialog DLG_DATASOURCE_SELECTION
HScroll = TRUE ;
Sort = TRUE ;
};
-
+
OKButton PB_OK
{
Pos = MAP_APPFONT ( 166 , 6 ) ;
@@ -107,5 +107,3 @@ ModalDialog DLG_DATASOURCE_SELECTION
Text [ en-US ] = "Choose a database";
};
};
-
-
diff --git a/dbaccess/source/ui/dlg/finteraction.cxx b/dbaccess/source/ui/dlg/finteraction.cxx
index 38b784c7e..8156a658e 100644
--- a/dbaccess/source/ui/dlg/finteraction.cxx
+++ b/dbaccess/source/ui/dlg/finteraction.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_FILEPICKER_INTERACTION_HXX
#include "finteraction.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UCB_INTERACTIVEIOEXCEPTION_HPP_
+#include <osl/diagnose.h>
#include <com/sun/star/ucb/InteractiveIOException.hpp>
-#endif
//........................................................................
namespace dbaui
@@ -56,7 +52,7 @@ namespace dbaui
,m_bDoesNotExist(sal_False)
{
DBG_CTOR( OFilePickerInteractionHandler, NULL );
- DBG_ASSERT( m_xMaster.is(), "OFilePickerInteractionHandler::OFilePickerInteractionHandler: invalid master handler!" );
+ OSL_ENSURE( m_xMaster.is(), "OFilePickerInteractionHandler::OFilePickerInteractionHandler: invalid master handler!" );
}
//--------------------------------------------------------------------
@@ -86,3 +82,4 @@ namespace dbaui
} // namespace svt
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/finteraction.hxx b/dbaccess/source/ui/dlg/finteraction.hxx
index 94156b51e..4015f2fdc 100644
--- a/dbaccess/source/ui/dlg/finteraction.hxx
+++ b/dbaccess/source/ui/dlg/finteraction.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,12 +29,8 @@
#ifndef DBAUI_FILEPICKER_INTERACTION_HXX
#define DBAUI_FILEPICKER_INTERACTION_HXX
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_
#include <com/sun/star/task/XInteractionHandler.hpp>
-#endif
//........................................................................
namespace dbaui
@@ -73,3 +70,4 @@ namespace dbaui
#endif // DBAUI_FILEPICKER_INTERACTION_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 3a0964d50..e6d7df7bf 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,6 +52,7 @@
#include "UITools.hxx"
#include <comphelper/processfactory.hxx>
#include <unotools/confignode.hxx>
+#include <osl/diagnose.h>
//.........................................................................
namespace dbaui
@@ -99,12 +101,12 @@ namespace dbaui
DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rItems.GetItem(DSID_TYPECOLLECTION));
if (pCollectionItem)
m_pCollection = pCollectionItem->getCollection();
- DBG_ASSERT(m_pCollection, "OGeneralPage::OGeneralPage : really need a DSN type collection !");
+ OSL_ENSURE(m_pCollection, "OGeneralPage::OGeneralPage : really need a DSN type collection !");
// If no driver for embedded DBs is installed, and no dBase driver, then hide the "Create new database" option
sal_Int32 nCreateNewDBIndex = m_pCollection->getIndexOf( m_pCollection->getEmbeddedDatabase() );
if ( nCreateNewDBIndex == -1 )
- nCreateNewDBIndex = m_pCollection->getIndexOf( ::rtl::OUString::createFromAscii( "sdbc:dbase:" ) );
+ nCreateNewDBIndex = m_pCollection->getIndexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:dbase:")) );
bool bHideCreateNew = ( nCreateNewDBIndex == -1 );
// also, if our application policies tell us to hide the option, do it
@@ -126,7 +128,7 @@ namespace dbaui
&m_aTypePostLabel
};
const long nOffset = m_aRB_OpenDocument.GetPosPixel().Y() - m_aRB_CreateDatabase.GetPosPixel().Y();
- for ( size_t i=0; i < sizeof( pWindowsToMove ) / sizeof( pWindowsToMove[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS( pWindowsToMove ); ++i )
{
Point aPos( pWindowsToMove[i]->GetPosPixel() );
aPos.Y() -= nOffset;
@@ -212,7 +214,7 @@ namespace dbaui
++loop
)
insertDatasourceTypeEntryData( loop->eType, loop->sDisplayName );
- } // if ( m_pCollection )
+ }
}
}
@@ -359,8 +361,8 @@ namespace dbaui
// collect some items and some values
SFX_ITEMSET_GET(_rSet, pNameItem, SfxStringItem, DSID_NAME, sal_True);
SFX_ITEMSET_GET(_rSet, pUrlItem, SfxStringItem, DSID_CONNECTURL, sal_True);
- DBG_ASSERT(pUrlItem, "OGeneralPage::implInitControls : missing the type attribute !");
- DBG_ASSERT(pNameItem, "OGeneralPage::implInitControls : missing the type attribute !");
+ OSL_ENSURE(pUrlItem, "OGeneralPage::implInitControls : missing the type attribute !");
+ OSL_ENSURE(pNameItem, "OGeneralPage::implInitControls : missing the type attribute !");
sName = pNameItem->GetValue();
sConnectURL = pUrlItem->GetValue();
}
@@ -606,7 +608,6 @@ namespace dbaui
const SfxFilter* pFilter = getStandardDatabaseFilter();
if ( pFilter )
{
-// aFileDlg.AddFilter(pFilter->GetUIName(),pFilter->GetDefaultExtension());
aFileDlg.SetCurrentFilter(pFilter->GetUIName());
}
if ( aFileDlg.Execute() == ERRCODE_NONE )
@@ -634,3 +635,4 @@ namespace dbaui
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx
index 4500fb296..21b1f6837 100644
--- a/dbaccess/source/ui/dlg/generalpage.hxx
+++ b/dbaccess/source/ui/dlg/generalpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,21 +29,11 @@
#ifndef _DBAUI_GENERALPAGE_HXX_
#define _DBAUI_GENERALPAGE_HXX_
-#ifndef _DBAUI_ADMINPAGES_HXX_
#include "adminpages.hxx"
-#endif
-#ifndef DBACCESS_SOURCE_UI_INC_OPENDOCCONTROLS_HXX
#include "opendoccontrols.hxx"
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _SV_EDIT_HXX
#include <vcl/edit.hxx>
-#endif
#include <svtools/dialogcontrolling.hxx>
#include <memory>
@@ -175,3 +166,5 @@ namespace dbaui
} // namespace dbaui
//.........................................................................
#endif // _DBAUI_GENERALPAGE_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index dda66d958..0d45e6ec7 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,42 +29,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_INDEXDIALOG_HXX_
#include "indexdialog.hxx"
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _DBAUI_INDEXDIALOG_HRC_
#include "indexdialog.hrc"
-#endif
-#ifndef _DBAUI_INDEXFIELDSCONTROL_HXX_
#include "indexfieldscontrol.hxx"
-#endif
-#ifndef _DBAUI_INDEXCOLLECTION_HXX_
#include "indexcollection.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _SVTOOLS_IMGDEF_HXX
#include <svtools/imgdef.hxx>
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
+#include <osl/diagnose.h>
//......................................................................
namespace dbaui
{
@@ -168,14 +146,14 @@ namespace dbaui
//------------------------------------------------------------------
void DbaIndexList::enableSelectHandler()
{
- DBG_ASSERT(m_bSuspendSelectHdl, "DbaIndexList::enableSelectHandler: invalid call (this is not cumulative)!");
+ OSL_ENSURE(m_bSuspendSelectHdl, "DbaIndexList::enableSelectHandler: invalid call (this is not cumulative)!");
m_bSuspendSelectHdl = sal_False;
}
//------------------------------------------------------------------
void DbaIndexList::disableSelectHandler()
{
- DBG_ASSERT(!m_bSuspendSelectHdl, "DbaIndexList::enableSelectHandler: invalid call (this is not cumulative)!");
+ OSL_ENSURE(!m_bSuspendSelectHdl, "DbaIndexList::enableSelectHandler: invalid call (this is not cumulative)!");
m_bSuspendSelectHdl = sal_True;
}
@@ -209,7 +187,7 @@ DBG_NAME(DbaIndexDialog)
const Reference< XMultiServiceFactory >& _rxORB,sal_Int32 _nMaxColumnsInIndex)
:ModalDialog( _pParent, ModuleRes(DLG_INDEXDESIGN))
,m_xConnection(_rxConnection)
- ,m_aGeometrySettings(E_DIALOG, ::rtl::OUString::createFromAscii("dbaccess.tabledesign.indexdialog"))
+ ,m_aGeometrySettings(E_DIALOG, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dbaccess.tabledesign.indexdialog")))
,m_aActions (this, ModuleRes(TLB_ACTIONS))
,m_aIndexes (this, ModuleRes(CTR_INDEXLIST))
,m_aIndexDetails (this, ModuleRes(FL_INDEXDETAILS))
@@ -252,7 +230,7 @@ DBG_NAME(DbaIndexDialog)
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "DbaIndexDialog::DbaIndexDialog: could not retrieve basic information from the UNO collection!");
+ OSL_FAIL("DbaIndexDialog::DbaIndexDialog: could not retrieve basic information from the UNO collection!");
}
fillIndexList();
@@ -262,14 +240,6 @@ DBG_NAME(DbaIndexDialog)
m_aClose.SetClickHdl(LINK(this, DbaIndexDialog, OnCloseDialog));
- // get our most recent geometry settings
-// if (m_aGeometrySettings.Exists())
-// {
-// Point aPos;
-// m_aGeometrySettings.GetPosition(aPos.X(), aPos.Y());
-// SetPosPixel(aPos);
-// }
-
// if all of the indexes have an empty description, we're not interested in displaying it
Indexes::const_iterator aCheck;
@@ -339,8 +309,7 @@ DBG_NAME(DbaIndexDialog)
//------------------------------------------------------------------
void DbaIndexDialog::fillIndexList()
{
- sal_Bool bHiContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
- Image aPKeyIcon(ModuleRes( bHiContrast ? IMG_PKEYICON_SCH : IMG_PKEYICON));
+ Image aPKeyIcon(ModuleRes( IMG_PKEYICON ));
// fill the list with the index names
m_aIndexes.Clear();
Indexes::iterator aIndexLoop = m_pIndexes->begin();
@@ -366,17 +335,13 @@ DBG_NAME(DbaIndexDialog)
delete m_pIndexes;
delete m_pFields;
- // save our geometry settings
-// Point aPos = GetPosPixel();
-// m_aGeometrySettings.SetPosition(aPos.X(), aPos.Y());
-
DBG_DTOR(DbaIndexDialog,NULL);
}
//------------------------------------------------------------------
sal_Bool DbaIndexDialog::implCommit(SvLBoxEntry* _pEntry)
{
- DBG_ASSERT(_pEntry, "DbaIndexDialog::implCommit: invalid entry!");
+ OSL_ENSURE(_pEntry, "DbaIndexDialog::implCommit: invalid entry!");
Indexes::iterator aCommitPos = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(_pEntry->GetUserData());
@@ -431,7 +396,7 @@ DBG_NAME(DbaIndexDialog)
}
if ((i>0x7FFFFFFF) || (i<0))
{
- DBG_ERROR("DbaIndexDialog::OnNewIndex: no free index name found!");
+ OSL_FAIL("DbaIndexDialog::OnNewIndex: no free index name found!");
// can't do anything ... of course we try another base, but this could end with the same result ...
return;
}
@@ -444,7 +409,7 @@ DBG_NAME(DbaIndexDialog)
for (SvLBoxEntry* pAdjust = m_aIndexes.First(); pAdjust; pAdjust = m_aIndexes.Next(pAdjust))
{
Indexes::iterator aAfterInsertPos = m_pIndexes->find(m_aIndexes.GetEntryText(pAdjust));
- DBG_ASSERT(aAfterInsertPos != m_pIndexes->end(), "DbaIndexDialog::OnNewIndex: problems with on of the entries!");
+ OSL_ENSURE(aAfterInsertPos != m_pIndexes->end(), "DbaIndexDialog::OnNewIndex: problems with on of the entries!");
pAdjust->SetUserData(reinterpret_cast< void* >(sal_Int32(aAfterInsertPos - m_pIndexes->begin())));
}
@@ -460,7 +425,7 @@ DBG_NAME(DbaIndexDialog)
{
// the selected index
SvLBoxEntry* pSelected = m_aIndexes.FirstSelected();
- DBG_ASSERT(pSelected, "DbaIndexDialog::OnDropIndex: invalid call!");
+ OSL_ENSURE(pSelected, "DbaIndexDialog::OnDropIndex: invalid call!");
if (pSelected)
{
// let the user confirm the drop
@@ -486,7 +451,7 @@ DBG_NAME(DbaIndexDialog)
{
// do the drop
Indexes::iterator aDropPos = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(_pEntry->GetUserData());
- DBG_ASSERT(aDropPos != m_pIndexes->end(), "DbaIndexDialog::OnDropIndex: did not find the index in my collection!");
+ OSL_ENSURE(aDropPos != m_pIndexes->end(), "DbaIndexDialog::OnDropIndex: did not find the index in my collection!");
SQLExceptionInfo aExceptionInfo;
sal_Bool bSuccess = sal_False;
@@ -516,7 +481,7 @@ DBG_NAME(DbaIndexDialog)
for (SvLBoxEntry* pAdjust = m_aIndexes.First(); pAdjust; pAdjust = m_aIndexes.Next(pAdjust))
{
Indexes::iterator aAfterDropPos = m_pIndexes->find(m_aIndexes.GetEntryText(pAdjust));
- DBG_ASSERT(aAfterDropPos != m_pIndexes->end(), "DbaIndexDialog::OnDropIndex: problems with on of the remaining entries!");
+ OSL_ENSURE(aAfterDropPos != m_pIndexes->end(), "DbaIndexDialog::OnDropIndex: problems with on of the remaining entries!");
pAdjust->SetUserData(reinterpret_cast< void* >(sal_Int32(aAfterDropPos - m_pIndexes->begin())));
}
@@ -537,7 +502,7 @@ DBG_NAME(DbaIndexDialog)
{
// the selected index
SvLBoxEntry* pSelected = m_aIndexes.FirstSelected();
- DBG_ASSERT(pSelected, "DbaIndexDialog::OnRenameIndex: invalid call!");
+ OSL_ENSURE(pSelected, "DbaIndexDialog::OnRenameIndex: invalid call!");
// save the changes made 'til here
// Upon leaving the edit mode, the control will be re-initialized with the
@@ -566,7 +531,7 @@ DBG_NAME(DbaIndexDialog)
{
// the selected index
SvLBoxEntry* pSelected = m_aIndexes.FirstSelected();
- DBG_ASSERT(pSelected, "DbaIndexDialog::OnResetIndex: invalid call!");
+ OSL_ENSURE(pSelected, "DbaIndexDialog::OnResetIndex: invalid call!");
Indexes::iterator aResetPos = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(pSelected->GetUserData());
@@ -624,7 +589,7 @@ DBG_NAME(DbaIndexDialog)
{
if (m_aIndexes.IsEditingActive())
{
- DBG_ASSERT(!m_bEditAgain, "DbaIndexDialog::OnCloseDialog: somebody was faster than hell!");
+ OSL_ENSURE(!m_bEditAgain, "DbaIndexDialog::OnCloseDialog: somebody was faster than hell!");
// this means somebody entered a new name, which was invalid, which cause us to posted us an event,
// and before the event arrived the user clicked onto "close". VERY fast, this user ....
m_aIndexes.EndEditing(sal_False);
@@ -635,7 +600,7 @@ DBG_NAME(DbaIndexDialog)
// the currently selected entry
const SvLBoxEntry* pSelected = m_aIndexes.FirstSelected();
- DBG_ASSERT(pSelected == m_pPreviousSelection, "DbaIndexDialog::OnCloseDialog: inconsistence!");
+ OSL_ENSURE(pSelected == m_pPreviousSelection, "DbaIndexDialog::OnCloseDialog: inconsistence!");
sal_Int32 nResponse = RET_NO;
if (pSelected)
@@ -680,7 +645,7 @@ DBG_NAME(DbaIndexDialog)
{
Indexes::iterator aPosition = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(_pEntry->GetUserData());
- DBG_ASSERT(aPosition >= m_pIndexes->begin() && aPosition < m_pIndexes->end(),
+ OSL_ENSURE(aPosition >= m_pIndexes->begin() && aPosition < m_pIndexes->end(),
"DbaIndexDialog::OnEntryEdited: invalid entry!");
String sNewName = m_aIndexes.GetEntryText(_pEntry);
@@ -804,7 +769,7 @@ DBG_NAME(DbaIndexDialog)
//------------------------------------------------------------------
IMPL_LINK( DbaIndexDialog, OnModified, void*, /*NOTINTERESTEDIN*/ )
{
- DBG_ASSERT(m_pPreviousSelection, "DbaIndexDialog, OnModified: invalid call!");
+ OSL_ENSURE(m_pPreviousSelection, "DbaIndexDialog, OnModified: invalid call!");
Indexes::iterator aPosition = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(m_pPreviousSelection->GetUserData());
aPosition->setModified(sal_True);
@@ -912,22 +877,19 @@ DBG_NAME(DbaIndexDialog)
}
}
//------------------------------------------------------------------
- ImageList DbaIndexDialog::getImageList(sal_Int16 _eBitmapSet,sal_Bool _bHiContast) const
+ ImageList DbaIndexDialog::getImageList(sal_Int16 _eBitmapSet) const
{
sal_Int16 nN = IMG_INDEX_DLG_SC;
- sal_Int16 nH = IMG_INDEX_DLG_SCH;
if ( _eBitmapSet == SFX_SYMBOLS_SIZE_LARGE )
{
nN = IMG_INDEX_DLG_LC;
- nH = IMG_INDEX_DLG_LCH;
- } // if ( _eBitmapSet == SFX_SYMBOLS_LARGE )
- return ImageList(ModuleRes( _bHiContast ? nH : nN ));
+ }
+ return ImageList( nN );
}
//------------------------------------------------------------------
void DbaIndexDialog::resizeControls(const Size& _rDiff)
{
// we use large images so we must change them
- Size aTbNewSize = m_aActions.GetSizePixel();
if ( _rDiff.Width() || _rDiff.Height() )
{
Size aDlgSize = GetSizePixel();
@@ -960,3 +922,4 @@ DBG_NAME(DbaIndexDialog)
} // namespace dbaui
//......................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/indexdialog.src b/dbaccess/source/ui/dlg/indexdialog.src
index fcc0a819c..d77706f5e 100644
--- a/dbaccess/source/ui/dlg/indexdialog.src
+++ b/dbaccess/source/ui/dlg/indexdialog.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -58,7 +58,6 @@ ModalDialog DLG_INDEXDESIGN
ToolBox TLB_ACTIONS
{
Pos = MAP_APPFONT ( 6 , 6 ) ;
- // Size = MAP_APPFONT ( DIALOG_SIZE_X - 14 , 14 ) ;
ButtonType = BUTTON_SYMBOL;
Align = BOXALIGN_TOP;
HelpId = HID_INDEX_DIALOG_ACTION_TB;
@@ -174,14 +173,17 @@ String STR_TAB_INDEX_SORTORDER
{
Text [ en-US ] = "Sort order" ;
};
+
String STR_TAB_INDEX_FIELD
{
Text [ en-US ] = "Index field" ;
};
+
String STR_ORDER_ASCENDING
{
Text [ en-US ] = "Ascending" ;
};
+
String STR_ORDER_DESCENDING
{
Text [ en-US ] = "Descending" ;
@@ -199,12 +201,7 @@ String STR_LOGICAL_INDEX_NAME
Image IMG_PKEYICON
{
- ImageBitmap = Bitmap { File = "pkey.bmp"; };
- MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
-};
-Image IMG_PKEYICON_SCH
-{
- ImageBitmap = Bitmap { File = "pkey_sch.bmp"; };
+ ImageBitmap = Bitmap { File = "pkey.png"; };
MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
};
@@ -236,4 +233,3 @@ String STR_INDEXDESIGN_DOUBLE_COLUMN_NAME
{
Text [ en-US ] = "In an index definition, no table column may occur more than once. However, you have entered column \"$name$\" twice.";
};
-
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index 2328f84bc..187612995 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_INDEXFIELDSCONTROL_HXX_
#include "indexfieldscontrol.hxx"
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
//......................................................................
namespace dbaui
@@ -205,7 +198,6 @@ DBG_NAME(IndexFieldsControl)
// insert rows for the the fields
RowInserted(GetRowCount(), m_aFields.size(), sal_False);
// insert an additional row for a new field for that index
-// if(!m_nMaxColumnsInIndex || GetRowCount() < m_nMaxColumnsInIndex )
RowInserted(GetRowCount(), 1, sal_False);
SetUpdateMode(sal_True);
@@ -318,7 +310,7 @@ DBG_NAME(IndexFieldsControl)
break;
default:
- OSL_ENSURE(sal_False, "IndexFieldsControl::GetController: invalid column id!");
+ OSL_FAIL("IndexFieldsControl::GetController: invalid column id!");
}
if (pReturn)
@@ -408,7 +400,7 @@ DBG_NAME(IndexFieldsControl)
}
break;
default:
- OSL_ENSURE(sal_False, "IndexFieldsControl::SaveModified: invalid column id!");
+ OSL_FAIL("IndexFieldsControl::SaveModified: invalid column id!");
}
return sal_True;
}
@@ -432,7 +424,7 @@ DBG_NAME(IndexFieldsControl)
break;
default:
- OSL_ENSURE(sal_False, "IndexFieldsControl::InitController: invalid column id!");
+ OSL_FAIL("IndexFieldsControl::InitController: invalid column id!");
}
}
@@ -498,7 +490,7 @@ DBG_NAME(IndexFieldsControl)
else
return _rRow->bSortAscending ? m_sAscendingText : m_sDescendingText;
default:
- OSL_ENSURE(sal_False, "IndexFieldsControl::GetCurrentRowCellText: invalid column id!");
+ OSL_FAIL("IndexFieldsControl::GetCurrentRowCellText: invalid column id!");
}
}
return String();
@@ -514,3 +506,4 @@ DBG_NAME(IndexFieldsControl)
} // namespace dbaui
//......................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/makefile.mk b/dbaccess/source/ui/dlg/makefile.mk
deleted file mode 100644
index ca0d3ab8c..000000000
--- a/dbaccess/source/ui/dlg/makefile.mk
+++ /dev/null
@@ -1,154 +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=uidlg
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-.IF "$(SYSTEM_ODBC_HEADERS)" == "YES"
-CFLAGS+=-DSYSTEM_ODBC_HEADERS
-.ENDIF
-
-.IF "$(WINDOWS_VISTA_PSDK)"!="" && "$(PROF_EDITION)"==""
-CDEFS+=-DWINDOWS_VISTA_PSDK
-.ENDIF
-
-.IF "$(GUI)$(COM)"=="WNTGCC" # for adoint.h
-CFLAGS+=-fpermissive
-.ENDIF
-
-# --- Files -------------------------------------
-
-# ... resource files ............................
-
-
-LOCALIZE_ME=AutoControls_tmpl.hrc
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- AutoControls.src \
- ConnectionPage.src \
- UserAdmin.src \
- admincontrols.src \
- directsql.src \
- AdabasStat.src \
- indexdialog.src \
- RelationDlg.src \
- adtabdlg.src \
- dlgsave.src \
- queryorder.src \
- queryfilter.src \
- paramdialog.src \
- dsselect.src \
- dbadmin.src \
- dbadmin2.src \
- dbadminsetup.src \
- dbfindex.src \
- dlgsize.src \
- CollectionView.src \
- dlgattr.src \
- advancedsettings.src\
- UserAdminDlg.src \
- sqlmessage.src \
- textconnectionsettings.src
-
-
-# ... object files ............................
-EXCEPTIONSFILES= \
- $(SLO)$/directsql.obj \
- $(SLO)$/dbwiz.obj \
- $(SLO)$/dbwizsetup.obj \
- $(SLO)$/generalpage.obj \
- $(SLO)$/indexfieldscontrol.obj \
- $(SLO)$/indexdialog.obj \
- $(SLO)$/RelationDlg.obj \
- $(SLO)$/adtabdlg.obj \
- $(SLO)$/dlgsave.obj \
- $(SLO)$/admincontrols.obj \
- $(SLO)$/adminpages.obj \
- $(SLO)$/queryorder.obj \
- $(SLO)$/queryfilter.obj \
- $(SLO)$/paramdialog.obj \
- $(SLO)$/dbadmin.obj \
- $(SLO)$/detailpages.obj \
- $(SLO)$/sqlmessage.obj \
- $(SLO)$/finteraction.obj \
- $(SLO)$/ConnectionPage.obj \
- $(SLO)$/ConnectionHelper.obj \
- $(SLO)$/TextConnectionHelper.obj \
- $(SLO)$/ConnectionPageSetup.obj \
- $(SLO)$/DBSetupConnectionPages.obj \
- $(SLO)$/UserAdminDlg.obj \
- $(SLO)$/UserAdmin.obj \
- $(SLO)$/AdabasStat.obj \
- $(SLO)$/tablespage.obj \
- $(SLO)$/DbAdminImpl.obj \
- $(SLO)$/TablesSingleDlg.obj \
- $(SLO)$/CollectionView.obj \
- $(SLO)$/dsselect.obj \
- $(SLO)$/dbfindex.obj \
- $(SLO)$/DriverSettings.obj \
- $(SLO)$/odbcconfig.obj \
- $(SLO)$/advancedsettings.obj \
- $(SLO)$/textconnectionsettings.obj
-
-SLOFILES= \
- $(EXCEPTIONSFILES) \
- $(SLO)$/dlgsize.obj \
- $(SLO)$/dlgattr.obj \
- $(SLO)$/optionalboolitem.obj
-
-.IF "$(WINDOWS_VISTA_PSDK)"!="" && "$(PROF_EDITION)"==""
-DISABLE_ADO=TRUE
-.ENDIF # "$(WINDOWS_VISTA_PSDK)"!="" && "$(PROF_EDITION)"==""
-
-.IF "$(GUI)"=="WNT" && "$(DISABLE_ADO)"==""
-SLOFILES+= $(SLO)$/adodatalinks.obj
-.ENDIF
-
-# --- Targets ----------------------------------
-.INCLUDE : target.mk
-
-$(SLO)$/ConnectionHelper.obj : $(LOCALIZE_ME_DEST)
-
-$(SLO)$/ConnectionPageSetup.obj : $(LOCALIZE_ME_DEST)
-
-$(SLO)$/DBSetupConnectionPages.obj : $(LOCALIZE_ME_DEST)
-
-$(SLO)$/TextConnectionHelper.obj : $(LOCALIZE_ME_DEST)
-
-$(SLO)$/detailpages.obj : $(LOCALIZE_ME_DEST)
-
-$(SLO)$/tablespage.obj : $(LOCALIZE_ME_DEST)
-
-$(SLO)$/ConnectionPage.obj : $(LOCALIZE_ME_DEST)
diff --git a/dbaccess/source/ui/dlg/odbcconfig.cxx b/dbaccess/source/ui/dlg/odbcconfig.cxx
index 15e15a338..2c9765452 100644
--- a/dbaccess/source/ui/dlg/odbcconfig.cxx
+++ b/dbaccess/source/ui/dlg/odbcconfig.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,38 +29,25 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_ODBC_CONFIG_HXX_
#include "odbcconfig.hxx"
+
+#ifdef SYSTEM_ODBC_HEADERS
+#include <sqltypes.h>
+#else
+#include <odbc/sqltypes.h>
#endif
+
#include <rtl/bootstrap.hxx>
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
-#endif
-#ifndef _RTL_USTRBUF_HXX_
#include <rtl/ustrbuf.hxx>
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef _OSL_PROCESS_H_
#include <osl/process.h>
-#endif
-#ifndef _THREAD_HXX_
#include <osl/thread.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
#ifdef HAVE_ODBC_SUPPORT
-#if defined(OS2)
-#define ODBC_LIBRARY "ODBC.DLL"
-#define ODBC_UI_LIBRARY "ODBCINST.DLL"
-#endif
#if defined WNT
#define ODBC_LIBRARY "ODBC32.DLL"
#define ODBC_UI_LIBRARY "ODBCCP32.DLL"
@@ -90,18 +78,11 @@
#endif
#endif // defined(WNT)
-#if defined(OS2)
-#define ALLREADY_HAVE_OS2_TYPES
-#define DONT_TD_VOID
-#endif
-
#ifdef SYSTEM_ODBC_HEADERS
#include <sqlext.h>
#else
-#ifndef __SQLEXT_H
#include <odbc/sqlext.h>
#endif
-#endif
#if defined(WNT)
#if defined _MSC_VER
@@ -112,10 +93,6 @@
#endif // defined(WNT)
// from here on you can do what you want to
-#if defined(OS2)
-#define SQL_API _System
-#endif // defined(OS2)
-
#else
#define ODBC_LIBRARY ""
@@ -295,7 +272,7 @@ void OOdbcEnumeration::getDatasourceNames(StringBag& _rNames)
if (!allocEnv())
{
- OSL_ENSURE(sal_False, "OOdbcEnumeration::getDatasourceNames: could not allocate an ODBC environment!");
+ OSL_FAIL("OOdbcEnumeration::getDatasourceNames: could not allocate an ODBC environment!");
return;
}
@@ -401,3 +378,5 @@ bool OOdbcManagement::isRunning() const
//.........................................................................
} // namespace dbaui
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/odbcconfig.hxx b/dbaccess/source/ui/dlg/odbcconfig.hxx
index dd63c3155..e35338a19 100644
--- a/dbaccess/source/ui/dlg/odbcconfig.hxx
+++ b/dbaccess/source/ui/dlg/odbcconfig.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,11 +31,11 @@
#include "commontypes.hxx"
-#if defined(WNT) || defined (UNX) || defined (OS2)
+#if defined(WNT) || defined (UNX)
#define HAVE_ODBC_SUPPORT
#endif
-#if ( defined(WNT) || defined (OS2) ) && defined(HAVE_ODBC_SUPPORT)
+#if defined(WNT) && defined(HAVE_ODBC_SUPPORT)
#define HAVE_ODBC_ADMINISTRATION
#endif
@@ -138,3 +139,4 @@ public:
#endif // _DBAUI_ODBC_CONFIG_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/optionalboolitem.cxx b/dbaccess/source/ui/dlg/optionalboolitem.cxx
index d266e70f8..704a846a3 100644
--- a/dbaccess/source/ui/dlg/optionalboolitem.cxx
+++ b/dbaccess/source/ui/dlg/optionalboolitem.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -74,3 +75,5 @@ namespace dbaui
//........................................................................
} // namespace dbaui
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/optionalboolitem.hxx b/dbaccess/source/ui/dlg/optionalboolitem.hxx
index 80740cecd..6890ac7a2 100644
--- a/dbaccess/source/ui/dlg/optionalboolitem.hxx
+++ b/dbaccess/source/ui/dlg/optionalboolitem.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -65,3 +66,5 @@ namespace dbaui
//........................................................................
#endif // DBACCESS_OPTIONALBOOLITEM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx
index 39800a8a8..3f273ce84 100644
--- a/dbaccess/source/ui/dlg/paramdialog.cxx
+++ b/dbaccess/source/ui/dlg/paramdialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,49 +29,21 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_PARAMDIALOG_HXX_
#include "paramdialog.hxx"
-#endif
-#ifndef _DBAUI_PARAMDIALOG_HRC_
#include "paramdialog.hrc"
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _DBAUI_COMMON_TYPES_HXX_
#include "commontypes.hxx"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
#include <com/sun/star/util/XNumberFormatter.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
+#include <osl/diagnose.h>
#include <tools/diagnose_ex.h>
-#ifndef _DBAUI_LOCALRESACCESS_HXX_
#include "localresaccess.hxx"
-#endif
-#ifndef INCLUDED_SVTOOLS_SYSLOCALE_HXX
#include <unotools/syslocale.hxx>
-#endif
#define EF_VISITED 0x0001
#define EF_DIRTY 0x0002
@@ -122,7 +95,7 @@ DBG_NAME(OParameterDialog)
m_xFormatter = Reference< XNumberFormatter>(_rxORB->createInstance(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatter"))), UNO_QUERY);
else {
- DBG_ERROR("OParameterDialog::OParameterDialog: need a service factory!");
+ OSL_FAIL("OParameterDialog::OParameterDialog: need a service factory!");
}
Reference< XNumberFormatsSupplier > xNumberFormats = ::dbtools::getNumberFormats(m_xConnection, sal_True);
@@ -132,7 +105,7 @@ DBG_NAME(OParameterDialog)
m_xFormatter->attachNumberFormatsSupplier(xNumberFormats);
try
{
- DBG_ASSERT(rParamContainer->getCount(), "OParameterDialog::OParameterDialog : can't handle empty containers !");
+ OSL_ENSURE(rParamContainer->getCount(), "OParameterDialog::OParameterDialog : can't handle empty containers !");
m_aFinalValues.realloc(rParamContainer->getCount());
PropertyValue* pValues = m_aFinalValues.getArray();
@@ -325,7 +298,7 @@ DBG_NAME(OParameterDialog)
{
sal_uInt16 nCurrent = m_aAllParams.GetSelectEntryPos();
sal_uInt16 nCount = m_aAllParams.GetEntryCount();
- DBG_ASSERT(nCount == m_aVisitedParams.size(), "OParameterDialog::OnButtonClicked : inconsistent lists !");
+ OSL_ENSURE(nCount == m_aVisitedParams.size(), "OParameterDialog::OnButtonClicked : inconsistent lists !");
// search the next entry in list we haven't visited yet
sal_uInt16 nNext = (nCurrent + 1) % nCount;
@@ -370,13 +343,13 @@ DBG_NAME(OParameterDialog)
// initialize the controls with the new values
sal_uInt16 nSelected = m_aAllParams.GetSelectEntryPos();
- DBG_ASSERT(nSelected != LISTBOX_ENTRY_NOTFOUND, "OParameterDialog::OnEntrySelected : no current entry !");
+ OSL_ENSURE(nSelected != LISTBOX_ENTRY_NOTFOUND, "OParameterDialog::OnEntrySelected : no current entry !");
m_aParam.SetText(::comphelper::getString(m_aFinalValues[nSelected].Value));
m_nCurrentlySelected = nSelected;
// with this the value isn't dirty
- DBG_ASSERT(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnEntrySelected : invalid current entry !");
+ OSL_ENSURE(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnEntrySelected : invalid current entry !");
m_aVisitedParams[m_nCurrentlySelected] &= ~EF_DIRTY;
m_aResetVisitFlag.SetTimeout(1000);
@@ -388,10 +361,10 @@ DBG_NAME(OParameterDialog)
//------------------------------------------------------------------------------
IMPL_LINK(OParameterDialog, OnVisitedTimeout, Timer*, /*pTimer*/)
{
- DBG_ASSERT(m_nCurrentlySelected != LISTBOX_ENTRY_NOTFOUND, "OParameterDialog::OnVisitedTimeout : invalid call !");
+ OSL_ENSURE(m_nCurrentlySelected != LISTBOX_ENTRY_NOTFOUND, "OParameterDialog::OnVisitedTimeout : invalid call !");
// mark the currently selected entry as visited
- DBG_ASSERT(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnVisitedTimeout : invalid entry !");
+ OSL_ENSURE(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnVisitedTimeout : invalid entry !");
m_aVisitedParams[m_nCurrentlySelected] |= EF_VISITED;
// was it the last "not visited yet" entry ?
@@ -438,7 +411,7 @@ DBG_NAME(OParameterDialog)
IMPL_LINK(OParameterDialog, OnValueModified, Control*, /*pBox*/)
{
// mark the currently selected entry as dirty
- DBG_ASSERT(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnValueModified : invalid entry !");
+ OSL_ENSURE(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnValueModified : invalid entry !");
m_aVisitedParams[m_nCurrentlySelected] |= EF_DIRTY;
m_bNeedErrorOnCurrent = sal_True;
@@ -450,3 +423,5 @@ DBG_NAME(OParameterDialog)
//.........................................................................
} // namespace dbaui
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/paramdialog.src b/dbaccess/source/ui/dlg/paramdialog.src
index 0be374ac5..5840ae57b 100644
--- a/dbaccess/source/ui/dlg/paramdialog.src
+++ b/dbaccess/source/ui/dlg/paramdialog.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,7 +44,6 @@ ModalDialog DLG_PARAMETERS
Moveable = TRUE ;
Closeable = TRUE ;
-
FixedLine FL_PARAMS
{
Pos = MAP_APPFONT ( 4 , 3 ) ;
@@ -101,4 +100,3 @@ ModalDialog DLG_PARAMETERS
Text [ en-US ] = "The entry could not be converted to a valid value for the \"$name$\"column";
};
};
-
diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx
index d738a1972..2ef82eda4 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,75 +29,28 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYFILTER_HXX
#include "queryfilter.hxx"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_DATE_HPP_
#include <com/sun/star/util/Date.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_DATETIME_HPP_
#include <com/sun/star/util/DateTime.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_TIME_HPP_
#include <com/sun/star/util/Time.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSER_HPP_
#include <com/sun/star/sdb/XSQLQueryComposer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNSEARCH_HPP_
#include <com/sun/star/sdbc/ColumnSearch.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLFILTEROPERATOR_HPP_
#include <com/sun/star/sdb/SQLFilterOperator.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_
#include <com/sun/star/sdbc/XResultSet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
-#include <tools/diagnose_ex.h>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
+#include <osl/diagnose.h>
#include "moduledbu.hxx"
-#endif
-#ifndef _CONNECTIVITY_PARSE_SQLITERATOR_HXX_
#include <connectivity/sqliterator.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef DBAUI_QUERYFILTER_HRC
#include "queryfilter.hrc"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSER_HPP_
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLFILTEROPERATOR_HPP_
#include <com/sun/star/sdb/SQLFilterOperator.hpp>
-#endif
using namespace dbaui;
using namespace connectivity;
@@ -235,7 +189,7 @@ DlgFilterCrit::DlgFilterCrit(Window * pParent,
fillLines(aValues);
}
- catch(Exception&)
+ catch(const Exception&)
{
FreeResource();
throw;
@@ -314,7 +268,7 @@ sal_Int32 DlgFilterCrit::GetOSQLPredicateType( const String& _rSelectedPredicate
nPredicateType = SQLFilterOperator::NOT_SQLNULL;
break;
default:
- OSL_ENSURE( false, "DlgFilterCrit::GetOSQLPredicateType: unknown predicate string!" );
+ OSL_FAIL( "DlgFilterCrit::GetOSQLPredicateType: unknown predicate string!" );
break;
}
@@ -408,10 +362,10 @@ sal_Bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rCom
sTableName += _rFilter.Name;
_rFilter.Name = sTableName;
}
- } // if ( !bFunction )
+ }
}
}
- catch(Exception)
+ catch(const Exception&)
{
}
@@ -500,7 +454,7 @@ Reference< XPropertySet > DlgFilterCrit::getMatchingColumn( const Edit& _rValueI
sField = aLB_WHEREFIELD3.GetSelectEntry();
}
else {
- DBG_ERROR( "DlgFilterCrit::getMatchingColumn: invalid event source!" );
+ OSL_FAIL( "DlgFilterCrit::getMatchingColumn: invalid event source!" );
}
// the field itself
@@ -510,7 +464,7 @@ Reference< XPropertySet > DlgFilterCrit::getMatchingColumn( const Edit& _rValueI
//------------------------------------------------------------------------------
IMPL_LINK( DlgFilterCrit, PredicateLoseFocus, Edit*, _pField )
{
- DBG_ASSERT( _pField, "DlgFilterCrit::PredicateLoseFocus: invalid event source!" );
+ OSL_ENSURE( _pField, "DlgFilterCrit::PredicateLoseFocus: invalid event source!" );
if ( _pField )
{
// retrieve the field affected
@@ -631,11 +585,9 @@ void DlgFilterCrit::SelectField( ListBox& rBox, const String& rField )
{
DBG_CHKTHIS(DlgFilterCrit,NULL);
sal_uInt16 nCnt = rBox.GetEntryCount();
- // sal_Bool bCase = m_rIterator.TablesAreSensitive();
for( sal_uInt16 i=0 ; i<nCnt ; i++ )
{
- // if(bCase ? rBox.GetEntry(i) == rField : rBox.GetEntry(i).EqualsIgnoreCaseAscii(rField))
if(rBox.GetEntry(i) == rField)
{
rBox.SelectEntryPos(i);
@@ -801,7 +753,7 @@ IMPL_LINK( DlgFilterCrit, ListSelectHdl, ListBox *, pListBox )
}
else
{
- DBG_ASSERT(0,"DlgFilterCrit::ListSelectHdl: Diese Column d�rfte garnicht vorhanden sein!");
+ OSL_FAIL("DlgFilterCrit::ListSelectHdl: Diese Column d�rfte garnicht vorhanden sein!");
}
}
pComp->SelectEntryPos(0);
@@ -826,7 +778,6 @@ void DlgFilterCrit::BuildWherePart()
Sequence<Sequence<PropertyValue> > aFilter,aHaving;
aFilter.realloc(1);
aHaving.realloc(1);
- // ::rtl::OUString aFilter;
if( LbPos(aLB_WHEREFIELD1) != 0 )
{
@@ -895,7 +846,7 @@ void DlgFilterCrit::BuildWherePart()
m_xQueryComposer->setStructuredFilter(aFilter);
m_xQueryComposer->setStructuredHavingClause(aHaving);
}
- catch(Exception)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -919,3 +870,4 @@ void DlgFilterCrit::fillLines(const Sequence<Sequence<PropertyValue > >& _aValue
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/queryfilter.src b/dbaccess/source/ui/dlg/queryfilter.src
index 4f8241dd8..6d273b5c5 100644
--- a/dbaccess/source/ui/dlg/queryfilter.src
+++ b/dbaccess/source/ui/dlg/queryfilter.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,15 +30,6 @@
#endif
#include "dbaccess_helpid.hrc"
-/*
-#define STRLST_AND_OR \
- StringList [ en-US ] = \
- {\
- < "AND" ; Default ; > ; \
- < "OR" ; Default ; > ; \
- };\
-*/
-
ModalDialog DLG_FILTERCRIT
{
OutputSize = TRUE ;
@@ -88,11 +79,10 @@ ModalDialog DLG_FILTERCRIT
TabStop = TRUE ;
DropDown = TRUE ;
CurPos = 0 ;
-// STRLST_AND_OR
StringList [ en-US ] =
{
- < "AND" ; Default ; > ;
- < "OR" ; Default ; > ;
+ < "AND" ; Default ; > ;
+ < "OR" ; Default ; > ;
};
};
ListBox LB_WHEREFIELD2
@@ -132,11 +122,10 @@ ModalDialog DLG_FILTERCRIT
TabStop = TRUE ;
DropDown = TRUE ;
CurPos = 0 ;
-// STRLST_AND_OR
StringList [ en-US ] =
{
- < "AND" ; Default ; > ;
- < "OR" ; Default ; > ;
+ < "AND" ; Default ; > ;
+ < "OR" ; Default ; > ;
};
};
ListBox LB_WHEREFIELD3
@@ -192,7 +181,6 @@ ModalDialog DLG_FILTERCRIT
{
Pos = MAP_APPFONT ( 15 , 14 ) ;
Size = MAP_APPFONT ( 40 , 8 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Verknüpfung : Verkn³pfung */
Center = TRUE ;
Text [ en-US ] = "Operator" ;
};
@@ -230,4 +218,3 @@ ModalDialog DLG_FILTERCRIT
Text [ en-US ] = "=;<>;<;<=;>;>=;like;not like;null;not null";
};
};
-
diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx
index a3d4ff318..73915de3d 100644
--- a/dbaccess/source/ui/dlg/queryorder.cxx
+++ b/dbaccess/source/ui/dlg/queryorder.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,48 +28,22 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYORDER_HRC
#include "queryorder.hrc"
-#endif
-#ifndef DBAUI_QUERYORDER_HXX
#include "queryorder.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSER_HPP_
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNSEARCH_HPP_
#include <com/sun/star/sdbc/ColumnSearch.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _CONNECTIVITY_PARSE_SQLITERATOR_HXX_
#include <connectivity/sqliterator.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
#include <algorithm>
@@ -272,8 +247,8 @@ void DlgOrderCrit::EnableLines()
DBG_CHKTHIS(DlgOrderCrit,NULL);
Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData();
::rtl::OUString sQuote = xMetaData.is() ? xMetaData->getIdentifierQuoteString() : ::rtl::OUString();
- static const ::rtl::OUString sDESC = ::rtl::OUString::createFromAscii(" DESC ");
- static const ::rtl::OUString sASC = ::rtl::OUString::createFromAscii(" ASC ");
+ static const ::rtl::OUString sDESC(RTL_CONSTASCII_USTRINGPARAM(" DESC "));
+ static const ::rtl::OUString sASC(RTL_CONSTASCII_USTRINGPARAM(" ASC "));
Reference< XNameAccess> xColumns = Reference< XColumnsSupplier >(m_xQueryComposer,UNO_QUERY)->getColumns();
@@ -283,7 +258,7 @@ void DlgOrderCrit::EnableLines()
if(m_aColumnList[i]->GetSelectEntryPos() != 0)
{
if(sOrder.getLength())
- sOrder += ::rtl::OUString::createFromAscii(",");
+ sOrder += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
String sName = m_aColumnList[i]->GetSelectEntry();
try
@@ -308,7 +283,7 @@ void DlgOrderCrit::EnableLines()
else
sOrder += ::dbtools::quoteName(sQuote,sName);
}
- catch(Exception)
+ catch(const Exception&)
{
}
if(m_aValueList[i]->GetSelectEntryPos())
@@ -332,3 +307,4 @@ void DlgOrderCrit::BuildOrderPart()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/queryorder.src b/dbaccess/source/ui/dlg/queryorder.src
index c585e48d5..7c349dda0 100644
--- a/dbaccess/source/ui/dlg/queryorder.src
+++ b/dbaccess/source/ui/dlg/queryorder.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -139,7 +139,6 @@ ModalDialog DLG_ORDERCRIT
{
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 46 , 8 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Verknüpfung : Verkn³pfung */
Text [ en-US ] = "Operator" ;
};
FixedText FT_ORDERDIR
@@ -179,39 +178,3 @@ ModalDialog DLG_ORDERCRIT
Text [ en-US ] = "<none>" ;
};
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 27e48ccbf..cb5109bd0 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,54 +29,23 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HRC_
#include "sqlmessage.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_SQLEXCEPTION_HPP_
#include <com/sun/star/sdbc/SQLException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _SV_GROUP_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SVTREEBOX_HXX
+#include <osl/diagnose.h>
#include <svtools/svtreebx.hxx>
-#endif
-#ifndef _SVEDIT_HXX //autogen
#include <svtools/svmedit.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef CONNECTIVITY_SQLERROR_HXX
#include <connectivity/sqlerror.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _UTL_CONFIGMGR_HXX_
#include <unotools/configmgr.hxx>
-#endif
-#ifndef _SFX_SFXUNO_HXX
#include <sfx2/sfxuno.hxx>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
#include <tools/urlobj.hxx>
@@ -103,7 +73,7 @@ namespace
class IImageProvider
{
public:
- virtual Image getImage( bool _highContrast ) const = 0;
+ virtual Image getImage() const = 0;
virtual ~IImageProvider() { }
};
@@ -122,27 +92,17 @@ namespace
{
private:
sal_uInt16 m_defaultImageID;
- sal_uInt16 m_highContrastImageID;
mutable Image m_defaultImage;
- mutable Image m_highContrastImage;
public:
- ImageProvider( sal_uInt16 _defaultImageID, sal_uInt16 _highContrastImageID )
+ ImageProvider( sal_uInt16 _defaultImageID )
:m_defaultImageID( _defaultImageID )
- ,m_highContrastImageID( _highContrastImageID )
{
}
- virtual Image getImage( bool _highContrast ) const
+ virtual Image getImage() const
{
- if ( _highContrast )
- {
- if ( !m_highContrastImage )
- m_highContrastImage = Image( ModuleRes( m_highContrastImageID ) );
- return m_highContrastImage;
- }
-
if ( !m_defaultImage )
m_defaultImage = Image( ModuleRes( m_defaultImageID ) );
return m_defaultImage;
@@ -186,20 +146,17 @@ namespace
{
::boost::shared_ptr< IImageProvider >* ppProvider( &m_pErrorImage );
sal_uInt16 nNormalImageID( BMP_EXCEPTION_ERROR );
- sal_uInt16 nHCImageID( BMP_EXCEPTION_ERROR_SCH );
switch ( _eType )
{
case SQLExceptionInfo::SQL_WARNING:
ppProvider = &m_pWarningsImage;
nNormalImageID = BMP_EXCEPTION_WARNING;
- nHCImageID = BMP_EXCEPTION_WARNING_SCH;
break;
case SQLExceptionInfo::SQL_CONTEXT:
ppProvider = &m_pInfoImage;
nNormalImageID = BMP_EXCEPTION_INFO;
- nHCImageID = BMP_EXCEPTION_INFO_SCH;
break;
default:
@@ -207,7 +164,7 @@ namespace
}
if ( !ppProvider->get() )
- ppProvider->reset( new ImageProvider( nNormalImageID, nHCImageID ) );
+ ppProvider->reset( new ImageProvider( nNormalImageID ) );
return *ppProvider;
}
@@ -305,7 +262,7 @@ namespace
iter.next( aCurrentElement );
const SQLException* pCurrentError = (const SQLException*)aCurrentElement;
- DBG_ASSERT( pCurrentError, "lcl_buildExceptionChain: iterator failure!" );
+ OSL_ENSURE( pCurrentError, "lcl_buildExceptionChain: iterator failure!" );
// hasMoreElements should not have returned <TRUE/> in this case
ExceptionDisplayInfo aDisplayInfo( aCurrentElement.getType() );
@@ -319,7 +276,7 @@ namespace
&& !lcl_hasDetails( aDisplayInfo )
)
{
- OSL_ENSURE( false, "lcl_buildExceptionChain: useles exception: no state, no error code, no message!" );
+ OSL_FAIL( "lcl_buildExceptionChain: useles exception: no state, no error code, no message!" );
continue;
}
@@ -347,9 +304,9 @@ namespace
}
//------------------------------------------------------------------------------
- void lcl_insertExceptionEntry( SvTreeListBox& _rList, bool _bHiContrast, size_t _nElementPos, const ExceptionDisplayInfo& _rEntry )
+ void lcl_insertExceptionEntry( SvTreeListBox& _rList, size_t _nElementPos, const ExceptionDisplayInfo& _rEntry )
{
- Image aEntryImage( _rEntry.pImageProvider->getImage( _bHiContrast ) );
+ Image aEntryImage( _rEntry.pImageProvider->getImage() );
SvLBoxEntry* pListEntry =
_rList.InsertEntry( _rEntry.pLabelProvider->getLabel(), aEntryImage, aEntryImage );
pListEntry->SetUserData( reinterpret_cast< void* >( _nElementPos ) );
@@ -408,7 +365,6 @@ OExceptionChainDialog::OExceptionChainDialog( Window* pParent, const ExceptionDi
m_aExceptionText.SetReadOnly(sal_True);
bool bHave22018 = false;
- bool bHiContrast = isHiContrast( this );
size_t elementPos = 0;
for ( ExceptionDisplayChain::const_iterator loop = m_aExceptions.begin();
@@ -416,12 +372,12 @@ OExceptionChainDialog::OExceptionChainDialog( Window* pParent, const ExceptionDi
++loop, ++elementPos
)
{
- lcl_insertExceptionEntry( m_aExceptionList, bHiContrast, elementPos, *loop );
+ lcl_insertExceptionEntry( m_aExceptionList, elementPos, *loop );
bHave22018 = loop->sSQLState.EqualsAscii( "22018" );
}
// if the error has the code 22018, then add an additional explanation
- // #i24021# / 2004-10-14 / frank.schoenheit@sun.com
+ // #i24021#
if ( bHave22018 )
{
ProviderFactory aProviderFactory;
@@ -432,7 +388,7 @@ OExceptionChainDialog::OExceptionChainDialog( Window* pParent, const ExceptionDi
aInfo22018.pImageProvider = aProviderFactory.getImageProvider( SQLExceptionInfo::SQL_CONTEXT );
m_aExceptions.push_back( aInfo22018 );
- lcl_insertExceptionEntry( m_aExceptionList, bHiContrast, m_aExceptions.size() - 1, aInfo22018 );
+ lcl_insertExceptionEntry( m_aExceptionList, m_aExceptions.size() - 1, aInfo22018 );
}
}
@@ -446,7 +402,7 @@ OExceptionChainDialog::~OExceptionChainDialog()
IMPL_LINK(OExceptionChainDialog, OnExceptionSelected, void*, EMPTYARG)
{
SvLBoxEntry* pSelected = m_aExceptionList.FirstSelected();
- DBG_ASSERT(!pSelected || !m_aExceptionList.NextSelected(pSelected), "OExceptionChainDialog::OnExceptionSelected : multi selection ?");
+ OSL_ENSURE(!pSelected || !m_aExceptionList.NextSelected(pSelected), "OExceptionChainDialog::OnExceptionSelected : multi selection ?");
String sText;
@@ -526,7 +482,7 @@ namespace
case BUTTON_RETRY: nButtonID = BUTTONID_RETRY; break;
case BUTTON_HELP: nButtonID = BUTTONID_HELP; break;
default:
- OSL_ENSURE( false, "lcl_addButton: invalid button id!" );
+ OSL_FAIL( "lcl_addButton: invalid button id!" );
break;
}
_rDialog.AddButton( _eType, nButtonID, _bDefault ? BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON : 0 );
@@ -640,7 +596,7 @@ void OSQLMessageBox::impl_initImage( MessageType _eImage )
switch (_eImage)
{
default:
- DBG_ERROR( "OSQLMessageBox::impl_initImage: unsupported image type!" );
+ OSL_FAIL( "OSQLMessageBox::impl_initImage: unsupported image type!" );
case Info:
m_aInfoImage.SetImage(InfoBox::GetStandardImage());
@@ -754,7 +710,7 @@ void OSQLMessageBox::Construct( WinBits _nStyle, MessageType _eImage )
case SQLExceptionInfo::SQL_EXCEPTION: eType = Error; break;
case SQLExceptionInfo::SQL_WARNING: eType = Warning; break;
case SQLExceptionInfo::SQL_CONTEXT: eType = Info; break;
- default: OSL_ENSURE( false, "OSQLMessageBox::Construct: invalid type!" );
+ default: OSL_FAIL( "OSQLMessageBox::Construct: invalid type!" );
}
}
impl_initImage( eType );
@@ -820,3 +776,4 @@ OSQLWarningBox::OSQLWarningBox( Window* _pParent, const UniString& _rMessage, Wi
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/sqlmessage.src b/dbaccess/source/ui/dlg/sqlmessage.src
index ae1f5e703..94b2e394d 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.src
+++ b/dbaccess/source/ui/dlg/sqlmessage.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,36 +38,19 @@
//-------------------------------------------------------------------------
Image BMP_EXCEPTION_ERROR
{
- ImageBitmap = Bitmap { File = "exerror.bmp"; };
+ ImageBitmap = Bitmap { File = "exerror.png"; };
MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; };
};
Image BMP_EXCEPTION_WARNING
{
- ImageBitmap = Bitmap { File = "exwarning.bmp"; };
+ ImageBitmap = Bitmap { File = "exwarning.png"; };
MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; };
};
Image BMP_EXCEPTION_INFO
{
- ImageBitmap = Bitmap { File = "exinfo.bmp"; };
- MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; };
-};
-Image BMP_EXCEPTION_ERROR_SCH
-{
- ImageBitmap = Bitmap { File = "exerror_sch.bmp"; };
- MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; };
-};
-
-Image BMP_EXCEPTION_WARNING_SCH
-{
- ImageBitmap = Bitmap { File = "exwarning_sch.bmp"; };
- MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; };
-};
-
-Image BMP_EXCEPTION_INFO_SCH
-{
- ImageBitmap = Bitmap { File = "exinfo_sch.bmp"; };
+ ImageBitmap = Bitmap { File = "exinfo.png"; };
MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; };
};
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index 27dff059e..16ae8f9ce 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,96 +29,37 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_TABLESPAGE_HXX_
#include "tablespage.hxx"
-#endif
-#ifndef _DBU_DLG_HRC_
#include "dbu_dlg.hrc"
-#endif
-#ifndef _DBAUI_DBADMIN_HRC_
#include "dbadmin.hrc"
-#endif
-#ifndef _DBAUI_DATASOURCEITEMS_HXX_
#include "dsitems.hxx"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _DBAUI_DATASOURCECONNECTOR_HXX_
#include "datasourceconnector.hxx"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _DBAUI_STRINGLISTITEM_HXX_
#include "stringlistitem.hxx"
-#endif
-#ifndef _SFXENUMITEM_HXX
#include <svl/eitem.hxx>
-#endif
-#ifndef _SFXSTRITEM_HXX
#include <svl/stritem.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_WAITOBJ_HXX
#include <vcl/waitobj.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XMODIFIABLE_HPP_
#include <com/sun/star/util/XModifiable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDROP_HPP_
#include <com/sun/star/sdbcx/XDrop.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADEFINITIONSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XDataDefinitionSupplier.hpp>
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _VOS_MUTEX_HXX_
-#include <vos/mutex.hxx>
-#endif
-#ifndef _SVTOOLS_IMGDEF_HXX
+#include <osl/mutex.hxx>
+#include <osl/diagnose.h>
#include <svtools/imgdef.hxx>
-#endif
-#ifndef _DBAUI_TABLESSINGLEDLG_HXX_
#include "TablesSingleDlg.hxx"
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
#include "AutoControlsDef.hrc"
//.........................................................................
@@ -232,7 +174,7 @@ DBG_NAME(OTableSubscriptionPage)
}
catch(SQLException&)
{
- DBG_ERROR("OTableSubscriptionPage::implCheckTables : could not retrieve the current connection's meta data!");
+ OSL_FAIL("OTableSubscriptionPage::implCheckTables : could not retrieve the current connection's meta data!");
}
// uncheck all
@@ -315,7 +257,7 @@ DBG_NAME(OTableSubscriptionPage)
// get the name of the data source we're working for
SFX_ITEMSET_GET(_rSet, pNameItem, SfxStringItem, DSID_NAME, sal_True);
- DBG_ASSERT(pNameItem, "OTableSubscriptionPage::implInitControls: missing the name attribute!");
+ OSL_ENSURE(pNameItem, "OTableSubscriptionPage::implInitControls: missing the name attribute!");
String sDSName = pNameItem->GetValue();
if (bValid && sDSName.Len() && !m_xCurrentConnection.is() )
@@ -323,7 +265,7 @@ DBG_NAME(OTableSubscriptionPage)
// the PropertyValues for the current dialog settings
Sequence< PropertyValue > aConnectionParams;
- DBG_ASSERT(m_pTablesDlg, "OTableSubscriptionPage::implInitControls: need a parent dialog doing the translation!");
+ OSL_ENSURE(m_pTablesDlg, "OTableSubscriptionPage::implInitControls: need a parent dialog doing the translation!");
if ( m_pTablesDlg )
{
if (!m_pTablesDlg->getCurrentSettings(aConnectionParams))
@@ -446,13 +388,9 @@ DBG_NAME(OTableSubscriptionPage)
// get the current table filter
SFX_ITEMSET_GET(_rSet, pTableFilter, OStringListItem, DSID_TABLEFILTER, sal_True);
- SFX_ITEMSET_GET(_rSet, pSuppress, SfxBoolItem, DSID_SUPPRESSVERSIONCL, sal_True);
Sequence< ::rtl::OUString > aTableFilter;
- sal_Bool bSuppressVersionColumns = sal_True;
if (pTableFilter)
aTableFilter = pTableFilter->getList();
- if (pSuppress)
- bSuppressVersionColumns = pSuppress->GetValue();
implCompleteTablesCheck( aTableFilter );
@@ -509,11 +447,11 @@ DBG_NAME(OTableSubscriptionPage)
{
SvLBoxEntry* pLHS = static_cast<SvLBoxEntry*>(_pSortData->pLeft);
SvLBoxEntry* pRHS = static_cast<SvLBoxEntry*>(_pSortData->pRight);
- DBG_ASSERT(pLHS && pRHS, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid tree entries!");
+ OSL_ENSURE(pLHS && pRHS, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid tree entries!");
SvLBoxString* pLeftTextItem = static_cast<SvLBoxString*>(pLHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
SvLBoxString* pRightTextItem = static_cast<SvLBoxString*>(pRHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
- DBG_ASSERT(pLeftTextItem && pRightTextItem, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid text items!");
+ OSL_ENSURE(pLeftTextItem && pRightTextItem, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid text items!");
String sLeftText = pLeftTextItem->GetText();
String sRightText = pRightTextItem->GetText();
@@ -690,3 +628,4 @@ DBG_NAME(OTableSubscriptionPage)
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/tablespage.hxx b/dbaccess/source/ui/dlg/tablespage.hxx
index 1a17ef476..3861822aa 100644
--- a/dbaccess/source/ui/dlg/tablespage.hxx
+++ b/dbaccess/source/ui/dlg/tablespage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,27 +29,13 @@
#ifndef _DBAUI_TABLESPAGE_HXX_
#define _DBAUI_TABLESPAGE_HXX_
-#ifndef _DBAUI_ADMINPAGES_HXX_
#include "adminpages.hxx"
-#endif
-#ifndef _COM_SUN_STAR_I18N_XCOLLATOR_HPP_
#include <com/sun/star/i18n/XCollator.hpp>
-#endif
-#ifndef _OSL_MUTEX_HXX_
#include <osl/mutex.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _DBAUI_TABLETREE_HXX_
#include "tabletree.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
//.........................................................................
@@ -133,3 +120,4 @@ namespace dbaui
#endif // _DBAUI_TABLESPAGE_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/textconnectionsettings.cxx b/dbaccess/source/ui/dlg/textconnectionsettings.cxx
index 10d2bf52a..c41310b1e 100644
--- a/dbaccess/source/ui/dlg/textconnectionsettings.cxx
+++ b/dbaccess/source/ui/dlg/textconnectionsettings.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -104,3 +105,5 @@ namespace dbaui
//........................................................................
} // namespace dbaui
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/textconnectionsettings.src b/dbaccess/source/ui/dlg/textconnectionsettings.src
index 2dfb816c8..b34a05607 100644
--- a/dbaccess/source/ui/dlg/textconnectionsettings.src
+++ b/dbaccess/source/ui/dlg/textconnectionsettings.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/ui/imagelists/dbimagelists.src b/dbaccess/source/ui/imagelists/dbimagelists.src
index c579bc1b7..8f993554f 100644
--- a/dbaccess/source/ui/imagelists/dbimagelists.src
+++ b/dbaccess/source/ui/imagelists/dbimagelists.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,13 +56,6 @@ ImageList IMG_INDEX_DLG_SC
IL_TOOL_2 ;
};
-ImageList IMG_INDEX_DLG_SCH
-{
- MASKCOLOR;
- prefix = "sch";
- IL_TOOL_2 ;
-};
-
ImageList IMG_INDEX_DLG_LC
{
MASKCOLOR;
@@ -70,53 +63,29 @@ ImageList IMG_INDEX_DLG_LC
IL_TOOL_2 ;
};
-ImageList IMG_INDEX_DLG_LCH
-{
- MASKCOLOR;
- prefix = "lch";
- IL_TOOL_2 ;
-};
-
Image IMG_FORMFOLDER_TREE_L
{
ImageBitmap = Bitmap { File = "forms_32"; };
MASKCOLOR;
};
-Image IMG_FORMFOLDER_TREE_LHC
-{
- ImageBitmap = Bitmap { File = "forms_32_h"; };
- MASKCOLOR;
-};
+
Image IMG_REPORTFOLDER_TREE_L
{
ImageBitmap = Bitmap { File = "reports_32"; };
MASKCOLOR;
};
-Image IMG_REPORTFOLDER_TREE_LHC
-{
- ImageBitmap = Bitmap { File = "reports_32_h"; };
- MASKCOLOR;
-};
+
Image IMG_QUERYFOLDER_TREE_L
{
ImageBitmap = Bitmap { File = "queries_32"; };
MASKCOLOR;
};
-Image IMG_QUERYFOLDER_TREE_LHC
-{
- ImageBitmap = Bitmap { File = "queries_32_h"; };
- MASKCOLOR;
-};
+
Image IMG_TABLEFOLDER_TREE_L
{
ImageBitmap = Bitmap { File = "tables_32"; };
MASKCOLOR;
};
-Image IMG_TABLEFOLDER_TREE_LHC
-{
- ImageBitmap = Bitmap { File = "tables_32_h"; };
- MASKCOLOR;
-};
//========================================================================
//= database object icons
@@ -126,13 +95,7 @@ Image IMG_TABLEFOLDER_TREE_LHC
Image DATABASE_TREE_ICON
{
- ImageBitmap = Bitmap { File = "db.bmp"; };
- MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; };
-};
-
-Image DATABASE_TREE_ICON_SCH
-{
- ImageBitmap = Bitmap { File = "db_sch.bmp"; };
+ ImageBitmap = Bitmap { File = "db.png"; };
MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; };
};
@@ -145,24 +108,12 @@ Image TABLE_TREE_ICON
MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
};
-Image TABLE_TREE_ICON_SCH
-{
- ImageBitmap = Bitmap { File = "sxh03188.png"; };
- MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
-};
-
Image TABLEFOLDER_TREE_ICON
{
ImageBitmap = Bitmap { File = "sx03187.png"; };
MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
};
-Image TABLEFOLDER_TREE_ICON_SCH
-{
- ImageBitmap = Bitmap { File = "sxh03187.png"; };
- MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
-};
-
//------------------------------------------------------------------------
// views
@@ -172,36 +123,18 @@ Image VIEW_TREE_ICON
MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
};
-Image VIEW_TREE_ICON_SCH
-{
- ImageBitmap = Bitmap { File = "sxh16670.png"; };
- MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
-};
-
//------------------------------------------------------------------------
// queries and query folders
Image QUERY_TREE_ICON
{
- ImageBitmap = Bitmap { File = "sx03202.bmp"; };
- MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
-};
-
-Image QUERY_TREE_ICON_SCH
-{
- ImageBitmap = Bitmap { File = "sxh03202.bmp"; };
+ ImageBitmap = Bitmap { File = "sx03202.png"; };
MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
};
Image QUERYFOLDER_TREE_ICON
{
- ImageBitmap = Bitmap { File = "sx03201.bmp"; };
- MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
-};
-
-Image QUERYFOLDER_TREE_ICON_SCH
-{
- ImageBitmap = Bitmap { File = "sxh03201.bmp"; };
+ ImageBitmap = Bitmap { File = "sx03201.png"; };
MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
};
@@ -214,24 +147,12 @@ Image FORM_TREE_ICON
MASKCOLOR;
};
-Image FORM_TREE_ICON_SCH
-{
- ImageBitmap = Bitmap { File = "form_16_h"; };
- MASKCOLOR;
-};
-
Image FORMFOLDER_TREE_ICON
{
ImageBitmap = Bitmap { File = "forms_16"; };
MASKCOLOR;
};
-Image FORMFOLDER_TREE_ICON_SCH
-{
- ImageBitmap = Bitmap { File = "forms_16_h"; };
- MASKCOLOR;
-};
-
//------------------------------------------------------------------------
// reports and report folders
@@ -241,22 +162,8 @@ Image REPORT_TREE_ICON
MASKCOLOR;
};
-Image REPORT_TREE_ICON_SCH
-{
- ImageBitmap = Bitmap { File = "report_16_h"; };
- MASKCOLOR;
-};
Image REPORTFOLDER_TREE_ICON
{
ImageBitmap = Bitmap { File = "reports_16"; };
MASKCOLOR;
};
-
-Image REPORTFOLDER_TREE_ICON_SCH
-{
- ImageBitmap = Bitmap { File = "reports_16_h"; };
- MASKCOLOR;
-};
-
-//========================================================================
-
diff --git a/dbaccess/source/ui/imagelists/makefile.mk b/dbaccess/source/ui/imagelists/makefile.mk
deleted file mode 100644
index 3620f6329..000000000
--- a/dbaccess/source/ui/imagelists/makefile.mk
+++ /dev/null
@@ -1,49 +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=..$/..$/..
-PRJNAME=dbaccess
-TARGET=uiimglst
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-IMGLST_SRS=$(SRS)$/$(TARGET).srs
-# --- Files -------------------------------------
-
-# ... resource files ............................
-
-SRS1NAME=$(TARGET)
-SRC1FILES=dbimagelists.src
-
-# ... object files ............................
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
-
diff --git a/dbaccess/source/ui/inc/AccessibleBaseIFace.hxx b/dbaccess/source/ui/inc/AccessibleBaseIFace.hxx
index 0ec25a73f..a6e8fbeed 100644
--- a/dbaccess/source/ui/inc/AccessibleBaseIFace.hxx
+++ b/dbaccess/source/ui/inc/AccessibleBaseIFace.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBAUI_ACCESSIBLE_HELPER_IFACE_HXX
#define DBAUI_ACCESSIBLE_HELPER_IFACE_HXX
-#ifndef _SAL_TYPES_H_
#include <sal/types.h>
-#endif
namespace dbaui
{
@@ -52,3 +51,5 @@ namespace dbaui
};
}
#endif // DBAUI_ACCESSIBLE_HELPER_IFACE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/AppElementType.hxx b/dbaccess/source/ui/inc/AppElementType.hxx
index 5922b6873..6a6c25c70 100644
--- a/dbaccess/source/ui/inc/AppElementType.hxx
+++ b/dbaccess/source/ui/inc/AppElementType.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,3 +65,4 @@ namespace dbaui
//........................................................................
#endif // DBAUI_APPELEMENTTYPE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/CollectionView.hxx b/dbaccess/source/ui/inc/CollectionView.hxx
index cf265e2fe..deb5750b9 100644
--- a/dbaccess/source/ui/inc/CollectionView.hxx
+++ b/dbaccess/source/ui/inc/CollectionView.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,24 +29,12 @@
#ifndef DBAUI_COLLECTIONVIEW_HXX
#define DBAUI_COLLECTIONVIEW_HXX
-#ifndef _SVT_FILEVIEW_HXX
#include <svtools/fileview.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _SV_EDIT_HXX
#include <vcl/edit.hxx>
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UCB_XCONTENT_HPP_
#include <com/sun/star/ucb/XContent.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
//.........................................................................
namespace dbaui
@@ -98,3 +87,4 @@ namespace dbaui
#endif //DBAUI_COLLECTIONVIEW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/ColumnControlWindow.hxx b/dbaccess/source/ui/inc/ColumnControlWindow.hxx
index 1081a7878..5c6d268a4 100644
--- a/dbaccess/source/ui/inc/ColumnControlWindow.hxx
+++ b/dbaccess/source/ui/inc/ColumnControlWindow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,18 +28,10 @@
#ifndef DBAUI_COLUMNCONTROLWINDOW_HXX
#define DBAUI_COLUMNCONTROLWINDOW_HXX
-#ifndef DBAUI_FIELDDESCRIPTIONCONTROL_HXX
#include "FieldDescControl.hxx"
-#endif
-#ifndef DBAUI_TYPEINFO_HXX
#include "TypeInfo.hxx"
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
#include <com/sun/star/util/XNumberFormatter.hpp>
-#endif
//.........................................................................
namespace dbaui
@@ -88,3 +81,5 @@ namespace dbaui
} // namespace dbaui
//.........................................................................
#endif // DBAUI_COLUMNCONTROLWINDOW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/ConnectionLine.hxx b/dbaccess/source/ui/inc/ConnectionLine.hxx
index 2b4d9adb1..96ad36c79 100644
--- a/dbaccess/source/ui/inc/ConnectionLine.hxx
+++ b/dbaccess/source/ui/inc/ConnectionLine.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef DBAUI_CONNECTIONLINE_HXX
#define DBAUI_CONNECTIONLINE_HXX
-#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
-#endif
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
-#endif
#include <functional>
class OutputDevice;
@@ -69,7 +64,7 @@ namespace dbaui
OConnectionLine( const OConnectionLine& rLine );
virtual ~OConnectionLine();
- virtual OConnectionLine& operator=( const OConnectionLine& rLine );
+ OConnectionLine& operator=( const OConnectionLine& rLine );
Rectangle GetBoundingRect();
sal_Bool RecalcLine();
@@ -113,3 +108,5 @@ namespace dbaui
}
#endif // DBAUI_CONNECTIONLINE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
index 3b6ba52e0..e9edc1837 100644
--- a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
+++ b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef DBACCESS_CONNECTIONLINEACCESS_HXX
#define DBACCESS_CONNECTIONLINEACCESS_HXX
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLERELATIONSET_HPP_
#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE2_HXX_
#include <cppuhelper/implbase2.hxx>
-#endif
-#ifndef _TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX_
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
-#endif
namespace dbaui
{
@@ -111,3 +106,5 @@ namespace dbaui
};
}
#endif // DBACCESS_CONNECTIONLINEACCESS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/ConnectionLineData.hxx b/dbaccess/source/ui/inc/ConnectionLineData.hxx
index 995359c1d..176e169b3 100644
--- a/dbaccess/source/ui/inc/ConnectionLineData.hxx
+++ b/dbaccess/source/ui/inc/ConnectionLineData.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,24 +28,13 @@
#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#define DBAUI_CONNECTIONLINEDATA_HXX
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
-#ifndef _VOS_REFERNCE_HXX_
-#include <vos/refernce.hxx>
-#endif
#include <vector>
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
-#endif
-
-#ifndef DBAUI_REFFUNCTOR_HXX
+#include <rtl/ref.hxx>
+#include <salhelper/simplereferenceobject.hxx>
#include "RefFunctor.hxx"
-#endif
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
-#endif
namespace dbaui
{
@@ -62,7 +52,7 @@ namespace dbaui
the class OConnectionLineData contains the data of a connection
e.g. the source and the destanation field
**/
- class OConnectionLineData : public ::vos::OReference
+ class OConnectionLineData : public ::salhelper::SimpleReferenceObject
{
::rtl::OUString m_aSourceFieldName;
::rtl::OUString m_aDestFieldName;
@@ -104,8 +94,9 @@ namespace dbaui
//-------------------------------------------------------------------------
//------------------------------------------------------------------
- typedef ::vos::ORef< OConnectionLineData > OConnectionLineDataRef;
+ typedef ::rtl::Reference< OConnectionLineData > OConnectionLineDataRef;
typedef ::std::vector< OConnectionLineDataRef > OConnectionLineDataVec;
}
#endif // DBAUI_CONNECTIONLINEDATA_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/DExport.hxx b/dbaccess/source/ui/inc/DExport.hxx
index a168df79e..8a68652e0 100644
--- a/dbaccess/source/ui/inc/DExport.hxx
+++ b/dbaccess/source/ui/inc/DExport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,10 +94,9 @@ namespace dbaui
SvNumberFormatter* m_pFormatter;
SvStream& m_rInputStream;
- //dyf add 2006/06/01
//for save the selected tablename
::rtl::OUString m_sDefaultTableName;
- //dyf add end
+
String m_sTextToken; // Zellen Inhalt
String m_sNumToken; /// SDNUM value
String m_sValToken; /// SDVAL value
@@ -165,10 +165,8 @@ namespace dbaui
);
void SetColumnTypes(const TColumnVector* rList,const OTypeInfoMap* _pInfoMap);
-
- //dyf add 20070601
+
inline void SetTableName(const ::rtl::OUString &_sTableName){ m_sDefaultTableName = _sTableName ; }
- //dyf add end
virtual void release() = 0;
@@ -187,3 +185,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/FieldControls.hxx b/dbaccess/source/ui/inc/FieldControls.hxx
index 2df780bf2..51fb6ca33 100644
--- a/dbaccess/source/ui/inc/FieldControls.hxx
+++ b/dbaccess/source/ui/inc/FieldControls.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,21 +28,11 @@
#ifndef DBAUI_FIELDCONTROLS_HXX
#define DBAUI_FIELDCONTROLS_HXX
-#ifndef _SV_FIELD_HXX
#include <vcl/field.hxx>
-#endif
-#ifndef _SV_LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef DBAUI_SQLNAMEEDIT_HXX
#include "SqlNameEdit.hxx"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
namespace dbaui
@@ -197,3 +188,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx
index ab4f4e851..7f9547774 100644
--- a/dbaccess/source/ui/inc/FieldDescControl.hxx
+++ b/dbaccess/source/ui/inc/FieldDescControl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,21 +28,11 @@
#ifndef DBAUI_FIELDDESCRIPTIONCONTROL_HXX
#define DBAUI_FIELDDESCRIPTIONCONTROL_HXX
-#ifndef _SV_TABPAGE_HXX
#include <vcl/tabpage.hxx>
-#endif
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
#include <com/sun/star/util/XNumberFormatter.hpp>
-#endif
-#ifndef DBAUI_TYPEINFO_HXX
#include "TypeInfo.hxx"
-#endif
//------------------------------------------------------------------
// die Spalten einer Feld-Beschreibung einer Tabelle
@@ -240,3 +231,4 @@ namespace dbaui
#endif // DBAUI_FIELDDESCRIPTIONCONTROL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/FieldDescriptions.hxx b/dbaccess/source/ui/inc/FieldDescriptions.hxx
index 13ff8e7e9..676419259 100644
--- a/dbaccess/source/ui/inc/FieldDescriptions.hxx
+++ b/dbaccess/source/ui/inc/FieldDescriptions.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,24 +28,12 @@
#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
#define DBAUI_FIELDDESCRIPTIONS_HXX
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
-#ifndef _SVX_SVXENUM_HXX
#include <editeng/svxenum.hxx>
-#endif
-#ifndef DBAUI_TYPEINFO_HXX
#include "TypeInfo.hxx"
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_
#include <com/sun/star/beans/XPropertySetInfo.hpp>
-#endif
namespace dbaui
{
@@ -133,3 +122,4 @@ namespace dbaui
#endif // DBAUI_FIELDDESCRIPTIONS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/GeneralUndo.hxx b/dbaccess/source/ui/inc/GeneralUndo.hxx
index 772f8f5ff..0785ab08b 100644
--- a/dbaccess/source/ui/inc/GeneralUndo.hxx
+++ b/dbaccess/source/ui/inc/GeneralUndo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBAUI_GENERALUNDO_HXX
#define DBAUI_GENERALUNDO_HXX
-#ifndef _UNDO_HXX
#include <svl/undo.hxx>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
namespace dbaui
{
@@ -57,3 +54,4 @@ namespace dbaui
#endif // DBAUI_GENERALUNDO_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/HtmlReader.hxx b/dbaccess/source/ui/inc/HtmlReader.hxx
index ad0241bfb..410a87961 100644
--- a/dbaccess/source/ui/inc/HtmlReader.hxx
+++ b/dbaccess/source/ui/inc/HtmlReader.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,21 +28,11 @@
#ifndef DBAUI_HTMLREADER_HXX
#define DBAUI_HTMLREADER_HXX
-#ifndef DBAUI_DATABASEEXPORT_HXX
#include "DExport.hxx"
-#endif
-#ifndef _PARHTML_HXX //autogen
#include <svtools/parhtml.hxx>
-#endif
-#ifndef _SVX_SVXENUM_HXX
#include <editeng/svxenum.hxx>
-#endif
-#ifndef _STREAM_HXX
#include <tools/stream.hxx>
-#endif
-#ifndef _COM_SUN_STAR_AWT_FONTDESCRIPTOR_HPP_
#include <com/sun/star/awt/FontDescriptor.hpp>
-#endif
namespace dbaui
@@ -64,7 +55,7 @@ namespace dbaui
virtual TypeSelectionPageFactory
getTypeSelectionPageFactory();
- void TableDataOn(SvxCellHorJustify& eVal,int nToken);
+ void TableDataOn(SvxCellHorJustify& eVal);
void TableFontOn(::com::sun::star::awt::FontDescriptor& _rFont,sal_Int32 &_rTextColor);
sal_Int16 GetWidthPixel( const HTMLOption* pOption );
void setTextEncoding();
@@ -98,3 +89,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/IClipBoardTest.hxx b/dbaccess/source/ui/inc/IClipBoardTest.hxx
index 6a8646d20..dfb708596 100644
--- a/dbaccess/source/ui/inc/IClipBoardTest.hxx
+++ b/dbaccess/source/ui/inc/IClipBoardTest.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,9 +27,7 @@
************************************************************************/
#ifndef DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
#define DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
-#ifndef _SAL_TYPES_H_
#include <sal/types.h>
-#endif
namespace dbaui
{
@@ -47,3 +46,5 @@ namespace dbaui
};
}
#endif // DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/IItemSetHelper.hxx b/dbaccess/source/ui/inc/IItemSetHelper.hxx
index ef83a9d43..d6e082d77 100644
--- a/dbaccess/source/ui/inc/IItemSetHelper.hxx
+++ b/dbaccess/source/ui/inc/IItemSetHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,9 @@
#ifndef DBAUI_ITEMSETHELPER_HXX
#define DBAUI_ITEMSETHELPER_HXX
-#ifndef _SAL_TYPES_H_
#include <sal/types.h>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _DBAUI_DSNTYPES_HXX_
#include "dsntypes.hxx"
-#endif
FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
FORWARD_DECLARE_INTERFACE(sdbc,XConnection)
@@ -74,3 +69,4 @@ namespace dbaui
}
#endif // DBAUI_ITEMSETHELPER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/IUpdateHelper.hxx b/dbaccess/source/ui/inc/IUpdateHelper.hxx
index de31a1c17..a13dbb5fa 100644
--- a/dbaccess/source/ui/inc/IUpdateHelper.hxx
+++ b/dbaccess/source/ui/inc/IUpdateHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,4 @@ namespace dbaui
#endif // DBAUI_IUPDATEHELPER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/JAccess.hxx b/dbaccess/source/ui/inc/JAccess.hxx
index fc83f5913..bfedcaa2e 100644
--- a/dbaccess/source/ui/inc/JAccess.hxx
+++ b/dbaccess/source/ui/inc/JAccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBACCESS_JACCESS_HXX
#define DBACCESS_JACCESS_HXX
-#ifndef _TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX_
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
namespace dbaui
{
@@ -88,3 +85,5 @@ namespace dbaui
};
}
#endif // DBACCESS_JACCESS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/JoinController.hxx b/dbaccess/source/ui/inc/JoinController.hxx
index c5c2ece17..d75d7026c 100644
--- a/dbaccess/source/ui/inc/JoinController.hxx
+++ b/dbaccess/source/ui/inc/JoinController.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -147,14 +148,14 @@ namespace dbaui
/** only defines a method to save a SQLException in d&d methods to show the error at a later state
set the internal member m_aExceptionInfo to _rInfo
*/
- void setErrorOccured(const ::dbtools::SQLExceptionInfo& _rInfo)
+ void setErrorOccurred(const ::dbtools::SQLExceptionInfo& _rInfo)
{
m_aExceptionInfo = _rInfo;
}
/**
just returns the internal member and clears it
*/
- ::dbtools::SQLExceptionInfo clearOccuredError()
+ ::dbtools::SQLExceptionInfo clearOccurredError()
{
::dbtools::SQLExceptionInfo aInfo = m_aExceptionInfo;
m_aExceptionInfo = ::dbtools::SQLExceptionInfo();
@@ -174,3 +175,4 @@ namespace dbaui
}
#endif // DBAUI_JOINCONTROLLER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/JoinDesignView.hxx b/dbaccess/source/ui/inc/JoinDesignView.hxx
index b8d290013..386d49777 100644
--- a/dbaccess/source/ui/inc/JoinDesignView.hxx
+++ b/dbaccess/source/ui/inc/JoinDesignView.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,12 @@
#ifndef DBAUI_JOINDESIGNVIEW_HXX
#define DBAUI_JOINDESIGNVIEW_HXX
-#ifndef DBAUI_DATAVIEW_HXX
#include "dataview.hxx"
-#endif
#ifndef _VECTOR_
#include <vector>
#endif
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
#include <memory>
@@ -89,3 +84,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/JoinExchange.hxx b/dbaccess/source/ui/inc/JoinExchange.hxx
index 0860aad00..d56547513 100644
--- a/dbaccess/source/ui/inc/JoinExchange.hxx
+++ b/dbaccess/source/ui/inc/JoinExchange.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,22 +28,12 @@
#ifndef DBAUI_JOINEXCHANGE_HXX
#define DBAUI_JOINEXCHANGE_HXX
-#ifndef DBAUI_DBEXCHANGE_HXX
#include "dbexchange.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#include "TableWindowListBox.hxx"
-#endif
-#ifndef _TRANSFER_HXX
#include <svtools/transfer.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
namespace dbaui
{
@@ -95,3 +86,4 @@ namespace dbaui
#endif // DBAUI_JOINEXCHANGE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx
index d68046690..074e25f20 100644
--- a/dbaccess/source/ui/inc/JoinTableView.hxx
+++ b/dbaccess/source/ui/inc/JoinTableView.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,28 +28,14 @@
#ifndef DBAUI_JOINTABLEVIEW_HXX
#define DBAUI_JOINTABLEVIEW_HXX
-#ifndef _SV_WINDOW_HXX
#include <vcl/window.hxx>
-#endif
-#ifndef _SV_TIMER_HXX
#include <vcl/timer.hxx>
-#endif
-#ifndef _SV_SCRBAR_HXX
#include <vcl/scrbar.hxx>
-#endif
-#ifndef _RTTI_HXX
#include <tools/rtti.hxx>
-#endif
-#ifndef _TRANSFER_HXX
#include <svtools/transfer.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _DBACCESS_UI_CALLBACKS_HXX_
#include "callbacks.hxx"
-#endif
#include "TableConnectionData.hxx"
#include "TableWindowData.hxx"
#include <memory>
@@ -335,3 +322,5 @@ namespace dbaui
};
}
#endif // DBAUI_JOINTABLEVIEW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/QEnumTypes.hxx b/dbaccess/source/ui/inc/QEnumTypes.hxx
index 8b9f52558..828595cd3 100644
--- a/dbaccess/source/ui/inc/QEnumTypes.hxx
+++ b/dbaccess/source/ui/inc/QEnumTypes.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,3 +89,4 @@ namespace dbaui
#endif // DBAUI_ENUMTYPES_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/QueryDesignView.hxx b/dbaccess/source/ui/inc/QueryDesignView.hxx
index 7c68d552a..5c781b77d 100644
--- a/dbaccess/source/ui/inc/QueryDesignView.hxx
+++ b/dbaccess/source/ui/inc/QueryDesignView.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,27 +28,13 @@
#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#define DBAUI_QUERYDESIGNVIEW_HXX
-#ifndef DBAUI_QUERYVIEW_HXX
#include "queryview.hxx"
-#endif
-#ifndef _SV_SPLIT_HXX
#include <vcl/split.hxx>
-#endif
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
-#endif
namespace connectivity
{
@@ -187,3 +174,4 @@ namespace dbaui
}
#endif // DBAUI_QUERYDESIGNVIEW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/QueryTableView.hxx b/dbaccess/source/ui/inc/QueryTableView.hxx
index b90aa5d97..156b232c8 100644
--- a/dbaccess/source/ui/inc/QueryTableView.hxx
+++ b/dbaccess/source/ui/inc/QueryTableView.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef DBAUI_QUERYTABLEVIEW_HXX
#define DBAUI_QUERYTABLEVIEW_HXX
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
namespace dbaui
{
@@ -147,3 +142,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/QueryTextView.hxx b/dbaccess/source/ui/inc/QueryTextView.hxx
index 9570d3be0..b8b4861c0 100644
--- a/dbaccess/source/ui/inc/QueryTextView.hxx
+++ b/dbaccess/source/ui/inc/QueryTextView.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBAUI_QUERYVIEW_TEXT_HXX
#define DBAUI_QUERYVIEW_TEXT_HXX
-#ifndef DBAUI_QUERYVIEW_HXX
#include "queryview.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTAINERWINDOW_HXX
#include "querycontainerwindow.hxx"
-#endif
class Splitter;
namespace dbaui
@@ -74,3 +71,4 @@ namespace dbaui
#endif // DBAUI_QUERYVIEW_TEXT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/QueryViewSwitch.hxx b/dbaccess/source/ui/inc/QueryViewSwitch.hxx
index 54cdbd2f2..a55803a53 100644
--- a/dbaccess/source/ui/inc/QueryViewSwitch.hxx
+++ b/dbaccess/source/ui/inc/QueryViewSwitch.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,3 +103,4 @@ namespace dbaui
}
#endif // DBAUI_QUERYVIEWSWITCH_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RTableConnectionData.hxx b/dbaccess/source/ui/inc/RTableConnectionData.hxx
index a9f05f193..c17d365a5 100644
--- a/dbaccess/source/ui/inc/RTableConnectionData.hxx
+++ b/dbaccess/source/ui/inc/RTableConnectionData.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,18 +28,10 @@
#ifndef DBAUI_RTABLECONNECTIONDATA_HXX
#define DBAUI_RTABLECONNECTIONDATA_HXX
-#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
namespace dbaui
{
@@ -106,3 +99,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RefFunctor.hxx b/dbaccess/source/ui/inc/RefFunctor.hxx
index 9fc9ab193..7782fec9a 100644
--- a/dbaccess/source/ui/inc/RefFunctor.hxx
+++ b/dbaccess/source/ui/inc/RefFunctor.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef DBAUI_REFFUNCTOR_HXX
#define DBAUI_REFFUNCTOR_HXX
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
-#endif
+#include <rtl/ref.hxx>
#ifndef INCLUDED_FUNCTIONAL
#define INCLUDED_FUNCTIONAL
#include <functional>
@@ -38,23 +37,20 @@
namespace dbaui
{
- template <class T> class OUnaryRefFunctor : public ::std::unary_function< ::vos::ORef<T> ,void>
+ template <class T> class OUnaryRefFunctor : public ::std::unary_function< ::rtl::Reference<T> ,void>
{
::std::mem_fun_t<bool,T> m_aFunction;
public:
OUnaryRefFunctor(const ::std::mem_fun_t<bool,T>& _aFunc) : m_aFunction(_aFunc)
{}
- inline void operator()(const ::vos::ORef<T>& _aType) const
+ inline void operator()(const ::rtl::Reference<T>& _aType) const
{
- m_aFunction(_aType.getBodyPtr());
+ m_aFunction(_aType.get());
}
-// inline void operator()(const ::vos::ORef<T>& _aType)
-// {
-// m_aFunction(_aType.getBodyPtr());
-// }
};
// -----------------------------------------------------------------------------
} // namespace dbaui
// -----------------------------------------------------------------------------
#endif //DBAUI_REFFUNCTOR_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RelControliFace.hxx b/dbaccess/source/ui/inc/RelControliFace.hxx
index e8698931b..d5a1d5b29 100644
--- a/dbaccess/source/ui/inc/RelControliFace.hxx
+++ b/dbaccess/source/ui/inc/RelControliFace.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBAUI_RELCONTROLIFACE_HXX
#define DBAUI_RELCONTROLIFACE_HXX
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
#include "TableConnectionData.hxx"
namespace dbaui
@@ -58,3 +57,5 @@ namespace dbaui
};
}
#endif // DBAUI_RELCONTROLIFACE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RelationControl.hxx b/dbaccess/source/ui/inc/RelationControl.hxx
index 23693ccb5..f41a64103 100644
--- a/dbaccess/source/ui/inc/RelationControl.hxx
+++ b/dbaccess/source/ui/inc/RelationControl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef DBAUI_RELATIONCONTROL_HXX
#define DBAUI_RELATIONCONTROL_HXX
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
namespace dbaui
{
@@ -106,3 +101,5 @@ namespace dbaui
};
}
#endif // DBAUI_RELATIONCONTROL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RelationController.hxx b/dbaccess/source/ui/inc/RelationController.hxx
index ae0a4d128..4d689ebc5 100644
--- a/dbaccess/source/ui/inc/RelationController.hxx
+++ b/dbaccess/source/ui/inc/RelationController.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBAUI_RELATIONCONTROLLER_HXX
#define DBAUI_RELATIONCONTROLLER_HXX
-#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
-#endif
-#ifndef DBAUI_RELATIONDESIGNVIEW_HXX
#include "RelationDesignView.hxx"
-#endif
class VCLXWindow;
class WaitObject;
@@ -99,3 +96,4 @@ namespace dbaui
}
#endif // DBAUI_RELATIONCONTROLLER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RelationDesignView.hxx b/dbaccess/source/ui/inc/RelationDesignView.hxx
index 5ce5b1e0f..dae489673 100644
--- a/dbaccess/source/ui/inc/RelationDesignView.hxx
+++ b/dbaccess/source/ui/inc/RelationDesignView.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,21 +29,13 @@
#ifndef DBAUI_RELATIONDESIGNVIEW_HXX
#define DBAUI_RELATIONDESIGNVIEW_HXX
-#ifndef DBAUI_JOINDESIGNVIEW_HXX
#include "JoinDesignView.hxx"
-#endif
#ifndef _VECTOR_
#include <vector>
#endif
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
-#ifndef DBAUI_RELATION_TABLEVIEW_HXX
#include "RelationTableView.hxx"
-#endif
namespace dbaui
{
@@ -72,3 +65,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RelationDlg.hxx b/dbaccess/source/ui/inc/RelationDlg.hxx
index d83933dd3..ece9e48a8 100644
--- a/dbaccess/source/ui/inc/RelationDlg.hxx
+++ b/dbaccess/source/ui/inc/RelationDlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,31 +28,14 @@
#ifndef DBAUI_RELATIONDIALOG_HXX
#define DBAUI_RELATIONDIALOG_HXX
-#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-//#ifndef _EDIT_HXX //autogen
-//#include <vcl/edit.hxx>
-//#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef DBAUI_RELCONTROLIFACE_HXX
#include "RelControliFace.hxx"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
namespace dbaui
@@ -128,3 +112,4 @@ namespace dbaui
#endif // DBAUI_RELATIONDIALOG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RelationTableView.hxx b/dbaccess/source/ui/inc/RelationTableView.hxx
index 3faee1f37..a4509d4d1 100644
--- a/dbaccess/source/ui/inc/RelationTableView.hxx
+++ b/dbaccess/source/ui/inc/RelationTableView.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,3 +81,4 @@ namespace dbaui
#endif // DBAUI_RELATION_TABLEVIEW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RtfReader.hxx b/dbaccess/source/ui/inc/RtfReader.hxx
index d18ba34d2..457768327 100644
--- a/dbaccess/source/ui/inc/RtfReader.hxx
+++ b/dbaccess/source/ui/inc/RtfReader.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,15 +31,9 @@
#ifndef _VECTOR_
#include <vector>
#endif
-#ifndef _PARRTF_HXX //autogen
#include <svtools/parrtf.hxx>
-#endif
-#ifndef DBAUI_DATABASEEXPORT_HXX
#include "DExport.hxx"
-#endif
-#ifndef _STREAM_HXX
#include <tools/stream.hxx>
-#endif
namespace dbaui
{
@@ -82,3 +77,4 @@ namespace dbaui
#endif // DBAUI_RTFREADER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/ScrollHelper.hxx b/dbaccess/source/ui/inc/ScrollHelper.hxx
index 13f923fa0..5eda7f699 100644
--- a/dbaccess/source/ui/inc/ScrollHelper.hxx
+++ b/dbaccess/source/ui/inc/ScrollHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef DBAUI_SCROLLHELPER_HXX
#define DBAUI_SCROLLHELPER_HXX
-#ifndef _LINK_HXX
#include <tools/link.hxx>
-#endif
-#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
-#endif
-#ifndef _SV_TIMER_HXX
#include <vcl/timer.hxx>
-#endif
namespace dbaui
{
@@ -79,3 +74,4 @@ namespace dbaui
}
#endif // DBAUI_SCROLLHELPER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/SqlNameEdit.hxx b/dbaccess/source/ui/inc/SqlNameEdit.hxx
index 09024c3b7..2356e9d0e 100644
--- a/dbaccess/source/ui/inc/SqlNameEdit.hxx
+++ b/dbaccess/source/ui/inc/SqlNameEdit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBAUI_SQLNAMEEDIT_HXX
#define DBAUI_SQLNAMEEDIT_HXX
-#ifndef _SV_EDIT_HXX
#include <vcl/edit.hxx>
-#endif
-#ifndef _SV_COMBOBOX_HXX
#include <vcl/combobox.hxx>
-#endif
namespace dbaui
{
@@ -110,3 +107,4 @@ namespace dbaui
#endif // DBAUI_SQLNAMEEDIT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableConnection.hxx b/dbaccess/source/ui/inc/TableConnection.hxx
index 2819d44b0..ff6c04352 100644
--- a/dbaccess/source/ui/inc/TableConnection.hxx
+++ b/dbaccess/source/ui/inc/TableConnection.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,25 +28,11 @@
#ifndef DBAUI_TABLECONNECTION_HXX
#define DBAUI_TABLECONNECTION_HXX
-//#ifndef _SV_GEN_HXX
-//#include <tools/gen.hxx>
-//#endif
-//#ifndef DBAUI_CONNECTIONLINE_HXX
-//#include "ConnectionLine.hxx"
-//#endif
#include <vector>
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _SV_WINDOW_HXX
#include <vcl/window.hxx>
-#endif
-#ifndef _RTTI_HXX
#include <tools/rtti.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
#include <com/sun/star/uno/Reference.h>
-#endif
#include "TableConnectionData.hxx"
class Point;
@@ -121,3 +108,4 @@ namespace dbaui
}
#endif // DBAUI_TABLECONNECTION_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableConnectionData.hxx b/dbaccess/source/ui/inc/TableConnectionData.hxx
index 67d4f49a2..f6c705ff0 100644
--- a/dbaccess/source/ui/inc/TableConnectionData.hxx
+++ b/dbaccess/source/ui/inc/TableConnectionData.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,22 +28,15 @@
#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#define DBAUI_TABLECONNECTIONDATA_HXX
-#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
-#endif
#include "TableWindowData.hxx"
#include <vector>
-#ifndef _RTTI_HXX
#include <tools/rtti.hxx>
-#endif
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
#include <boost/shared_ptr.hpp>
namespace dbaui
{
-#define MAX_CONN_COUNT 2
//==================================================================
// ConnData ---------->* ConnLineData
// ^1 ^1
@@ -50,14 +44,14 @@ namespace dbaui
// Conn ---------->* ConnLine
//==================================================================
-
+
//==================================================================
/*
the class OTableConnectionData contains all connection data which exists between two windows
**/
class OTableConnectionData
{
-
+
protected:
TTableWindowData::value_type m_pReferencingTable;
TTableWindowData::value_type m_pReferencedTable;
@@ -117,3 +111,4 @@ namespace dbaui
#endif // DBAUI_TABLECONNECTIONDATA_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableController.hxx b/dbaccess/source/ui/inc/TableController.hxx
index 9c70ad56b..19766b27b 100644
--- a/dbaccess/source/ui/inc/TableController.hxx
+++ b/dbaccess/source/ui/inc/TableController.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -153,3 +154,4 @@ namespace dbaui
#endif // DBUI_TABLECONTROLLER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableCopyHelper.hxx b/dbaccess/source/ui/inc/TableCopyHelper.hxx
index abcbdd7e8..bedd9b261 100644
--- a/dbaccess/source/ui/inc/TableCopyHelper.hxx
+++ b/dbaccess/source/ui/inc/TableCopyHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,27 +28,13 @@
#ifndef DBUI_TABLECOPYHELPER_HXX
#define DBUI_TABLECOPYHELPER_HXX
-#ifndef DBAUI_APPELEMENTTYPE_HXX
#include "AppElementType.hxx"
-#endif
-#ifndef _DBAUI_COMMON_TYPES_HXX_
#include "commontypes.hxx"
-#endif
-#ifndef _SVX_DATACCESSDESCRIPTOR_HXX_
#include <svx/dataaccessdescriptor.hxx>
-#endif
-#ifndef _SOT_STORAGE_HXX
#include <sot/storage.hxx>
-#endif
-#ifndef _TRANSFER_HXX
#include <svtools/transfer.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_
#include <com/sun/star/sdbc/XResultSet.hpp>
-#endif
#include <functional>
class SvLBoxEntry;
@@ -94,10 +81,10 @@ namespace dbaui
struct DropDescriptor
{
::svx::ODataAccessDescriptor aDroppedData;
- //dyf add 20070601
+
//for transfor the tablename
::rtl::OUString sDefaultTableName;
- //dyf add end
+
String aUrl;
SotStorageStreamRef aHtmlRtfStorage;
ElementType nType;
@@ -210,3 +197,4 @@ namespace dbaui
//........................................................................
#endif // DBUI_TABLECOPYHELPER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableDesignControl.hxx b/dbaccess/source/ui/inc/TableDesignControl.hxx
index dd15a3d4b..ea50a78e1 100644
--- a/dbaccess/source/ui/inc/TableDesignControl.hxx
+++ b/dbaccess/source/ui/inc/TableDesignControl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,19 +28,11 @@
#ifndef DBAUI_TABLEDESIGNCONTROL_HXX
#define DBAUI_TABLEDESIGNCONTROL_HXX
-#ifndef _TABBAR_HXX //autogen
#include <svtools/tabbar.hxx>
-#endif
-#ifndef _SVTOOLS_EDITBROWSEBOX_HXX_
#include <svtools/editbrowsebox.hxx>
-#endif
-#ifndef DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
#include "IClipBoardTest.hxx"
-#endif
-#ifndef DBAUI_TYPEINFO_HXX
#include "TypeInfo.hxx"
-#endif
#define TABPAGESIZE 70
namespace dbaui
@@ -106,3 +99,4 @@ namespace dbaui
#endif // DBAUI_TABLEDESIGNCONTROL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableDesignHelpBar.hxx b/dbaccess/source/ui/inc/TableDesignHelpBar.hxx
index ae0641030..8182f1eca 100644
--- a/dbaccess/source/ui/inc/TableDesignHelpBar.hxx
+++ b/dbaccess/source/ui/inc/TableDesignHelpBar.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,25 +28,17 @@
#ifndef DBAUI_TABLEDESIGNHELPBAR_HXX
#define DBAUI_TABLEDESIGNHELPBAR_HXX
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef _SV_TABCTRL_HXX
#include <vcl/tabctrl.hxx>
-#endif
-#ifndef _SV_TABPAGE_HXX
#include <vcl/tabpage.hxx>
-#endif
-#ifndef DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
#include "IClipBoardTest.hxx"
-#endif
class MultiLineEdit;
namespace dbaui
{
//==================================================================
// Ableitung von TabPage ist ein Trick von TH,
- // um Aenderungen der Systemfarben zu bemerken (Bug #53905)
+ // um Aenderungen der Systemfarben zu bemerken
class OTableDesignHelpBar : public TabPage
,public IClipboardTest
{
@@ -79,3 +72,4 @@ namespace dbaui
}
#endif // DBAUI_TABLEDESIGNHELPBAR_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableDesignView.hxx b/dbaccess/source/ui/inc/TableDesignView.hxx
index 5f1b61dab..8b7cbc050 100644
--- a/dbaccess/source/ui/inc/TableDesignView.hxx
+++ b/dbaccess/source/ui/inc/TableDesignView.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,21 +28,11 @@
#ifndef DBAUI_TABLEDESIGNVIEW_HXX
#define DBAUI_TABLEDESIGNVIEW_HXX
-#ifndef DBAUI_DATAVIEW_HXX
#include "dataview.hxx"
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
#include <com/sun/star/frame/XController.hpp>
-#endif
-#ifndef _SV_SPLIT_HXX
#include <vcl/split.hxx>
-#endif
-#ifndef DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
#include "IClipBoardTest.hxx"
-#endif
namespace dbaui
{
@@ -129,3 +120,4 @@ namespace dbaui
}
#endif // DBAUI_TABLEDESIGNVIEW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableFieldDescription.hxx b/dbaccess/source/ui/inc/TableFieldDescription.hxx
index d930f489b..1438d5bda 100644
--- a/dbaccess/source/ui/inc/TableFieldDescription.hxx
+++ b/dbaccess/source/ui/inc/TableFieldDescription.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,18 +32,12 @@
#define INCLUDED_VECTOR
#include <vector>
#endif
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _VOS_REF_HXX_
-#include <vos/ref.hxx>
-#endif
+#include <rtl/ref.hxx>
+
+#include <salhelper/simplereferenceobject.hxx>
namespace comphelper
{
@@ -52,7 +47,7 @@ namespace comphelper
class Window;
namespace dbaui
{
- class OTableFieldDesc : public ::vos::OReference
+ class OTableFieldDesc : public ::salhelper::SimpleReferenceObject
{
private:
::std::vector< ::rtl::OUString >
@@ -160,8 +155,9 @@ namespace dbaui
return bEmpty;
}
//------------------------------------------------------------------
- typedef ::vos::ORef< OTableFieldDesc> OTableFieldDescRef;
+ typedef ::rtl::Reference< OTableFieldDesc> OTableFieldDescRef;
typedef ::std::vector<OTableFieldDescRef> OTableFields;
}
#endif //
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableGrantCtrl.hxx b/dbaccess/source/ui/inc/TableGrantCtrl.hxx
index 27313e4e4..f2505f34c 100644
--- a/dbaccess/source/ui/inc/TableGrantCtrl.hxx
+++ b/dbaccess/source/ui/inc/TableGrantCtrl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,24 +28,12 @@
#ifndef DBAUI_TABLEGRANTCONTROL_HXX
#define DBAUI_TABLEGRANTCONTROL_HXX
-#ifndef _SVTOOLS_EDITBROWSEBOX_HXX_
#include <svtools/editbrowsebox.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAUTHORIZABLE_HPP_
#include <com/sun/star/sdbcx/XAuthorizable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
class Edit;
namespace dbaui
@@ -124,3 +113,5 @@ private:
}
#endif // DBAUI_TABLEGRANTCONTROL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableRow.hxx b/dbaccess/source/ui/inc/TableRow.hxx
index 2b2a8b499..d206014d6 100644
--- a/dbaccess/source/ui/inc/TableRow.hxx
+++ b/dbaccess/source/ui/inc/TableRow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,28 +28,15 @@
#ifndef DBAUI_TABLEROW_HXX
#define DBAUI_TABLEROW_HXX
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef _STREAM_HXX
#include <tools/stream.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef DBAUI_TYPEINFO_HXX
#include "TypeInfo.hxx"
-#endif
namespace dbaui
{
-// class OTableRow;
-// friend SvStream& operator<<( SvStream& rStr, OTableRow& _rRow );
-
class OFieldDescription;
class OTypeInfo;
class OTableRow
@@ -99,3 +87,4 @@ namespace dbaui
}
#endif // DBAUI_TABLEROW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableRowExchange.hxx b/dbaccess/source/ui/inc/TableRowExchange.hxx
index eb2706dd2..c927dd8ef 100644
--- a/dbaccess/source/ui/inc/TableRowExchange.hxx
+++ b/dbaccess/source/ui/inc/TableRowExchange.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef DBAUI_TABLEROW_EXCHANGE_HXX
#define DBAUI_TABLEROW_EXCHANGE_HXX
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE2_HXX_
#include <cppuhelper/implbase2.hxx>
-#endif
-#ifndef _TRANSFER_HXX
#include <svtools/transfer.hxx>
-#endif
#include <boost/shared_ptr.hpp>
namespace dbaui
@@ -55,3 +50,4 @@ namespace dbaui
}
#endif // DBAUI_TABLEROW_EXCHANGE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx
index 5628d1fe9..eeaa896f1 100644
--- a/dbaccess/source/ui/inc/TableWindow.hxx
+++ b/dbaccess/source/ui/inc/TableWindow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -207,3 +208,4 @@ namespace dbaui
#endif //DBAUI_TABLEWINDOW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableWindowAccess.hxx b/dbaccess/source/ui/inc/TableWindowAccess.hxx
index 0ba2d0360..a1fd78373 100644
--- a/dbaccess/source/ui/inc/TableWindowAccess.hxx
+++ b/dbaccess/source/ui/inc/TableWindowAccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef DBACCESS_TABLEWINDOWACCESS_HXX
#define DBACCESS_TABLEWINDOWACCESS_HXX
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLERELATIONSET_HPP_
#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE2_HXX_
#include <cppuhelper/implbase2.hxx>
-#endif
-#ifndef _TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX_
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
-#endif
namespace dbaui
{
@@ -122,3 +117,5 @@ namespace dbaui
};
}
#endif // DBACCESS_TABLEWINDOWACCESS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableWindowData.hxx b/dbaccess/source/ui/inc/TableWindowData.hxx
index a1eb7fb63..79bfcb478 100644
--- a/dbaccess/source/ui/inc/TableWindowData.hxx
+++ b/dbaccess/source/ui/inc/TableWindowData.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBAUI_TABLEWINDOWDATA_HXX
#define DBAUI_TABLEWINDOWDATA_HXX
-#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
-#endif
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
@@ -104,3 +103,4 @@ namespace dbaui
}
#endif // DBAUI_TABLEWINDOWDATA_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableWindowListBox.hxx b/dbaccess/source/ui/inc/TableWindowListBox.hxx
index d0d50fd25..b193bae04 100644
--- a/dbaccess/source/ui/inc/TableWindowListBox.hxx
+++ b/dbaccess/source/ui/inc/TableWindowListBox.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -107,3 +108,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableWindowTitle.hxx b/dbaccess/source/ui/inc/TableWindowTitle.hxx
index 25897fc5e..a07e8fda0 100644
--- a/dbaccess/source/ui/inc/TableWindowTitle.hxx
+++ b/dbaccess/source/ui/inc/TableWindowTitle.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBAUI_TABLEWINDOWTITLE_HXX
#define DBAUI_TABLEWINDOWTITLE_HXX
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
namespace dbaui
{
@@ -57,3 +56,4 @@ namespace dbaui
}
#endif // DBAUI_TABLEWINDOWTITLE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TablesSingleDlg.hxx b/dbaccess/source/ui/inc/TablesSingleDlg.hxx
index a1a761153..b861d4e11 100644
--- a/dbaccess/source/ui/inc/TablesSingleDlg.hxx
+++ b/dbaccess/source/ui/inc/TablesSingleDlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,10 @@
#ifndef _DBAUI_TABLESSINGLEDLG_HXX_
#define _DBAUI_TABLESSINGLEDLG_HXX_
-#ifndef _BASEDLGS_HXX
#include <sfx2/basedlgs.hxx>
-#endif
-#ifndef DBAUI_ITEMSETHELPER_HXX
#include "IItemSetHelper.hxx"
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
#include <memory>
@@ -91,3 +84,4 @@ class ODbDataSourceAdministrationHelper;
#endif // _DBAUI_TABLESSINGLEDLG_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TokenWriter.hxx b/dbaccess/source/ui/inc/TokenWriter.hxx
index 5896fa376..523cf828f 100644
--- a/dbaccess/source/ui/inc/TokenWriter.hxx
+++ b/dbaccess/source/ui/inc/TokenWriter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -83,18 +84,18 @@ namespace dbaui
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xFactory;
::rtl::OUString m_sName;
- //dyf add 20070601
+
//for transfor the tablename
::rtl::OUString m_sDefaultTableName;
- //dyf add end
+
::rtl::OUString m_sDataSourceName;
sal_Int32 m_nCommandType;
bool m_bNeedToReInitialize;
#if defined UNX
- static const char __FAR_DATA sNewLine;
+ static const char sNewLine;
#else
- static const char __FAR_DATA sNewLine[];
+ static const char sNewLine[];
#endif
ODatabaseExport* m_pReader;
@@ -120,10 +121,8 @@ namespace dbaui
public:
void setStream(SvStream* _pStream){ m_pStream = _pStream; }
- //dyf add 20070601
//for set the tablename
void setSTableName(const ::rtl::OUString &_sTableName){ m_sDefaultTableName = _sTableName; }
- //dyf add end
virtual sal_Bool Write(); // Export
virtual sal_Bool Read(); // Import
@@ -177,10 +176,10 @@ namespace dbaui
// HtmlFontSz[1-7] in s*3.ini [user]
static sal_Int16 nFontSize[SBA_HTML_FONTSIZES];
static const sal_Int16 nCellSpacing;
- static const char __FAR_DATA sIndentSource[];
+ static const char sIndentSource[];
char sIndent[nIndentMax+1];
sal_Int16 m_nIndent;
- #ifdef DBG_UTIL
+ #if OSL_DEBUG_LEVEL > 0
sal_Bool m_bCheckFont;
#endif
@@ -255,3 +254,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TypeInfo.hxx b/dbaccess/source/ui/inc/TypeInfo.hxx
index 3be393403..73ffcbde5 100644
--- a/dbaccess/source/ui/inc/TypeInfo.hxx
+++ b/dbaccess/source/ui/inc/TypeInfo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,10 @@
#define DBAUI_TYPEINFO_HXX
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNSEARCH_HPP_
#include <com/sun/star/sdbc/ColumnSearch.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#endif
#include <boost/shared_ptr.hpp>
#include <map>
@@ -150,3 +143,4 @@ const sal_uInt16 TYPE_BIT = 31;
#endif // DBAUI_TYPEINFO_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx
index 1faca3f3b..c7f540ad8 100644
--- a/dbaccess/source/ui/inc/UITools.hxx
+++ b/dbaccess/source/ui/inc/UITools.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,24 +28,12 @@
#ifndef DBAUI_TOOLS_HXX
#define DBAUI_TOOLS_HXX
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef DBAUI_TYPEINFO_HXX
#include "TypeInfo.hxx"
-#endif
-#ifndef _SVX_SVXENUM_HXX
#include <editeng/svxenum.hxx>
-#endif
-#ifndef _SV_TASKPANELIST_HXX
#include <vcl/taskpanelist.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
#define RET_ALL 10
@@ -277,14 +266,6 @@ namespace dbaui
*/
void adjustToolBoxSize(ToolBox* _pToolBox);
- /** isHiContrast check if we are in hi contrast mode.
- @param _pWindow
- The window we have to check on.
- @return
- <TRUE/> if so, otherwise <FALSE/>
- */
- sal_Bool isHiContrast(Window* _pWindow);
-
void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId );
/** check if SQL92 name checking is enabled
@@ -472,3 +453,4 @@ namespace dbaui
#endif // DBAUI_TOOLS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/UserAdminDlg.hxx b/dbaccess/source/ui/inc/UserAdminDlg.hxx
index 6a6cf798e..747b7d4b5 100644
--- a/dbaccess/source/ui/inc/UserAdminDlg.hxx
+++ b/dbaccess/source/ui/inc/UserAdminDlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,21 +29,11 @@
#ifndef DBAUI_USERADMINDLG_HXX
#define DBAUI_USERADMINDLG_HXX
-#ifndef _SFXTABDLG_HXX
#include <sfx2/tabdlg.hxx>
-#endif
-#ifndef _DBAUI_DSNTYPES_HXX_
#include "dsntypes.hxx"
-#endif
-#ifndef DBAUI_ITEMSETHELPER_HXX
#include "IItemSetHelper.hxx"
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
#include <memory>
FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
@@ -98,3 +89,5 @@ namespace dbaui
//.........................................................................
#endif // DBAUI_USERADMINDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/VertSplitView.hxx b/dbaccess/source/ui/inc/VertSplitView.hxx
index e932bf367..c1acc80e4 100644
--- a/dbaccess/source/ui/inc/VertSplitView.hxx
+++ b/dbaccess/source/ui/inc/VertSplitView.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBAUI_VERTSPLITVIEW_HXX
#define DBAUI_VERTSPLITVIEW_HXX
-#ifndef _SV_SPLIT_HXX
#include <vcl/split.hxx>
-#endif
namespace dbaui
{
@@ -58,3 +57,4 @@ namespace dbaui
}
#endif // DBAUI_VERTSPLITVIEW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/WCPage.hxx b/dbaccess/source/ui/inc/WCPage.hxx
index 5d79f752b..34e7cc7de 100644
--- a/dbaccess/source/ui/inc/WCPage.hxx
+++ b/dbaccess/source/ui/inc/WCPage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,24 +30,12 @@
#include "WTabPage.hxx"
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_GROUP_HXX
#include <vcl/group.hxx>
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_EDIT_HXX
#include <vcl/edit.hxx>
-#endif
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
namespace dbaui
{
@@ -81,9 +70,7 @@ namespace dbaui
DECL_LINK( KeyClickHdl, Button* );
sal_Bool checkAppendData();
- //--------dyf add
void SetAppendDataRadio();
- //--------add end
public:
virtual void Reset();
@@ -118,3 +105,4 @@ namespace dbaui
#endif // DBAUI_WIZARD_CPAGE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/WColumnSelect.hxx b/dbaccess/source/ui/inc/WColumnSelect.hxx
index 872355442..eb0a5be57 100644
--- a/dbaccess/source/ui/inc/WColumnSelect.hxx
+++ b/dbaccess/source/ui/inc/WColumnSelect.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,15 +31,9 @@
#include "WTabPage.hxx"
#include "WCopyTable.hxx"
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <comphelper/stl_types.hxx>
namespace dbaui
@@ -107,3 +102,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx
index f1f38e397..c28630bb1 100644
--- a/dbaccess/source/ui/inc/WCopyTable.hxx
+++ b/dbaccess/source/ui/inc/WCopyTable.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -418,3 +419,5 @@ namespace dbaui
}
#endif // DBAUI_WIZ_COPYTABLEDIALOG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/WExtendPages.hxx b/dbaccess/source/ui/inc/WExtendPages.hxx
index 729f4f859..7e8289304 100644
--- a/dbaccess/source/ui/inc/WExtendPages.hxx
+++ b/dbaccess/source/ui/inc/WExtendPages.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBAUI_WIZ_EXTENDPAGES_HXX
#define DBAUI_WIZ_EXTENDPAGES_HXX
-#ifndef DBAUI_WIZ_TYPESELECT_HXX
#include "WTypeSelect.hxx"
-#endif
class SvStream;
namespace dbaui
@@ -84,3 +83,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/WNameMatch.hxx b/dbaccess/source/ui/inc/WNameMatch.hxx
index 542b1d53e..e9d056347 100644
--- a/dbaccess/source/ui/inc/WNameMatch.hxx
+++ b/dbaccess/source/ui/inc/WNameMatch.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,24 +28,12 @@
#ifndef DBAUI_WIZ_NAMEMATCHING_HXX
#define DBAUI_WIZ_NAMEMATCHING_HXX
-#ifndef DBAUI_WIZ_TABBPAGE_HXX
#include "WTabPage.hxx"
-#endif
-#ifndef _DBAUI_MARKTREE_HXX_
#include "marktree.hxx"
-#endif
-#ifndef DBAUI_DATABASEEXPORT_HXX
#include "DExport.hxx"
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
-#ifndef DBAUI_WIZ_COPYTABLEDIALOG_HXX
#include "WCopyTable.hxx"
-#endif
namespace dbaui
{
@@ -110,3 +99,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/WTabPage.hxx b/dbaccess/source/ui/inc/WTabPage.hxx
index df0af4855..8bf6b815f 100644
--- a/dbaccess/source/ui/inc/WTabPage.hxx
+++ b/dbaccess/source/ui/inc/WTabPage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef DBAUI_WIZ_TABBPAGE_HXX
#define DBAUI_WIZ_TABBPAGE_HXX
-#ifndef _SV_TABPAGE_HXX
#include <vcl/tabpage.hxx>
-#endif
namespace dbaui
{
@@ -44,7 +43,7 @@ namespace dbaui
OCopyTableWizard* m_pParent;
sal_Bool m_bFirstTime; // Page wird das erste mal gerufen ; should be set in the reset methode
- OWizardPage( Window* pParent, const ResId& rResId );// : TabPage(pParent,rResId),m_pParent((OCopyTableWizard*)pParent),m_bFirstTime(sal_True) {};
+ OWizardPage( Window* pParent, const ResId& rResId );
public:
virtual void Reset ( ) = 0;
@@ -58,3 +57,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/WTypeSelect.hxx b/dbaccess/source/ui/inc/WTypeSelect.hxx
index 945cf650b..d5ddf0790 100644
--- a/dbaccess/source/ui/inc/WTypeSelect.hxx
+++ b/dbaccess/source/ui/inc/WTypeSelect.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -140,3 +141,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/adtabdlg.hxx b/dbaccess/source/ui/inc/adtabdlg.hxx
index fcb3a15aa..7ffe59ede 100644
--- a/dbaccess/source/ui/inc/adtabdlg.hxx
+++ b/dbaccess/source/ui/inc/adtabdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,35 +28,19 @@
#ifndef DBAUI_QYDLGTAB_HXX
#define DBAUI_QYDLGTAB_HXX
-#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _SV_DIALOG_HXX
#include <vcl/dialog.hxx>
-#endif
-#ifndef _STRING_HXX //autogen
#include <tools/string.hxx>
-#endif
-#ifndef _DBAUI_TABLETREE_HXX_
#include "tabletree.hxx"
-#endif
#include <memory>
@@ -138,3 +123,5 @@ namespace dbaui
};
}
#endif // DBAUI_QYDLGTAB_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/advancedsettingsdlg.hxx b/dbaccess/source/ui/inc/advancedsettingsdlg.hxx
index f1196b0fe..12abaf2ac 100644
--- a/dbaccess/source/ui/inc/advancedsettingsdlg.hxx
+++ b/dbaccess/source/ui/inc/advancedsettingsdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -92,3 +93,5 @@ namespace dbaui
//........................................................................
#endif // DBACCESS_ADVANCEDSETTINGSDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/asyncmodaldialog.hxx b/dbaccess/source/ui/inc/asyncmodaldialog.hxx
index 8202fcc2a..9711070bc 100644
--- a/dbaccess/source/ui/inc/asyncmodaldialog.hxx
+++ b/dbaccess/source/ui/inc/asyncmodaldialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#define DBACCESS_ASYNCMODALDIALOG_HXX
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_UI_DIALOGS_XEXECUTABLEDIALOG_HPP_
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#endif
/** === end UNO includes === **/
//........................................................................
@@ -65,3 +64,4 @@ namespace dbaui
#endif // DBACCESS_ASYNCMODALDIALOG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/browserids.hxx b/dbaccess/source/ui/inc/browserids.hxx
index 3c53bd592..3bac18ae4 100644
--- a/dbaccess/source/ui/inc/browserids.hxx
+++ b/dbaccess/source/ui/inc/browserids.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBACCESS_UI_BROWSER_ID_HXX
#define DBACCESS_UI_BROWSER_ID_HXX
-#ifndef _SBASLTID_HRC
#include <svx/svxids.hrc>
-#endif
-#ifndef _DBACCESS_SLOTID_HRC_
#include "dbaccess_slotid.hrc"
-#endif
#define ID_BROWSER_COPY SID_COPY
#define ID_BROWSER_CUT SID_CUT
@@ -120,3 +117,5 @@
#endif // DBACCESS_UI_BROWSER_ID_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx
index d68a144a5..29d21fffc 100644
--- a/dbaccess/source/ui/inc/brwctrlr.hxx
+++ b/dbaccess/source/ui/inc/brwctrlr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,7 +53,7 @@
#include <vcl/timer.hxx>
#include <svtools/transfer.hxx>
#include <osl/mutex.hxx>
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
#include <cppuhelper/implbase9.hxx>
#include <svtools/cliplistener.hxx>
@@ -368,3 +369,4 @@ namespace dbaui
#endif // _SBA_BWRCTRLR_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/brwview.hxx b/dbaccess/source/ui/inc/brwview.hxx
index 455edd48a..b95468886 100644
--- a/dbaccess/source/ui/inc/brwview.hxx
+++ b/dbaccess/source/ui/inc/brwview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,23 +29,13 @@
#ifndef _SBX_BRWVIEW_HXX
#define _SBX_BRWVIEW_HXX
-#ifndef _SV_WINDOW_HXX //autogen
#include <vcl/window.hxx>
-#endif
-#ifndef _TOOLS_RESID_HXX //autogen wg. ResId
#include <tools/resid.hxx>
-#endif
-#ifndef _COM_SUN_STAR_AWT_POSSIZE_HPP_
#include <com/sun/star/awt/PosSize.hpp>
-#endif
-#ifndef DBAUI_DATAVIEW_HXX
#include "dataview.hxx"
-#endif
-#ifndef _UNOTOOLS_EVENTLISTENERADAPTER_HXX_
#include <unotools/eventlisteneradapter.hxx>
-#endif
namespace com { namespace sun { namespace star { namespace awt {
@@ -123,3 +114,4 @@ namespace dbaui
}
#endif // _SBX_BRWVIEW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/callbacks.hxx b/dbaccess/source/ui/inc/callbacks.hxx
index 791809572..2acd041c6 100644
--- a/dbaccess/source/ui/inc/callbacks.hxx
+++ b/dbaccess/source/ui/inc/callbacks.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,9 @@
#ifndef _DBACCESS_UI_CALLBACKS_HXX_
#define _DBACCESS_UI_CALLBACKS_HXX_
-#ifndef _SOT_EXCHANGE_HXX
#include <sot/exchange.hxx>
-#endif
-#ifndef _SOT_FORMATS_HXX
#include <sot/formats.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
#include <com/sun/star/container/XContainer.hpp>
-#endif
class CommandEvent;
class SvLBoxEntry;
@@ -131,3 +126,4 @@ namespace dbaui
#endif // _DBACCESS_UI_CALLBACKS_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/charsetlistbox.hxx b/dbaccess/source/ui/inc/charsetlistbox.hxx
index 8a9b5d695..2c14821a5 100644
--- a/dbaccess/source/ui/inc/charsetlistbox.hxx
+++ b/dbaccess/source/ui/inc/charsetlistbox.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,5 @@ namespace dbaui
//........................................................................
#endif // CHARSETLISTBOX_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/charsets.hxx b/dbaccess/source/ui/inc/charsets.hxx
index 10caf9268..00a4a1f83 100644
--- a/dbaccess/source/ui/inc/charsets.hxx
+++ b/dbaccess/source/ui/inc/charsets.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,10 @@
#ifndef _DBAUI_CHARSETS_HXX_
#define _DBAUI_CHARSETS_HXX_
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef _TOOLS_RC_HXX
#include <tools/rc.hxx>
-#endif
-#ifndef _DBHELPER_DBCHARSET_HXX_
#include <connectivity/dbcharset.hxx>
-#endif
-#ifndef _SVX_TXENCTAB_HXX
#include <svx/txenctab.hxx>
-#endif
//.........................................................................
namespace dbaui
@@ -148,3 +141,4 @@ namespace dbaui
#endif // _DBAUI_CHARSETS_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/commontypes.hxx b/dbaccess/source/ui/inc/commontypes.hxx
index f5742c2d9..61dede6f1 100644
--- a/dbaccess/source/ui/inc/commontypes.hxx
+++ b/dbaccess/source/ui/inc/commontypes.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,12 +29,8 @@
#ifndef _DBAUI_COMMON_TYPES_HXX_
#define _DBAUI_COMMON_TYPES_HXX_
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef UNOTOOLS_INC_SHAREDUNOCOMPONENT_HXX
#include <unotools/sharedunocomponent.hxx>
-#endif
namespace com { namespace sun { namespace star {
namespace sdbc {
@@ -58,3 +55,4 @@ namespace dbaui
#endif // _DBAUI_COMMON_TYPES_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/curledit.hxx b/dbaccess/source/ui/inc/curledit.hxx
index 3b8a366d4..33f8ca446 100644
--- a/dbaccess/source/ui/inc/curledit.hxx
+++ b/dbaccess/source/ui/inc/curledit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,9 @@
#ifndef _DBAUI_CURLEDIT_HXX_
#define _DBAUI_CURLEDIT_HXX_
-#ifndef _SV_EDIT_HXX
#include <vcl/edit.hxx>
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _DBAUI_DSNTYPES_HXX_
#include "dsntypes.hxx"
-#endif
#include <memory>
//.........................................................................
@@ -91,3 +86,4 @@ public:
#endif // _DBAUI_CURLEDIT_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/databaseobjectview.hxx b/dbaccess/source/ui/inc/databaseobjectview.hxx
index 949edefaf..9ea455557 100644
--- a/dbaccess/source/ui/inc/databaseobjectview.hxx
+++ b/dbaccess/source/ui/inc/databaseobjectview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,42 +29,18 @@
#ifndef DBACCESS_DATABASE_OBJECT_VIEW_HXX
#define DBACCESS_DATABASE_OBJECT_VIEW_HXX
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_
#include <com/sun/star/sdbc/XDataSource.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_
#include <com/sun/star/frame/XDispatch.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_
#include <com/sun/star/lang/XComponent.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
#include <com/sun/star/frame/XComponentLoader.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
#include <com/sun/star/frame/XFrame.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_DIALOGS_XEXECUTABLEDIALOG_HPP_
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_XDATABASEDOCUMENTUI_HPP_
#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
-#endif
#include <comphelper/namedvaluecollection.hxx>
#include <boost/shared_ptr.hpp>
@@ -284,3 +261,4 @@ namespace dbaui
#endif // DBACCESS_DATABASE_OBJECT_VIEW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/datasourceconnector.hxx b/dbaccess/source/ui/inc/datasourceconnector.hxx
index dc973c894..12aba17ae 100644
--- a/dbaccess/source/ui/inc/datasourceconnector.hxx
+++ b/dbaccess/source/ui/inc/datasourceconnector.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,10 @@
#ifndef _DBAUI_DATASOURCECONNECTOR_HXX_
#define _DBAUI_DATASOURCECONNECTOR_HXX_
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_
#include <com/sun/star/sdbc/XDataSource.hpp>
-#endif
namespace dbtools
{
@@ -100,3 +93,4 @@ namespace dbaui
#endif // _DBAUI_DATASOURCECONNECTOR_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/datasourcemap.hxx b/dbaccess/source/ui/inc/datasourcemap.hxx
index db488b266..35f811037 100644
--- a/dbaccess/source/ui/inc/datasourcemap.hxx
+++ b/dbaccess/source/ui/inc/datasourcemap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,21 +29,11 @@
#ifndef DBAUI_DATASOURCEMAP_HXX
#define DBAUI_DATASOURCEMAP_HXX
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
class SfxItemPool;
class SfxItemSet;
@@ -122,7 +113,7 @@ namespace dbaui
void clearModifiedFlag(const ::rtl::OUString& _rName);
/** tell the map that a data source is scheduled to be deleted.
- @return id for accessing the deleted data source later. -1 if no free id existed or an error occured
+ @return id for accessing the deleted data source later. -1 if no free id existed or an error occurred
*/
sal_Int32 markDeleted(const ::rtl::OUString& _rName);
@@ -272,3 +263,4 @@ namespace dbaui
#endif // DBAUI_DATASOURCEMAP_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dbadmin.hxx b/dbaccess/source/ui/inc/dbadmin.hxx
index 9db4c063f..277dce8e4 100644
--- a/dbaccess/source/ui/inc/dbadmin.hxx
+++ b/dbaccess/source/ui/inc/dbadmin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,11 @@
#ifndef _DBAUI_DBADMIN_HXX_
#define _DBAUI_DBADMIN_HXX_
-#ifndef _SFXTABDLG_HXX
+#include <sal/macros.h>
#include <sfx2/tabdlg.hxx>
-#endif
-#ifndef _DBAUI_DSNTYPES_HXX_
#include "dsntypes.hxx"
-#endif
-#ifndef DBAUI_ITEMSETHELPER_HXX
#include "IItemSetHelper.hxx"
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
#include <memory>
FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
@@ -129,7 +123,7 @@ private:
{
AR_LEAVE_MODIFIED, // somthing was modified and has successfully been committed
AR_LEAVE_UNCHANGED, // no changes were made
- AR_KEEP // don't leave the page (e.g. because an error occured)
+ AR_KEEP // don't leave the page (e.g. because an error occurred)
};
/** apply all changes made
*/
@@ -142,3 +136,4 @@ private:
#endif // _DBAUI_DBADMIN_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dbexchange.hxx b/dbaccess/source/ui/inc/dbexchange.hxx
index bc4834b0f..f41d5971a 100644
--- a/dbaccess/source/ui/inc/dbexchange.hxx
+++ b/dbaccess/source/ui/inc/dbexchange.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,30 +28,14 @@
#ifndef DBAUI_DBEXCHANGE_HXX
#define DBAUI_DBEXCHANGE_HXX
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
#include <com/sun/star/util/XNumberFormatter.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HPP_
#include <com/sun/star/lang/XEventListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
-#ifndef _SVX_DBAEXCHANGE_HXX_
#include <svx/dbaexchange.hxx>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
#include <vector>
#include <rtl/ref.hxx>
@@ -111,3 +96,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx
index 87957c6cf..7ad8cbd54 100644
--- a/dbaccess/source/ui/inc/dbtreelistbox.hxx
+++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -165,3 +166,5 @@ namespace dbaui
}
#endif // DBAUI_DBTREELISTBOX_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index 51dda5790..5881a4f29 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -249,48 +249,23 @@
// free
// free
#define IMG_PKEYICON RID_IMAGE_START + 12
-#define REPORTFOLDER_TREE_ICON_SCH RID_IMAGE_START + 13
-#define FORMFOLDER_TREE_ICON_SCH RID_IMAGE_START + 14
-#define IMG_DATABASE_CONNECTED RID_IMAGE_START + 15
-#define QUERYFOLDER_TREE_ICON_SCH RID_IMAGE_START + 16
-#define TABLEFOLDER_TREE_ICON_SCH RID_IMAGE_START + 17
// free
-#define DATABASE_TREE_ICON_SCH RID_IMAGE_START + 19
-#define IMG_DATABASE_CONNECTED_SCH RID_IMAGE_START + 20
-#define TABLE_TREE_ICON_SCH RID_IMAGE_START + 21
-#define VIEW_TREE_ICON_SCH RID_IMAGE_START + 22
-#define QUERY_TREE_ICON_SCH RID_IMAGE_START + 23
-#define REPORTFOLDER_TREE_ICON RID_IMAGE_START + 24
// free
+#define IMG_DATABASE_CONNECTED RID_IMAGE_START + 15
// free
+// ...
// free
-#define BMP_EXCEPTION_ERROR_SCH RID_IMAGE_START + 28
-#define BMP_EXCEPTION_WARNING_SCH RID_IMAGE_START + 29
-#define BMP_EXCEPTION_INFO_SCH RID_IMAGE_START + 30
-#define IMG_PKEYICON_SCH RID_IMAGE_START + 31
-#define IMG_JOINS_H RID_IMAGE_START + 32
-#define IMG_ALL_LEFT_H RID_IMAGE_START + 33
-#define IMG_ONE_LEFT_H RID_IMAGE_START + 34
-#define IMG_ONE_RIGHT_H RID_IMAGE_START + 35
-#define IMG_ALL_RIGHT_H RID_IMAGE_START + 36
-#define IMG_SORTUP_H RID_IMAGE_START + 37
-#define IMG_SORTDOWN_H RID_IMAGE_START + 38
+#define REPORTFOLDER_TREE_ICON RID_IMAGE_START + 24
#define IMG_FORMFOLDER_TREE_L RID_IMAGE_START + 39
#define IMG_REPORTFOLDER_TREE_L RID_IMAGE_START + 40
#define IMG_QUERYFOLDER_TREE_L RID_IMAGE_START + 41
#define IMG_TABLEFOLDER_TREE_L RID_IMAGE_START + 42
-#define IMG_FORMFOLDER_TREE_LHC RID_IMAGE_START + 43
-#define IMG_REPORTFOLDER_TREE_LHC RID_IMAGE_START + 44
-#define IMG_QUERYFOLDER_TREE_LHC RID_IMAGE_START + 45
-#define IMG_TABLEFOLDER_TREE_LHC RID_IMAGE_START + 46
#define IMG_NAVIGATION_BTN_UP_SC RID_IMAGE_START + 47
-#define IMG_NAVIGATION_BTN_UP_SCH RID_IMAGE_START + 48
#define IMG_NAVIGATION_CREATEFOLDER_SC RID_IMAGE_START + 49
-#define IMG_NAVIGATION_CREATEFOLDER_SCH RID_IMAGE_START + 50
#define FORM_TREE_ICON RID_IMAGE_START + 51
#define REPORT_TREE_ICON RID_IMAGE_START + 52
-#define FORM_TREE_ICON_SCH RID_IMAGE_START + 53
-#define REPORT_TREE_ICON_SCH RID_IMAGE_START + 54
+// free
+// free
#define FORMFOLDER_TREE_ICON RID_IMAGE_START + 55
@@ -298,17 +273,17 @@
// image lists
#define IMG_JOINS RID_IMAGELIST_START + 0
#define IMG_INDEX_DLG_SC RID_IMAGELIST_START + 1
-#define IMG_INDEX_DLG_SCH RID_IMAGELIST_START + 2
+// free
#define IMG_INDEX_DLG_LC RID_IMAGELIST_START + 3
-#define IMG_INDEX_DLG_LCH RID_IMAGELIST_START + 4
+// free
#define IMP_FORM_SC RID_IMAGELIST_START + 5
-#define IMP_FORM_SCH RID_IMAGELIST_START + 6
+// free
#define IMP_FORM_LC RID_IMAGELIST_START + 7
-#define IMP_FORM_LCH RID_IMAGELIST_START + 8
+// free
#define IMP_REPORT_SC RID_IMAGELIST_START + 9
-#define IMP_REPORT_SCH RID_IMAGELIST_START + 10
+// free
#define IMP_REPORT_LC RID_IMAGELIST_START + 11
-#define IMP_REPORT_LCH RID_IMAGELIST_START + 12
+// free
//========================================================================
// menues
@@ -353,7 +328,7 @@
#define STR_TABLEDESIGN_DBFIELDTYPES RID_STR_GEN_START + 8
#define STR_QRY_CONTINUE RID_STR_GEN_START + 9
#define STR_COLUMN_NAME RID_STR_GEN_START + 10
-#define STR_ERROR_OCCURED_WHILE_COPYING RID_STR_GEN_START + 11
+#define STR_ERROR_OCCURRED_WHILE_COPYING RID_STR_GEN_START + 11
#define STR_MISSING_TABLES_XDROP RID_STR_GEN_START + 12
#define STR_QUERY_DELETE_TABLE RID_STR_GEN_START + 13
#define STR_BUTTON_TEXT_ALL RID_STR_GEN_START + 14
@@ -393,17 +368,17 @@
// free
#define RSC_QUERY_OBJECT_TYPE RID_UNTYPED_START + 4
#define IMG_TABLESUBCRIPTION_SC RID_UNTYPED_START + 5
-#define IMG_TABLESUBCRIPTION_SCH RID_UNTYPED_START + 6
+// free
#define IMG_TABLESUBCRIPTION_LC RID_UNTYPED_START + 7
-#define IMG_TABLESUBCRIPTION_LCH RID_UNTYPED_START + 8
+// free
#define IMG_QUERYADMINISTRATION_SC RID_UNTYPED_START + 9
-#define IMG_QUERYADMINISTRATION_SCH RID_UNTYPED_START + 10
+// free
#define IMG_QUERYADMINISTRATION_LC RID_UNTYPED_START + 11
-#define IMG_QUERYADMINISTRATION_LCH RID_UNTYPED_START + 12
+// free
#define IMG_DOCUMENTLINKS_SC RID_UNTYPED_START + 13
-#define IMG_DOCUMENTLINKS_SCH RID_UNTYPED_START + 14
+// free
#define IMG_DOCUMENTLINKS_LC RID_UNTYPED_START + 15
-#define IMG_DOCUMENTLINKS_LCH RID_UNTYPED_START + 16
+// free
//========================================================================
// various
diff --git a/dbaccess/source/ui/inc/dbwiz.hxx b/dbaccess/source/ui/inc/dbwiz.hxx
index 3bd8fc666..0a18bef8a 100644
--- a/dbaccess/source/ui/inc/dbwiz.hxx
+++ b/dbaccess/source/ui/inc/dbwiz.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,24 +29,12 @@
#ifndef DBAUI_DBWIZ_HXX
#define DBAUI_DBWIZ_HXX
-#ifndef _SFXTABDLG_HXX
#include <sfx2/tabdlg.hxx>
-#endif
-#ifndef _DBAUI_DSNTYPES_HXX_
#include "dsntypes.hxx"
-#endif
-#ifndef DBAUI_ITEMSETHELPER_HXX
#include "IItemSetHelper.hxx"
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _SVTOOLS_WIZARDMACHINE_HXX_
#include <svtools/wizardmachine.hxx>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
#include <memory>
FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
@@ -127,7 +116,7 @@ protected:
{
AR_LEAVE_MODIFIED, // somthing was modified and has successfully been committed
AR_LEAVE_UNCHANGED, // no changes were made
- AR_KEEP // don't leave the page (e.g. because an error occured)
+ AR_KEEP // don't leave the page (e.g. because an error occurred)
};
/** apply all changes made
*/
@@ -143,3 +132,4 @@ private:
#endif // DBAUI_DBWIZ_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx
index 25899e158..781186596 100644
--- a/dbaccess/source/ui/inc/dbwizsetup.hxx
+++ b/dbaccess/source/ui/inc/dbwizsetup.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,31 +29,15 @@
#ifndef DBAUI_DBWIZ2_HXX
#define DBAUI_DBWIZ2_HXX
-#ifndef _SFXTABDLG_HXX
#include <sfx2/tabdlg.hxx>
-#endif
-#ifndef _DBAUI_DSNTYPES_HXX_
#include "dsntypes.hxx"
-#endif
-#ifndef DBAUI_ITEMSETHELPER_HXX
#include "IItemSetHelper.hxx"
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
-#endif
#include <memory>
-#ifndef SVTOOLS_INC_ROADMAPWIZARD_HXX
#include <svtools/roadmapwizard.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
FORWARD_DECLARE_INTERFACE(sdbc,XConnection)
@@ -164,7 +149,7 @@ protected:
{
AR_LEAVE_MODIFIED, // somthing was modified and has successfully been committed
AR_LEAVE_UNCHANGED, // no changes were made
- AR_KEEP // don't leave the page (e.g. because an error occured)
+ AR_KEEP // don't leave the page (e.g. because an error occurred)
};
private:
@@ -209,3 +194,4 @@ private:
#endif // DBAUI_DBWIZ2_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx b/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx
index ce353703d..4914cc7a2 100644
--- a/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx
+++ b/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,20 +29,12 @@
#ifndef DBACCESS_SOURCE_UI_INC_DEFAULTOBJECTNAMECHECK_HXX
#define DBACCESS_SOURCE_UI_INC_DEFAULTOBJECTNAMECHECK_HXX
-#ifndef DBACCESS_SOURCE_UI_INC_OBJECTNAMECHECK_HXX
#include "objectnamecheck.hxx"
-#endif
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_CONTAINER_XHIERARCHICALNAMEACCESS_HPP_
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
/** === end UNO includes === **/
#include <memory>
@@ -150,3 +143,4 @@ namespace dbaui
#endif // DBACCESS_SOURCE_UI_INC_DEFAULTOBJECTNAMECHECK_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/directsql.hxx b/dbaccess/source/ui/inc/directsql.hxx
index 0b28615c2..25910af5b 100644
--- a/dbaccess/source/ui/inc/directsql.hxx
+++ b/dbaccess/source/ui/inc/directsql.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,38 +29,18 @@
#ifndef _DBACCESS_UI_DIRECTSQL_HXX_
#define _DBACCESS_UI_DIRECTSQL_HXX_
-#ifndef _SV_DIALOG_HXX
#include <vcl/dialog.hxx>
-#endif
-#ifndef _SVEDIT_HXX
#include <svtools/editsyntaxhighlighter.hxx>
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
#include <deque>
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _UNOTOOLS_EVENTLISTENERADAPTER_HXX_
#include <unotools/eventlisteneradapter.hxx>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _OSL_MUTEX_HXX_
#include <osl/mutex.hxx>
-#endif
//........................................................................
namespace dbaui
@@ -145,7 +126,7 @@ namespace dbaui
{ \
const sal_Char* pError = impl_CheckInvariants(); \
if (pError) \
- OSL_ENSURE(sal_False, (ByteString(methodname) += ByteString(": ") += ByteString(pError)).GetBuffer()); \
+ OSL_FAIL((ByteString(methodname) += ByteString(": ") += ByteString(pError)).GetBuffer()); \
}
#else
#define CHECK_INVARIANTS(methodname)
@@ -157,3 +138,4 @@ namespace dbaui
#endif // _DBACCESS_UI_DIRECTSQL_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dlgattr.hxx b/dbaccess/source/ui/inc/dlgattr.hxx
index b1e7fa08e..007af9137 100644
--- a/dbaccess/source/ui/inc/dlgattr.hxx
+++ b/dbaccess/source/ui/inc/dlgattr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,16 +29,10 @@
#define DBAUI_SBATTRDLG_HXX
-#ifndef DBAUI_SBATTRDLG_HRC
#include "dlgattr.hrc"
-#endif
-#ifndef _SFXTABDLG_HXX //autogen
#include <sfx2/tabdlg.hxx>
-#endif
-#ifndef _SOLAR_H
#include <tools/solar.h>
-#endif
@@ -66,3 +61,4 @@ namespace dbaui
#endif//DBAUI_SBATTRDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dlgsave.hxx b/dbaccess/source/ui/inc/dlgsave.hxx
index 256a79831..2a9f49f32 100644
--- a/dbaccess/source/ui/inc/dlgsave.hxx
+++ b/dbaccess/source/ui/inc/dlgsave.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,10 @@
#ifndef DBAUI_DLGSAVE_HXX
#define DBAUI_DLGSAVE_HXX
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
namespace com { namespace sun { namespace star {
namespace container {
@@ -103,3 +96,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dlgsize.hxx b/dbaccess/source/ui/inc/dlgsize.hxx
index 84eb8e53f..5e7e87773 100644
--- a/dbaccess/source/ui/inc/dlgsize.hxx
+++ b/dbaccess/source/ui/inc/dlgsize.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,21 +28,13 @@
#ifndef _DBAUI_DLGSIZE_HXX
#define _DBAUI_DLGSIZE_HXX
-#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
//.........................................................................
namespace dbaui
@@ -76,3 +69,4 @@ namespace dbaui
#endif // _DBAUI_DLGSIZE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dsitems.hxx b/dbaccess/source/ui/inc/dsitems.hxx
index 6940812a9..425d04a2f 100644
--- a/dbaccess/source/ui/inc/dsitems.hxx
+++ b/dbaccess/source/ui/inc/dsitems.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,3 +106,4 @@ typedef sal_Int32 ItemID;
#endif // _DBAUI_DATASOURCEITEMS_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dsmeta.hxx b/dbaccess/source/ui/inc/dsmeta.hxx
index 6e89515b4..6d2ed5ed3 100644
--- a/dbaccess/source/ui/inc/dsmeta.hxx
+++ b/dbaccess/source/ui/inc/dsmeta.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -142,3 +143,5 @@ namespace dbaui
//........................................................................
#endif // DBACCESS_DSMETA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/exsrcbrw.hxx b/dbaccess/source/ui/inc/exsrcbrw.hxx
index f2eff7673..2669037fd 100644
--- a/dbaccess/source/ui/inc/exsrcbrw.hxx
+++ b/dbaccess/source/ui/inc/exsrcbrw.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -110,3 +111,5 @@ namespace dbaui
}
#endif // _SBA_EXTCTRLR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/formadapter.hxx b/dbaccess/source/ui/inc/formadapter.hxx
index 89a14648e..0d4d2f7d4 100644
--- a/dbaccess/source/ui/inc/formadapter.hxx
+++ b/dbaccess/source/ui/inc/formadapter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,121 +29,45 @@
#ifndef _SBA_FORMADAPTER_HXX
#define _SBA_FORMADAPTER_HXX
-#ifndef _SBA_MULTIPLEX_HXX
#include "sbamultiplex.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XPARAMETERS_HPP_
#include <com/sun/star/sdbc/XParameters.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCOLUMNLOCATE_HPP_
#include <com/sun/star/sdbc/XColumnLocate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCLOSEABLE_HPP_
#include <com/sun/star/sdbc/XCloseable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XROWLOCATE_HPP_
#include <com/sun/star/sdbcx/XRowLocate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROWUPDATE_HPP_
#include <com/sun/star/sdbc/XRowUpdate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETUPDATE_HPP_
#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROWSET_HPP_
#include <com/sun/star/sdbc/XRowSet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDELETEROWS_HPP_
#include <com/sun/star/sdbcx/XDeleteRows.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XWARNINGSSUPPLIER_HPP_
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XSQLERRORBROADCASTER_HPP_
#include <com/sun/star/sdb/XSQLErrorBroadcaster.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XROWSETAPPROVEBROADCASTER_HPP_
#include <com/sun/star/sdb/XRowSetApproveBroadcaster.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_
#include <com/sun/star/form/XLoadable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XRESULTSETACCESS_HPP_
#include <com/sun/star/sdb/XResultSetAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XFORM_HPP_
#include <com/sun/star/form/XForm.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XMULTIPROPERTYSET_HPP_
#include <com/sun/star/beans/XMultiPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XFASTPROPERTYSET_HPP_
#include <com/sun/star/beans/XFastPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXCONTAINER_HPP_
#include <com/sun/star/container/XIndexContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
#include <com/sun/star/container/XContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XRESET_HPP_
#include <com/sun/star/form/XReset.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XSUBMIT_HPP_
#include <com/sun/star/form/XSubmit.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XDATABASEPARAMETERBROADCASTER_HPP_
#include <com/sun/star/form/XDatabaseParameterBroadcaster.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_
#include <com/sun/star/container/XEnumerationAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_
#include <com/sun/star/beans/XPropertyState.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_XTABCONTROLLERMODEL_HPP_
#include <com/sun/star/awt/XTabControllerModel.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_XPERSISTOBJECT_HPP_
#include <com/sun/star/io/XPersistObject.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_
#include <com/sun/star/container/XNamed.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XCANCELLABLE_HPP_
#include <com/sun/star/util/XCancellable.hpp>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE12_HXX_
#include <cppuhelper/implbase12.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE10_HXX_
#include <cppuhelper/implbase10.hxx>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
namespace dbaui
{
@@ -521,3 +446,4 @@ namespace dbaui
}
#endif // _SBA_FORMADAPTER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/imageprovider.hxx b/dbaccess/source/ui/inc/imageprovider.hxx
index 42e39b34f..d4f6135ac 100644
--- a/dbaccess/source/ui/inc/imageprovider.hxx
+++ b/dbaccess/source/ui/inc/imageprovider.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,17 +29,11 @@
#ifndef DBACCESS_IMAGEPROVIDER_HXX
#define DBACCESS_IMAGEPROVIDER_HXX
-#ifndef _SV_IMAGE_HXX
#include <vcl/image.hxx>
-#endif
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_DATABASEOBJECT_HPP_
#include <com/sun/star/sdb/application/DatabaseObject.hpp>
-#endif
/** === end UNO includes === **/
#include <boost/shared_ptr.hpp>
@@ -92,16 +87,13 @@ namespace dbaui
the name of the object
@param _out_rImage
the normal image to use for the object
- @param _out_rImageHC
- the high-contrast version of the image to use for the object
@return
the image to be used for the object.
*/
void getImages(
const String& _rName,
const sal_Int32 _nDatabaseObjectType,
- Image& _out_rImage,
- Image& _out_rImageHC
+ Image& _out_rImage
);
/** returns the default image to be used for a database object
@@ -113,18 +105,11 @@ namespace dbaui
@param _nDatabaseObjectType
the type of the object. Must be one of the css.sdb.application.DatabaseObject
constants.
- @param _bHighContrast
- indicates whether High-Contrast icons should be used.
- Note that normally, this would be some application-wide setting. However,
- in current OOo, HC support is decided on a per-control basis, means every
- control decides itself whether its images must be HC versions or not.
- Thus callers need to specify this flag.
@return
the image to be used for the object type.
*/
Image getDefaultImage(
- sal_Int32 _nDatabaseObjectType,
- bool _bHighContrast
+ sal_Int32 _nDatabaseObjectType
);
/** returns the resource ID for the default image to be used for a database object
@@ -136,19 +121,12 @@ namespace dbaui
@param _nDatabaseObjectType
the type of the object. Must be one of the css.sdb.application.DatabaseObject
constants.
- @param _bHighContrast
- indicates whether High-Contrast icons should be used.
- Note that normally, this would be some application-wide setting. However,
- in current OOo, HC support is decided on a per-control basis, means every
- control decides itself whether its images must be HC versions or not.
- Thus callers need to specify this flag.
@return
the resource ID image to be used for the object type. Must be fed into a
ModuleRes instance to actually load the image.
*/
sal_uInt16 getDefaultImageResourceID(
- sal_Int32 _nDatabaseObjectType,
- bool _bHighContrast
+ sal_Int32 _nDatabaseObjectType
);
/** retrieves the image to be used for folders of database objects
@@ -157,31 +135,18 @@ namespace dbaui
constants.
@param _rName
the name of the object
- @param _bHighContrast
- indicates whether High-Contrast icons should be used.
- Note that normally, this would be some application-wide setting. However,
- in current OOo, HC support is decided on a per-control basis, means every
- control decides itself whether its images must be HC versions or not.
- Thus callers need to specify this flag.
@return
the image to be used for folders of the given type
*/
Image getFolderImage(
- sal_Int32 _nDatabaseObjectType,
- bool _bHighContrast
+ sal_Int32 _nDatabaseObjectType
);
/** retrieves the image to be used for a database as a whole.
- @param _bHighContrast
- indicates whether High-Contrast icons should be used.
- Note that normally, this would be some application-wide setting. However,
- in current OOo, HC support is decided on a per-control basis, means every
- control decides itself whether its images must be HC versions or not.
- Thus callers need to specify this flag.
@return
the image to be used for folders of this type
*/
- Image getDatabaseImage( bool _bHighContrast );
+ Image getDatabaseImage();
};
//........................................................................
@@ -190,3 +155,4 @@ namespace dbaui
#endif // DBACCESS_IMAGEPROVIDER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/indexcollection.hxx b/dbaccess/source/ui/inc/indexcollection.hxx
index 46ce56c1a..a7a7daaf8 100644
--- a/dbaccess/source/ui/inc/indexcollection.hxx
+++ b/dbaccess/source/ui/inc/indexcollection.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,10 @@
#ifndef _DBAUI_INDEXCOLLECTION_HXX_
#define _DBAUI_INDEXCOLLECTION_HXX_
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_SQLEXCEPTION_HPP_
#include <com/sun/star/sdbc/SQLException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _DBAUI_INDEXES_HXX_
#include "indexes.hxx"
-#endif
//......................................................................
namespace dbaui
@@ -123,3 +116,4 @@ namespace dbaui
#endif // _DBAUI_INDEXCOLLECTION_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/indexdialog.hxx b/dbaccess/source/ui/inc/indexdialog.hxx
index 3410a1829..636e1bf3d 100644
--- a/dbaccess/source/ui/inc/indexdialog.hxx
+++ b/dbaccess/source/ui/inc/indexdialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,45 +29,19 @@
#ifndef _DBAUI_INDEXDIALOG_HXX_
#define _DBAUI_INDEXDIALOG_HXX_
-#ifndef _SV_DIALOG_HXX
#include <vcl/dialog.hxx>
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
-#endif
-#ifndef _SV_TOOLBOX_HXX
#include <vcl/toolbox.hxx>
-#endif
-#ifndef _SVTREEBOX_HXX
#include <svtools/svtreebx.hxx>
-#endif
-#ifndef INCLUDED_SVTOOLS_VIEWOPTIONS_HXX
#include <unotools/viewoptions.hxx>
-#endif
-#ifndef _DBAUI_INDEXES_HXX_
#include "indexes.hxx"
-#endif
-#ifndef DBAUI_TOOLBOXHELPER_HXX
#include "ToolBoxHelper.hxx"
-#endif
//......................................................................
namespace dbaui
@@ -161,7 +136,7 @@ namespace dbaui
@param _bHiContast
<TRUE/> when in high contrast mode.
*/
- virtual ImageList getImageList(sal_Int16 _eBitmapSet,sal_Bool _bHiContast) const;
+ virtual ImageList getImageList(sal_Int16 _eBitmapSet) const;
/** will be called when the controls need to be resized.
*/
@@ -207,3 +182,4 @@ namespace dbaui
#endif // _DBAUI_INDEXDIALOG_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/indexes.hxx b/dbaccess/source/ui/inc/indexes.hxx
index e6f926285..5457ec8bd 100644
--- a/dbaccess/source/ui/inc/indexes.hxx
+++ b/dbaccess/source/ui/inc/indexes.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,12 +29,8 @@
#ifndef _DBAUI_INDEXES_HXX_
#define _DBAUI_INDEXES_HXX_
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
//......................................................................
namespace dbaui
@@ -105,3 +102,4 @@ namespace dbaui
#endif // _DBAUI_INDEXES_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/indexfieldscontrol.hxx b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
index 93fddf107..4b622baa9 100644
--- a/dbaccess/source/ui/inc/indexfieldscontrol.hxx
+++ b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,10 @@
#ifndef _DBAUI_INDEXFIELDSCONTROL_HXX_
#define _DBAUI_INDEXFIELDSCONTROL_HXX_
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _SVTOOLS_EDITBROWSEBOX_HXX_
#include <svtools/editbrowsebox.hxx>
-#endif
-#ifndef _DBAUI_INDEXCOLLECTION_HXX_
#include "indexcollection.hxx"
-#endif
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
-#endif
//......................................................................
namespace dbaui
@@ -116,3 +109,4 @@ namespace dbaui
#endif // _DBAUI_INDEXFIELDSCONTROL_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/linkeddocuments.hxx b/dbaccess/source/ui/inc/linkeddocuments.hxx
index a17fea929..7439bb7a5 100644
--- a/dbaccess/source/ui/inc/linkeddocuments.hxx
+++ b/dbaccess/source/ui/inc/linkeddocuments.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,38 +31,18 @@
#include "AppElementType.hxx"
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_
#include <com/sun/star/lang/XComponent.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
#include <com/sun/star/frame/XFrame.hpp>
-#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
#include <com/sun/star/frame/XComponentLoader.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_XCONTENT_HPP_
#include <com/sun/star/ucb/XContent.hpp>
-#endif
#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
-#ifndef _LINK_HXX
#include <tools/link.hxx>
-#endif
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef COMPHELPER_NAMEDVALUECOLLECTION_HXX
#include <comphelper/namedvaluecollection.hxx>
-#endif
class Window;
//......................................................................
@@ -157,3 +138,4 @@ namespace dbaui
#endif // _DBAUI_LINKEDDOCUMENTS_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/listviewitems.hxx b/dbaccess/source/ui/inc/listviewitems.hxx
index ca8a330e8..02f109600 100644
--- a/dbaccess/source/ui/inc/listviewitems.hxx
+++ b/dbaccess/source/ui/inc/listviewitems.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef _DBAUI_LISTVIEWITEMS_HXX_
#define _DBAUI_LISTVIEWITEMS_HXX_
-#ifndef _SVLBOXITM_HXX
#include <svtools/svlbitm.hxx>
-#endif
//........................................................................
namespace dbaui
@@ -68,3 +67,4 @@ namespace dbaui
#endif // _DBAUI_LISTVIEWITEMS_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/localresaccess.hxx b/dbaccess/source/ui/inc/localresaccess.hxx
index dc6c30651..f288666dc 100644
--- a/dbaccess/source/ui/inc/localresaccess.hxx
+++ b/dbaccess/source/ui/inc/localresaccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,12 +29,8 @@
#ifndef _DBAUI_LOCALRESACCESS_HXX_
#define _DBAUI_LOCALRESACCESS_HXX_
-#ifndef _SVTOOLS_LOCALRESACCESS_HXX_
#include <svtools/localresaccess.hxx>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
//.........................................................................
namespace dbaui
@@ -62,3 +59,4 @@ public:
#endif // _DBAUI_LOCALRESACCESS_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/makefile.mk b/dbaccess/source/ui/inc/makefile.mk
deleted file mode 100644
index 5e1454d57..000000000
--- a/dbaccess/source/ui/inc/makefile.mk
+++ /dev/null
@@ -1,43 +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=..$/..$/..
-
-PRJNAME=dbaccess
-TARGET=dba_uiinc
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-LOCALIZE_ME=toolbox_tmpl.hrc
-
-.INCLUDE : target.mk
-
diff --git a/dbaccess/source/ui/inc/marktree.hxx b/dbaccess/source/ui/inc/marktree.hxx
index 7ad084162..018e1c5ba 100644
--- a/dbaccess/source/ui/inc/marktree.hxx
+++ b/dbaccess/source/ui/inc/marktree.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef _DBAUI_MARKTREE_HXX_
#define _DBAUI_MARKTREE_HXX_
-#ifndef DBAUI_DBTREELISTBOX_HXX
#include "dbtreelistbox.hxx"
-#endif
@@ -84,3 +83,4 @@ private:
#endif // _DBAUI_MARKTREE_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/moduledbu.hxx b/dbaccess/source/ui/inc/moduledbu.hxx
index 815fc5c30..b66caaddb 100644
--- a/dbaccess/source/ui/inc/moduledbu.hxx
+++ b/dbaccess/source/ui/inc/moduledbu.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,12 +29,9 @@
#ifndef _DBAUI_MODULE_DBU_HXX_
#define _DBAUI_MODULE_DBU_HXX_
-#ifndef _OSL_MUTEX_HXX_
#include <osl/mutex.hxx>
-#endif
-#ifndef _TOOLS_RESID_HXX
#include <tools/resid.hxx>
-#endif
+#include <sal/macros.h>
class ResMgr;
@@ -105,3 +103,4 @@ public:
#endif // _DBAUI_MODULE_DBU_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/objectnamecheck.hxx b/dbaccess/source/ui/inc/objectnamecheck.hxx
index c978ebf45..55c490a46 100644
--- a/dbaccess/source/ui/inc/objectnamecheck.hxx
+++ b/dbaccess/source/ui/inc/objectnamecheck.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,3 +73,5 @@ namespace dbaui
//........................................................................
#endif // DBACCESS_SOURCE_UI_INC_OBJECTNAMECHECK_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/opendoccontrols.hxx b/dbaccess/source/ui/inc/opendoccontrols.hxx
index 06fa78ed1..c00860bce 100644
--- a/dbaccess/source/ui/inc/opendoccontrols.hxx
+++ b/dbaccess/source/ui/inc/opendoccontrols.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,9 @@
#ifndef DBACCESS_SOURCE_UI_INC_OPENDOCCONTROLS_HXX
#define DBACCESS_SOURCE_UI_INC_OPENDOCCONTROLS_HXX
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
-#ifndef _SV_LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
-#endif
#include <map>
//........................................................................
@@ -97,3 +92,4 @@ namespace dbaui
#endif // DBACCESS_SOURCE_UI_INC_OPENDOCCONTROLS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/paramdialog.hxx b/dbaccess/source/ui/inc/paramdialog.hxx
index a500e07b3..fb9b9df2d 100644
--- a/dbaccess/source/ui/inc/paramdialog.hxx
+++ b/dbaccess/source/ui/inc/paramdialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,50 +29,22 @@
#ifndef _DBAUI_PARAMDIALOG_HXX_
#define _DBAUI_PARAMDIALOG_HXX_
-#ifndef _DBAUI_COMMON_TYPES_HXX_
#include "commontypes.hxx"
-#endif
-#ifndef _DIALOG_HXX
#include <vcl/dialog.hxx>
-#endif
-#ifndef _BUTTON_HXX
#include <vcl/button.hxx>
-#endif
-#ifndef _FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _EDIT_HXX
#include <vcl/edit.hxx>
-#endif
-#ifndef _SV_GROUP_HXX
#include <vcl/group.hxx>
-#endif
-#ifndef _SV_LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
#include <com/sun/star/util/XNumberFormatter.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
#include <com/sun/star/container/XIndexAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef CONNECTIVITY_PREDICATEINPUT_HXX
#include <connectivity/predicateinput.hxx>
-#endif
-#ifndef SVX_QUERYDESIGNCONTEXT_HXX
#include "svx/ParseContext.hxx"
-#endif
namespace connectivity
{
@@ -150,3 +123,4 @@ namespace dbaui
#endif // _DBAUI_PARAMDIALOG_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/propertysetitem.hxx b/dbaccess/source/ui/inc/propertysetitem.hxx
index 33bc340ed..463d1449a 100644
--- a/dbaccess/source/ui/inc/propertysetitem.hxx
+++ b/dbaccess/source/ui/inc/propertysetitem.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,12 +29,8 @@
#ifndef _DBAUI_PROPERTYSETITEM_HXX_
#define _DBAUI_PROPERTYSETITEM_HXX_
-#ifndef _SFXPOOLITEM_HXX
#include <svl/poolitem.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
//.........................................................................
namespace dbaui
@@ -69,3 +66,4 @@ namespace dbaui
#endif // _DBAUI_PROPERTYSETITEM_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/propertystorage.hxx b/dbaccess/source/ui/inc/propertystorage.hxx
index 0eac7090b..5a00ed219 100644
--- a/dbaccess/source/ui/inc/propertystorage.hxx
+++ b/dbaccess/source/ui/inc/propertystorage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -92,3 +93,5 @@ namespace dbaui
//........................................................................
#endif // PROPERTYSTORAGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/querycontainerwindow.hxx b/dbaccess/source/ui/inc/querycontainerwindow.hxx
index a6d677c24..f439b4030 100644
--- a/dbaccess/source/ui/inc/querycontainerwindow.hxx
+++ b/dbaccess/source/ui/inc/querycontainerwindow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,24 +29,12 @@
#ifndef DBAUI_QUERYCONTAINERWINDOW_HXX
#define DBAUI_QUERYCONTAINERWINDOW_HXX
-#ifndef _SV_WINDOW_HXX
#include <vcl/window.hxx>
-#endif
-#ifndef _SV_SPLIT_HXX
#include <vcl/split.hxx>
-#endif
-#ifndef DBAUI_DATAVIEW_HXX
#include "dataview.hxx"
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
#include <com/sun/star/frame/XFrame.hpp>
-#endif
-#ifndef DBAUI_QUERYVIEWSWITCH_HXX
#include "QueryViewSwitch.hxx"
-#endif
-#ifndef _SV_DOCKWIN_HXX
#include <vcl/dockwin.hxx>
-#endif
class FixedLine;
//.........................................................................
@@ -134,3 +123,4 @@ namespace dbaui
#endif // DBAUI_QUERYCONTAINERWINDOW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/querycontroller.hxx b/dbaccess/source/ui/inc/querycontroller.hxx
index ec15058c8..73f3ebb15 100644
--- a/dbaccess/source/ui/inc/querycontroller.hxx
+++ b/dbaccess/source/ui/inc/querycontroller.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -257,3 +258,4 @@ namespace dbaui
}
#endif // DBAUI_QUERYCONTROLLER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/queryfilter.hxx b/dbaccess/source/ui/inc/queryfilter.hxx
index d4c3b6eda..4c764cfa3 100644
--- a/dbaccess/source/ui/inc/queryfilter.hxx
+++ b/dbaccess/source/ui/inc/queryfilter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,35 +29,19 @@
#ifndef DBAUI_QUERYFILTER_HXX
#define DBAUI_QUERYFILTER_HXX
-#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _CONNECTIVITY_PARSE_SQLITERATOR_HXX_
#include <connectivity/sqliterator.hxx>
-#endif
-#ifndef CONNECTIVITY_PREDICATEINPUT_HXX
#include <connectivity/predicateinput.hxx>
-#endif
-#ifndef SVX_QUERYDESIGNCONTEXT_HXX
#include "svx/ParseContext.hxx"
-#endif
namespace rtl
{
@@ -161,3 +146,4 @@ namespace dbaui
#endif // DBAUI_QUERYFILTER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/queryorder.hxx b/dbaccess/source/ui/inc/queryorder.hxx
index 248fef99c..7c2bab9ca 100644
--- a/dbaccess/source/ui/inc/queryorder.hxx
+++ b/dbaccess/source/ui/inc/queryorder.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,25 +28,15 @@
#ifndef DBAUI_QUERYORDER_HXX
#define DBAUI_QUERYORDER_HXX
-#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#define DOG_ROWS 3
@@ -136,3 +127,4 @@ namespace dbaui
#endif // DBAUI_QUERYORDER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/queryview.hxx b/dbaccess/source/ui/inc/queryview.hxx
index 270421025..d7e5f728f 100644
--- a/dbaccess/source/ui/inc/queryview.hxx
+++ b/dbaccess/source/ui/inc/queryview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBAUI_QUERYVIEW_HXX
#define DBAUI_QUERYVIEW_HXX
-#ifndef DBAUI_JOINDESIGNVIEW_HXX
#include "JoinDesignView.hxx"
-#endif
namespace dbaui
{
@@ -57,3 +56,5 @@ namespace dbaui
};
}
#endif // DBAUI_QUERYVIEW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/sbagrid.hrc b/dbaccess/source/ui/inc/sbagrid.hrc
index e883bbf0f..52b1d1a65 100644
--- a/dbaccess/source/ui/inc/sbagrid.hrc
+++ b/dbaccess/source/ui/inc/sbagrid.hrc
@@ -29,24 +29,6 @@
#define DBACCESS_SBA_GRID_HRC
//----------------Menueitems-------------------------------------------------
-//#define SID_SBA_BRW_DELETEROWS (SID_SBA_START + 34) // Zeilen loeschen
-//#define SID_SBA_BRW_HIDECOL (SID_SBA_START + 35) // Spalten verstecken
-//#define SID_SBA_BRW_SHOWCOL (SID_SBA_START + 36) // Spalten wieder zeigen
-//#define SID_SBA_BRW_SHOWALLCOLS (SID_SBA_START + 37) // Alle Spalten wieder zeigen
-//#define SID_SBA_BRW_INSERTROWS (SID_SBA_START + 38) // Zeilen einfuegen
-//#define SID_SBA_BRW_DELETEROW (SID_SBA_START + 39) // Zeilen loeschen
-//#define SID_SBA_TABED_PRIMARYKEY (SID_SBA_START + 40) // Primary key vergeben
-//#define SID_QRY_FUNCTION (SID_SBA_START + 41) // Funktionen anzeigen
-//#define SID_QRY_TABLENAME (SID_SBA_START + 42) // Tabellennamen anzeigen
-//#define SID_QRY_ALIASNAME (SID_SBA_START + 43) // Aliasnamen anzeigen
-//#define SID_QRY_DISTINCT (SID_SBA_START + 44) // Distinct anzeigen
-//#define SID_TBL_SORT_ASC (SID_SBA_START + 45) // Aufsteigen Sortieren
-//#define SID_TBL_SORT_DESC (SID_SBA_START + 46) // Absteigen Sortieren
-
-//#define SID_DBSTATE_ACTUALIZE (SID_SBA_START + 48) // actualize dbstate
-//#define SID_DBSTATE_SHUTDOWN (SID_SBA_START + 49) // shutdown db
-//#define SID_DBSTATE_RESTART (SID_SBA_START + 50) // restart db
-
// Tabelle
#define SBA_WHICHID_START 100
// Zeilenhoehe
diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx
index 93a21750a..06e27c49a 100644
--- a/dbaccess/source/ui/inc/sbagrid.hxx
+++ b/dbaccess/source/ui/inc/sbagrid.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,37 +29,17 @@
#ifndef _SBA_GRID_HXX
#define _SBA_GRID_HXX
-// #include <sdb/tools.hxx>
-
-#ifndef _SVX_FMGRIDCL_HXX
#include <svx/fmgridcl.hxx>
-#endif
-#ifndef _SVX_FMGRIDIF_HXX
#include <svx/fmgridif.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSER_HPP_
#include <com/sun/star/sdb/XSQLQueryComposer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_
#include <com/sun/star/frame/XDispatch.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_URL_HPP_
#include <com/sun/star/util/URL.hpp>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _SBA_MULTIPLEX_HXX
#include "sbamultiplex.hxx"
-#endif
-#ifndef _SVX_DATACCESSDESCRIPTOR_HXX_
#include <svx/dataaccessdescriptor.hxx>
-#endif
#include <queue>
class SvNumberFormatter;
@@ -361,3 +342,4 @@ namespace dbaui
}
#endif // _SBA_GRID_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/sbamultiplex.hxx b/dbaccess/source/ui/inc/sbamultiplex.hxx
index fd10a03bd..23d5035f0 100644
--- a/dbaccess/source/ui/inc/sbamultiplex.hxx
+++ b/dbaccess/source/ui/inc/sbamultiplex.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,82 +29,30 @@
#ifndef _SBA_MULTIPLEX_HXX
#define _SBA_MULTIPLEX_HXX
-//#ifndef _SDB_TOOLS_HXX
-//#include <sdb/tools.hxx>
-//#endif
-
-#ifndef _COM_SUN_STAR_BEANS_XVETOABLECHANGELISTENER_HPP_
#include <com/sun/star/beans/XVetoableChangeListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XUPDATELISTENER_HPP_
#include <com/sun/star/form/XUpdateListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XERRORLISTENER_HPP_
#include <com/sun/star/form/XErrorListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XRESTORELISTENER_HPP_
#include <com/sun/star/form/XRestoreListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XINSERTLISTENER_HPP_
#include <com/sun/star/form/XInsertListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XDELETELISTENER_HPP_
#include <com/sun/star/form/XDeleteListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XPOSITIONINGLISTENER_HPP_
#include <com/sun/star/form/XPositioningListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XDATABASEPARAMETERLISTENER_HPP_
#include <com/sun/star/form/XDatabaseParameterListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XLOADLISTENER_HPP_
#include <com/sun/star/form/XLoadListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATECHANGELISTENER_HPP_
#include <com/sun/star/beans/XPropertyStateChangeListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTIESCHANGELISTENER_HPP_
#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XSUBMITLISTENER_HPP_
#include <com/sun/star/form/XSubmitListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XRESETLISTENER_HPP_
#include <com/sun/star/form/XResetListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XREFRESHLISTENER_HPP_
#include <com/sun/star/util/XRefreshListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XSQLERRORLISTENER_HPP_
#include <com/sun/star/sdb/XSQLErrorListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XROWSETAPPROVELISTENER_HPP_
#include <com/sun/star/sdb/XRowSetApproveListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROWSETLISTENER_HPP_
#include <com/sun/star/sdbc/XRowSetListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
#include <com/sun/star/frame/XStatusListener.hpp>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
#include <cppuhelper/interfacecontainer.hxx>
-#endif
-#ifndef _CPPUHELPER_QUERYINTERFACE_HXX_
#include <cppuhelper/queryinterface.hxx>
-#endif
-#ifndef _CPPUHELPER_WEAK_HXX_
#include <cppuhelper/weak.hxx>
-#endif
namespace dbaui
{
@@ -486,3 +435,4 @@ namespace dbaui
#endif // _SBA_MULTIPLEXER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/singledoccontroller.hxx b/dbaccess/source/ui/inc/singledoccontroller.hxx
index 4734dad80..4734dad80 100755..100644
--- a/dbaccess/source/ui/inc/singledoccontroller.hxx
+++ b/dbaccess/source/ui/inc/singledoccontroller.hxx
diff --git a/dbaccess/source/ui/inc/sqledit.hxx b/dbaccess/source/ui/inc/sqledit.hxx
index 8d135a2d5..b2461a5ed 100644
--- a/dbaccess/source/ui/inc/sqledit.hxx
+++ b/dbaccess/source/ui/inc/sqledit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,3 +88,4 @@ namespace dbaui
#endif // DBAUI_SQLEDIT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/sqlmessage.hxx b/dbaccess/source/ui/inc/sqlmessage.hxx
index 71a6cb293..e7aaa6f89 100644
--- a/dbaccess/source/ui/inc/sqlmessage.hxx
+++ b/dbaccess/source/ui/inc/sqlmessage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,19 +29,11 @@
#ifndef _DBAUI_SQLMESSAGE_HXX_
#define _DBAUI_SQLMESSAGE_HXX_
-#ifndef _BUTTON_HXX
#include <vcl/button.hxx>
-#endif
-#ifndef _FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_BTNDLG_HXX
#include <vcl/btndlg.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
#include <memory>
@@ -141,3 +134,4 @@ public:
#endif // _DBAUI_SQLMESSAGE_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/statusbarontroller.hxx b/dbaccess/source/ui/inc/statusbarontroller.hxx
index f959fe404..e96616066 100644
--- a/dbaccess/source/ui/inc/statusbarontroller.hxx
+++ b/dbaccess/source/ui/inc/statusbarontroller.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,21 +28,11 @@
#ifndef DBAUI_STATUSBARCONTROLLER_HXX
#define DBAUI_STATUSBARCONTROLLER_HXX
-#ifndef _SVTOOLS_STATUSBARCONTROLLER_HXX
#include <svtools/statusbarcontroller.hxx>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
namespace dbaui
{
@@ -60,3 +51,4 @@ namespace dbaui
}
#endif // DBAUI_STATUSBARCONTROLLER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/stringlistitem.hxx b/dbaccess/source/ui/inc/stringlistitem.hxx
index ccac85a1a..88d02acde 100644
--- a/dbaccess/source/ui/inc/stringlistitem.hxx
+++ b/dbaccess/source/ui/inc/stringlistitem.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,16 +29,10 @@
#ifndef _DBAUI_STRINGLISTITEM_HXX_
#define _DBAUI_STRINGLISTITEM_HXX_
-#ifndef _SFXPOOLITEM_HXX
#include <svl/poolitem.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
-#endif
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
-#endif
//.........................................................................
namespace dbaui
@@ -70,3 +65,4 @@ public:
#endif // _DBAUI_STRINGLISTITEM_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/tabletree.hxx b/dbaccess/source/ui/inc/tabletree.hxx
index 7594309f6..6efcee71b 100644
--- a/dbaccess/source/ui/inc/tabletree.hxx
+++ b/dbaccess/source/ui/inc/tabletree.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,28 +29,14 @@
#ifndef _DBAUI_TABLETREE_HXX_
#define _DBAUI_TABLETREE_HXX_
-#ifndef _DBAUI_MARKTREE_HXX_
#include "marktree.hxx"
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDRIVER_HPP_
#include <com/sun/star/sdbc/XDriver.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_NAMEDDATABASEOBJECT_HPP_
#include <com/sun/star/sdb/application/NamedDatabaseObject.hpp>
-#endif
#include <memory>
@@ -210,3 +197,4 @@ protected:
#endif // _DBAUI_TABLETREE_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/textconnectionsettings.hxx b/dbaccess/source/ui/inc/textconnectionsettings.hxx
index ec17ce178..08af3e9d5 100644
--- a/dbaccess/source/ui/inc/textconnectionsettings.hxx
+++ b/dbaccess/source/ui/inc/textconnectionsettings.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,5 @@ namespace dbaui
//........................................................................
#endif // TEXTCONNECTIONSETTINGS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/toolboxcontroller.hxx b/dbaccess/source/ui/inc/toolboxcontroller.hxx
index ce036b5a3..8779c351c 100644
--- a/dbaccess/source/ui/inc/toolboxcontroller.hxx
+++ b/dbaccess/source/ui/inc/toolboxcontroller.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,24 +28,12 @@
#ifndef DBACCESS_TOOLBOXCONTROLLER_HXX
#define DBACCESS_TOOLBOXCONTROLLER_HXX
-#ifndef _SVTOOLS_TOOLBOXCONTROLLER_HXX
#include <svtools/toolboxcontroller.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
#include <memory>
class PopupMenu;
@@ -83,3 +72,4 @@ namespace dbaui
//..........................................................................
#endif //DBACCESS_TOOLBOXCONTROLLER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/undosqledit.hxx b/dbaccess/source/ui/inc/undosqledit.hxx
index ce64012e9..f8bb1541d 100644
--- a/dbaccess/source/ui/inc/undosqledit.hxx
+++ b/dbaccess/source/ui/inc/undosqledit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBAUI_UNDOSQLEDIT_HXX
#define DBAUI_UNDOSQLEDIT_HXX
-#ifndef DBAUI_GENERALUNDO_HXX
#include "GeneralUndo.hxx"
-#endif
-#ifndef _DBU_CONTROL_HRC_
#include "dbu_control.hrc"
-#endif
namespace dbaui
{
@@ -59,3 +56,4 @@ namespace dbaui
#endif // DBAUI_UNDOSQLEDIT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/unoadmin.hxx b/dbaccess/source/ui/inc/unoadmin.hxx
index 1f77a518b..2d2ab40bf 100644
--- a/dbaccess/source/ui/inc/unoadmin.hxx
+++ b/dbaccess/source/ui/inc/unoadmin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,10 @@
#ifndef _DBAUI_UNOADMIN_
#define _DBAUI_UNOADMIN_
-#ifndef _SVT_GENERICUNODIALOG_HXX_
#include <svtools/genericunodialog.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _DBAUI_DSNTYPES_HXX_
#include "dsntypes.hxx"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
class SfxItemSet;
class SfxItemPool;
@@ -85,3 +78,4 @@ protected:
#endif // _DBAUI_UNOADMIN_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx
index 96727961e..4081bf1e5 100644
--- a/dbaccess/source/ui/inc/unodatbr.hxx
+++ b/dbaccess/source/ui/inc/unodatbr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,72 +29,28 @@
#ifndef _SBA_UNODATBR_HXX_
#define _SBA_UNODATBR_HXX_
-#ifndef _SBA_BWRCTRLR_HXX
#include "brwctrlr.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
#include <com/sun/star/frame/XStatusListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_
#include <com/sun/star/frame/XDispatch.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_
#include <com/sun/star/container/XContainerListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_I18N_XCOLLATOR_HPP_
#include <com/sun/star/i18n/XCollator.hpp>
-#endif
-#ifndef _COM_SUN_STAR_VIEW_XSELECTIONSUPPLIER_HPP_
#include <com/sun/star/view/XSelectionSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
#include <com/sun/star/awt/XWindow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DOCUMENT_XSCRIPTINVOCATIONCONTEXT_HPP_
#include <com/sun/star/document/XScriptInvocationContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_XCONTEXTMENUINTERCEPTION_HPP_
#include <com/sun/star/ui/XContextMenuInterception.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_DATABASEOBJECT_HPP_
#include <com/sun/star/sdb/application/DatabaseObject.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_DATABASEOBJECTCONTAINER_HPP_
#include <com/sun/star/sdb/application/DatabaseObjectContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_DATABASEOBJECTCONTAINER_HPP_
#include <com/sun/star/sdb/XDatabaseRegistrationsListener.hpp>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE5_HXX_
#include <cppuhelper/implbase5.hxx>
-#endif
-#ifndef _DBACCESS_UI_CALLBACKS_HXX_
#include "callbacks.hxx"
-#endif
-#ifndef _SV_TIMER_HXX
#include <vcl/timer.hxx>
-#endif
-#ifndef _TRANSFER_HXX
#include <svtools/transfer.hxx>
-#endif
-#ifndef _SVX_DATACCESSDESCRIPTOR_HXX_
#include <svx/dataaccessdescriptor.hxx>
-#endif
-#ifndef _SOT_STORAGE_HXX
#include <sot/storage.hxx>
-#endif
-#ifndef DBUI_TABLECOPYHELPER_HXX
#include "TableCopyHelper.hxx"
-#endif
-#ifndef _DBAUI_COMMON_TYPES_HXX_
#include "commontypes.hxx"
-#endif
// =========================================================================
class SvLBoxEntry;
@@ -494,7 +451,7 @@ namespace dbaui
void* _pTreeListUserData // in rela a DBTreeListUserData*, but we do not know this class here ....
);
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
// checks whether the given tree entry denotes a data source
bool impl_isDataSourceEntry( SvLBoxEntry* _pEntry ) const;
#endif
@@ -514,9 +471,6 @@ namespace dbaui
// remove all grid columns and dispose them
void clearGridColumns(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& _xColContainer);
- sal_Bool isHiContrast() const;
-
-
/** checks if the currently displayed entry changed
@param _sName
Name of the changed entry
@@ -543,3 +497,4 @@ namespace dbaui
#endif // _SBA_UNODATBR_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/unosqlmessage.hxx b/dbaccess/source/ui/inc/unosqlmessage.hxx
index 92d009bc3..c5c7078d5 100644
--- a/dbaccess/source/ui/inc/unosqlmessage.hxx
+++ b/dbaccess/source/ui/inc/unosqlmessage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,12 +29,8 @@
#ifndef _DBAUI_UNOSQLMESSAGE_HXX_
#define _DBAUI_UNOSQLMESSAGE_HXX_
-#ifndef _SVT_GENERICUNODIALOG_HXX_
#include <svtools/genericunodialog.hxx>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
//.........................................................................
namespace dbaui
{
@@ -90,3 +87,4 @@ protected:
#endif // _DBAUI_UNOSQLMESSAGE_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index 2a03f9b7f..d8142f40b 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,6 +56,7 @@
#include "UITools.hxx"
#include <unotools/configmgr.hxx>
#include <memory>
+#include <o3tl/compat_functional.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
#include <i18npool/mslangid.hxx>
@@ -289,7 +291,7 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection,
break;
}
}
- } // if(xSet.is())
+ }
if ( !m_pTypeInfo )
m_pTypeInfo = TOTypeInfoSP(new OTypeInfo());
SetColumnTypes(pList,_pInfoMap);
@@ -325,20 +327,17 @@ void ODatabaseExport::insertValueIntoColumn()
sal_Int32 nPos = m_vColumns[nNewPos].first;
if ( nPos != COLUMN_POSITION_NOT_FOUND )
{
- // if(m_nDefToken != LANGUAGE_DONTKNOW) // falls Sprache anders als Systemsprache
- // m_pNF->ChangeIntl((LanguageType)m_nDefToken);
-
if ( !m_sTextToken.Len() && pField->IsNullable() )
m_pUpdateHelper->updateNull(nPos,pField->GetType());
else
{
- sal_Int32 nNumberFormat = 0;
- double fOutNumber = 0.0;
OSL_ENSURE((nNewPos) < static_cast<sal_Int32>(m_vColumnTypes.size()),"Illegal index for vector");
if (m_vColumnTypes[nNewPos] != DataType::VARCHAR && m_vColumnTypes[nNewPos] != DataType::CHAR && m_vColumnTypes[nNewPos] != DataType::LONGVARCHAR )
{
RTL_LOGFILE_CONTEXT_TRACE( aLogger, "ODatabaseExport::insertValueIntoColumn != DataType::VARCHAR" );
ensureFormatter();
+ sal_Int32 nNumberFormat = 0;
+ double fOutNumber = 0.0;
bool bNumberFormatError = false;
if ( m_pFormatter && m_sNumToken.Len() )
{
@@ -364,7 +363,7 @@ void ODatabaseExport::insertValueIntoColumn()
,NumberFormat::NUMBER
,NumberFormat::LOGICAL
};
- for (size_t i = 0; i < sizeof(nFormats)/sizeof(nFormats[0]); ++i)
+ for (size_t i = 0; i < SAL_N_ELEMENTS(nFormats); ++i)
{
try
{
@@ -562,7 +561,7 @@ sal_Int16 ODatabaseExport::CheckString(const String& aCheckToken, sal_Int16 _nOl
}
break;
default:
- OSL_ENSURE(0,"ODatabaseExport: Unbekanntes Format");
+ OSL_FAIL("ODatabaseExport: Unbekanntes Format");
}
}
}
@@ -790,7 +789,7 @@ void ODatabaseExport::showErrorDialog(const ::com::sun::star::sdbc::SQLException
m_bDontAskAgain = sal_True;
else
m_bError = sal_True;
- } // if(!m_bDontAskAgain)
+ }
}
// -----------------------------------------------------------------------------
void ODatabaseExport::adjustFormat()
@@ -872,7 +871,7 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R
for(sal_uInt32 j=0; j < aInsertList.size() ;++i,++j)
{
ODatabaseExport::TPositions::const_iterator aFind = ::std::find_if(_rvColumns.begin(),_rvColumns.end(),
- ::std::compose1(::std::bind2nd(::std::equal_to<sal_Int32>(),i+1),::std::select2nd<ODatabaseExport::TPositions::value_type>()));
+ ::o3tl::compose1(::std::bind2nd(::std::equal_to<sal_Int32>(),i+1),::o3tl::select2nd<ODatabaseExport::TPositions::value_type>()));
if ( _rvColumns.end() != aFind && aFind->second != sal::static_int_cast< long >(CONTAINER_ENTRY_NOTFOUND) && aFind->first != sal::static_int_cast< long >(CONTAINER_ENTRY_NOTFOUND) )
{
OSL_ENSURE((aFind->first) < static_cast<sal_Int32>(aInsertList.size()),"aInsertList: Illegal index for vector");
@@ -903,3 +902,4 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx
index 8d997a41b..3d1c4631a 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,7 @@
#include "dbu_misc.hrc"
#include "dbustrings.hrc"
#include <sfx2/sfxhtml.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <tools/tenccvt.hxx>
#include "moduledbu.hxx"
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
@@ -185,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);
@@ -336,7 +337,6 @@ void OHTMLReader::fetchOptions()
case HTML_O_SDVAL:
{
m_sValToken = pOption->GetString();
- //m_sTextToken = pOption->GetString();
m_bSDNum = sal_True;
}
break;
@@ -347,11 +347,10 @@ void OHTMLReader::fetchOptions()
}
}
//---------------------------------------------------------------------------------
-void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal,int nToken)
+void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::TableDataOn" );
DBG_CHKTHIS(OHTMLReader,NULL);
- sal_Bool bHorJustifyCenterTH = (nToken == HTML_TABLEHEADER_ON);
const HTMLOptions* pHtmlOptions = GetOptions();
sal_Int16 nArrLen = pHtmlOptions->Count();
for ( sal_Int16 i = 0; i < nArrLen; i++ )
@@ -361,7 +360,6 @@ void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal,int nToken)
{
case HTML_O_ALIGN:
{
- bHorJustifyCenterTH = sal_False;
const String& rOptVal = pOption->GetString();
if (rOptVal.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_right ))
eVal = SVX_HOR_JUSTIFY_RIGHT;
@@ -438,14 +436,14 @@ sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption* pOption )
const String& rOptVal = pOption->GetString();
if ( rOptVal.Search('%') != STRING_NOTFOUND )
{ // Prozent
- DBG_ASSERT( m_nColumnWidth, "WIDTH Option: m_nColumnWidth==0 und Width%" );
+ OSL_ENSURE( m_nColumnWidth, "WIDTH Option: m_nColumnWidth==0 und Width%" );
return (sal_Int16)((pOption->GetNumber() * m_nColumnWidth) / 100);
}
else
{
if ( rOptVal.Search('*') != STRING_NOTFOUND )
{ // relativ zu was?!?
-//2do: ColArray aller relativen Werte sammeln und dann MakeCol
+//TODO: ColArray aller relativen Werte sammeln und dann MakeCol
return 0;
}
else
@@ -488,15 +486,11 @@ sal_Bool OHTMLReader::CreateTable(int nToken)
m_sTextToken.Erase();
break;
case HTML_TABLEDATA_ON:
- // m_bAppendFirstLine = true;
- // run through
case HTML_TABLEHEADER_ON:
- TableDataOn(eVal,nTmpToken2);
+ TableDataOn(eVal);
bTableHeader = sal_True;
break;
case HTML_TABLEDATA_OFF:
- // m_bAppendFirstLine = true;
- // run through
case HTML_TABLEHEADER_OFF:
{
aColumnName.EraseLeadingChars();
@@ -596,3 +590,4 @@ TypeSelectionPageFactory OHTMLReader::getTypeSelectionPageFactory()
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/ModuleHelper.cxx b/dbaccess/source/ui/misc/ModuleHelper.cxx
index b9e2d4ebc..59f432022 100644
--- a/dbaccess/source/ui/misc/ModuleHelper.cxx
+++ b/dbaccess/source/ui/misc/ModuleHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,9 +26,7 @@
*
************************************************************************/
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
//.........................................................................
namespace dbaui
@@ -42,3 +41,4 @@ namespace dbaui
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx
index 86c34e2e4..6acb232d2 100644
--- a/dbaccess/source/ui/misc/RowSetDrop.cxx
+++ b/dbaccess/source/ui/misc/RowSetDrop.cxx
@@ -1,3 +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.
@@ -47,7 +49,6 @@ using namespace ::com::sun::star::util;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::lang;
-// using namespace ::com::sun::star::sdbcx;
// export data
ORowSetImportExport::ORowSetImportExport( Window* _pParent,
@@ -83,7 +84,7 @@ void ORowSetImportExport::initialize()
m_aColumnTypes.reserve(nCount);
for (sal_Int32 i = 1;i <= nCount; ++i)
{
- sal_Int32 nPos = -1; // -1 means column is autoincrement or doesn't exists
+ sal_Int32 nPos = -1; // -1 means column is autoincrement or doesn't exist
if(!m_xTargetResultSetMetaData->isAutoIncrement(i))
{
try
@@ -94,7 +95,7 @@ void ORowSetImportExport::initialize()
catch(const SQLException&)
{
if(m_xTargetResultSetMetaData->isNullable(i))
- nPos = 0; // column doesn't exists but we could set it to null
+ nPos = 0; // column doesn't exist but we could set it to null
}
}
@@ -119,8 +120,6 @@ sal_Bool ORowSetImportExport::Read()
if(::std::find_if(m_aColumnMapping.begin(),m_aColumnMapping.end(),
::std::bind2nd(::std::greater<sal_Int32>(),0)) == m_aColumnMapping.end())
return sal_False;
- sal_Int32 nCurrentRow = 0;
- sal_Int32 nRowFilterIndex = 0;
sal_Bool bContinue = sal_True;
if(m_aSelection.getLength())
{
@@ -130,7 +129,7 @@ sal_Bool ORowSetImportExport::Read()
{
sal_Int32 nPos = -1;
*pBegin >>= nPos;
- OSL_ENSURE(nPos != -1,"Invalid posiotion!");
+ OSL_ENSURE(nPos != -1,"Invalid position!");
bContinue = (m_xResultSet.is() && m_xResultSet->absolute(nPos) && insertNewRow());
}
}
@@ -138,6 +137,8 @@ sal_Bool ORowSetImportExport::Read()
{
Reference<XPropertySet> xProp(m_xResultSet,UNO_QUERY);
sal_Int32 nRowCount = 0;
+ sal_Int32 nCurrentRow = 0;
+ sal_Int32 nRowFilterIndex = 0;
if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_ISROWCOUNTFINAL) )
{
sal_Bool bFinal = sal_False;
@@ -241,7 +242,7 @@ sal_Bool ORowSetImportExport::insertNewRow()
aValue <<= m_xRow->getClob(*aIter);
break;
default:
- OSL_ENSURE(0,"Unknown type");
+ OSL_FAIL("Unknown type");
}
if(m_xRow->wasNull())
m_xTargetRowUpdate->updateNull(i);
@@ -257,7 +258,7 @@ sal_Bool ORowSetImportExport::insertNewRow()
{
if(!m_bAlreadyAsked)
{
- String sAskIfContinue = String(ModuleRes(STR_ERROR_OCCURED_WHILE_COPYING));
+ String sAskIfContinue = String(ModuleRes(STR_ERROR_OCCURRED_WHILE_COPYING));
OSQLWarningBox aDlg( m_pParent, sAskIfContinue, WB_YES_NO | WB_DEF_YES );
if(aDlg.Execute() == RET_YES)
m_bAlreadyAsked = sal_True;
@@ -271,3 +272,4 @@ sal_Bool ORowSetImportExport::insertNewRow()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx
index dee89b861..6afb0db40 100644
--- a/dbaccess/source/ui/misc/RtfReader.cxx
+++ b/dbaccess/source/ui/misc/RtfReader.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -129,7 +130,6 @@ void ORTFReader::NextToken( int nToken )
{
int nTmpToken2 = GetNextToken();
- sal_Bool bNext = sal_True;
do
{
Color aColor;
@@ -140,8 +140,7 @@ void ORTFReader::NextToken( int nToken )
case RTF_RED: aColor.SetRed((sal_uInt8)nTokenValue); break;
case RTF_BLUE: aColor.SetBlue((sal_uInt8)nTokenValue); break;
case RTF_GREEN: aColor.SetGreen((sal_uInt8)nTokenValue); break;
- default:
- bNext = sal_False;
+ default: break;
}
nTmpToken2 = GetNextToken();
}
@@ -163,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;
@@ -216,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();
@@ -314,8 +313,6 @@ sal_Bool ORTFReader::CreateTable(int nToken)
}
break;
case RTF_CF:
- // if(nTokenValue < m_vecColor.size())
- // m_xTable->setPropertyValue(PROPERTY_TEXTCOLOR,makeAny(m_vecColor[nTokenValue]));
break;
case RTF_B:
aFont.Weight = ::com::sun::star::awt::FontWeight::BOLD;
@@ -375,3 +372,4 @@ TypeSelectionPageFactory ORTFReader::getTypeSelectionPageFactory()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index 2f1e37815..4255f3cfd 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,116 +28,44 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBUI_TABLECOPYHELPER_HXX
#include "TableCopyHelper.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBAUI_WIZ_COPYTABLEDIALOG_HXX
#include "WCopyTable.hxx"
-#endif
-#ifndef DBAUI_GENERICCONTROLLER_HXX
#include "genericcontroller.hxx"
-#endif
-#ifndef DBAUI_WIZARD_CPAGE_HXX
#include "WCPage.hxx"
-#endif
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_
#include <com/sun/star/task/XInteractionHandler.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSER_HPP_
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_COPYTABLEOPERATION_HPP_
#include <com/sun/star/sdb/application/CopyTableOperation.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_COPYTABLEWIZARD_HPP_
#include <com/sun/star/sdb/application/CopyTableWizard.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_DATAACCESSDESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdb/DataAccessDescriptorFactory.hpp>
-#endif
-#ifndef DBAUI_RTFREADER_HXX
#include "RtfReader.hxx"
-#endif
-#ifndef DBAUI_HTMLREADER_HXX
#include "HtmlReader.hxx"
-#endif
-#ifndef DBAUI_TOKENWRITER_HXX
#include "TokenWriter.hxx"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef DBAUI_DATAVIEW_HXX
#include "dataview.hxx"
-#endif
-#ifndef _DBU_RESOURCE_HRC_
#include "dbu_resource.hrc"
-#endif
-#ifndef _UNOTOOLS_UCBHELPER_HXX
#include <unotools/ucbhelper.hxx>
-#endif
-#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef COMPHELPER_COMPONENTCONTEXT_HXX
#include <comphelper/componentcontext.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XVIEWSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XQUERYDEFINITIONSSUPPLIER_HPP_
#include <com/sun/star/sdb/XQueryDefinitionsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XPARAMETERS_HPP_
#include <com/sun/star/sdbc/XParameters.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XQUERIESSUPPLIER_HPP_
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCOLUMNLOCATE_HPP_
#include <com/sun/star/sdbc/XColumnLocate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XROWLOCATE_HPP_
#include <com/sun/star/sdbcx/XRowLocate.hpp>
-#endif
-#ifndef _SV_WAITOBJ_HXX
#include <vcl/waitobj.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSERFACTORY_HPP_
#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
-#endif
-#ifndef _UNOTOOLS_TEMPFILE_HXX
#include <unotools/tempfile.hxx>
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
-#ifndef DBAUI_DBEXCHANGE_HXX
#include "dbexchange.hxx"
-#endif
#include <rtl/logfile.hxx>
//........................................................................
namespace dbaui
@@ -170,7 +99,7 @@ void OTableCopyHelper::insertTable( const ::rtl::OUString& i_rSourceDataSource,
{
if ( CommandType::QUERY != i_nCommandType && CommandType::TABLE != i_nCommandType )
{
- DBG_ERROR( "OTableCopyHelper::insertTable: invalid call (no supported format found)!" );
+ OSL_FAIL( "OTableCopyHelper::insertTable: invalid call (no supported format found)!" );
return;
}
@@ -182,7 +111,7 @@ void OTableCopyHelper::insertTable( const ::rtl::OUString& i_rSourceDataSource,
if ( !xSrcConnection.is() || !i_rDestConnection.is() )
{
- OSL_ENSURE( false, "OTableCopyHelper::insertTable: no connection/s!" );
+ OSL_FAIL( "OTableCopyHelper::insertTable: no connection/s!" );
return;
}
@@ -294,7 +223,7 @@ void OTableCopyHelper::pasteTable( SotFormatStringId _nFormatId
aTrans.bHtml = SOT_FORMATSTR_ID_HTML == _nFormatId;
aTrans.sDefaultTableName = GetTableNameForAppend();
if ( !copyTagTable(aTrans,sal_False,_xConnection) )
- m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString::createFromAscii("S1000") ,0,Any()));
+ m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")),0,Any()));
}
catch(const SQLException&)
{
@@ -306,7 +235,7 @@ void OTableCopyHelper::pasteTable( SotFormatStringId _nFormatId
}
}
else
- m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString::createFromAscii("S1000") ,0,Any()));
+ m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")),0,Any()));
}
// -----------------------------------------------------------------------------
@@ -337,10 +266,9 @@ sal_Bool OTableCopyHelper::copyTagTable(OTableCopyHelper::DropDescriptor& _rDesc
if ( _bCheck )
pImport->enableCheckOnly();
- //dyf add 20070601
//set the selected tablename
pImport->setSTableName(_rDesc.sDefaultTableName);
- //dyf add end
+
pImport->setStream(pStream);
return pImport->Read();
}
@@ -406,10 +334,11 @@ void OTableCopyHelper::asyncCopyTagTable( DropDescriptor& _rDesc
else if ( !_rDesc.bError )
pasteTable(_rDesc.aDroppedData,i_rDestDataSource,_xConnection);
else
- m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString::createFromAscii("S1000") ,0,Any()));
+ m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")),0,Any()));
}
// -----------------------------------------------------------------------------
//........................................................................
} // namespace dbaui
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index a844f509e..0bfae5565 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,6 +31,7 @@
#include "TokenWriter.hxx"
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include "RtfReader.hxx"
#include "HtmlReader.hxx"
#include "dbustrings.hrc"
@@ -81,15 +83,15 @@ using namespace ::com::sun::star::util;
using ::com::sun::star::frame::XModel;
#if defined(UNX)
-const char __FAR_DATA ODatabaseImportExport::sNewLine = '\012';
+const char ODatabaseImportExport::sNewLine = '\012';
#else
-const char __FAR_DATA ODatabaseImportExport::sNewLine[] = "\015\012";
+const char ODatabaseImportExport::sNewLine[] = "\015\012";
#endif
-const static char __FAR_DATA sMyBegComment[] = "<!-- ";
-const static char __FAR_DATA sMyEndComment[] = " -->";
-const static char __FAR_DATA sFontFamily[] = "font-family: ";
-const static char __FAR_DATA sFontSize[] = "font-size: ";
+const static char sMyBegComment[] = "<!-- ";
+const static char sMyEndComment[] = " -->";
+const static char sFontFamily[] = "font-family: ";
+const static char sFontSize[] = "font-size: ";
#define SBA_FORMAT_SELECTION_COUNT 4
#define CELL_X 1437
@@ -200,8 +202,6 @@ void SAL_CALL ODatabaseImportExport::disposing( const EventObject& Source ) thro
m_xConnection.clear();
dispose();
m_bNeedToReInitialize = true;
- //if(!m_bInInitialize)
- // initialize();
}
}
// -----------------------------------------------------------------------------
@@ -248,7 +248,7 @@ void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor
{
if ( !m_xResultSet.is() )
{
- OSL_ENSURE( false, "ODatabaseImportExport::impl_initFromDescriptor: selection without result set is nonsense!" );
+ OSL_FAIL( "ODatabaseImportExport::impl_initFromDescriptor: selection without result set is nonsense!" );
m_aSelection.realloc( 0 );
}
}
@@ -257,7 +257,7 @@ void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor
{
if ( m_bBookmarkSelection && !m_xRowLocate.is() )
{
- OSL_ENSURE( false, "ODatabaseImportExport::impl_initFromDescriptor: no XRowLocate -> no bookmars!" );
+ OSL_FAIL( "ODatabaseImportExport::impl_initFromDescriptor: no XRowLocate -> no bookmars!" );
m_aSelection.realloc( 0 );
}
}
@@ -331,7 +331,7 @@ void ODatabaseImportExport::initialize()
// the result set may be already set with the datadescriptor
if ( !m_xResultSet.is() )
{
- m_xResultSet.set( m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.sdb.RowSet" ) ), UNO_QUERY );
+ m_xResultSet.set( m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.RowSet")) ), UNO_QUERY );
Reference< XPropertySet > xProp( m_xResultSet, UNO_QUERY_THROW );
xProp->setPropertyValue( PROPERTY_ACTIVE_CONNECTION, makeAny( m_xConnection.getTyped() ) );
xProp->setPropertyValue( PROPERTY_COMMAND_TYPE, makeAny( m_nCommandType ) );
@@ -368,7 +368,7 @@ sal_Bool ODatabaseImportExport::Write()
{
if ( !m_bInInitialize )
initialize();
- } // if ( m_bNeedToReInitialize )
+ }
return sal_True;
}
// -----------------------------------------------------------------------------
@@ -378,7 +378,7 @@ sal_Bool ODatabaseImportExport::Read()
{
if ( !m_bInInitialize )
initialize();
- } // if ( m_bNeedToReInitialize )
+ }
return sal_True;
}
// -----------------------------------------------------------------------------
@@ -403,54 +403,6 @@ sal_Bool ORTFImportExport::Write()
(*m_pStream) << OOO_STRING_SVTOOLS_RTF_ANSI << ODatabaseImportExport::sNewLine;
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252;
- /*
- // Access RTF Export Beispiel
- {\rtf1\ansi
- {\colortbl\red0\green0\blue0;\red255\green255\blue255;\red192\green192\blue192;}
- {\fonttbl\f0\fcharset0\fnil MS Sans Serif;\f1\fcharset0\fnil Arial;\f2\fcharset0\fnil Arial;}
- \trowd\trgaph40
- \clbrdrl\brdrs\brdrcf0\clbrdrt\brdrs\brdrcf0\clbrdrb\brdrs\brdrcf0\clbrdrr\brdrs\brdrcf0\clshdng10000\clcfpat2\cellx1437
- \clbrdrl\brdrs\brdrcf0\clbrdrt\brdrs\brdrcf0\clbrdrb\brdrs\brdrcf0\clbrdrr\brdrs\brdrcf0\clshdng10000\clcfpat2\cellx2874
- {
- \trrh-270\pard\intbl
- {\qc\fs20\b\f1\cf0\cb2 text\cell}
- \pard\intbl
- {\qc\fs20\b\f1\cf0\cb2 datum\cell}
- \pard\intbl\row
- }
- \trowd\trgaph40\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx1437\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx2874
- {\trrh-270\pard\intbl
- {\ql\fs20\f2\cf0\cb1 heute\cell}
- \pard\intbl
- {\qr\fs20\f2\cf0\cb1 10.11.98\cell}
- \pard\intbl\row
- }
- \trowd\trgaph40\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx1437\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx2874
- {\trrh-270\pard\intbl
- {\ql\fs20\f2\cf0\cb1 morgen\cell}
- \pard\intbl
- {\qr\fs20\f2\cf0\cb1 11.11.98\cell}
- \pard\intbl\row
- }
- \trowd\trgaph40\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx1437\clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx2874
- {\trrh-270\pard\intbl
- {\ql\fs20\f2\cf0\cb1 bruder\cell}
- \pard\intbl
- {\qr\fs20\f2\cf0\cb1 21.04.98\cell}
- \pard\intbl\row
- }
- \trowd\trgaph40
- \clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx
- \clbrdrl\brdrs\brdrcf2\clbrdrt\brdrs\brdrcf2\clbrdrb\brdrs\brdrcf2\clbrdrr\brdrs\brdrcf2\clshdng10000\clcfpat1\cellx2874
- {\trrh-270\pard\intbl
- {\ql\fs20\f2\cf0\cb1 vater\cell}
- \pard\intbl
- {\qr\fs20\f2\cf0\cb1 28.06.98\cell}
- \pard\intbl\row
- }
- }
- */
-
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 );
@@ -472,10 +424,10 @@ sal_Bool ORTFImportExport::Write()
(*m_pStream) << "{\\fonttbl";
xub_StrLen nTokenCount = aFonts.GetTokenCount();
- for(xub_StrLen j=0;j<nTokenCount;++j)
+ for(sal_uInt32 j=0;j<nTokenCount;++j)
{
(*m_pStream) << "\\f";
- m_pStream->WriteNumber(j);
+ m_pStream->WriteNumber(static_cast<sal_Int32>(j));
(*m_pStream) << aFormat;
(*m_pStream) << aFonts.GetToken(j).GetBuffer();
(*m_pStream) << ';';
@@ -484,11 +436,11 @@ sal_Bool ORTFImportExport::Write()
(*m_pStream) << ODatabaseImportExport::sNewLine;
// write the rtf color table
(*m_pStream) << '{' << OOO_STRING_SVTOOLS_RTF_COLORTBL << OOO_STRING_SVTOOLS_RTF_RED;
- m_pStream->WriteNumber(aColor.GetRed());
+ m_pStream->WriteNumber(static_cast<sal_uInt32>(aColor.GetRed()));
(*m_pStream) << OOO_STRING_SVTOOLS_RTF_GREEN;
- m_pStream->WriteNumber(aColor.GetGreen());
+ m_pStream->WriteNumber(static_cast<sal_uInt32>(aColor.GetGreen()));
(*m_pStream) << OOO_STRING_SVTOOLS_RTF_BLUE;
- m_pStream->WriteNumber(aColor.GetBlue());
+ m_pStream->WriteNumber(static_cast<sal_uInt32>(aColor.GetBlue()));
(*m_pStream) << ";\\red255\\green255\\blue255;\\red192\\green192\\blue192;}"
<< ODatabaseImportExport::sNewLine;
@@ -498,7 +450,7 @@ sal_Bool ORTFImportExport::Write()
::rtl::OString aCell1("\\clbrdrl\\brdrs\\brdrcf0\\clbrdrt\\brdrs\\brdrcf0\\clbrdrb\\brdrs\\brdrcf0\\clbrdrr\\brdrs\\brdrcf0\\clshdng10000\\clcfpat2\\cellx");
(*m_pStream) << OOO_STRING_SVTOOLS_RTF_TROWD << OOO_STRING_SVTOOLS_RTF_TRGAPH;
- m_pStream->WriteNumber(40);
+ m_pStream->WriteNumber(static_cast<sal_Int32>(40));
(*m_pStream) << ODatabaseImportExport::sNewLine;
if(m_xObject.is())
@@ -628,7 +580,7 @@ void ORTFImportExport::appendRow(::rtl::OString* pHorzChar,sal_Int32 _nColumnCou
{
++kk;
(*m_pStream) << OOO_STRING_SVTOOLS_RTF_TROWD << OOO_STRING_SVTOOLS_RTF_TRGAPH;
- m_pStream->WriteNumber(40);
+ m_pStream->WriteNumber(static_cast<sal_Int32>(40));
(*m_pStream) << ODatabaseImportExport::sNewLine;
static const ::rtl::OString aCell2("\\clbrdrl\\brdrs\\brdrcf2\\clbrdrt\\brdrs\\brdrcf2\\clbrdrb\\brdrs\\brdrcf2\\clbrdrr\\brdrs\\brdrcf2\\clshdng10000\\clcfpat1\\cellx");
@@ -670,14 +622,12 @@ void ORTFImportExport::appendRow(::rtl::OString* pHorzChar,sal_Int32 _nColumnCou
Reference<XPropertySet> xColumn(m_xRowSetColumns->getByIndex(i-1),UNO_QUERY_THROW);
dbtools::FormattedColumnValue aFormatedValue(aContext,xRowSet,xColumn);
::rtl::OUString sValue = aFormatedValue.getFormattedValue();
- // m_xRow->getString(i);
- //if (!m_xRow->wasNull())
if ( sValue.getLength() )
RTFOutFuncs::Out_String(*m_pStream,sValue,m_eDestEnc);
}
catch (Exception&)
{
- OSL_ENSURE(0,"RTF WRITE!");
+ OSL_FAIL("RTF WRITE!");
}
(*m_pStream) << OOO_STRING_SVTOOLS_RTF_CELL;
@@ -711,7 +661,7 @@ sal_Bool ORTFImportExport::Read()
}
//-------------------------------------------------------------------
//===================================================================
-const sal_Int16 __FAR_DATA OHTMLImportExport::nDefaultFontSize[SBA_HTML_FONTSIZES] =
+const sal_Int16 OHTMLImportExport::nDefaultFontSize[SBA_HTML_FONTSIZES] =
{
HTMLFONTSZ1_DFLT, HTMLFONTSZ2_DFLT, HTMLFONTSZ3_DFLT, HTMLFONTSZ4_DFLT,
HTMLFONTSZ5_DFLT, HTMLFONTSZ6_DFLT, HTMLFONTSZ7_DFLT
@@ -720,10 +670,10 @@ const sal_Int16 __FAR_DATA OHTMLImportExport::nDefaultFontSize[SBA_HTML_FONTSIZE
sal_Int16 OHTMLImportExport::nFontSize[SBA_HTML_FONTSIZES] = { 0 };
const sal_Int16 OHTMLImportExport::nCellSpacing = 0;
-const char __FAR_DATA OHTMLImportExport::sIndentSource[nIndentMax+1] = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
+const char OHTMLImportExport::sIndentSource[nIndentMax+1] = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
//========================================================================
-// Makros fuer HTML-Export
+// Macros for HTML-Export
//========================================================================
#define OUT_PROLOGUE() ((*m_pStream) << sHTML30_Prologue << ODatabaseImportExport::sNewLine << ODatabaseImportExport::sNewLine)
#define TAG_ON( tag ) HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag )
@@ -744,14 +694,14 @@ OHTMLImportExport::OHTMLImportExport(const ::svx::ODataAccessDescriptor& _aDataD
const String& rExchange)
: ODatabaseImportExport(_aDataDescriptor,_rM,_rxNumberF,rExchange)
,m_nIndent(0)
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
,m_bCheckFont(sal_False)
#endif
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::OHTMLImportExport" );
// set HTML configuration
- SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
- m_eDestEnc = pHtmlOptions->GetTextEncoding();
+ SvxHtmlOptions& rHtmlOptions = SvxHtmlOptions::Get();
+ m_eDestEnc = rHtmlOptions.GetTextEncoding();
strncpy( sIndent, sIndentSource ,std::min(sizeof(sIndent),sizeof(sIndentSource)));
sIndent[0] = 0;
}
@@ -786,9 +736,7 @@ sal_Bool OHTMLImportExport::Read()
((OHTMLReader*)m_pReader)->AddRef();
if ( isCheckEnabled() )
m_pReader->enableCheckOnly();
- //dyf add 20070601
m_pReader->SetTableName(m_sDefaultTableName);
- //dyf add end
eState = ((OHTMLReader*)m_pReader)->CallParser();
m_pReader->release();
m_pReader = NULL;
@@ -801,8 +749,8 @@ void OHTMLImportExport::WriteHeader()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::WriteHeader" );
uno::Reference<document::XDocumentProperties> xDocProps(
- m_xFactory->createInstance(::rtl::OUString::createFromAscii(
- "com.sun.star.document.DocumentProperties")),
+ m_xFactory->createInstance(::rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.DocumentProperties"))),
uno::UNO_QUERY);
if (xDocProps.is()) {
xDocProps->setTitle(m_sName);
@@ -826,7 +774,7 @@ void OHTMLImportExport::WriteBody()
(*m_pStream) << OOO_STRING_SVTOOLS_HTML_body << " { " << sFontFamily << '\"' << ::rtl::OString(m_aFont.Name,m_aFont.Name.getLength(), gsl_getSystemTextEncoding()) << '\"';
// TODO : think about the encoding of the font name
(*m_pStream) << "; " << sFontSize;
- m_pStream->WriteNumber(m_aFont.Height);
+ m_pStream->WriteNumber(static_cast<sal_Int32>(m_aFont.Height));
(*m_pStream) << '}';
OUT_LF();
@@ -834,7 +782,7 @@ void OHTMLImportExport::WriteBody()
IncIndent(-1); OUT_LF(); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_style );
OUT_LF();
- // default Textfarbe schwarz
+ // default Textcolour black
(*m_pStream) << '<' << OOO_STRING_SVTOOLS_HTML_body << ' ' << OOO_STRING_SVTOOLS_HTML_O_text << '=';
sal_Int32 nColor = 0;
if(m_xObject.is())
@@ -1056,13 +1004,13 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_I
aStrTD = aStrTD + "=";
aStrTD = aStrTD + pChar;
- double fVal = 0.0;
-
Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier = m_xFormatter->getNumberFormatsSupplier();
SvNumberFormatsSupplierObj* pSupplierImpl = SvNumberFormatsSupplierObj::getImplementation( xSupplier );
SvNumberFormatter* pFormatter = pSupplierImpl ? pSupplierImpl->GetNumberFormatter() : NULL;
if(pFormatter)
{
+ double fVal = 0.0;
+
try
{
fVal = m_xFormatter->convertStringToNumber(nFormat,rValue);
@@ -1091,7 +1039,7 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_I
if ( bStrikeout ) TAG_ON( OOO_STRING_SVTOOLS_HTML_strike );
if ( !rValue.Len() )
- TAG_ON( OOO_STRING_SVTOOLS_HTML_linebreak ); // #42573# keine komplett leere Zelle
+ TAG_ON( OOO_STRING_SVTOOLS_HTML_linebreak ); // keine komplett leere Zelle
else
HTMLOutFuncs::Out_String( (*m_pStream), rValue ,m_eDestEnc);
@@ -1109,7 +1057,7 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_I
void OHTMLImportExport::FontOn()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::FontOn" );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
m_bCheckFont = sal_True;
#endif
@@ -1140,9 +1088,9 @@ void OHTMLImportExport::FontOn()
inline void OHTMLImportExport::FontOff()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::FontOff" );
- DBG_ASSERT(m_bCheckFont,"Kein FontOn() gerufen");
+ OSL_ENSURE(m_bCheckFont,"Kein FontOn() gerufen");
TAG_OFF( OOO_STRING_SVTOOLS_HTML_font );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
m_bCheckFont = sal_False;
#endif
}
@@ -1159,3 +1107,5 @@ void OHTMLImportExport::IncIndent( sal_Int16 nVal )
sIndent[m_nIndent] = 0;
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/ToolBoxHelper.cxx b/dbaccess/source/ui/misc/ToolBoxHelper.cxx
index c0a665592..26f4d4fc8 100644
--- a/dbaccess/source/ui/misc/ToolBoxHelper.cxx
+++ b/dbaccess/source/ui/misc/ToolBoxHelper.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,33 +28,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TOOLBOXHELPER_HXX
#include "ToolBoxHelper.hxx"
-#endif
-#ifndef _SV_TOOLBOX_HXX
#include <vcl/toolbox.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef INCLUDED_SVTOOLS_MISCOPT_HXX
#include <svtools/miscopt.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _SVTOOLS_IMGDEF_HXX
#include <svtools/imgdef.hxx>
-#endif
#include <vcl/event.hxx>
namespace dbaui
{
DBG_NAME(OToolBoxHelper)
OToolBoxHelper::OToolBoxHelper()
- : m_bIsHiContrast(sal_False)
- ,m_nSymbolsSize(-1 )
- ,m_pToolBox(NULL)
+ : m_nSymbolsSize(-1 )
+ , m_pToolBox(NULL)
{
DBG_CTOR(OToolBoxHelper,NULL);
@@ -67,22 +55,19 @@ namespace dbaui
SvtMiscOptions().RemoveListenerLink( LINK( this, OToolBoxHelper, ConfigOptionsChanged ) );
Application::RemoveEventListener( LINK( this, OToolBoxHelper, SettingsChanged ) );
DBG_DTOR(OToolBoxHelper,NULL);
- }
-
+ }
+
// -----------------------------------------------------------------------------
void OToolBoxHelper::checkImageList()
{
if ( m_pToolBox )
{
sal_Int16 nCurSymbolsSize = SvtMiscOptions().GetCurrentSymbolsSize();
- if ( nCurSymbolsSize != m_nSymbolsSize ||
- m_bIsHiContrast != m_pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode() )
+ if ( nCurSymbolsSize != m_nSymbolsSize )
{
m_nSymbolsSize = nCurSymbolsSize;
- m_bIsHiContrast = m_pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode();
-
- m_pToolBox->SetImageList( getImageList(m_nSymbolsSize,m_bIsHiContrast) );
+ m_pToolBox->SetImageList( getImageList(m_nSymbolsSize) );
Size aTbOldSize = m_pToolBox->GetSizePixel();
adjustToolBoxSize(m_pToolBox);
Size aTbNewSize = m_pToolBox->GetSizePixel();
@@ -116,7 +101,7 @@ namespace dbaui
( pData->GetType() == DATACHANGED_DISPLAY )) &&
( pData->GetFlags() & SETTINGS_STYLE )))
// check if imagelist changed
- checkImageList();
+ checkImageList();
}
return 0L;
@@ -128,7 +113,6 @@ namespace dbaui
m_pToolBox = _pTB;
if ( m_pToolBox )
{
- // m_bIsHiContrast = m_pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode();
ConfigOptionsChanged(NULL);
if ( bFirstTime )
adjustToolBoxSize(m_pToolBox);
@@ -138,3 +122,4 @@ namespace dbaui
} // namespace
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 72d1833a3..b56d3fcbe 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,272 +29,103 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _SFX_DOCFILT_HACK_HXX
#include <sfx2/docfilt.hxx>
-#endif
-#ifndef _DBACCESS_UI_CALLBACKS_HXX_
#include "callbacks.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _DBU_RESOURCE_HRC_
#include "dbu_resource.hrc"
-#endif
-#ifndef DBAUI_DLGSAVE_HXX
#include "dlgsave.hxx"
-#endif
-#ifndef DBAUI_DBTREELISTBOX_HXX
#include "dbtreelistbox.hxx"
-#endif
-#ifndef DBACCESS_SOURCE_UI_INC_DEFAULTOBJECTNAMECHECK_HXX
#include "defaultobjectnamecheck.hxx"
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYANALYZER_HPP_
#include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XCOMPLETEDCONNECTION_HPP_
#include <com/sun/star/sdb/XCompletedConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_
#include <com/sun/star/sdbc/XDataSource.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XKEYSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XVIEWSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATASUPPLIER_HPP_
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATA_HPP_
#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
-#endif
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_
#include <com/sun/star/task/XInteractionHandler.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_XCONTENT_HPP_
#include <com/sun/star/ucb/XContent.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UI_DIALOGS_XEXECUTABLEDIALOG_HPP_
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
#include <com/sun/star/container/XIndexAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_INTERACTIVEIOEXCEPTION_HPP_
#include <com/sun/star/ucb/InteractiveIOException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XDOCUMENTDATASOURCE_HPP_
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_IOERRORCODE_HPP_
#include <com/sun/star/ucb/IOErrorCode.hpp>
-#endif
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/helper/vclunohelper.hxx>
-#endif
-#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_
#include <toolkit/awt/vclxwindow.hxx>
-#endif
-#ifndef _VCL_STDTEXT_HXX
#include <vcl/stdtext.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_
#include <com/sun/star/beans/XPropertySetInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
#include <com/sun/star/container/XContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XHIERARCHICALNAMECONTAINER_HPP_
#include <com/sun/star/container/XHierarchicalNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_TEXTALIGN_HPP_
#include <com/sun/star/awt/TextAlign.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_FONTDESCRIPTOR_HPP_
#include <com/sun/star/awt/FontDescriptor.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_FONTWEIGHT_HPP_
#include <com/sun/star/awt/FontWeight.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_FONTRELIEF_HPP_
#include <com/sun/star/awt/FontRelief.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_FONTWIDTH_HPP_
#include <com/sun/star/awt/FontWidth.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
#include <com/sun/star/frame/XModel.hpp>
-#endif
-#ifndef DBAUI_SBATTRDLG_HRC
#include "dlgattr.hrc"
-#endif
-#ifndef DBAUI_TYPEINFO_HXX
#include "TypeInfo.hxx"
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
#include "FieldDescriptions.hxx"
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef COMPHELPER_COMPONENTCONTEXT_HXX
#include <comphelper/componentcontext.hxx>
-#endif
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#define ITEMID_HORJUSTIFY SID_ATTR_ALIGN_HOR_JUSTIFY
#define ITEMID_VERJUSTIFY SID_ATTR_ALIGN_VER_JUSTIFY
-//#define ITEMID_ORIENTATION SID_ATTR_ALIGN_ORIENTATION
#define ITEMID_LINEBREAK SID_ATTR_ALIGN_LINEBREAK
#define ITEMID_MARGIN SID_ATTR_ALIGN_MARGIN
#define ITEMID_NUMBERINFO SID_ATTR_NUMBERFORMAT_INFO
-#ifndef _SFXITEMPOOL_HXX
#include <svl/itempool.hxx>
-#endif
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _SFXITEMSET_HXX //autogen wg. SfxItemSet
#include <svl/itemset.hxx>
-#endif
-#ifndef DBACCESS_SBA_GRID_HRC
#include "sbagrid.hrc"
-#endif
-#ifndef _SFXRNGITEM_HXX
#include <svl/rngitem.hxx>
-#endif
-#ifndef _SFXINTITEM_HXX
#include <svl/intitem.hxx>
-#endif
-#ifndef _SVX_ALGITEM_HXX
#include <svx/algitem.hxx>
-#endif
-#ifndef _SVX_NUMINF_HXX
#include <svx/numinf.hxx>
-#endif
#define _ZFORLIST_DECLARE_TABLE
-#ifndef _SVX_NUMINF_HXX
#include <svx/numinf.hxx>
-#endif
-#ifndef _ZFORLIST_HXX
#include <svl/zforlist.hxx>
-#endif
-#ifndef DBAUI_SBATTRDLG_HXX
#include "dlgattr.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
#include <com/sun/star/container/XChild.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
#include <com/sun/star/util/XNumberFormatter.hpp>
-#endif
-#ifndef _DBU_MISC_HRC_
#include "dbu_misc.hrc"
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef _COM_SUN_STAR_UTIL_NUMBERFORMAT_HPP_
#include <com/sun/star/util/NumberFormat.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_URL_HPP_
#include <com/sun/star/util/URL.hpp>
-#endif
-#ifndef _SV_TOOLBOX_HXX
#include <vcl/toolbox.hxx>
-#endif
-#ifndef _DBAUI_DLGSIZE_HXX
#include "dlgsize.hxx"
-#endif
-#ifndef _SVTOOLS_EDITBROWSEBOX_HXX_
#include <svtools/editbrowsebox.hxx>
-#endif
-#ifndef _UTL_CONFIGMGR_HXX_
#include <unotools/configmgr.hxx>
-#endif
-#ifndef INCLUDED_SVTOOLS_HELPOPT_HXX
#include <svtools/helpopt.hxx>
-#endif
-#ifndef _UCBHELPER_CONTENT_HXX
#include <ucbhelper/content.hxx>
-#endif
-#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _NUMUNO_HXX
#include <svl/numuno.hxx>
-#endif
-#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX
#include <unotools/pathoptions.hxx>
-#endif
-#ifndef SVTOOLS_FILENOTATION_HXX_
#include <svl/filenotation.hxx>
-#endif
-#ifndef _SVT_FILEVIEW_HXX
#include <svtools/fileview.hxx>
-#endif
-#ifndef _CONNECTIVITY_FILE_VALUE_HXX_
#include <connectivity/FValue.hxx>
-#endif
+
+#include <editeng/justifyitem.hxx>
// .........................................................................
namespace dbaui
@@ -330,7 +162,7 @@ SQLExceptionInfo createConnection( const ::rtl::OUString& _rsDataSourceName,
{
xProp.set(_xDatabaseContext->getByName(_rsDataSourceName),UNO_QUERY);
}
- catch(Exception&)
+ catch(const Exception&)
{
}
SQLExceptionInfo aInfo;
@@ -346,7 +178,7 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XPr
SQLExceptionInfo aInfo;
if ( !_xDataSource.is() )
{
- OSL_ENSURE(0,"createConnection: coult not retrieve the data source!");
+ OSL_FAIL("createConnection: coult not retrieve the data source!");
return aInfo;
}
@@ -358,9 +190,9 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XPr
bPwdReq = ::cppu::any2bool(_xDataSource->getPropertyValue(PROPERTY_ISPASSWORDREQUIRED));
_xDataSource->getPropertyValue(PROPERTY_USER) >>= sUser;
}
- catch(Exception&)
+ catch(const Exception&)
{
- OSL_ENSURE(0,"createConnection: error while retrieving data source properties!");
+ OSL_FAIL("createConnection: error while retrieving data source properties!");
}
@@ -371,15 +203,14 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XPr
Reference<XCompletedConnection> xConnectionCompletion(_xDataSource, UNO_QUERY);
if (!xConnectionCompletion.is())
{
- OSL_ENSURE(0,"createConnection: missing an interface ... need an error message here!");
+ OSL_FAIL("createConnection: missing an interface ... need an error message here!");
}
else
{ // instantiate the default SDB interaction handler
Reference< XInteractionHandler > xHandler(_rMF->createInstance(SERVICE_TASK_INTERACTION_HANDLER), UNO_QUERY);
if (!xHandler.is())
{
- OSL_ENSURE(sal_False, "createConnection: could not instantiate an interaction handler!");
- // ShowServiceNotAvailableError(NULL, String(SERVICE_TASK_INTERACTION_HANDLER), sal_True);
+ OSL_FAIL("createConnection: could not instantiate an interaction handler!");
// TODO: a real parent!
}
else
@@ -396,12 +227,10 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XPr
if (xComponent.is() && _rEvtLst.is())
xComponent->addEventListener(_rEvtLst);
}
- catch(SQLContext& e) { aInfo = SQLExceptionInfo(e); }
- catch(SQLWarning& e) { aInfo = SQLExceptionInfo(e); }
- catch(SQLException& e) { aInfo = SQLExceptionInfo(e); }
- catch(Exception&) { OSL_ENSURE(0,"SbaTableQueryBrowser::OnExpandEntry: could not connect - unknown exception!"); }
-
- // showError(aInfo);
+ catch(const SQLContext& e) { aInfo = SQLExceptionInfo(e); }
+ catch(const SQLWarning& e) { aInfo = SQLExceptionInfo(e); }
+ catch(const SQLException& e) { aInfo = SQLExceptionInfo(e); }
+ catch(const Exception&) { OSL_FAIL("SbaTableQueryBrowser::OnExpandEntry: could not connect - unknown exception!"); }
return aInfo;
}
@@ -571,8 +400,7 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo,
&& ( (_bAutoIncrement && aIter->second->bAutoIncrement) || !_bAutoIncrement )
)
{
- OSL_ENSURE(sal_False,
- ( ::rtl::OString("getTypeInfoFromType: assuming column type ")
+ OSL_FAIL(( ::rtl::OString("getTypeInfoFromType: assuming column type ")
+= ::rtl::OString(aIter->second->aTypeName.getStr(), aIter->second->aTypeName.getLength(), gsl_getSystemTextEncoding())
+= ::rtl::OString("\" (expected type name ")
+= ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), gsl_getSystemTextEncoding())
@@ -587,11 +415,6 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo,
// -> drop the precision and the scale restriction, accept any type with the property
// type id (nType)
- //OSL_ENSURE(sal_False,
- // ( ::rtl::OString("getTypeInfoFromType: did not find a matching type")
- // += ::rtl::OString(" (expected type name: ")
- // += ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), gsl_getSystemTextEncoding())
- // += ::rtl::OString(")! Defaulting to the first matching type.")).getStr());
for(aIter = aPair.first; aIter != aPair.second; ++aIter)
{
// search the best matching type (now comparing the local names)
@@ -679,8 +502,8 @@ void fillTypeInfo( const Reference< ::com::sun::star::sdbc::XConnection>& _rxCon
// Information for a single SQL type
if(xRs.is())
{
- static const ::rtl::OUString aB1 = ::rtl::OUString::createFromAscii(" [ ");
- static const ::rtl::OUString aB2 = ::rtl::OUString::createFromAscii(" ]");
+ static const ::rtl::OUString aB1(RTL_CONSTASCII_USTRINGPARAM(" [ "));
+ static const ::rtl::OUString aB2(RTL_CONSTASCII_USTRINGPARAM(" ]"));
Reference<XResultSetMetaData> xResultSetMetaData = Reference<XResultSetMetaDataSupplier>(xRs,UNO_QUERY)->getMetaData();
::connectivity::ORowSetValue aValue;
::std::vector<sal_Int32> aTypes;
@@ -954,7 +777,7 @@ sal_Bool checkDataSourceAvailable(const ::rtl::OUString& _sDataSourceName,const
{
bRet = xDataBaseContext->getByName(_sDataSourceName).hasValue();
}
- catch(Exception)
+ catch(const Exception&)
{
}
}
@@ -972,7 +795,7 @@ sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment)
case SVX_HOR_JUSTIFY_CENTER: nAlignment = ::com::sun::star::awt::TextAlign::CENTER; break;
case SVX_HOR_JUSTIFY_RIGHT: nAlignment = ::com::sun::star::awt::TextAlign::RIGHT; break;
default:
- OSL_ENSURE(0,"Invalid TextAlign!");
+ OSL_FAIL("Invalid TextAlign!");
}
return nAlignment;
}
@@ -986,7 +809,7 @@ SvxCellHorJustify mapTextJustify(const sal_Int32& _nAlignment)
case ::com::sun::star::awt::TextAlign::CENTER : eJustify = SVX_HOR_JUSTIFY_CENTER; break;
case ::com::sun::star::awt::TextAlign::RIGHT : eJustify = SVX_HOR_JUSTIFY_RIGHT; break;
default:
- OSL_ENSURE(0,"Invalid TextAlign!");
+ OSL_FAIL("Invalid TextAlign!");
}
return eJustify;
}
@@ -1014,7 +837,7 @@ float ConvertFontWeight( ::FontWeight eWeight )
else if( eWeight == WEIGHT_BLACK )
return ::com::sun::star::awt::FontWeight::BLACK;
- OSL_ENSURE(0, "Unknown FontWeigth" );
+ OSL_FAIL("Unknown FontWeigth" );
return ::com::sun::star::awt::FontWeight::DONTKNOW;
}
// -----------------------------------------------------------------------------
@@ -1041,7 +864,7 @@ float ConvertFontWidth( ::FontWidth eWidth )
else if( eWidth == WIDTH_ULTRA_EXPANDED )
return ::com::sun::star::awt::FontWidth::ULTRAEXPANDED;
- OSL_ENSURE(0, "Unknown FontWidth" );
+ OSL_FAIL("Unknown FontWidth" );
return ::com::sun::star::awt::FontWidth::DONTKNOW;
}
// -----------------------------------------------------------------------------
@@ -1115,7 +938,7 @@ sal_Bool callColumnFormatDialog(Window* _pParent,
sal_Bool _bHasFormat)
{
sal_Bool bRet = sal_False;
- // the allowed format changes depend of the type of the field ...
+ // the allowed format changes depending on the type of the field ...
_nFlags = TP_ATTR_ALIGN;
if (_bHasFormat)
@@ -1220,7 +1043,7 @@ sal_Bool callColumnFormatDialog(Window* _pParent,
delete pFormatDescriptor;
SfxItemPool::Free(pPool);
- for (sal_uInt16 i=0; i<sizeof(pDefaults)/sizeof(pDefaults[0]); ++i)
+ for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(pDefaults); ++i)
delete pDefaults[i];
return bRet;
@@ -1253,7 +1076,7 @@ sal_Bool appendToFilter(const Reference<XConnection>& _xConnection,
xProp->getPropertyValue(PROPERTY_TABLEFILTER) >>= aFilter;
// first check if we have something like SCHEMA.%
sal_Bool bHasToInsert = sal_True;
- static ::rtl::OUString sPattern = ::rtl::OUString::createFromAscii("%");
+ static ::rtl::OUString sPattern(RTL_CONSTASCII_USTRINGPARAM("%"));
const ::rtl::OUString* pBegin = aFilter.getConstArray();
const ::rtl::OUString* pEnd = pBegin + aFilter.getLength();
for (;pBegin != pEnd; ++pBegin)
@@ -1318,22 +1141,6 @@ void adjustToolBoxSize(ToolBox* _pToolBox)
}
}
// -----------------------------------------------------------------------------
-sal_Bool isHiContrast(Window* _pWindow)
-{
- OSL_ENSURE(_pWindow,"Window must be not null!");
- Window* pIter = _pWindow;
- // while( pIter && pIter->GetBackground().GetColor().GetColor() == COL_TRANSPARENT )
- while( pIter )
- {
- if ( pIter->GetBackground().GetColor().GetColor() == COL_TRANSPARENT )
- pIter = pIter->GetParent();
- else
- break;
- }
- return pIter && pIter->GetSettings().GetStyleSettings().GetHighContrastMode();
-}
-
-// -----------------------------------------------------------------------------
void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId )
{
sal_Int32 nColSize = -1;
@@ -1399,7 +1206,7 @@ void fillAutoIncrementValue(const Reference<XPropertySet>& _xDatasource,
pValue->Value >>= _rsAutoIncrementValue;
pValue =::std::find_if(aInfo.getConstArray(),
aInfo.getConstArray() + aInfo.getLength(),
- ::std::bind2nd(TPropertyValueEqualFunctor(),::rtl::OUString::createFromAscii("IsAutoRetrievingEnabled") ));
+ ::std::bind2nd(TPropertyValueEqualFunctor(),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsAutoRetrievingEnabled")) ));
if ( pValue && pValue != (aInfo.getConstArray() + aInfo.getLength()) )
pValue->Value >>= _rAutoIncrementValueEnabled;
}
@@ -1437,29 +1244,29 @@ void fillAutoIncrementValue(const Reference<XConnection>& _xConnection,
return sName;
}
// -----------------------------------------------------------------------------
- void AppendConfigToken( ::rtl::OUString& _rURL, sal_Bool _bQuestionMark )
- {
- Any aLocale =
- ::utl::ConfigManager::GetConfigManager()->GetDirectConfigProperty( ::utl::ConfigManager::LOCALE );
- ::rtl::OUString sLocaleStr;
- if ( !( aLocale >>= sLocaleStr ) )
- // fallback is english
- sLocaleStr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en"));
-
- // query part exists?
- if ( _bQuestionMark )
- // no, so start with '?'
- _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?"));
- else
- // yes, so only append with '&'
- _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&"));
-
- // set parameters
- _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Language="));
- _rURL += sLocaleStr;
- _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&System="));
- _rURL += SvtHelpOptions().GetSystem();
- }
+void AppendConfigToken( ::rtl::OUString& _rURL, sal_Bool _bQuestionMark )
+{
+ Any aLocale =
+ ::utl::ConfigManager::GetConfigManager().GetDirectConfigProperty( ::utl::ConfigManager::LOCALE );
+ ::rtl::OUString sLocaleStr;
+ if ( !( aLocale >>= sLocaleStr ) )
+ // fallback is english
+ sLocaleStr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en"));
+
+ // query part exists?
+ if ( _bQuestionMark )
+ // no, so start with '?'
+ _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?"));
+ else
+ // yes, so only append with '&'
+ _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&"));
+
+ // set parameters
+ _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Language="));
+ _rURL += sLocaleStr;
+ _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&System="));
+ _rURL += SvtHelpOptions().GetSystem();
+}
namespace
{
@@ -1474,7 +1281,7 @@ namespace
{
::ucbhelper::Content aCnt( INetURLObject( _rURL ).GetMainURL( INetURLObject::NO_DECODE ),
Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
- if ( ( aCnt.getPropertyValue( ::rtl::OUString::createFromAscii( "AnchorName" ) ) >>= sAnchor ) )
+ if ( ( aCnt.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AnchorName")) ) >>= sAnchor ) )
{
if ( sAnchor.getLength() > 0 )
@@ -1632,20 +1439,20 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
break;
default:
;
- } // switch(_nDataType)
+ }
if ( !pTypeInfo )
{
::rtl::OUString sCreate(RTL_CONSTASCII_USTRINGPARAM("x")),sTypeName;
sal_Bool bForce = sal_True;
pTypeInfo = ::dbaui::getTypeInfoFromType(_rTypeInfo,DataType::VARCHAR,sTypeName,sCreate,50,0,sal_False,bForce);
- } // if ( !pTypeInfo )
+ }
OSL_ENSURE(pTypeInfo,"Wrong DataType supplied!");
return pTypeInfo;
}
// -----------------------------------------------------------------------------
sal_Int32 askForUserAction(Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _nText,sal_Bool _bAll,const ::rtl::OUString& _sName)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
String aMsg = String(ModuleRes(_nText));
aMsg.SearchAndReplace(String::CreateFromAscii("%1"),String(_sName));
OSQLMessageBox aAsk(_pParent,String(ModuleRes(_nTitle )),aMsg,WB_YES_NO | WB_DEF_YES,OSQLMessageBox::Query);
@@ -1886,3 +1693,5 @@ Reference< XNumberFormatter > getNumberFormatter(const Reference< XConnection >&
// .........................................................................
} // dbaui
// .........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/UpdateHelperImpl.hxx b/dbaccess/source/ui/misc/UpdateHelperImpl.hxx
index 58a4113db..e6b52dee9 100644
--- a/dbaccess/source/ui/misc/UpdateHelperImpl.hxx
+++ b/dbaccess/source/ui/misc/UpdateHelperImpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -147,3 +148,4 @@ namespace dbaui
#endif // DBAUI_UPDATEHELPERIMPL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx
index b34bf9b4b..de2072630 100644
--- a/dbaccess/source/ui/misc/WCPage.cxx
+++ b/dbaccess/source/ui/misc/WCPage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,57 +32,23 @@
#include "WCPage.hxx"
#include "WCopyTable.hxx"
-#ifndef DBACCESS_SOURCE_UI_MISC_DEFAULTOBJECTNAMECHECK_HXX
#include "defaultobjectnamecheck.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _DBU_MISC_HRC_
#include "dbu_misc.hrc"
-#endif
-#ifndef DBAUI_WIZARD_PAGES_HRC
#include "WizardPages.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_
#include <com/sun/star/sdbc/XResultSet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
#include <com/sun/star/sdb/CommandType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XVIEWSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_COPYTABLEOPERATION_HPP_
#include <com/sun/star/sdb/application/CopyTableOperation.hpp>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
using namespace ::dbaui;
using namespace ::dbtools;
@@ -167,7 +134,7 @@ IMPL_LINK( OCopyTable, AppendDataClickHdl, Button*, /*pButton*/ )
SetAppendDataRadio();
return 0;
}
-//--------dyf ADD
+
void OCopyTable::SetAppendDataRadio()
{
m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,sal_True);
@@ -177,7 +144,6 @@ void OCopyTable::SetAppendDataRadio()
m_pParent->setOperation(CopyTableOperation::AppendData);
}
-//--------add end
//------------------------------------------------------------------------
IMPL_LINK( OCopyTable, RadioChangeHdl, Button*, pButton )
{
@@ -338,7 +304,6 @@ sal_Bool OCopyTable::checkAppendData()
xTables->getByName( m_edTableName.GetText() ) >>= xTable;
ObjectCopySource aTableCopySource( m_pParent->m_xDestConnection, xTable );
m_pParent->loadData( aTableCopySource, m_pParent->m_vDestColumns, m_pParent->m_aDestVec );
- // #90027#
const ODatabaseExport::TColumnVector* pDestColumns = m_pParent->getDestVector();
ODatabaseExport::TColumnVector::const_iterator aDestIter = pDestColumns->begin();
ODatabaseExport::TColumnVector::const_iterator aDestEnd = pDestColumns->end();
@@ -384,7 +349,6 @@ void OCopyTable::setCreatePrimaryKey( bool _bDoCreate, const ::rtl::OUString& _r
}
// -----------------------------------------------------------------------------
-//---dyf add 2006/7/10
void OCopyTable::setCreateStyleAction()
{
// reselect the last action before
@@ -415,4 +379,5 @@ void OCopyTable::setCreateStyleAction()
}
}
}
-//---add end
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index be5d84da3..955fe8054 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,46 +29,21 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_WIZ_COLUMNSELECT_HXX
#include "WColumnSelect.hxx"
-#endif
-#ifndef _DBU_MISC_HRC_
#include "dbu_misc.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef DBAUI_WIZARD_PAGES_HRC
+#include <osl/diagnose.h>
#include "WizardPages.hrc"
-#endif
-#ifndef DBAUI_WIZ_COPYTABLEDIALOG_HXX
#include "WCopyTable.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_APPLICATION_COPYTABLEOPERATION_HPP_
#include <com/sun/star/sdb/application/CopyTableOperation.hpp>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
#include <functional>
+#include <o3tl/compat_functional.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
@@ -150,8 +126,6 @@ void OWizColumnSelect::Reset()
m_lbOrgColumnNames.SetEntryData(nPos,(*aIter)->second);
}
- // m_pParent->clearDestColumns();
-
if(m_lbOrgColumnNames.GetEntryCount())
m_lbOrgColumnNames.SelectEntryPos(0);
@@ -186,7 +160,6 @@ sal_Bool OWizColumnSelect::LeavePage()
{
DBG_CHKTHIS(OWizColumnSelect,NULL);
- // m_pParent->getColumns()->clear();
m_pParent->clearDestColumns();
for(sal_uInt16 i=0 ; i< m_lbNewColumnNames.GetEntryCount();++i)
@@ -364,12 +337,12 @@ void OWizColumnSelect::moveColumn( ListBox* _pRight,
{
// find the new column in the dest name mapping to obtain the old column
OCopyTableWizard::TNameMapping::iterator aIter = ::std::find_if(m_pParent->m_mNameMapping.begin(),m_pParent->m_mNameMapping.end(),
- ::std::compose1(
+ ::o3tl::compose1(
::std::bind2nd(_aCase, _sColumnName),
- ::std::select2nd<OCopyTableWizard::TNameMapping::value_type>())
+ ::o3tl::select2nd<OCopyTableWizard::TNameMapping::value_type>())
);
- DBG_ASSERT(aIter != m_pParent->m_mNameMapping.end(),"Column must be defined");
+ OSL_ENSURE(aIter != m_pParent->m_mNameMapping.end(),"Column must be defined");
if ( aIter == m_pParent->m_mNameMapping.end() )
return; // do nothing
const ODatabaseExport::TColumns* pSrcColumns = m_pParent->getSourceColumns();
@@ -414,12 +387,12 @@ sal_uInt16 OWizColumnSelect::adjustColumnPosition( ListBox* _pLeft,
{
// find the new column in the dest name mapping to obtain the old column
OCopyTableWizard::TNameMapping::iterator aIter = ::std::find_if(m_pParent->m_mNameMapping.begin(),m_pParent->m_mNameMapping.end(),
- ::std::compose1(
+ ::o3tl::compose1(
::std::bind2nd(_aCase, sColumnString),
- ::std::select2nd<OCopyTableWizard::TNameMapping::value_type>())
+ ::o3tl::select2nd<OCopyTableWizard::TNameMapping::value_type>())
);
- DBG_ASSERT(aIter != m_pParent->m_mNameMapping.end(),"Column must be defined");
+ OSL_ENSURE(aIter != m_pParent->m_mNameMapping.end(),"Column must be defined");
const ODatabaseExport::TColumns* pSrcColumns = m_pParent->getSourceColumns();
ODatabaseExport::TColumns::const_iterator aSrcIter = pSrcColumns->find((*aIter).first);
if ( aSrcIter != pSrcColumns->end() )
@@ -450,3 +423,4 @@ void OWizColumnSelect::enableButtons()
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 707f3b990..397b79cfe 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,6 +75,7 @@
#include <vcl/waitobj.hxx>
#include <functional>
+#include <o3tl/compat_functional.hxx>
using namespace ::dbaui;
using namespace ::com::sun::star::uno;
@@ -151,7 +153,7 @@ bool ObjectCopySource::isView() const
{
::rtl::OUString sObjectType;
OSL_VERIFY( m_xObject->getPropertyValue( PROPERTY_TYPE ) >>= sObjectType );
- bIsView = sObjectType.equalsAscii( "VIEW" );
+ bIsView = sObjectType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VIEW" ) );
}
}
catch( const Exception& )
@@ -167,7 +169,7 @@ void ObjectCopySource::copyUISettingsTo( const Reference< XPropertySet >& _rxObj
const ::rtl::OUString aCopyProperties[] = {
PROPERTY_FONT, PROPERTY_ROW_HEIGHT, PROPERTY_TEXTCOLOR,PROPERTY_TEXTLINECOLOR,PROPERTY_TEXTEMPHASIS,PROPERTY_TEXTRELIEF
};
- for ( size_t i=0; i < sizeof( aCopyProperties ) / sizeof( aCopyProperties[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS( aCopyProperties ); ++i )
{
if ( m_xObjectPSI->hasPropertyByName( aCopyProperties[i] ) )
_rxObject->setPropertyValue( aCopyProperties[i], m_xObject->getPropertyValue( aCopyProperties[i] ) );
@@ -194,7 +196,7 @@ void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _
sStatement += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE 0=1"));
- for ( i=0; i < sizeof( aProperties ) / sizeof( aProperties[0] ); ++i )
+ for ( i=0; i < SAL_N_ELEMENTS( aProperties ); ++i )
{
if ( m_xObjectPSI->hasPropertyByName( aProperties[i].first ) )
{
@@ -329,7 +331,7 @@ bool NamedTableCopySource::isView() const
{
DBG_UNHANDLED_EXCEPTION();
}
- return sTableType.equalsAscii( "VIEW" );
+ return sTableType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VIEW" ) );
}
//------------------------------------------------------------------------
@@ -478,14 +480,14 @@ const DummyCopySource& DummyCopySource::Instance()
//------------------------------------------------------------------------
::rtl::OUString DummyCopySource::getQualifiedObjectName() const
{
- OSL_ENSURE( false, "DummyCopySource::getQualifiedObjectName: not to be called!" );
+ OSL_FAIL( "DummyCopySource::getQualifiedObjectName: not to be called!" );
return ::rtl::OUString();
}
//------------------------------------------------------------------------
bool DummyCopySource::isView() const
{
- OSL_ENSURE( false, "DummyCopySource::isView: not to be called!" );
+ OSL_FAIL( "DummyCopySource::isView: not to be called!" );
return false;
}
@@ -507,27 +509,27 @@ Sequence< ::rtl::OUString > DummyCopySource::getColumnNames() const
//------------------------------------------------------------------------
Sequence< ::rtl::OUString > DummyCopySource::getPrimaryKeyColumnNames() const
{
- OSL_ENSURE( false, "DummyCopySource::getPrimaryKeyColumnNames: not to be called!" );
+ OSL_FAIL( "DummyCopySource::getPrimaryKeyColumnNames: not to be called!" );
return Sequence< ::rtl::OUString >();
}
//------------------------------------------------------------------------
OFieldDescription* DummyCopySource::createFieldDescription( const ::rtl::OUString& /*_rColumnName*/ ) const
{
- OSL_ENSURE( false, "DummyCopySource::createFieldDescription: not to be called!" );
+ OSL_FAIL( "DummyCopySource::createFieldDescription: not to be called!" );
return NULL;
}
//------------------------------------------------------------------------
::rtl::OUString DummyCopySource::getSelectStatement() const
{
- OSL_ENSURE( false, "DummyCopySource::getSelectStatement: not to be called!" );
+ OSL_FAIL( "DummyCopySource::getSelectStatement: not to be called!" );
return ::rtl::OUString();
}
//------------------------------------------------------------------------
::utl::SharedUNOComponent< XPreparedStatement > DummyCopySource::getPreparedSelectStatement() const
{
- OSL_ENSURE( false, "DummyCopySource::getPreparedSelectStatement: not to be called!" );
+ OSL_FAIL( "DummyCopySource::getPreparedSelectStatement: not to be called!" );
return ::utl::SharedUNOComponent< XPreparedStatement >();
}
@@ -615,8 +617,7 @@ OCopyTableWizard::OCopyTableWizard( Window * pParent, const ::rtl::OUString& _rD
impl_loadSourceData();
bool bAllowViews = true;
- // if the source is a, don't allow creating views #100644# (oj)
- // (fs: Hmm? A SELECT * FROM <view> would be created, where #100644# claims this is nonsense. Why?
+ // if the source is a, don't allow creating views
if ( m_rSourceObject.isView() )
bAllowViews = false;
// no views if the target connection does not support creating them
@@ -930,7 +931,7 @@ IMPL_LINK( OCopyTableWizard, ImplOKHdl, OKButton*, EMPTYARG )
if ( supportsPrimaryKey() )
{
ODatabaseExport::TColumns::iterator aFind = ::std::find_if(m_vDestColumns.begin(),m_vDestColumns.end()
- ,::std::compose1(::std::mem_fun(&OFieldDescription::IsPrimaryKey),::std::select2nd<ODatabaseExport::TColumns::value_type>()));
+ ,::o3tl::compose1(::std::mem_fun(&OFieldDescription::IsPrimaryKey),::o3tl::select2nd<ODatabaseExport::TColumns::value_type>()));
if ( aFind == m_vDestColumns.end() && m_xInteractionHandler.is() )
{
@@ -973,7 +974,7 @@ IMPL_LINK( OCopyTableWizard, ImplOKHdl, OKButton*, EMPTYARG )
break;
default:
{
- OSL_ENSURE(sal_False, "OCopyTableWizard::ImplOKHdl: invalid creation style!");
+ OSL_FAIL("OCopyTableWizard::ImplOKHdl: invalid creation style!");
}
}
@@ -1024,7 +1025,7 @@ IMPL_LINK( OCopyTableWizard, ImplActivateHdl, WizardDialog*, EMPTYARG )
void OCopyTableWizard::CheckButtons()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OCopyTableWizard::CheckButtons" );
- if(GetCurLevel() == 0) // erste Seite hat kein PrevButton
+ if(GetCurLevel() == 0) // the first page has no back button
{
if(m_nPageCount > 1)
m_pbNext.Enable(sal_True);
@@ -1033,7 +1034,7 @@ void OCopyTableWizard::CheckButtons()
m_pbPrev.Enable(sal_False);
}
- else if(GetCurLevel() == m_nPageCount-1) // letzte Seite hat keinen Next Button
+ else if(GetCurLevel() == m_nPageCount-1) // the last page has no next button
{
m_pbNext.Enable(sal_False);
m_pbPrev.Enable(sal_True);
@@ -1041,14 +1042,13 @@ void OCopyTableWizard::CheckButtons()
else
{
m_pbPrev.Enable(sal_True);
- // next has already his state
+ // next already has its state
}
}
// -----------------------------------------------------------------------
void OCopyTableWizard::EnableButton(Wizard_Button_Style eStyle,sal_Bool bEnable)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OCopyTableWizard::EnableButton" );
-// CheckButtons();
Button* pButton;
if(eStyle == WIZARD_NEXT)
pButton = &m_pbNext;
@@ -1229,7 +1229,7 @@ void OCopyTableWizard::appendColumns( Reference<XColumnsSupplier>& _rxColSup, co
}
else
{
- OSL_ENSURE(sal_False, "OCopyTableWizard::appendColumns: invalid field name!");
+ OSL_FAIL("OCopyTableWizard::appendColumns: invalid field name!");
}
}
@@ -1376,8 +1376,8 @@ Reference< XPropertySet > OCopyTableWizard::createTable()
ODatabaseExport::TPositions::iterator aPosFind = ::std::find_if(
m_vColumnPos.begin(),
m_vColumnPos.end(),
- ::std::compose1( ::std::bind2nd( ::std::equal_to< sal_Int32 >(), nPos ),
- ::std::select1st< ODatabaseExport::TPositions::value_type >()
+ ::o3tl::compose1( ::std::bind2nd( ::std::equal_to< sal_Int32 >(), nPos ),
+ ::o3tl::select1st< ODatabaseExport::TPositions::value_type >()
)
);
@@ -1690,3 +1690,4 @@ void OCopyTableWizard::showError(const Any& _aError)
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WExtendPages.cxx b/dbaccess/source/ui/misc/WExtendPages.cxx
index bb385ef38..3c9e2f477 100644
--- a/dbaccess/source/ui/misc/WExtendPages.cxx
+++ b/dbaccess/source/ui/misc/WExtendPages.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,18 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_WIZ_EXTENDPAGES_HXX
#include "WExtendPages.hxx"
-#endif
-#ifndef DBAUI_RTFREADER_HXX
#include "RtfReader.hxx"
-#endif
-#ifndef DBAUI_HTMLREADER_HXX
#include "HtmlReader.hxx"
-#endif
-#ifndef DBAUI_WIZ_COPYTABLEDIALOG_HXX
#include "WCopyTable.hxx"
-#endif
using namespace dbaui;
//========================================================================
@@ -90,3 +83,4 @@ SvParser* OWizNormalExtend::createReader(sal_Int32 /*_nRows*/)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 470721969..3b37a3d7f 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,36 +28,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_WIZ_NAMEMATCHING_HXX
#include "WNameMatch.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
+#include <osl/diagnose.h>
#include "FieldDescriptions.hxx"
-#endif
-#ifndef DBAUI_WIZ_COPYTABLEDIALOG_HXX
#include "WCopyTable.hxx"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _DBU_MISC_HRC_
#include "dbu_misc.hrc"
-#endif
-#ifndef DBAUI_WIZARD_PAGES_HRC
#include "WizardPages.hrc"
-#endif
-#ifndef _SV_SCRBAR_HXX
#include <vcl/scrbar.hxx>
-#endif
-#ifndef DBAUI_WIZ_COPYTABLEDIALOG_HXX
#include "WCopyTable.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
using namespace ::dbaui;
//========================================================================
@@ -100,12 +81,6 @@ OWizNameMatching::OWizNameMatching( Window* pParent)
m_sDestText = m_FT_TABLE_RIGHT.GetText();
m_sDestText.AppendAscii("\n");
- // set hiContrast
- m_ibColumn_up.SetModeImage(ModuleRes(IMG_SORTUP_H),BMP_COLOR_HIGHCONTRAST);
- m_ibColumn_down.SetModeImage(ModuleRes(IMG_SORTDOWN_H),BMP_COLOR_HIGHCONTRAST);
- m_ibColumn_up_right.SetModeImage(ModuleRes(IMG_SORTUP_H),BMP_COLOR_HIGHCONTRAST);
- m_ibColumn_down_right.SetModeImage(ModuleRes(IMG_SORTDOWN_H),BMP_COLOR_HIGHCONTRAST);
-
FreeResource();
}
// -----------------------------------------------------------------------
@@ -126,11 +101,10 @@ void OWizNameMatching::Reset()
m_CTRL_RIGHT.SetEntryHeight(m_CTRL_LEFT.GetEntryHeight());
m_CTRL_RIGHT.SetIndent(m_CTRL_LEFT.GetIndent());
m_CTRL_RIGHT.SetSpaceBetweenEntries(m_CTRL_LEFT.GetSpaceBetweenEntries());
-
+
m_bFirstTime = sal_False;
}
-
- // m_CTRL_LEFT.Clear();
+
}
// -----------------------------------------------------------------------
void OWizNameMatching::ActivatePage( )
@@ -140,7 +114,7 @@ void OWizNameMatching::ActivatePage( )
// set source table name
String aName = m_sSourceText;
aName += String(m_pParent->m_sSourceName);
-
+
m_FT_TABLE_LEFT.SetText(aName);
// set dest table name
@@ -148,7 +122,7 @@ void OWizNameMatching::ActivatePage( )
aName += String(m_pParent->m_sName);
m_FT_TABLE_RIGHT.SetText(aName);
-
+
m_CTRL_LEFT.FillListBox(*m_pParent->getSrcVector());
m_CTRL_RIGHT.FillListBox(*m_pParent->getDestVector());
@@ -157,7 +131,7 @@ void OWizNameMatching::ActivatePage( )
m_ibColumn_up_right.Enable( m_CTRL_RIGHT.GetEntryCount() > 1 );
m_ibColumn_down_right.Enable( m_CTRL_RIGHT.GetEntryCount() > 1 );
-
+
m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,sal_False);
m_CTRL_LEFT.GrabFocus();
@@ -168,20 +142,20 @@ sal_Bool OWizNameMatching::LeavePage()
DBG_CHKTHIS(OWizNameMatching,NULL);
const ODatabaseExport::TColumnVector* pSrcColumns = m_pParent->getSrcVector();
-
+
m_pParent->m_vColumnPos.clear();
m_pParent->m_vColumnTypes.clear();
m_pParent->m_vColumnPos.resize( pSrcColumns->size(), ODatabaseExport::TPositions::value_type( COLUMN_POSITION_NOT_FOUND, COLUMN_POSITION_NOT_FOUND ) );
m_pParent->m_vColumnTypes.resize( pSrcColumns->size(), COLUMN_POSITION_NOT_FOUND );
-
+
sal_Int32 nParamPos = 0;
SvLBoxEntry* pLeftEntry = m_CTRL_LEFT.GetModel()->First();
SvLBoxEntry* pRightEntry = m_CTRL_RIGHT.GetModel()->First();
while(pLeftEntry && pRightEntry)
{
OFieldDescription* pSrcField = static_cast<OFieldDescription*>(pLeftEntry->GetUserData());
- DBG_ASSERT(pSrcField,"OWizNameMatching: OColumn can not be null!");
+ OSL_ENSURE(pSrcField,"OWizNameMatching: OColumn can not be null!");
ODatabaseExport::TColumnVector::const_iterator aSrcIter = pSrcColumns->begin();
ODatabaseExport::TColumnVector::const_iterator aSrcEnd = pSrcColumns->end();
@@ -189,11 +163,10 @@ sal_Bool OWizNameMatching::LeavePage()
;
const sal_Int32 nPos = ::std::distance(pSrcColumns->begin(),aSrcIter);
- // sal_Int32 nPos = m_CTRL_LEFT.GetModel()->GetAbsPos(pLeftEntry);
if(m_CTRL_LEFT.GetCheckButtonState(pLeftEntry) == SV_BUTTON_CHECKED)
{
OFieldDescription* pDestField = static_cast<OFieldDescription*>(pRightEntry->GetUserData());
- DBG_ASSERT(pDestField,"OWizNameMatching: OColumn can not be null!");
+ OSL_ENSURE(pDestField,"OWizNameMatching: OColumn can not be null!");
const ODatabaseExport::TColumnVector* pDestColumns = m_pParent->getDestVector();
ODatabaseExport::TColumnVector::const_iterator aDestIter = pDestColumns->begin();
ODatabaseExport::TColumnVector::const_iterator aDestEnd = pDestColumns->end();
@@ -247,7 +220,6 @@ IMPL_LINK( OWizNameMatching, ButtonClickHdl, Button *, pButton )
if(pButton == &m_ibColumn_down && (nThumbPos+nVisibleSize+1) < nPos)
{
m_CTRL_LEFT.GetVScroll()->DoScrollAction(SCROLL_LINEDOWN);
- // m_CTRL_LEFT.MakeVisible(pEntry,sal_True);
}
TableListClickHdl(&m_CTRL_LEFT);
@@ -376,18 +348,7 @@ public:
}
virtual void Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry);
- //virtual void InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData);
};
-
-
-
-//------------------------------------------------------------------------
-/*
-void OColumnString::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData)
-{
- SvLBoxString::InitViewData(pView,pEntry,pViewData);
-}
-*/
//------------------------------------------------------------------------
void OColumnString::Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 /*nFlags*/, SvLBoxEntry* /*pEntry*/ )
{
@@ -448,3 +409,4 @@ void OColumnTreeBox::FillListBox( const ODatabaseExport::TColumnVector& _rList)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index a92767170..69be5ac02 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,48 +28,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_WIZ_TYPESELECT_HXX
#include "WTypeSelect.hxx"
-#endif
-#ifndef DBAUI_WIZARD_PAGES_HRC
#include "WizardPages.hrc"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
+#include <osl/diagnose.h>
#include "FieldDescriptions.hxx"
-#endif
-#ifndef DBAUI_WIZ_COPYTABLEDIALOG_HXX
#include "WCopyTable.hxx"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _DBU_MISC_HRC_
#include "dbu_misc.hrc"
-#endif
-#ifndef _STREAM_HXX
#include <tools/stream.hxx>
-#endif
-#ifndef _SVPARSER_HXX
#include <svtools/svparser.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef DBAUI_FIELDCONTROLS_HXX
#include "FieldControls.hxx"
-#endif
#include "dbaccess_slotid.hrc"
@@ -78,7 +51,6 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::sdbc;
-// using namespace ::com::sun::star::sdbcx;
//========================================================================
// OWizTypeSelectControl
@@ -127,7 +99,7 @@ void OWizTypeSelectControl::DeactivateAggregate( EControlType eType )
// -----------------------------------------------------------------------
void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
{
- DBG_ASSERT(nRow == -1,"nRow muss -1 sein!");
+ OSL_ENSURE(nRow == -1,"nRow muss -1 sein!");
(void)nRow;
MultiListBox &aListBox = ((OWizTypeSelect*)GetParent())->m_lbColumnNames;
@@ -275,7 +247,7 @@ OWizTypeSelect::OWizTypeSelect( Window* pParent, SvStream* _pStream )
DBG_CTOR(OWizTypeSelect,NULL);
m_lbColumnNames.SetSelectHdl(LINK(this,OWizTypeSelect,ColumnSelectHdl));
- ModuleRes aModuleRes(isHiContrast(&m_lbColumnNames) ? IMG_JOINS_H : IMG_JOINS);
+ ModuleRes aModuleRes(IMG_JOINS);
ImageList aImageList(aModuleRes);
m_imgPKey = aImageList.GetImage(IMG_PRIMARY_KEY);
@@ -493,7 +465,7 @@ void OWizTypeSelect::fillColumnList(sal_uInt32 nRows)
DBG_CHKTHIS(OWizTypeSelect,NULL);
if(m_pParserStream)
{
- sal_uInt32 nTell = m_pParserStream->Tell(); // verändert vielleicht die Position des Streams
+ sal_uInt32 nTell = m_pParserStream->Tell(); // might change seek position of stream
SvParser *pReader = createReader(nRows);
if(pReader)
@@ -508,3 +480,4 @@ void OWizTypeSelect::fillColumnList(sal_uInt32 nRows)
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WizardPages.src b/dbaccess/source/ui/misc/WizardPages.src
index 21f479344..9910a99d9 100644
--- a/dbaccess/source/ui/misc/WizardPages.src
+++ b/dbaccess/source/ui/misc/WizardPages.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -72,7 +72,6 @@ ModalDialog WIZ_RTFCOPYTABLE
Text [ en-US ] = "Copy RTF Table" ;
-
OutputSize = TRUE ;
SVLook = TRUE ;
Moveable = TRUE ;
@@ -127,11 +126,10 @@ TabPage TAB_WIZ_COLUMN_SELECT
FixedLine FL_COLUMN_SELECT
{
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( WINDOW_SIZE_X - 12 , 8 ) ;
- Text [ en-US ] = "Existing columns" ;
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( WINDOW_SIZE_X - 12 , 8 ) ;
+ Text [ en-US ] = "Existing columns" ;
};
-
MultiListBox LB_ORG_COLUMN_NAMES
{
HelpID = "dbaccess:MultiListBox:TAB_WIZ_COLUMN_SELECT:LB_ORG_COLUMN_NAMES";
@@ -155,7 +153,7 @@ TabPage TAB_WIZ_COLUMN_SELECT
{
ImageBitmap = Bitmap
{
- File = "one_right.bmp" ;
+ File = "one_right.png" ;
};
MaskColor = Color
{
@@ -176,7 +174,7 @@ TabPage TAB_WIZ_COLUMN_SELECT
{
ImageBitmap = Bitmap
{
- File = "all_right.bmp" ;
+ File = "all_right.png" ;
};
MaskColor = Color
{
@@ -196,7 +194,7 @@ TabPage TAB_WIZ_COLUMN_SELECT
{
ImageBitmap = Bitmap
{
- File = "one_left.bmp" ;
+ File = "one_left.png1" ;
};
MaskColor = Color
{
@@ -216,7 +214,7 @@ TabPage TAB_WIZ_COLUMN_SELECT
{
ImageBitmap = Bitmap
{
- File = "all_left.bmp" ;
+ File = "all_left.png" ;
};
MaskColor = Color
{
@@ -328,6 +326,7 @@ Menu RID_SBA_RTF_PKEYPOPUP
};
};
};
+
//==================================================================
// TAB_WIZ_NAME_MATCHING
//==================================================================
@@ -384,7 +383,7 @@ TabPage TAB_WIZ_NAME_MATCHING
{
ImageBitmap = Bitmap
{
- File = "sortup.bmp" ;
+ File = "sortup.png" ;
};
MaskColor = Color
{
@@ -404,7 +403,7 @@ TabPage TAB_WIZ_NAME_MATCHING
{
ImageBitmap = Bitmap
{
- File = "sortdown.bmp" ;
+ File = "sortdown.png" ;
};
MaskColor = Color
{
@@ -425,7 +424,7 @@ TabPage TAB_WIZ_NAME_MATCHING
{
ImageBitmap = Bitmap
{
- File = "sortup.bmp" ;
+ File = "sortup.png" ;
};
MaskColor = Color
{
@@ -445,7 +444,7 @@ TabPage TAB_WIZ_NAME_MATCHING
{
ImageBitmap = Bitmap
{
- File = "sortdown.bmp" ;
+ File = "sortdown.png" ;
};
MaskColor = Color
{
@@ -474,6 +473,7 @@ TabPage TAB_WIZ_NAME_MATCHING
Text [ en-US ] = "Non~e" ;
};
};
+
TabPage TAB_WIZ_COPYTABLE
{
SVLook = TRUE ;
@@ -590,69 +590,3 @@ String STR_INVALID_TABLE_NAME_LENGTH
{
Text [ en-US ] = "Please change the table name. It is too long.";
};
-
-Image IMG_SORTUP_H
-{
- ImageBitmap = Bitmap
- {
- File = "sortup_h.bmp" ;
- };
- MaskColor = Color
- {
- Red = 0xFFFF ;
- Green = 0x0000 ;
- Blue = 0xFFFF ;
- };
-};
-
-Image IMG_SORTDOWN_H
-{
- ImageBitmap = Bitmap
- {
- File = "sortdown_h.bmp" ;
- };
- MaskColor = Color
- {
- Red = 0xFFFF ;
- Green = 0x0000 ;
- Blue = 0xFFFF ;
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dbaccess/source/ui/misc/asyncmodaldialog.cxx b/dbaccess/source/ui/misc/asyncmodaldialog.cxx
index cb779d728..f0f03f99b 100644
--- a/dbaccess/source/ui/misc/asyncmodaldialog.cxx
+++ b/dbaccess/source/ui/misc/asyncmodaldialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,22 +29,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBACCESS_ASYNCMODALDIALOG_HXX
#include "asyncmodaldialog.hxx"
-#endif
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HPP_
#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#endif
/** === end UNO includes === **/
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
//........................................................................
namespace dbaui
@@ -119,3 +112,4 @@ namespace dbaui
} // namespace dbaui
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/charsets.cxx b/dbaccess/source/ui/misc/charsets.cxx
index 9cea43d8c..ed7e6939e 100644
--- a/dbaccess/source/ui/misc/charsets.cxx
+++ b/dbaccess/source/ui/misc/charsets.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,24 +29,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_CHARSETS_HXX_
#include "charsets.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef _DBU_MISC_HRC_
+#include <osl/diagnose.h>
#include "dbu_misc.hrc"
-#endif
-#ifndef _RTL_TENCINFO_H
#include <rtl/tencinfo.h>
-#endif
-#ifndef _TOOLS_RCID_H
#include <tools/rcid.h>
-#endif
-#ifndef _DBAUI_LOCALRESACCESS_HXX_
#include "localresaccess.hxx"
-#endif
//.........................................................................
namespace dbaui
@@ -133,7 +122,7 @@ namespace dbaui
:CharsetDisplayDerefHelper_Base(_rBase)
,m_sDisplayName(_rDisplayName)
{
- DBG_ASSERT( m_sDisplayName.getLength(), "CharsetDisplayDerefHelper::CharsetDisplayDerefHelper: invalid display name!" );
+ OSL_ENSURE( m_sDisplayName.getLength(), "CharsetDisplayDerefHelper::CharsetDisplayDerefHelper: invalid display name!" );
}
//=========================================================================
@@ -144,7 +133,7 @@ namespace dbaui
:m_pContainer(_pContainer)
,m_aPosition(_rPosition)
{
- DBG_ASSERT(m_pContainer, "OCharsetDisplay::ExtendedCharsetIterator::ExtendedCharsetIterator : invalid container!");
+ OSL_ENSURE(m_pContainer, "OCharsetDisplay::ExtendedCharsetIterator::ExtendedCharsetIterator : invalid container!");
}
//-------------------------------------------------------------------------
@@ -157,7 +146,7 @@ namespace dbaui
//-------------------------------------------------------------------------
CharsetDisplayDerefHelper OCharsetDisplay::ExtendedCharsetIterator::operator*() const
{
- DBG_ASSERT( m_aPosition != m_pContainer->OCharsetDisplay_Base::end(), "OCharsetDisplay::ExtendedCharsetIterator::operator* : invalid position!");
+ OSL_ENSURE( m_aPosition != m_pContainer->OCharsetDisplay_Base::end(), "OCharsetDisplay::ExtendedCharsetIterator::operator* : invalid position!");
rtl_TextEncoding eEncoding = (*m_aPosition).getEncoding();
return CharsetDisplayDerefHelper(
@@ -169,7 +158,7 @@ namespace dbaui
//-------------------------------------------------------------------------
const OCharsetDisplay::ExtendedCharsetIterator& OCharsetDisplay::ExtendedCharsetIterator::operator++()
{
- DBG_ASSERT( m_aPosition != m_pContainer->OCharsetDisplay_Base::end(), "OCharsetDisplay::ExtendedCharsetIterator::operator++ : invalid position!");
+ OSL_ENSURE( m_aPosition != m_pContainer->OCharsetDisplay_Base::end(), "OCharsetDisplay::ExtendedCharsetIterator::operator++ : invalid position!");
if ( m_aPosition != m_pContainer->OCharsetDisplay_Base::end() )
++m_aPosition;
return *this;
@@ -178,7 +167,7 @@ namespace dbaui
//-------------------------------------------------------------------------
const OCharsetDisplay::ExtendedCharsetIterator& OCharsetDisplay::ExtendedCharsetIterator::operator--()
{
- DBG_ASSERT( m_aPosition != m_pContainer->OCharsetDisplay_Base::begin(), "OCharsetDisplay::ExtendedCharsetIterator::operator-- : invalid position!");
+ OSL_ENSURE( m_aPosition != m_pContainer->OCharsetDisplay_Base::begin(), "OCharsetDisplay::ExtendedCharsetIterator::operator-- : invalid position!");
if ( m_aPosition != m_pContainer->OCharsetDisplay_Base::begin() )
--m_aPosition;
return *this;
@@ -194,3 +183,4 @@ namespace dbaui
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/controllerframe.cxx b/dbaccess/source/ui/misc/controllerframe.cxx
index a8e716f0a..0f7006712 100644
--- a/dbaccess/source/ui/misc/controllerframe.cxx
+++ b/dbaccess/source/ui/misc/controllerframe.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -238,7 +239,7 @@ namespace dbaui
{
if ( _rData.m_xDocEventBroadcaster.is() )
{
- ::rtl::OUString sEventName( ::rtl::OUString::createFromAscii( _bActive ? "OnFocus" : "OnUnfocus" ) );
+ ::rtl::OUString sEventName = _bActive ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OnFocus")) : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OnUnfocus"));
Reference< XController2 > xController( _rData.m_rController.getXController(), UNO_QUERY_THROW );
_rData.m_xDocEventBroadcaster->notifyDocumentEvent( sEventName, xController, Any() );
}
@@ -297,11 +298,6 @@ namespace dbaui
const Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow );
ENSURE_OR_THROW( pContainerWindow, "no Window implementation for the frame's container window!" );
- /*const Window* pContainerParentWindow = pContainerWindow->GetParent();
- if ( pContainerParentWindow && ( pContainerParentWindow->GetType() == WINDOW_BORDERWINDOW ) )
- pContainerParentWindow = pContainerParentWindow->GetParent();
- m_pData->m_bIsTopLevelDocumentWindow = ( pContainerParentWindow == NULL );*/
-
m_pData->m_bIsTopLevelDocumentWindow = ( pContainerWindow->GetExtendedStyle() & WB_EXT_DOCUMENT ) != 0;
}
@@ -444,3 +440,5 @@ namespace dbaui
//........................................................................
} // namespace dbaui
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/databaseobjectview.cxx b/dbaccess/source/ui/misc/databaseobjectview.cxx
index 92fd3dbbc..b5a86c9b6 100644
--- a/dbaccess/source/ui/misc/databaseobjectview.cxx
+++ b/dbaccess/source/ui/misc/databaseobjectview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -130,16 +131,16 @@ namespace dbaui
// if we have no externally provided frame, create one
if ( !m_xFrameLoader.is() )
{
- Reference< XSingleServiceFactory > xFact(m_xORB->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.TaskCreator")), UNO_QUERY_THROW);
+ Reference< XSingleServiceFactory > xFact(m_xORB->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.TaskCreator"))), UNO_QUERY_THROW);
Sequence< Any > lArgs(2);
NamedValue aProp;
sal_Int32 nArg = 0;
- aProp.Name = ::rtl::OUString::createFromAscii("ParentFrame");
+ aProp.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentFrame"));
aProp.Value <<= m_xParentFrame;
lArgs[nArg++] <<= aProp;
- aProp.Name = ::rtl::OUString::createFromAscii("TopWindow");
+ aProp.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TopWindow"));
aProp.Value <<= sal_True;
lArgs[nArg++] <<= aProp;
@@ -339,3 +340,4 @@ namespace dbaui
} // namespace dbaui
// .........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/datasourceconnector.cxx b/dbaccess/source/ui/misc/datasourceconnector.cxx
index ef0fa05bb..7156a7ddd 100644
--- a/dbaccess/source/ui/misc/datasourceconnector.cxx
+++ b/dbaccess/source/ui/misc/datasourceconnector.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,72 +29,28 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_DATASOURCECONNECTOR_HXX_
#include "datasourceconnector.hxx"
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XWARNINGSSUPPLIER_HPP_
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XCOMPLETEDCONNECTION_HPP_
#include <com/sun/star/sdb/XCompletedConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_
#include <com/sun/star/task/XInteractionHandler.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
#include <com/sun/star/frame/XModel.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_SQLWARNING_HPP_
#include <com/sun/star/sdbc/SQLWarning.hpp>
-#endif
-#ifndef _OSL_THREAD_H_
#include <osl/thread.h>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef COMPHELPER_NAMEDVALUECOLLECTION_HXX
#include <comphelper/namedvaluecollection.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_
#include <com/sun/star/sdbc/XDataSource.hpp>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _VCL_STDTEXT_HXX
#include <vcl/stdtext.hxx>
-#endif
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
-#ifndef SVTOOLS_FILENOTATION_HXX
#include <svl/filenotation.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
-#ifndef _DBU_MISC_HRC_
#include "dbu_misc.hrc"
-#endif
#include "moduledbu.hxx"
//.........................................................................
@@ -275,3 +232,4 @@ namespace dbaui
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/dbaundomanager.cxx b/dbaccess/source/ui/misc/dbaundomanager.cxx
index e142d77a1..fe9b349ce 100755..100644
--- a/dbaccess/source/ui/misc/dbaundomanager.cxx
+++ b/dbaccess/source/ui/misc/dbaundomanager.cxx
@@ -34,7 +34,6 @@
#include <svl/undo.hxx>
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
#include <framework/undomanagerhelper.hxx>
//......................................................................................................................
@@ -263,7 +262,7 @@ namespace dbaui
//------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::undo( ) throw (EmptyUndoStackException, UndoContextNotClosedException, UndoFailedException, RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
// (all our UndoActions work directly on VCL code, usually, so ...)
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->aUndoHelper.undo( aGuard );
@@ -272,7 +271,7 @@ namespace dbaui
//------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManager::redo( ) throw (EmptyUndoStackException, UndoContextNotClosedException, UndoFailedException, RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
// (all our UndoActions work directly on VCL code, usually, so ...)
UndoManagerMethodGuard aGuard( *m_pImpl );
m_pImpl->aUndoHelper.redo( aGuard );
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index 39c1603f6..a2beff675 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -308,7 +308,7 @@ namespace dbaui
if(xSupplier.is())
{
m_pImpl->m_xFormatter = Reference< XNumberFormatter >(getORB()
- ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatter")), UNO_QUERY);
+ ->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!");
diff --git a/dbaccess/source/ui/misc/dbumiscres.src b/dbaccess/source/ui/misc/dbumiscres.src
index 4d191adef..974b36e68 100644
--- a/dbaccess/source/ui/misc/dbumiscres.src
+++ b/dbaccess/source/ui/misc/dbumiscres.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -61,17 +61,16 @@ String STR_MISSING_TABLES_XDROP
String STR_BUTTON_TEXT_ALL
{
Text [ en-US ] = "~All";
-
};
String STR_UNDO_COLON
{
- Text [ en-US ] = "Undo:";
+ Text [ en-US ] = "Undo:";
};
String STR_REDO_COLON
{
- Text [ en-US ] = "Redo:";
+ Text [ en-US ] = "Redo:";
};
String STR_UNKNOWN_TYPE_FOUND
@@ -93,6 +92,7 @@ String STR_NAMED_OBJECT_ALREADY_EXISTS
{
Text [ en-US ] = "The name '$#$' already exists.\nPlease enter another name." ;
};
+
String RID_STR_EXTENSION_NOT_PRESENT
{
// #i96130# use hard coded name
diff --git a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
index 8f59b9d51..18974ecec 100644
--- a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
+++ b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,56 +29,28 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBACCESS_SOURCE_UI_MISC_DEFAULTOBJECTNAMECHECK_HXX
#include "defaultobjectnamecheck.hxx"
-#endif
-#ifndef _DBU_MISC_HRC_
#include "dbu_misc.hrc"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HPP_
#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XQUERIESSUPPLIER_HPP_
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
#include <com/sun/star/sdb/CommandType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_TOOLS_XCONNECTIONTOOLS_HPP_
#include <com/sun/star/sdb/tools/XConnectionTools.hpp>
-#endif
/** === end UNO includes === **/
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef CONNECTIVITY_INC_CONNECTIVITY_DBMETADATA_HXX
#include <connectivity/dbmetadata.hxx>
-#endif
-#ifndef _RTL_USTRBUF_HXX_
#include <rtl/ustrbuf.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
-#endif
#include <vector>
#include <boost/shared_ptr.hpp>
@@ -230,3 +203,4 @@ namespace dbaui
} // namespace dbaui
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx
index 47a0e822e..62a78ce1e 100644
--- a/dbaccess/source/ui/misc/dsmeta.cxx
+++ b/dbaccess/source/ui/misc/dsmeta.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -153,9 +154,9 @@ namespace dbaui
{
::rtl::OUString sAuth;
aMetaData.get("Authentication") >>= sAuth;
- if ( sAuth.equalsAscii("UserPassword") )
+ if ( sAuth.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UserPassword")) )
aInit = AuthUserPwd;
- else if ( sAuth.equalsAscii("Password") )
+ else if ( sAuth.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Password")) )
aInit = AuthPwd;
}
s_aSupport.insert(Supported::value_type(*pIter,aInit));
@@ -214,3 +215,5 @@ namespace dbaui
//........................................................................
} // namespace dbaui
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/imageprovider.cxx b/dbaccess/source/ui/misc/imageprovider.cxx
index 2f9f378db..55283604c 100644
--- a/dbaccess/source/ui/misc/imageprovider.cxx
+++ b/dbaccess/source/ui/misc/imageprovider.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,15 +82,12 @@ namespace dbaui
{
//................................................................
static void lcl_getConnectionProvidedTableIcon_nothrow( const ImageProvider_Data& _rData,
- const ::rtl::OUString& _rName, Reference< XGraphic >& _out_rxGraphic, Reference< XGraphic >& _out_rxGraphicHC )
+ const ::rtl::OUString& _rName, Reference< XGraphic >& _out_rxGraphic )
{
try
{
if ( _rData.xTableUI.is() )
- {
_out_rxGraphic = _rData.xTableUI->getTableIcon( _rName, GraphicColorMode::NORMAL );
- _out_rxGraphicHC = _rData.xTableUI->getTableIcon( _rName, GraphicColorMode::HIGH_CONTRAST );
- }
}
catch( const Exception& )
{
@@ -99,21 +97,19 @@ namespace dbaui
//................................................................
static void lcl_getTableImageResourceID_nothrow( const ImageProvider_Data& _rData, const ::rtl::OUString& _rName,
- sal_uInt16& _out_rResourceID, sal_uInt16& _out_rResourceID_HC )
+ sal_uInt16& _out_rResourceID)
{
- _out_rResourceID = _out_rResourceID_HC = 0;
+ _out_rResourceID = 0;
try
{
bool bIsView = _rData.xViews.is() && _rData.xViews->hasByName( _rName );
if ( bIsView )
{
_out_rResourceID = VIEW_TREE_ICON;
- _out_rResourceID_HC = VIEW_TREE_ICON_SCH;
}
else
{
_out_rResourceID = TABLE_TREE_ICON;
- _out_rResourceID_HC = TABLE_TREE_ICON_SCH;
}
}
catch( const Exception& )
@@ -151,95 +147,88 @@ namespace dbaui
}
//--------------------------------------------------------------------
- void ImageProvider::getImages( const String& _rName, const sal_Int32 _nDatabaseObjectType, Image& _out_rImage, Image& _out_rImageHC )
+ void ImageProvider::getImages( const String& _rName, const sal_Int32 _nDatabaseObjectType, Image& _out_rImage )
{
if ( _nDatabaseObjectType != DatabaseObject::TABLE )
{
// for types other than tables, the icon does not depend on the concrete object
- _out_rImage = getDefaultImage( _nDatabaseObjectType, false );
- _out_rImageHC = getDefaultImage( _nDatabaseObjectType, true );
+ _out_rImage = getDefaultImage( _nDatabaseObjectType );
}
else
{
// check whether the connection can give us an icon
Reference< XGraphic > xGraphic;
- Reference< XGraphic > xGraphicHC;
- lcl_getConnectionProvidedTableIcon_nothrow( *m_pData, _rName, xGraphic, xGraphicHC );
+ lcl_getConnectionProvidedTableIcon_nothrow( *m_pData, _rName, xGraphic );
if ( xGraphic.is() )
_out_rImage = Image( xGraphic );
- if ( xGraphicHC.is() )
- _out_rImageHC = Image( xGraphicHC );
- if ( !_out_rImage || !_out_rImageHC )
+ if ( !_out_rImage )
{
// no -> determine by type
sal_uInt16 nImageResourceID = 0;
- sal_uInt16 nImageResourceID_HC = 0;
- lcl_getTableImageResourceID_nothrow( *m_pData, _rName, nImageResourceID, nImageResourceID_HC );
+ lcl_getTableImageResourceID_nothrow( *m_pData, _rName, nImageResourceID );
if ( nImageResourceID && !_out_rImage )
_out_rImage = Image( ModuleRes( nImageResourceID ) );
- if ( nImageResourceID_HC && !_out_rImageHC )
- _out_rImageHC = Image( ModuleRes( nImageResourceID_HC ) );
}
}
}
//--------------------------------------------------------------------
- Image ImageProvider::getDefaultImage( sal_Int32 _nDatabaseObjectType, bool _bHighContrast )
+ Image ImageProvider::getDefaultImage( sal_Int32 _nDatabaseObjectType )
{
Image aObjectImage;
- sal_uInt16 nImageResourceID( getDefaultImageResourceID( _nDatabaseObjectType, _bHighContrast ) );
+ sal_uInt16 nImageResourceID( getDefaultImageResourceID( _nDatabaseObjectType) );
if ( nImageResourceID )
aObjectImage = Image( ModuleRes( nImageResourceID ) );
return aObjectImage;
}
//--------------------------------------------------------------------
- sal_uInt16 ImageProvider::getDefaultImageResourceID( sal_Int32 _nDatabaseObjectType, bool _bHighContrast )
+ sal_uInt16 ImageProvider::getDefaultImageResourceID( sal_Int32 _nDatabaseObjectType)
{
sal_uInt16 nImageResourceID( 0 );
switch ( _nDatabaseObjectType )
{
case DatabaseObject::QUERY:
- nImageResourceID = _bHighContrast ? QUERY_TREE_ICON_SCH : QUERY_TREE_ICON;
+ nImageResourceID = QUERY_TREE_ICON;
break;
case DatabaseObject::FORM:
- nImageResourceID = _bHighContrast ? FORM_TREE_ICON_SCH : FORM_TREE_ICON;
+ nImageResourceID = FORM_TREE_ICON;
break;
case DatabaseObject::REPORT:
- nImageResourceID = _bHighContrast ? REPORT_TREE_ICON_SCH : REPORT_TREE_ICON;
+ nImageResourceID = REPORT_TREE_ICON;
break;
case DatabaseObject::TABLE:
- nImageResourceID = _bHighContrast ? TABLE_TREE_ICON_SCH : TABLE_TREE_ICON;
+ nImageResourceID = TABLE_TREE_ICON;
break;
default:
- OSL_ENSURE( false, "ImageProvider::getDefaultImage: invalid database object type!" );
+ OSL_FAIL( "ImageProvider::getDefaultImage: invalid database object type!" );
break;
}
return nImageResourceID;
}
//--------------------------------------------------------------------
- Image ImageProvider::getFolderImage( sal_Int32 _nDatabaseObjectType, bool _bHighContrast )
+ Image ImageProvider::getFolderImage( sal_Int32 _nDatabaseObjectType )
{
sal_uInt16 nImageResourceID( 0 );
switch ( _nDatabaseObjectType )
{
case DatabaseObject::QUERY:
- nImageResourceID = _bHighContrast ? QUERYFOLDER_TREE_ICON_SCH : QUERYFOLDER_TREE_ICON;
+ nImageResourceID = QUERYFOLDER_TREE_ICON;
break;
case DatabaseObject::FORM:
- nImageResourceID = _bHighContrast ? FORMFOLDER_TREE_ICON_SCH : FORMFOLDER_TREE_ICON;
+ nImageResourceID = FORMFOLDER_TREE_ICON;
break;
case DatabaseObject::REPORT:
- nImageResourceID = _bHighContrast ? REPORTFOLDER_TREE_ICON_SCH : REPORTFOLDER_TREE_ICON;
+ nImageResourceID = REPORTFOLDER_TREE_ICON;
break;
case DatabaseObject::TABLE:
- nImageResourceID = _bHighContrast ? TABLEFOLDER_TREE_ICON_SCH : TABLEFOLDER_TREE_ICON;
+ nImageResourceID = TABLEFOLDER_TREE_ICON;
break;
default:
- OSL_ENSURE( false, "ImageProvider::getDefaultImage: invalid database object type!" );
+ OSL_FAIL( "ImageProvider::getDefaultImage: invalid database object type!" );
break;
}
@@ -250,12 +239,13 @@ namespace dbaui
}
//--------------------------------------------------------------------
- Image ImageProvider::getDatabaseImage( bool _bHighContrast )
+ Image ImageProvider::getDatabaseImage()
{
- return Image( ModuleRes( _bHighContrast ? DATABASE_TREE_ICON_SCH : DATABASE_TREE_ICON ) );
+ return Image( ModuleRes( DATABASE_TREE_ICON ) );
}
//........................................................................
} // namespace dbaui
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx
index 8ef4c6292..546b1a16c 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,33 +29,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_INDEXCOLLECTION_HXX_
#include "indexcollection.hxx"
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDROP_HPP_
#include <com/sun/star/sdbcx/XDrop.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
//......................................................................
namespace dbaui
@@ -82,12 +65,6 @@ namespace dbaui
}
//------------------------------------------------------------------
-// OIndexCollection::OIndexCollection(const Reference< XNameAccess >& _rxIndexes)
-// {
-// implConstructFrom(_rxIndexes);
-// }
-
- //------------------------------------------------------------------
const OIndexCollection& OIndexCollection::operator=(const OIndexCollection& _rSource)
{
detach();
@@ -180,7 +157,7 @@ namespace dbaui
Reference< XAppend > xAppendIndex(xIndexFactory, UNO_QUERY);
if (!xAppendIndex.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::commitNewIndex: missing an interface of the index container!");
+ OSL_FAIL("OIndexCollection::commitNewIndex: missing an interface of the index container!");
return;
}
@@ -194,14 +171,14 @@ namespace dbaui
Reference< XAppend > xAppendCols(xColumnFactory, UNO_QUERY);
if (!xAppendCols.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::commitNewIndex: invalid index descriptor returned!");
+ OSL_FAIL("OIndexCollection::commitNewIndex: invalid index descriptor returned!");
return;
}
// set the properties
- static const ::rtl::OUString s_sUniquePropertyName = ::rtl::OUString::createFromAscii("IsUnique");
- static const ::rtl::OUString s_sSortPropertyName = ::rtl::OUString::createFromAscii("IsAscending");
- static const ::rtl::OUString s_sNamePropertyName = ::rtl::OUString::createFromAscii("Name");
+ static const ::rtl::OUString s_sUniquePropertyName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsUnique"));
+ static const ::rtl::OUString s_sSortPropertyName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsAscending"));
+ static const ::rtl::OUString s_sNamePropertyName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"));
// the index' own props
xIndexDescriptor->setPropertyValue(s_sUniquePropertyName, ::cppu::bool2any(_rPos->bUnique));
xIndexDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(_rPos->sName));
@@ -249,7 +226,7 @@ namespace dbaui
Reference< XDrop > xDropIndex(m_xIndexes, UNO_QUERY);
if (!xDropIndex.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::drop: no XDrop interface!");
+ OSL_FAIL("OIndexCollection::drop: no XDrop interface!");
return sal_False;
}
@@ -296,7 +273,7 @@ namespace dbaui
m_xIndexes->getByName(_rIndex.getOriginalName()) >>= xIndex;
if (!xIndex.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::implFillIndexInfo: got an invalid index object!");
+ OSL_FAIL("OIndexCollection::implFillIndexInfo: got an invalid index object!");
}
else
implFillIndexInfo(_rIndex, xIndex);
@@ -305,10 +282,10 @@ namespace dbaui
//------------------------------------------------------------------
void OIndexCollection::implFillIndexInfo(OIndex& _rIndex, Reference< XPropertySet > _rxDescriptor) SAL_THROW((Exception))
{
- static const ::rtl::OUString s_sPrimaryIndexPropertyName = ::rtl::OUString::createFromAscii("IsPrimaryKeyIndex");
- static const ::rtl::OUString s_sUniquePropertyName = ::rtl::OUString::createFromAscii("IsUnique");
- static const ::rtl::OUString s_sSortPropertyName = ::rtl::OUString::createFromAscii("IsAscending");
- static const ::rtl::OUString s_sCatalogPropertyName = ::rtl::OUString::createFromAscii("Catalog");
+ static const ::rtl::OUString s_sPrimaryIndexPropertyName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsPrimaryKeyIndex"));
+ static const ::rtl::OUString s_sUniquePropertyName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsUnique"));
+ static const ::rtl::OUString s_sSortPropertyName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsAscending"));
+ static const ::rtl::OUString s_sCatalogPropertyName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Catalog"));
_rIndex.bPrimaryKey = ::cppu::any2bool(_rxDescriptor->getPropertyValue(s_sPrimaryIndexPropertyName));
_rIndex.bUnique = ::cppu::any2bool(_rxDescriptor->getPropertyValue(s_sUniquePropertyName));
@@ -337,7 +314,7 @@ namespace dbaui
xCols->getByName(*pFieldNames) >>= xIndexColumn;
if (!xIndexColumn.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::implFillIndexInfo: invalid index column!");
+ OSL_FAIL("OIndexCollection::implFillIndexInfo: invalid index column!");
--aCopyTo;
continue;
}
@@ -406,7 +383,7 @@ namespace dbaui
m_xIndexes->getByName(*pNames) >>= xIndex;
if (!xIndex.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::implConstructFrom: got an invalid index object ... ignoring!");
+ OSL_FAIL("OIndexCollection::implConstructFrom: got an invalid index object ... ignoring!");
continue;
}
@@ -422,3 +399,4 @@ namespace dbaui
} // namespace dbaui
//......................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx
index cd2d52715..dd2352dfd 100644
--- a/dbaccess/source/ui/misc/linkeddocuments.cxx
+++ b/dbaccess/source/ui/misc/linkeddocuments.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,107 +29,42 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_LINKEDDOCUMENTS_HXX_
#include "linkeddocuments.hxx"
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
#include <tools/diagnose_ex.h>
#include <unotools/confignode.hxx>
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
#include <comphelper/classids.hxx>
-#ifndef COMPHELPER_NAMEDVALUECOLLECTION_HXX
#include <comphelper/namedvaluecollection.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_
#include <com/sun/star/frame/XDispatchProvider.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
#include <com/sun/star/frame/XComponentLoader.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_URL_HPP_
#include <com/sun/star/util/URL.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_XCOMMANDPROCESSOR_HPP_
#include <com/sun/star/ucb/XCommandProcessor.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_OPENCOMMANDARGUMENT_HPP_
#include <com/sun/star/ucb/OpenCommandArgument.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UCB_OPENMODE_HPP_
#include <com/sun/star/ucb/OpenMode.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XJOBEXECUTOR_HPP_
#include <com/sun/star/task/XJobExecutor.hpp>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _UCBHELPER_CONTENT_HXX
#include <ucbhelper/content.hxx>
-#endif
-#ifndef _DBU_MISC_HRC_
#include "dbu_misc.hrc"
-#endif
-#ifndef SVTOOLS_FILENOTATION_HXX_
#include <svl/filenotation.hxx>
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _SFXNEW_HXX
#include <sfx2/new.hxx>
-#endif
-#ifndef _SVTOOLS_TEMPLDLG_HXX
-#include <svtools/templdlg.hxx>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
// -----------------
// for calling basic
-#ifndef _SFXAPP_HXX
#include <sfx2/app.hxx>
-#endif
-#ifndef _SBXCLASS_HXX
#include <basic/sbx.hxx>
-#endif
-#ifndef _SB_SBUNO_HXX
#include <basic/sbuno.hxx>
-#endif
-#ifndef _EHDL_HXX
#include <svtools/ehdl.hxx>
-#endif
-#ifndef _SVX_DATACCESSDESCRIPTOR_HXX_
#include <svx/dataaccessdescriptor.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XHIERARCHICALNAMECONTAINER_HPP_
#include <com/sun/star/container/XHierarchicalNameContainer.hpp>
-#endif
-#ifndef _SV_WAITOBJ_HXX
#include <vcl/waitobj.hxx>
-#endif
-#ifndef _COMPHELPER_MIMECONFIGHELPER_HXX_
#include <comphelper/mimeconfighelper.hxx>
-#endif
#include <cppuhelper/exc_hlp.hxx>
#include <connectivity/dbtools.hxx>
@@ -185,7 +121,7 @@ namespace dbaui
//==================================================================
//= OLinkedDocumentsAccess
//==================================================================
- DBG_NAME(OLinkedDocumentsAccess)
+ DBG_NAME(OLinkedDocumentsAccess)
//------------------------------------------------------------------
OLinkedDocumentsAccess::OLinkedDocumentsAccess( Window* _pDialogParent, const Reference< XDatabaseDocumentUI >& i_rDocumentUI,
const Reference< XMultiServiceFactory >& _rxORB, const Reference< XNameAccess >& _rxContainer,
@@ -197,14 +133,14 @@ namespace dbaui
,m_pDialogParent(_pDialogParent)
,m_sDataSourceName(_sDataSourceName)
{
- DBG_CTOR(OLinkedDocumentsAccess,NULL);
+ DBG_CTOR(OLinkedDocumentsAccess,NULL);
OSL_ENSURE(m_xORB.is(), "OLinkedDocumentsAccess::OLinkedDocumentsAccess: invalid service factory!");
OSL_ENSURE(m_pDialogParent, "OLinkedDocumentsAccess::OLinkedDocumentsAccess: really need a dialog parent!");
}
//------------------------------------------------------------------
OLinkedDocumentsAccess::~OLinkedDocumentsAccess()
{
- DBG_DTOR(OLinkedDocumentsAccess,NULL);
+ DBG_DTOR(OLinkedDocumentsAccess,NULL);
}
//------------------------------------------------------------------
Reference< XComponent> OLinkedDocumentsAccess::impl_open( const ::rtl::OUString& _rLinkName, Reference< XComponent >& _xDefinition,
@@ -235,14 +171,14 @@ namespace dbaui
break;
default:
- OSL_ENSURE( false, "OLinkedDocumentsAccess::implOpen: invalid open mode!" );
+ OSL_FAIL( "OLinkedDocumentsAccess::implOpen: invalid open mode!" );
break;
}
aArguments.put( "OpenMode", sOpenMode );
aArguments.put( (::rtl::OUString)PROPERTY_ACTIVE_CONNECTION, m_xConnection );
try
- {
+ {
Reference<XHierarchicalNameContainer> xHier(m_xDocumentContainer,UNO_QUERY);
if ( xHier.is() && xHier->hasByHierarchicalName(_rLinkName) )
{
@@ -253,9 +189,8 @@ namespace dbaui
xRet = xComponentLoader->loadComponentFromURL( _rLinkName, ::rtl::OUString(), 0, aArguments.getPropertyValues() );
}
- catch(Exception& e)
+ catch(const Exception&)
{
- (void)e;
throw;
}
@@ -280,7 +215,7 @@ namespace dbaui
}
aArgs.put( "DocumentUI", m_xDocumentUI );
-
+
Reference< XJobExecutor > xWizard;
{
WaitObject aWaitCursor( m_pDialogParent );
@@ -293,7 +228,7 @@ namespace dbaui
xWizard->trigger( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "start" ) ) );
::comphelper::disposeComponent( xWizard );
}
- catch(const Exception& e)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -313,7 +248,7 @@ namespace dbaui
void OLinkedDocumentsAccess::newTableWithPilot()
{
impl_newWithPilot( "com.sun.star.wizards.table.CallTableWizard", -1, ::rtl::OUString() );
- }
+ }
//------------------------------------------------------------------
void OLinkedDocumentsAccess::newQueryWithPilot()
{
@@ -351,7 +286,7 @@ namespace dbaui
break;
default:
- OSL_ENSURE( sal_False, "OLinkedDocumentsAccess::newDocument: please use newFormWithPilot!" );
+ OSL_FAIL( "OLinkedDocumentsAccess::newDocument: please use newFormWithPilot!" );
return Reference< XComponent >();
}
@@ -361,7 +296,7 @@ namespace dbaui
Reference< XComponent > xNewDocument;
try
{ // get the desktop object
-
+
Reference<XMultiServiceFactory> xORB(m_xDocumentContainer,UNO_QUERY);
if ( xORB.is() )
{
@@ -398,7 +333,7 @@ namespace dbaui
xNewDocument.set( xContent->execute( aCommand, xContent->createCommandIdentifier(), NULL ), UNO_QUERY );
}
}
- catch(const Exception& )
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -409,10 +344,10 @@ namespace dbaui
//------------------------------------------------------------------
Reference< XComponent > OLinkedDocumentsAccess::open( const ::rtl::OUString& _rLinkName, Reference< XComponent >& _xDefinition,
ElementOpenMode _eOpenMode, const ::comphelper::NamedValueCollection& _rAdditionalArgs )
- {
+ {
dbtools::SQLExceptionInfo aInfo;
Reference< XComponent > xRet;
- try
+ try
{
xRet = impl_open( _rLinkName, _xDefinition, _eOpenMode, _rAdditionalArgs );
if ( !xRet.is() )
@@ -422,13 +357,12 @@ namespace dbaui
com::sun::star::sdbc::SQLException aSQLException;
aSQLException.Message = sMessage;
- // aSQLException.Context = e.Context;
aInfo = dbtools::SQLExceptionInfo(aSQLException);
}
return xRet;
}
- catch (com::sun::star::io::WrongFormatException e)
- {
+ catch(const com::sun::star::io::WrongFormatException &e)
+ {
com::sun::star::sdbc::SQLException aSQLException;
aSQLException.Message = e.Message;
aSQLException.Context = e.Context;
@@ -441,9 +375,9 @@ namespace dbaui
String sMessage = String(ModuleRes(STR_COULDNOTOPEN_LINKEDDOC));
sMessage.SearchAndReplaceAscii("$file$",_rLinkName);
- aInfo.prepend(sMessage);
+ aInfo.prepend(sMessage);
}
- catch(Exception& e)
+ catch(const Exception& e)
{
Any aAny = ::cppu::getCaughtException();
com::sun::star::sdbc::SQLException a;
@@ -453,10 +387,10 @@ namespace dbaui
aSQLException.Message = e.Message;
aSQLException.Context = e.Context;
aInfo = dbtools::SQLExceptionInfo(aSQLException);
-
+
// more like a hack, insert an empty message
aInfo.prepend(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" \n")));
-
+
String sMessage = String(ModuleRes(STR_COULDNOTOPEN_LINKEDDOC));
sMessage.SearchAndReplaceAscii("$file$",_rLinkName);
aInfo.prepend(sMessage);
@@ -468,9 +402,10 @@ namespace dbaui
}
return xRet;
}
-
+
//......................................................................
} // namespace dbaui
//......................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/makefile.mk b/dbaccess/source/ui/misc/makefile.mk
deleted file mode 100644
index 534d90e39..000000000
--- a/dbaccess/source/ui/misc/makefile.mk
+++ /dev/null
@@ -1,88 +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=uimisc
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)/util/makefile.pmk
-
-# --- Files -------------------------------------
-
-# ... resource files ............................
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- dbumiscres.src \
- WizardPages.src
-
-# ... object files ............................
-
-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/moduledbu.cxx b/dbaccess/source/ui/misc/moduledbu.cxx
index dd7a26c08..da21270d6 100644
--- a/dbaccess/source/ui/misc/moduledbu.cxx
+++ b/dbaccess/source/ui/misc/moduledbu.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,19 +29,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _TOOLS_RESMGR_HXX
#include <tools/resmgr.hxx>
-#endif
-#ifndef _SOLAR_HRC
#include <svl/solar.hrc>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
#define ENTER_MOD_METHOD() \
::osl::MutexGuard aGuard(s_aMutex); \
@@ -144,3 +137,4 @@ void OModule::ensureImpl()
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/propertysetitem.cxx b/dbaccess/source/ui/misc/propertysetitem.cxx
index b3382050d..eb34cb5f1 100644
--- a/dbaccess/source/ui/misc/propertysetitem.cxx
+++ b/dbaccess/source/ui/misc/propertysetitem.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_PROPERTYSETITEM_HXX_
#include "propertysetitem.hxx"
-#endif
//.........................................................................
namespace dbaui
@@ -84,3 +83,4 @@ namespace dbaui
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/propertystorage.cxx b/dbaccess/source/ui/misc/propertystorage.cxx
index 5b55d8dda..f8a9733c9 100644
--- a/dbaccess/source/ui/misc/propertystorage.cxx
+++ b/dbaccess/source/ui/misc/propertystorage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -116,7 +117,7 @@ namespace dbaui
)
return;
- OSL_ENSURE( false, "SetItemPropertyStorage::getPropertyValue: unsupported item type!" );
+ OSL_FAIL( "SetItemPropertyStorage::getPropertyValue: unsupported item type!" );
}
//--------------------------------------------------------------------
@@ -128,9 +129,11 @@ namespace dbaui
)
return;
- OSL_ENSURE( false, "SetItemPropertyStorage::setPropertyValue: unsupported item type!" );
+ OSL_FAIL( "SetItemPropertyStorage::setPropertyValue: unsupported item type!" );
}
//........................................................................
} // namespace dbaui
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/singledoccontroller.cxx b/dbaccess/source/ui/misc/singledoccontroller.cxx
index 5a049f652..ff6679c55 100755..100644
--- a/dbaccess/source/ui/misc/singledoccontroller.cxx
+++ b/dbaccess/source/ui/misc/singledoccontroller.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -37,6 +38,7 @@
/** === end UNO includes === **/
#include <svl/undo.hxx>
+#include <osl/diagnose.h>
#include <boost/scoped_ptr.hpp>
@@ -198,3 +200,5 @@ namespace dbaui
//......................................................................................................................
} // namespace dbaui
//......................................................................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/stringlistitem.cxx b/dbaccess/source/ui/misc/stringlistitem.cxx
index 7d51a99d1..a635c20f7 100644
--- a/dbaccess/source/ui/misc/stringlistitem.cxx
+++ b/dbaccess/source/ui/misc/stringlistitem.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_STRINGLISTITEM_HXX_
#include "stringlistitem.hxx"
-#endif
//.........................................................................
namespace dbaui
@@ -85,3 +84,4 @@ SfxPoolItem* OStringListItem::Clone(SfxItemPool* /* _pPool */) const
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/uiservices.cxx b/dbaccess/source/ui/misc/uiservices.cxx
index 4f499ea0f..2c10435c6 100644
--- a/dbaccess/source/ui/misc/uiservices.cxx
+++ b/dbaccess/source/ui/misc/uiservices.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _CPPUHELPER_FACTORY_HXX_
#include <cppuhelper/factory.hxx>
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef INCLUDED_DBACCESSDLLAPI_H
#include "dbaccessdllapi.h"
-#endif
/********************************************************************************************/
@@ -115,7 +108,7 @@ extern "C" void SAL_CALL createRegistryInfo_DBU()
//---------------------------------------------------------------------------------------
-extern "C" DBACCESS_DLLPUBLIC void SAL_CALL component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
uno_Environment **
)
@@ -125,7 +118,7 @@ extern "C" DBACCESS_DLLPUBLIC void SAL_CALL component_getImplementationEnvironme
}
//---------------------------------------------------------------------------------------
-extern "C" DBACCESS_DLLPUBLIC void* SAL_CALL component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/)
@@ -142,3 +135,5 @@ extern "C" DBACCESS_DLLPUBLIC void* SAL_CALL component_getFactory(
xRet->acquire();
return xRet.get();
};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/ConnectionData.hxx b/dbaccess/source/ui/querydesign/ConnectionData.hxx
deleted file mode 100644
index 5b7de2e42..000000000
--- a/dbaccess/source/ui/querydesign/ConnectionData.hxx
+++ /dev/null
@@ -1,63 +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 DBAUI_CONNECTIONDATA_HXX
-#define DBAUI_CONNECTIONDATA_HXX
-
-namespace dbaui
-{
-
- //==================================================================
- // ConnData ---------->* ConnLineData
- // ^1 ^1
- // | |
- // Conn ---------->* ConnLine
- //==================================================================
-
-
-}
-#endif // DBAUI_CONNECTIONDATA_HXX
-
-DECLARE_LIST( OConnectionLineDataList, OConnectionLineData* );
-
-//==================================================================
-class SbaJoinTabConn;
-
-
-
-DECLARE_LIST( OConnectionLineList, OConnectionLine* );
-
-DECLARE_LIST( OTableConnectionDataList, OTableConnectionData* );
-
-//==================================================================
-const sal_uInt16 MAX_CONN_COUNT = 2;
-
-class SbaJoinTabWin;
-class SbaJoinTabWinCont;
-
-
-
-DECLARE_LIST( SbaJoinTabConnList, SbaJoinTabConn* );
diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
index c114ba0ea..1fa0db035 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,30 +28,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_CONNECTIONLINE_HXX
#include "ConnectionLine.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#include "TableWindowListBox.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
#ifndef _INC_MATH
#include <math.h>
#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
+#include <osl/diagnose.h>
#include <vcl/lineinfo.hxx>
@@ -77,7 +64,7 @@ namespace
Rectangle GetTextPos(const OTableWindow* _pWin, const Point& _aConnPos,const Point& _aDescrLinePos)
{
OTableWindowListBox* pListBox = _pWin ? _pWin->GetListBox() : NULL;
- DBG_ASSERT(_pWin && pListBox, "OConnectionLine::GetSourceTextPos : invalid call !");
+ OSL_ENSURE(_pWin && pListBox, "OConnectionLine::GetSourceTextPos : invalid call !");
Rectangle aReturn;
if ( pListBox )
@@ -339,7 +326,7 @@ void OConnectionLine::Draw( OutputDevice* pOutDev )
// -----------------------------------------------------------------------------
sal_Bool OConnectionLine::IsValid() const
{
- return m_pData.isValid();
+ return m_pData.is();
}
//------------------------------------------------------------------------
double dist_Euklid(const Point &p1, const Point& p2,const Point& pM, Point& q)
@@ -395,3 +382,4 @@ Point OConnectionLine::getMidPoint() const
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
index b42f45c3a..11ce9125f 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,39 +28,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBACCESS_CONNECTIONLINEACCESS_HXX
#include "ConnectionLineAccess.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
#include <com/sun/star/accessibility/AccessibleRole.hpp>
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLERELATIONTYPE_HPP_
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
-#endif
-#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_
#include <toolkit/awt/vclxwindow.hxx>
-#endif
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef DBAUI_JOINDESIGNVIEW_HXX
#include "JoinDesignView.hxx"
-#endif
-#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
namespace dbaui
{
@@ -67,7 +46,6 @@ namespace dbaui
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
- // using namespace ::com::sun::star::awt;
using namespace ::com::sun::star;
OConnectionLineAccess::OConnectionLineAccess(OTableConnection* _pLine)
@@ -102,7 +80,7 @@ namespace dbaui
// -----------------------------------------------------------------------------
::rtl::OUString OConnectionLineAccess::getImplementationName_Static(void) throw( RuntimeException )
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.ConnectionLineAccessibility");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.ConnectionLineAccessibility"));
}
// -----------------------------------------------------------------------------
// XAccessibleContext
@@ -270,3 +248,4 @@ namespace dbaui
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx b/dbaccess/source/ui/querydesign/ConnectionLineData.cxx
index 43a203c01..38ee10d66 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineData.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
using namespace dbaui;
@@ -56,7 +53,7 @@ OConnectionLineData::OConnectionLineData( const ::rtl::OUString& rSourceFieldNam
//------------------------------------------------------------------------
OConnectionLineData::OConnectionLineData( const OConnectionLineData& rConnLineData )
- : ::vos::OReference()
+ : ::salhelper::SimpleReferenceObject()
{
DBG_CTOR(OConnectionLineData,NULL);
*this = rConnLineData;
@@ -104,3 +101,4 @@ bool operator==(const OConnectionLineData& lhs, const OConnectionLineData& rhs)
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/JAccess.cxx b/dbaccess/source/ui/querydesign/JAccess.cxx
index 00efeb7de..ed125b3b3 100644
--- a/dbaccess/source/ui/querydesign/JAccess.cxx
+++ b/dbaccess/source/ui/querydesign/JAccess.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,30 +28,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBACCESS_JACCESS_HXX
#include "JAccess.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
#include <com/sun/star/accessibility/AccessibleRole.hpp>
-#endif
-#ifndef DBAUI_JOINDESIGNVIEW_HXX
#include "JoinDesignView.hxx"
-#endif
-#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
namespace dbaui
{
@@ -72,7 +57,7 @@ namespace dbaui
// -----------------------------------------------------------------------------
::rtl::OUString OJoinDesignViewAccess::getImplementationName_Static(void) throw( RuntimeException )
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.JoinViewAccessibility");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.JoinViewAccessibility"));
}
// -----------------------------------------------------------------------------
void OJoinDesignViewAccess::clearTableView()
@@ -143,3 +128,4 @@ namespace dbaui
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index 3636b6031..63d0435bb 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,120 +28,45 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _SFXSIDS_HRC
#include <sfx2/sfxsids.hrc>
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
#include <com/sun/star/container/XChild.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_KEYTYPE_HPP_
#include <com/sun/star/sdbcx/KeyType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDROP_HPP_
#include <com/sun/star/sdbcx/XDrop.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XALTERTABLE_HPP_
#include <com/sun/star/sdbcx/XAlterTable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_SQLWARNING_HPP_
#include <com/sun/star/sdbc/SQLWarning.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UI_DIALOGS_XEXECUTABLEDIALOG_HPP_
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#endif
-#ifndef _COMPHELPER_STREAMSECTION_HXX_
#include <comphelper/streamsection.hxx>
-#endif
-#ifndef _COMPHELPER_BASIC_IO_HXX_
#include <comphelper/basicio.hxx>
-#endif
-#ifndef _COMPHELPER_SEQSTREAM_HXX
#include <comphelper/seqstream.hxx>
-#endif
-#ifndef _COM_SUN_STAR_IO_XACTIVEDATASOURCE_HPP_
#include <com/sun/star/io/XActiveDataSource.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_XACTIVEDATASINK_HPP_
#include <com/sun/star/io/XActiveDataSink.hpp>
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBAUI_TABLEWINDOWDATA_HXX
#include "TableWindowData.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
-#endif
-#ifndef DBAUI_QYDLGTAB_HXX
#include "adtabdlg.hxx"
-#endif
-#ifndef _SV_WAITOBJ_HXX
#include <vcl/waitobj.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _VOS_MUTEX_HXX_
-#include <vos/mutex.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
+#include <osl/mutex.hxx>
#include "UITools.hxx"
-#endif
+#include <osl/diagnose.h>
#include <boost/optional.hpp>
@@ -409,7 +335,7 @@ void OJoinController::SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabW
// Wenn die TabWins ein SetData haetten, koennte ich mir das sparen ... haben sie aber nicht, ausserdem muesste ich dann immer
// noch Informationen, die sich eigentlich nicht geaendert haben, auch neu setzen.
// Also loesche ich die TabWinDatas nicht, sondern aktualisiere sie nur.
- DBG_ASSERT(m_vTableData.size() == pTabWinList->size(),
+ OSL_ENSURE(m_vTableData.size() == pTabWinList->size(),
"OJoinController::SaveTabWinsPosSize : inkonsistenter Zustand : sollte genausviel TabWinDatas haben wie TabWins !");
OJoinTableView::OTableWindowMap::iterator aIter = pTabWinList->begin();
@@ -438,7 +364,7 @@ sal_Bool SAL_CALL OJoinController::suspend(sal_Bool _bSuspend) throw( RuntimeExc
if ( getBroadcastHelper().bInDispose || getBroadcastHelper().bDisposed )
return sal_True;
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
if ( getView() && getView()->IsInModalMode() )
return sal_False;
@@ -538,10 +464,12 @@ TTableWindowData::value_type OJoinController::createTableWindowData(const ::rtl:
OJoinDesignView* pView = getJoinView();
if( pView )
return pView->getTableView()->createTableWindowData(_sComposedName,_sTableName,_sWindowName);
- OSL_ENSURE(0,"We should never ever reach this point!");
+ OSL_FAIL("We should never ever reach this point!");
return TTableWindowData::value_type();
}
// .............................................................................
} // namespace dbaui
// .............................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/JoinDesignView.cxx b/dbaccess/source/ui/querydesign/JoinDesignView.cxx
index ab573f28d..0ef1fd9e7 100644
--- a/dbaccess/source/ui/querydesign/JoinDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinDesignView.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,70 +28,27 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_JOINDESIGNVIEW_HXX
#include "JoinDesignView.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
-#endif
-#ifndef _UNDO_HXX
#include <svl/undo.hxx>
-#endif
-#ifndef DBAUI_QYDLGTAB_HXX
#include "adtabdlg.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINE_HXX
#include "ConnectionLine.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-// #include <com/sun/star/util/URL.hdl>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -136,7 +94,6 @@ void OJoinDesignView::Construct()
// -----------------------------------------------------------------------------
void OJoinDesignView::initialize()
{
- // getAddTableDialog()->Update();
}
// -------------------------------------------------------------------------
void OJoinDesignView::resizeDocumentView(Rectangle& _rPlayground)
@@ -168,3 +125,4 @@ void OJoinDesignView::KeyInput( const KeyEvent& rEvt )
} // namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/JoinExchange.cxx b/dbaccess/source/ui/querydesign/JoinExchange.cxx
index 8c5b860e6..0a8bfaec1 100644
--- a/dbaccess/source/ui/querydesign/JoinExchange.cxx
+++ b/dbaccess/source/ui/querydesign/JoinExchange.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,21 +28,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_JOINEXCHANGE_HXX
#include "JoinExchange.hxx"
-#endif
-#ifndef _SOT_FORMATS_HXX
#include <sot/formats.hxx>
-#endif
-#ifndef _SVX_DBEXCH_HRC
#include <svx/dbexch.hrc>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _SOT_FORMATS_HXX
#include <sot/formats.hxx>
-#endif
namespace dbaui
{
@@ -184,3 +175,5 @@ namespace dbaui
} // namespace dbaui
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index c4c634e7c..86d09b5e6 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,76 +28,29 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
+#include <osl/diagnose.h>
#include "querycontroller.hxx"
-#endif
-#ifndef DBAUI_JOINDESIGNVIEW_HXX
#include "JoinDesignView.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-//#ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
-//#include "QTableWindowData.hxx"
-//#endif
-#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#include "TableWindowListBox.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINE_HXX
#include "ConnectionLine.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _URLBMK_HXX
#include <svl/urlbmk.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef DBAUI_OQUERYMOVETABWINUNDOACT_HXX
#include "QueryMoveTabWinUndoAct.hxx"
-#endif
-#ifndef DBAUI_QUERYSIZETABWINUNDOACT_HXX
#include "QuerySizeTabWinUndoAct.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef DBAUI_TABLEWINDOWDATA_HXX
#include "TableWindowData.hxx"
-#endif
-#ifndef DBACCESS_JACCESS_HXX
#include "JAccess.hxx"
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_
#include <com/sun/star/accessibility/XAccessible.hpp>
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
#include <com/sun/star/accessibility/AccessibleRole.hpp>
-#endif
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
#include <cppuhelper/exc_hlp.hxx>
#include <tools/diagnose_ex.h>
#include <boost/bind.hpp>
@@ -217,8 +171,6 @@ void OScrollWindowHelper::Resize()
// class OJoinTableView
//==================================================================
-//const long WINDOW_WIDTH = 1000;
-//const long WINDOW_HEIGHT = 1000;
DBG_NAME(OJoinTableView);
//------------------------------------------------------------------------------
OJoinTableView::OJoinTableView( Window* pParent, OJoinDesignView* pView )
@@ -480,7 +432,6 @@ namespace
// -----------------------------------------------------------------------------
sal_Bool isScrollAllowed( OJoinTableView* _pView,long nDelta, sal_Bool bHoriz)
{
- sal_Bool bRet = sal_True;
//////////////////////////////////////////////////////////////////////
// adjust ScrollBar-Positions
ScrollBar* pBar = _pView->GetVScrollBar();
@@ -490,9 +441,9 @@ namespace
long nOldThumbPos = pBar->GetThumbPos();
long nNewThumbPos = nOldThumbPos + nDelta;
if( nNewThumbPos < 0 )
- nNewThumbPos = 0;// bRet = sal_False;
+ nNewThumbPos = 0;
else if( nNewThumbPos > pBar->GetRangeMax() )
- nNewThumbPos = pBar->GetRangeMax();// bRet = sal_False;
+ nNewThumbPos = pBar->GetRangeMax();
if ( bHoriz )
{
@@ -502,7 +453,7 @@ namespace
else if ( nNewThumbPos == _pView->GetScrollOffset().Y() )
return sal_False;
- return bRet;
+ return sal_True;
}
// -----------------------------------------------------------------------------
sal_Bool getMovementImpl(OJoinTableView* _pView,const Point& _rPoint,const Size& _rSize,long& _nScrollX,long& _nScrollY)
@@ -512,7 +463,6 @@ namespace
Point aUpperLeft = _rPoint;
// normalize with respect to visibility
aUpperLeft -= _pView->GetScrollOffset();
- // aUpperLeft.Y() -= _pView->GetScrollOffset().Y();
Point aLowerRight(aUpperLeft.X() + _rSize.Width(), aUpperLeft.Y() + _rSize.Height());
// data about ourself
@@ -523,7 +473,6 @@ namespace
sal_Bool bFitsVert= (aUpperLeft.Y() >= 0) && (aLowerRight.Y() <= aSize.Height());
if (!bFitsHor || !bFitsVert)
{
- // #100386# OJ
if (!bFitsHor)
{
// ensure the visibility of the right border
@@ -531,7 +480,6 @@ namespace
_nScrollX = aLowerRight.X() - aSize.Width() + TABWIN_SPACING_X;
// ensure the visibility of the left border (higher priority)
- // if ( (aUpperLeft.X() - _nScrollX) < 0 )
if ( aUpperLeft.X() < 0 )
_nScrollX = aUpperLeft.X() - TABWIN_SPACING_X;
}
@@ -542,7 +490,6 @@ namespace
if ( aLowerRight.Y() > aSize.Height() )
_nScrollY = aLowerRight.Y() - aSize.Height() + TABWIN_SPACING_Y;
// upper border
- // if ( (aUpperLeft.Y() - _nScrollY) < 0 )
if ( aUpperLeft.Y() < 0 )
_nScrollY = aUpperLeft.Y() - TABWIN_SPACING_Y;
}
@@ -580,7 +527,6 @@ void OJoinTableView::EnsureVisible(const OTableWindow* _pWin)
{
// data about the tab win
TTableWindowData::value_type pData = _pWin->GetData();
- // Point aUpperLeft = pData->GetPosition();
EnsureVisible( pData->GetPosition() , pData->GetSize());
Invalidate(INVALIDATE_NOCHILDREN);
}
@@ -628,7 +574,7 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin )
//////////////////////////////////////////////////////////////////
// Belegte Bereiche dieser Zeile pruefen
- OTableWindow* pOtherTabWin;// = GetTabWinMap()->First();
+ OTableWindow* pOtherTabWin;
OTableWindowMapIterator aIter = m_aTableMap.begin();
OTableWindowMapIterator aEnd = m_aTableMap.end();
for(;aIter != aEnd;++aIter)
@@ -1142,7 +1088,7 @@ void OJoinTableView::ClearAll()
sal_Bool OJoinTableView::ScrollWhileDragging()
{
DBG_CHKTHIS(OJoinTableView,NULL);
- DBG_ASSERT(m_pDragWin != NULL, "OJoinTableView::ScrollWhileDragging darf nur waehrend Dragging eines Fensters aufgerufen werden !");
+ OSL_ENSURE(m_pDragWin != NULL, "OJoinTableView::ScrollWhileDragging darf nur waehrend Dragging eines Fensters aufgerufen werden !");
// den Timer schon mal killen
if (m_aDragScrollTimer.IsActive())
@@ -1274,10 +1220,6 @@ sal_Bool OJoinTableView::IsAddAllowed()
return sal_False;
}
- // nicht wenn keine Joins moeglich
-// if (!GetDatabase()->IsCapable(SDB_CAP_JOIN) && nMax <= GetTabWinCount())
-// return sal_False;
-
return sal_True;
}
// -----------------------------------------------------------------------------
@@ -1349,7 +1291,7 @@ void OJoinTableView::Command(const CommandEvent& rEvt)
OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTableWindow* pRhs,bool _bSupressCrossOrNaturalJoin,const OTableConnection* _rpFirstAfter) const
{
OTableConnection* pConn = NULL;
- DBG_ASSERT(pRhs || pLhs, "OJoinTableView::GetTabConn : invalid args !");
+ OSL_ENSURE(pRhs || pLhs, "OJoinTableView::GetTabConn : invalid args !");
// only one NULL-arg allowed
if ((!pLhs || pLhs->ExistsAConn()) && (!pRhs || pRhs->ExistsAConn()))
@@ -1763,7 +1705,7 @@ bool OJoinTableView::allowQueries() const
// -----------------------------------------------------------------------------
void OJoinTableView::onNoColumns_throw()
{
- OSL_ENSURE( false, "OTableWindow::onNoColumns_throw: cannot really handle this!" );
+ OSL_FAIL( "OTableWindow::onNoColumns_throw: cannot really handle this!" );
throw SQLException();
}
//------------------------------------------------------------------------------
@@ -1771,3 +1713,5 @@ bool OJoinTableView::supressCrossNaturalJoin(const TTableConnectionData::value_t
{
return false;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QTableConnection.cxx b/dbaccess/source/ui/querydesign/QTableConnection.cxx
index 3dedea1e9..77860750b 100644
--- a/dbaccess/source/ui/querydesign/QTableConnection.cxx
+++ b/dbaccess/source/ui/querydesign/QTableConnection.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,18 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYTABLECONNECTION_HXX
#include "QTableConnection.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
+#include <osl/diagnose.h>
#include "QueryTableView.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINE_HXX
#include "ConnectionLine.hxx"
-#endif
using namespace dbaui;
//========================================================================
// class OQueryTableConnection
@@ -53,7 +46,6 @@ OQueryTableConnection::OQueryTableConnection(OQueryTableView* pContainer, const
DBG_CTOR(OQueryTableConnection,NULL);
}
-
//------------------------------------------------------------------------
OQueryTableConnection::OQueryTableConnection(const OQueryTableConnection& rConn)
:OTableConnection( rConn )
@@ -81,7 +73,7 @@ OQueryTableConnection& OQueryTableConnection::operator=(const OQueryTableConnect
//------------------------------------------------------------------------
sal_Bool OQueryTableConnection::operator==(const OQueryTableConnection& rCompare)
{
- DBG_ASSERT(GetData() && rCompare.GetData(), "OQueryTableConnection::operator== : einer der beiden Teilnehmer hat keine Daten !");
+ OSL_ENSURE(GetData() && rCompare.GetData(), "OQueryTableConnection::operator== : einer der beiden Teilnehmer hat keine Daten !");
// allzuviel brauche ich nicht vergleichen (schon gar nicht alle Member) : lediglich die Fenster, an denen wir haengen, und
// die Indizies in der entsprechenden Tabelle muessen uebereinstimmen
@@ -104,8 +96,4 @@ sal_Bool OQueryTableConnection::operator==(const OQueryTableConnection& rCompare
}
// -----------------------------------------------------------------------------
-
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QTableConnection.hxx b/dbaccess/source/ui/querydesign/QTableConnection.hxx
index 63c72e14e..9e49ded40 100644
--- a/dbaccess/source/ui/querydesign/QTableConnection.hxx
+++ b/dbaccess/source/ui/querydesign/QTableConnection.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef DBAUI_QUERYTABLECONNECTION_HXX
#define DBAUI_QUERYTABLECONNECTION_HXX
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef DBAUI_QTABLECONNECTIONDATA_HXX
#include "QTableConnectionData.hxx"
-#endif
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
namespace dbaui
{
@@ -60,3 +55,5 @@ namespace dbaui
};
}
#endif // DBAUI_QUERYTABLECONNECTION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
index 88dd97e8d..b4ff85cae 100644
--- a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
+++ b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,18 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QTABLECONNECTIONDATA_HXX
#include "QTableConnectionData.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef DBAUI_QTABLECONNECTIONDATA_HXX
#include "QTableConnectionData.hxx"
-#endif
-#ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
#include "QTableWindow.hxx"
-#endif
using namespace dbaui;
@@ -173,6 +166,4 @@ sal_Bool OQueryTableConnectionData::Update()
}
// -----------------------------------------------------------------------------
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.hxx b/dbaccess/source/ui/querydesign/QTableConnectionData.hxx
index 116e2ad55..2abf703fd 100644
--- a/dbaccess/source/ui/querydesign/QTableConnectionData.hxx
+++ b/dbaccess/source/ui/querydesign/QTableConnectionData.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,21 +28,10 @@
#ifndef DBAUI_QTABLECONNECTIONDATA_HXX
#define DBAUI_QTABLECONNECTIONDATA_HXX
-#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
-#endif
-#ifndef DBAUI_TABLEFIELDDESC_HXX
#include "TableFieldDescription.hxx"
-#endif
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
-#ifndef _RTTI_HXX
#include <tools/rtti.hxx>
-#endif
-//#ifndef DBAUI_QUERYCONTROLLER_HXX
-//#include "querycontroller.hxx"
-//#endif
namespace dbaui
{
@@ -97,3 +87,5 @@ namespace dbaui
}
#endif // DBAUI_QTABLECONNECTIONDATA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx
index 6f6f3e8f8..f55d9b533 100644
--- a/dbaccess/source/ui/querydesign/QTableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,70 +28,28 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
#include "QTableWindow.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
+#include <osl/diagnose.h>
#include "dbaccess_helpid.hrc"
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef _SV_IMAGE_HXX
#include <vcl/image.hxx>
-#endif
-#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#include "TableWindowListBox.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBAUI_QUERY_HRC
#include "Query.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XKEYSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
#include <com/sun/star/container/XIndexAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_KEYTYPE_HPP_
#include <com/sun/star/sdbcx/KeyType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef DBAUI_TABLEFIELDINFO_HXX
#include "TableFieldInfo.hxx"
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
using namespace ::com::sun::star::sdbc;
@@ -161,14 +120,13 @@ sal_Bool OQueryTableWindow::Init()
sAliasName = String(sAliasName).EraseAllChars('"');
SetAliasName(sAliasName);
// SetAliasName reicht das als WinName weiter, dadurch benutzt es die Basisklasse
- // reset the titel
+ // reset the title
m_aTitle.SetText( pWinData->GetWinName() );
m_aTitle.Show();
- // sal_Bool bSuccess(sal_True);
if (!bSuccess)
{ // es soll nur ein Dummy-Window aufgemacht werden ...
- DBG_ASSERT(GetAliasName().getLength(), "OQueryTableWindow::Init : kein Alias- UND kein Tabellenname geht nicht !");
+ OSL_ENSURE(GetAliasName().getLength(), "OQueryTableWindow::Init : kein Alias- UND kein Tabellenname geht nicht !");
// .. aber das braucht wenigstens einen Alias
// ::com::sun::star::form::ListBox anlegen
@@ -205,14 +163,14 @@ void OQueryTableWindow::deleteUserData(void*& _pUserData)
//------------------------------------------------------------------------------
void OQueryTableWindow::OnEntryDoubleClicked(SvLBoxEntry* pEntry)
{
- DBG_ASSERT(pEntry != NULL, "OQueryTableWindow::OnEntryDoubleClicked : pEntry darf nicht NULL sein !");
+ OSL_ENSURE(pEntry != NULL, "OQueryTableWindow::OnEntryDoubleClicked : pEntry darf nicht NULL sein !");
// man koennte das auch abfragen und dann ein return hinsetzen, aber so weist es vielleicht auf Fehler bei Aufrufer hin
if (getTableView()->getDesignView()->getController().isReadOnly())
return;
OTableFieldInfo* pInf = static_cast<OTableFieldInfo*>(pEntry->GetUserData());
- DBG_ASSERT(pInf != NULL, "OQueryTableWindow::OnEntryDoubleClicked : Feld hat keine FieldInfo !");
+ OSL_ENSURE(pInf != NULL, "OQueryTableWindow::OnEntryDoubleClicked : Feld hat keine FieldInfo !");
// eine DragInfo aufbauen
OTableFieldDescRef aInfo = new OTableFieldDesc(GetTableName(),m_pListBox->GetEntryText(pEntry));
@@ -228,8 +186,8 @@ void OQueryTableWindow::OnEntryDoubleClicked(SvLBoxEntry* pEntry)
//------------------------------------------------------------------------------
sal_Bool OQueryTableWindow::ExistsField(const ::rtl::OUString& strFieldName, OTableFieldDescRef& rInfo)
{
- DBG_ASSERT(m_pListBox != NULL, "OQueryTableWindow::ExistsField : habe keine ::com::sun::star::form::ListBox !");
- OSL_ENSURE(rInfo.isValid(),"OQueryTableWindow::ExistsField: invlid argument for OTableFieldDescRef!");
+ OSL_ENSURE(m_pListBox != NULL, "OQueryTableWindow::ExistsField : habe keine ::com::sun::star::form::ListBox !");
+ OSL_ENSURE(rInfo.is(),"OQueryTableWindow::ExistsField: invlid argument for OTableFieldDescRef!");
Reference< XConnection> xConnection = getTableView()->getDesignView()->getController().getConnection();
sal_Bool bExists = sal_False;
if(xConnection.is())
@@ -245,7 +203,7 @@ sal_Bool OQueryTableWindow::ExistsField(const ::rtl::OUString& strFieldName, OTa
if (bCase(strFieldName,::rtl::OUString(m_pListBox->GetEntryText(pEntry))))
{
OTableFieldInfo* pInf = static_cast<OTableFieldInfo*>(pEntry->GetUserData());
- DBG_ASSERT(pInf != NULL, "OQueryTableWindow::ExistsField : Feld hat keine FieldInfo !");
+ OSL_ENSURE(pInf != NULL, "OQueryTableWindow::ExistsField : Feld hat keine FieldInfo !");
rInfo->SetTabWindow(this);
rInfo->SetField(strFieldName);
@@ -280,5 +238,4 @@ void OQueryTableWindow::KeyInput( const KeyEvent& rEvt )
}
// -----------------------------------------------------------------------------
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QTableWindow.hxx b/dbaccess/source/ui/querydesign/QTableWindow.hxx
index 327eb8205..5d90264f1 100644
--- a/dbaccess/source/ui/querydesign/QTableWindow.hxx
+++ b/dbaccess/source/ui/querydesign/QTableWindow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,18 +28,10 @@
#ifndef DBAUI_QUERY_TABLEWINDOW_HXX
#define DBAUI_QUERY_TABLEWINDOW_HXX
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
#include "QTableWindowData.hxx"
-#endif
-#ifndef DBAUI_TABLEFIELDDESC_HXX
#include "TableFieldDescription.hxx"
-#endif
-#ifndef _RTTI_HXX
#include <tools/rtti.hxx>
-#endif
namespace dbaui
{
@@ -98,3 +91,4 @@ namespace dbaui
#endif // DBAUI_QUERY_TABLEWINDOW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QTableWindowData.cxx b/dbaccess/source/ui/querydesign/QTableWindowData.cxx
index eccb969c7..02905ae3e 100644
--- a/dbaccess/source/ui/querydesign/QTableWindowData.cxx
+++ b/dbaccess/source/ui/querydesign/QTableWindowData.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
#include "QTableWindowData.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
using namespace dbaui;
@@ -60,3 +57,4 @@ OQueryTableWindowData::~OQueryTableWindowData()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QTableWindowData.hxx b/dbaccess/source/ui/querydesign/QTableWindowData.hxx
index 26b8dd3c8..da13c287b 100644
--- a/dbaccess/source/ui/querydesign/QTableWindowData.hxx
+++ b/dbaccess/source/ui/querydesign/QTableWindowData.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,19 +28,13 @@
#ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
#define DBAUI_QUERY_TABLEWINDOWDATA_HXX
-#ifndef DBAUI_TABLEWINDOWDATA_HXX
#include "TableWindowData.hxx"
-#endif
#ifndef INCLUDED_VECTOR
#define INCLUDED_VECTOR
#include <vector>
#endif
-#ifndef _COM_SUN_STAR_IO_XOBJECTOUTPUTSTREAM_HPP_
#include <com/sun/star/io/XObjectOutputStream.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_XOBJECTINPUTSTREAM_HPP_
#include <com/sun/star/io/XObjectInputStream.hpp>
-#endif
namespace dbaui
@@ -57,3 +52,4 @@ namespace dbaui
#endif // DBAUI_QUERY_TABLEWINDOWDATA_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryAddTabConnUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryAddTabConnUndoAction.hxx
index 6c3b5d9d1..c847b8c56 100644
--- a/dbaccess/source/ui/querydesign/QueryAddTabConnUndoAction.hxx
+++ b/dbaccess/source/ui/querydesign/QueryAddTabConnUndoAction.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBAUI_QUERYADDTABCONNUNDOACTION_HXX
#define DBAUI_QUERYADDTABCONNUNDOACTION_HXX
-#ifndef DBAUI_QUERYTABCONNUNDOACTION_HXX
#include "QueryTabConnUndoAction.hxx"
-#endif
namespace dbaui
{
@@ -61,3 +60,4 @@ namespace dbaui
#endif // DBAUI_QUERYADDTABCONNUNDOACTION_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
index 679814bf6..b616acd41 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef DBAUI_QUERYDESIGNFIELDUNDOACT_HXX
#define DBAUI_QUERYDESIGNFIELDUNDOACT_HXX
-#ifndef DBAUI_GENERALUNDO_HXX
#include "GeneralUndo.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBAUI_QUERYDESIGN_OSELECTIONBROWSEBOX_HXX
#include "SelectionBrowseBox.hxx"
-#endif
namespace dbaui
@@ -163,3 +158,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx
index 8f714fb1c..68b2591f5 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBAUI_QUERYDESIGNUNDOACTION_HXX
#define DBAUI_QUERYDESIGNUNDOACTION_HXX
-#ifndef DBAUI_GENERALUNDO_HXX
#include "GeneralUndo.hxx"
-#endif
namespace dbaui
{
@@ -48,3 +47,4 @@ namespace dbaui
}
#endif // DBAUI_QUERYDESIGNUNDOACTION_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 6975b7287..ee324e934 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,111 +28,42 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef DBAUI_QUERY_TABLEWINDOW_HXX
#include "QTableWindow.hxx"
-#endif
-#ifndef _SV_TOOLBOX_HXX
#include <vcl/toolbox.hxx>
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef _SV_SPLIT_HXX
#include <vcl/split.hxx>
-#endif
-#ifndef _UNDO_HXX
#include <svl/undo.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef DBAUI_QYDLGTAB_HXX
+#include <osl/diagnose.h>
#include "adtabdlg.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_COMBOBOX_HXX
#include <vcl/combobox.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef DBAUI_QUERYDESIGN_OSELECTIONBROWSEBOX_HXX
#include "SelectionBrowseBox.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef _UTL_CONFIGMGR_HXX_
#include <unotools/configmgr.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _COM_SUN_STAR_I18N_XLOCALEDATA_HPP_
#include <com/sun/star/i18n/XLocaleData.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#endif
-#ifndef _CONNECTIVITY_PCOLUMN_HXX_
#include <connectivity/PColumn.hxx>
-#endif
-#ifndef DBAUI_QUERYTABLECONNECTION_HXX
#include "QTableConnection.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINE_HXX
#include "ConnectionLine.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
-#endif
-#ifndef DBAUI_QTABLECONNECTIONDATA_HXX
#include "QTableConnectionData.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTAINERWINDOW_HXX
#include "querycontainerwindow.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef INCLUDED_SVTOOLS_SYSLOCALE_HXX
#include <unotools/syslocale.hxx>
-#endif
using namespace ::dbaui;
using namespace ::utl;
@@ -152,8 +84,8 @@ using namespace ::com::sun::star::container;
// please look at the book LargeScale C++ to know why
namespace
{
- static const ::rtl::OUString C_AND = ::rtl::OUString::createFromAscii(" AND ");
- static const ::rtl::OUString C_OR = ::rtl::OUString::createFromAscii(" OR ");
+ static const ::rtl::OUString C_AND(RTL_CONSTASCII_USTRINGPARAM(" AND "));
+ static const ::rtl::OUString C_OR(RTL_CONSTASCII_USTRINGPARAM(" OR "));
// forward declarations
sal_Bool InsertJoin( const OQueryDesignView* _pView,
@@ -316,7 +248,7 @@ namespace
bError = sal_True;
}
}
- // check if error occured
+ // check if error occurred
if ( bError )
eErrorCode = eIllegalJoin;
@@ -401,7 +333,7 @@ namespace
}
catch(SQLException&)
{
- OSL_ASSERT(!"Failure while building Join criteria!");
+ OSL_FAIL("Failure while building Join criteria!");
}
}
@@ -444,7 +376,6 @@ namespace
{
::rtl::OUString aDBName(pEntryTab->GetComposedName());
- // Reference< XConnection> xConnection = static_cast<OQueryController&>(_pView->getController()).getConnection();
if( _xConnection.is() )
{
try
@@ -458,9 +389,9 @@ namespace
::rtl::OUString aQuote = xMetaData->getIdentifierQuoteString();
if ( _bForce || isAppendTableAliasEnabled( _xConnection ) || pEntryTab->GetAliasName() != aDBName )
{
- aTableListStr += ::rtl::OUString::createFromAscii(" ");
+ aTableListStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" "));
if ( generateAsBeforeTableAlias( _xConnection ) )
- aTableListStr += ::rtl::OUString::createFromAscii("AS ");
+ aTableListStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AS "));
aTableListStr += ::dbtools::quoteName( aQuote, pEntryTab->GetAliasName() );
}
aDBName = aTableListStr;
@@ -550,8 +481,6 @@ namespace
if ( pEntryConnData->GetJoinType() == INNER_JOIN && !pEntryConnData->isNatural() )
return;
- // Reference< XConnection> xConnection = static_cast<OQueryController&>(_pView->getController()).getConnection();
-
if(!aJoin.getLength())
{
OQueryTableWindow* pEntryTabFrom = static_cast<OQueryTableWindow*>(pEntryConn->GetSourceWin());
@@ -621,7 +550,7 @@ namespace
else if (SQL_ISRULEOR2(pNode,search_condition,boolean_term) && // AND/OR-Verknuepfung:
pNode->count() == 3)
{
- // nur AND Verknüpfung zulassen
+ // nur AND Verkn�pfung zulassen
if (!SQL_ISTOKEN(pNode->getChild(1),AND))
eErrorCode = eIllegalJoinCondition;
else if ( eOk == (eErrorCode = InsertJoinConnection(_pView,pNode->getChild(0), _eJoinType,pLeftTable,pRightTable)) )
@@ -630,7 +559,7 @@ namespace
else if (SQL_ISRULE(pNode,comparison_predicate))
{
// only the comparison of columns is allowed
- DBG_ASSERT(pNode->count() == 3,"OQueryDesignView::InsertJoinConnection: Fehler im Parse Tree");
+ OSL_ENSURE(pNode->count() == 3,"OQueryDesignView::InsertJoinConnection: Fehler im Parse Tree");
if (!(SQL_ISRULE(pNode->getChild(0),column_ref) &&
SQL_ISRULE(pNode->getChild(2),column_ref) &&
pNode->getChild(1)->getNodeType() == SQL_NODE_EQUAL))
@@ -649,7 +578,6 @@ namespace
if ( pLeftTable )
{
OQueryTableWindow* pLeftWindow = static_cast<OQueryTableView*>(_pView->getTableView())->FindTable( getTableRange(_pView,pLeftTable->getByRule(OSQLParseNode::table_ref) ));
- // OQueryTableWindow* pRightWindow = static_cast<OQueryTableView*>(_pView->getTableView())->FindTable( getTableRange(_pView,pRightTable->getByRule(OSQLParseNode::table_ref) ));
if ( pLeftWindow == aDragLeft->GetTabWindow() )
insertConnection(_pView,_eJoinType,aDragLeft,aDragRight);
else
@@ -750,7 +678,7 @@ namespace
if ( pEntryField->isAggreateFunction() )
{
- DBG_ASSERT(pEntryField->GetFunction().getLength(),"Functionname darf hier nicht leer sein! ;-(");
+ OSL_ENSURE(pEntryField->GetFunction().getLength(),"Functionname darf hier nicht leer sein! ;-(");
::rtl::OUStringBuffer aTmpStr2( pEntryField->GetFunction());
aTmpStr2.appendAscii("(");
aTmpStr2.append(aTmpStr.makeStringAndClear());
@@ -775,7 +703,7 @@ namespace
}
catch(SQLException&)
{
- OSL_ASSERT(!"Failure while building select list!");
+ OSL_FAIL("Failure while building select list!");
}
return aFieldListStr.makeStringAndClear();
}
@@ -913,7 +841,7 @@ namespace
}
}
}
- // nur einmal für jedes Feld
+ // nur einmal f�r jedes Feld
else if ( !i && pEntryField->isCondition() )
{
if (!aWhereStr.getLength()) // noch keine Kriterien
@@ -950,7 +878,7 @@ namespace
}
catch(SQLException&)
{
- OSL_ASSERT(!"Failure while building where clause!");
+ OSL_FAIL("Failure while building where clause!");
}
return sal_True;
}
@@ -1003,7 +931,7 @@ namespace
}
else if ( pEntryField->isNumericOrAggreateFunction() )
{
- DBG_ASSERT(pEntryField->GetFunction().getLength(),"Functionname darf hier nicht leer sein! ;-(");
+ OSL_ENSURE(pEntryField->GetFunction().getLength(),"Functionname darf hier nicht leer sein! ;-(");
aWorkStr += pEntryField->GetFunction();
aWorkStr += ::rtl::OUString('(');
aWorkStr += quoteTableAlias(bMulti,pEntryField->GetAlias(),aQuote);
@@ -1044,14 +972,14 @@ namespace
eErrorCode = eStatementTooLong;
else
{
- _rsRet = ::rtl::OUString::createFromAscii(" ORDER BY ");
+ _rsRet = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ORDER BY "));
_rsRet += aWorkStr;
}
}
}
catch(SQLException&)
{
- OSL_ASSERT(!"Failure while building group by!");
+ OSL_FAIL("Failure while building group by!");
}
return eErrorCode;
@@ -1241,7 +1169,7 @@ namespace
OTableFieldDescRef pEntryField = *aIter;
if ( pEntryField->IsGroupBy() )
{
- DBG_ASSERT(pEntryField->GetField().getLength(),"Kein FieldName vorhanden!;-(");
+ OSL_ENSURE(pEntryField->GetField().getLength(),"Kein FieldName vorhanden!;-(");
::rtl::OUString sGroupByPart = quoteTableAlias(bMulti,pEntryField->GetAlias(),aQuote);
// only quote the field name when it isn't calculated
@@ -1279,14 +1207,14 @@ namespace
if ( aGroupByStr.getLength() )
{
aGroupByStr = aGroupByStr.replaceAt(aGroupByStr.getLength()-1,1, ::rtl::OUString(' ') );
- ::rtl::OUString aGroupByStr2 = ::rtl::OUString::createFromAscii(" GROUP BY ");
+ ::rtl::OUString aGroupByStr2(RTL_CONSTASCII_USTRINGPARAM(" GROUP BY "));
aGroupByStr2 += aGroupByStr;
aGroupByStr = aGroupByStr2;
}
}
catch(SQLException&)
{
- OSL_ASSERT(!"Failure while building group by!");
+ OSL_FAIL("Failure while building group by!");
}
return aGroupByStr;
}
@@ -1574,7 +1502,7 @@ namespace
aDragLeft->SetField(aCondition);
aDragLeft->SetFunctionType(FKT_CONDITION);
- eErrorCode = _pSelectionBrw->InsertField(aDragLeft,BROWSER_INVALIDID,sal_False,sal_True).isValid() ? eOk : eTooManyColumns;
+ eErrorCode = _pSelectionBrw->InsertField(aDragLeft,BROWSER_INVALIDID,sal_False,sal_True).is() ? eOk : eTooManyColumns;
}
else //! TODO not supported yet
eErrorCode = eStatementTooComplex;
@@ -1618,13 +1546,6 @@ namespace
&rController.getParser().getContext(),
sal_True,
sal_True); // quote is to true because we need quoted elements inside the function
- // i75557
- //pFunction->parseNodeToPredicateStr(aColumnName,
- // xConnection,
- // rController.getNumberFormatter(),
- // _pView->getLocale(),
- // static_cast<sal_Char>(_pView->getDecimalSeparator().toChar()),
- // &rController.getParser().getContext());
// don't display the column name
aCondition = aCondition.copy(aColumnName.getLength());
aCondition = aCondition.trim();
@@ -1644,7 +1565,7 @@ namespace
for(;aIter != aTabEnd;++aIter)
{
OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second);
- if (pTabWin->ExistsField( ::rtl::OUString::createFromAscii("*"), aDragLeft ))
+ if (pTabWin->ExistsField( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")), aDragLeft ))
{
aDragLeft->SetAlias(String());
aDragLeft->SetTable(String());
@@ -1693,7 +1614,7 @@ namespace
SqlParseError eErrorCode = eOk;
OQueryController& rController = static_cast<OQueryController&>(_pView->getController());
- DBG_ASSERT(SQL_ISRULE( pCondition, comparison_predicate),"ComparisonPredicate: pCondition ist kein ComparisonPredicate");
+ OSL_ENSURE(SQL_ISRULE( pCondition, comparison_predicate),"ComparisonPredicate: pCondition ist kein ComparisonPredicate");
if ( SQL_ISRULE(pCondition->getChild(0), column_ref )
|| SQL_ISRULE(pCondition->getChild(pCondition->count()-1), column_ref) )
{
@@ -1758,22 +1679,22 @@ namespace
case SQL_NODE_LESS:
// take the opposite as we change the order
i--;
- aCondition = aCondition + ::rtl::OUString::createFromAscii(">");
+ aCondition = aCondition + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(">"));
break;
case SQL_NODE_LESSEQ:
// take the opposite as we change the order
i--;
- aCondition = aCondition + ::rtl::OUString::createFromAscii(">=");
+ aCondition = aCondition + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(">="));
break;
case SQL_NODE_GREAT:
// take the opposite as we change the order
i--;
- aCondition = aCondition + ::rtl::OUString::createFromAscii("<");
+ aCondition = aCondition + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("<"));
break;
case SQL_NODE_GREATEQ:
// take the opposite as we change the order
i--;
- aCondition = aCondition + ::rtl::OUString::createFromAscii("<=");
+ aCondition = aCondition + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("<="));
break;
default:
break;
@@ -1877,7 +1798,7 @@ namespace
rParseIter.getColumnRange( pColumnRef, aColumnName, aTableRange );
sal_Bool bFound(sal_False);
- DBG_ASSERT(aColumnName.getLength(),"Columnname darf nicht leer sein");
+ OSL_ENSURE(aColumnName.getLength(),"Columnname darf nicht leer sein");
if (!aTableRange.getLength())
{
// SELECT column, ...
@@ -1930,7 +1851,7 @@ namespace
sal_Bool InsertJoin(const OQueryDesignView* _pView,
const ::connectivity::OSQLParseNode *pNode)
{
- DBG_ASSERT( SQL_ISRULE( pNode, qualified_join ) || SQL_ISRULE( pNode, joined_table ) || SQL_ISRULE( pNode, cross_union ),
+ OSL_ENSURE( SQL_ISRULE( pNode, qualified_join ) || SQL_ISRULE( pNode, joined_table ) || SQL_ISRULE( pNode, cross_union ),
"OQueryDesignView::InsertJoin: Fehler im Parse Tree");
if (SQL_ISRULE(pNode,joined_table))
@@ -1944,7 +1865,7 @@ namespace
if ( !checkJoinConditions(_pView,pNode->getChild(0)) || !checkJoinConditions(_pView,pRightTableRef))
return sal_False;
- // named column join wird später vieleicht noch implementiert
+ // named column join wird sp�ter vieleicht noch implementiert
// SQL_ISRULE(pNode->getChild(4),named_columns_join)
EJoinType eJoinType = INNER_JOIN;
bool bNatural = false;
@@ -2020,7 +1941,7 @@ namespace
OTableFields& rUnUsedFields = rController.getUnUsedFields();
OTableFields::iterator aEnd = rUnUsedFields.end();
for(OTableFields::iterator aIter = rUnUsedFields.begin();aIter != aEnd;++aIter)
- if(_pSelectionBrw->InsertField(*aIter,BROWSER_INVALIDID,sal_False,sal_False).isValid())
+ if(_pSelectionBrw->InsertField(*aIter,BROWSER_INVALIDID,sal_False,sal_False).is())
(*aIter) = NULL;
OTableFields().swap( rUnUsedFields );
}
@@ -2071,7 +1992,7 @@ namespace
Reference< XConnection> xConnection = rController.getConnection();
if ( !xConnection.is() )
{
- DBG_ERROR( "InitFromParseNodeImpl: no connection? no connection!" );
+ OSL_FAIL( "InitFromParseNodeImpl: no connection? no connection!" );
break;
}
@@ -2178,7 +2099,7 @@ namespace
}
catch(SQLException&)
{
- OSL_ASSERT(!"getMaxTablesInSelect!");
+ OSL_FAIL("getMaxTablesInSelect!");
}
}
while ( false );
@@ -2223,7 +2144,7 @@ namespace
return eNoSelectStatement;
::connectivity::OSQLParseNode* pParseTree = pNode->getChild(2); // selection
- sal_Bool bFirstField = sal_True; // bei der Initialisierung muß auf alle Faelle das erste Feld neu aktiviert werden
+ sal_Bool bFirstField = sal_True; // bei der Initialisierung mu� auf alle Faelle das erste Feld neu aktiviert werden
SqlParseError eErrorCode = eOk;
@@ -2281,11 +2202,6 @@ namespace
_pView->getLocale(),
static_cast<sal_Char>(_pView->getDecimalSeparator().toChar()),
&rController.getParser().getContext());
- //pColumnRef->parseNodeToStr( aColumns,
- // xConnection,
- // &rController.getParser().getContext(),
- // sal_True,
- // sal_True); // quote is to true because we need quoted elements inside the function
sal_Int32 nFunctionType = FKT_NONE;
::connectivity::OSQLParseNode* pParamRef = NULL;
@@ -2308,7 +2224,7 @@ namespace
for(;aIter != aEnd;++aIter)
{
OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second);
- if (pTabWin->ExistsField( ::rtl::OUString::createFromAscii("*"), aInfo ))
+ if (pTabWin->ExistsField( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")), aInfo ))
{
aInfo->SetAlias(String());
aInfo->SetTable(String());
@@ -2355,7 +2271,7 @@ namespace
eErrorCode = _pView->InsertField(aInfo, sal_True, bFirstField);
bFirstField = sal_False;
}
- else //if(SQL_ISRULE(pColumnRef,num_value_exp) || SQL_ISRULE(pColumnRef,term))
+ else
{
::rtl::OUString aColumns;
pColumnRef->parseNodeToStr( aColumns,
@@ -2388,7 +2304,7 @@ namespace
break;
}
- DBG_ERROR( "InstallFields: don't know how to interpret this parse node!" );
+ OSL_FAIL( "InstallFields: don't know how to interpret this parse node!" );
} while ( false );
}
@@ -2438,7 +2354,7 @@ namespace
for(;aIter != aEnd;++aIter)
{
OTableFieldDescRef pEntry = *aIter;
- if(pEntry.isValid() && pEntry->GetFieldAlias() == aColumnName)
+ if(pEntry.is() && pEntry->GetFieldAlias() == aColumnName)
pEntry->SetOrderDir( eOrderDir );
}
}
@@ -2496,7 +2412,7 @@ namespace
{
OQueryController& rController = static_cast<OQueryController&>(_pView->getController());
::connectivity::OSQLParseNode* pGroupBy = pSelectRoot->getChild(3)->getChild(2)->getChild(2);
-
+
for( sal_uInt32 i=0 ; i < pGroupBy->count() && eOk == eErrorCode; ++i )
{
OTableFieldDescRef aDragInfo = new OTableFieldDesc();
@@ -2834,7 +2750,7 @@ bool OQueryDesignView::HasFieldByAliasName(const ::rtl::OUString& rFieldName, OT
// -----------------------------------------------------------------------------
SqlParseError OQueryDesignView::InsertField( const OTableFieldDescRef& rInfo, sal_Bool bVis, sal_Bool bActivate)
{
- return m_pSelectionBox->InsertField( rInfo, BROWSER_INVALIDID,bVis, bActivate ).isValid() ? eOk : eTooManyColumns;
+ return m_pSelectionBox->InsertField( rInfo, BROWSER_INVALIDID,bVis, bActivate ).is() ? eOk : eTooManyColumns;
}
// -----------------------------------------------------------------------------
sal_Int32 OQueryDesignView::getColWidth(sal_uInt16 _nColPos) const
@@ -2848,7 +2764,7 @@ sal_Int32 OQueryDesignView::getColWidth(sal_uInt16 _nColPos) const
//------------------------------------------------------------------------------
void OQueryDesignView::fillValidFields(const ::rtl::OUString& sAliasName, ComboBox* pFieldList)
{
- DBG_ASSERT(pFieldList != NULL, "OQueryDesignView::FillValidFields : What the hell do you think I can do with a NULL-ptr ? This will crash !");
+ OSL_ENSURE(pFieldList != NULL, "OQueryDesignView::FillValidFields : What the hell do you think I can do with a NULL-ptr ? This will crash !");
pFieldList->Clear();
sal_Bool bAllTables = sAliasName.getLength() == 0;
@@ -2916,7 +2832,7 @@ sal_Bool OQueryDesignView::checkStatement()
{
sal_Bool bRet = sal_True;
if ( m_pSelectionBox )
- bRet = m_pSelectionBox->Save(); // a error occured so we return no
+ bRet = m_pSelectionBox->Save(); // an error occurred so we return no
return bRet;
}
//-------------------------------------------------------------------------------
@@ -2967,7 +2883,7 @@ sal_Bool OQueryDesignView::checkStatement()
const ::std::vector<OTableConnection*>* pConnList = m_pTableView->getTableConnections();
Reference< XConnection> xConnection = rController.getConnection();
::rtl::OUString aTableListStr(GenerateFromClause(xConnection,pTabList,pConnList));
- DBG_ASSERT(aTableListStr.getLength(), "OQueryDesignView::getStatement() : unerwartet : habe Felder, aber keine Tabellen !");
+ OSL_ENSURE(aTableListStr.getLength(), "OQueryDesignView::getStatement() : unerwartet : habe Felder, aber keine Tabellen !");
// wenn es Felder gibt, koennen die nur durch Einfuegen aus einer schon existenten Tabelle entstanden sein; wenn andererseits
// eine Tabelle geloescht wird, verschwinden auch die zugehoerigen Felder -> ergo KANN es das nicht geben, dass Felder
// existieren, aber keine Tabellen (und aFieldListStr hat schon eine Laenge, das stelle ich oben sicher)
@@ -2980,9 +2896,9 @@ sal_Bool OQueryDesignView::checkStatement()
GenerateInnerJoinCriterias(xConnection,aJoinCrit,pConnList);
if(aJoinCrit.getLength())
{
- ::rtl::OUString aTmp = ::rtl::OUString::createFromAscii("( ");
+ ::rtl::OUString aTmp(RTL_CONSTASCII_USTRINGPARAM("( "));
aTmp += aJoinCrit;
- aTmp += ::rtl::OUString::createFromAscii(" )");
+ aTmp += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" )"));
if(aCriteriaListStr.getLength())
{
aTmp += C_AND;
@@ -2991,16 +2907,16 @@ sal_Bool OQueryDesignView::checkStatement()
aCriteriaListStr = aTmp;
}
// ----------------- Statement aufbauen ----------------------
- ::rtl::OUStringBuffer aSqlCmd(::rtl::OUString::createFromAscii("SELECT "));
+ ::rtl::OUStringBuffer aSqlCmd(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT ")));
if(static_cast<OQueryController&>(getController()).isDistinct())
- aSqlCmd.append(::rtl::OUString::createFromAscii(" DISTINCT "));
+ aSqlCmd.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" DISTINCT ")));
aSqlCmd.append(aFieldListStr);
- aSqlCmd.append(::rtl::OUString::createFromAscii(" FROM "));
+ aSqlCmd.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" FROM ")));
aSqlCmd.append(aTableListStr);
if (aCriteriaListStr.getLength())
{
- aSqlCmd.append(::rtl::OUString::createFromAscii(" WHERE "));
+ aSqlCmd.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE ")));
aSqlCmd.append(aCriteriaListStr.makeStringAndClear());
}
// ----------------- GroupBy aufbauen und Anh"angen ------------
@@ -3015,7 +2931,7 @@ sal_Bool OQueryDesignView::checkStatement()
// ----------------- having Anh"angen ------------
if(aHavingStr.getLength())
{
- aSqlCmd.append(::rtl::OUString::createFromAscii(" HAVING "));
+ aSqlCmd.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" HAVING ")));
aSqlCmd.append(aHavingStr.makeStringAndClear());
}
// ----------------- Sortierung aufbauen und Anh"angen ------------
@@ -3106,7 +3022,6 @@ void OQueryDesignView::SaveUIConfig()
{
OQueryController& rCtrl = static_cast<OQueryController&>(getController());
rCtrl.SaveTabWinsPosSize( m_pTableView->GetTabWinMap(), m_pScrollWindow->GetHScrollBar()->GetThumbPos(), m_pScrollWindow->GetVScrollBar()->GetThumbPos() );
- // rCtrl.SaveTabFieldsWidth( m_pSelectionBox );
rCtrl.setVisibleRows( m_pSelectionBox->GetNoneVisibleRows() );
if ( m_aSplitter.GetSplitPosPixel() != 0 )
rCtrl.setSplitPos( m_aSplitter.GetSplitPosPixel() );
@@ -3117,8 +3032,8 @@ OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(OTableFieldDescRef pE
::rtl::OUString& _rsErrorMessage,
Reference<XPropertySet>& _rxColumn) const
{
- OSL_ENSURE(pEntry.isValid(),"Entry is null!");
- if(!pEntry.isValid())
+ OSL_ENSURE(pEntry.is(),"Entry is null!");
+ if(!pEntry.is())
return NULL;
Reference< XConnection> xConnection = static_cast<OQueryController&>(getController()).getConnection();
if(!xConnection.is())
@@ -3237,7 +3152,7 @@ void OQueryDesignView::initByFieldDescriptions( const Sequence< PropertyValue >&
++field
)
{
- ::vos::ORef< OTableFieldDesc > pField( new OTableFieldDesc() );
+ ::rtl::Reference< OTableFieldDesc > pField( new OTableFieldDesc() );
pField->Load( *field, true );
InsertField( pField, sal_True, sal_False );
}
@@ -3306,3 +3221,5 @@ void OQueryDesignView::fillFunctionInfo( const ::connectivity::OSQLParseNode* p
aInfo->SetTabWindow(NULL);
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx
index cb80cf0d9..8c3ee3ac8 100644
--- a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx
+++ b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_OQUERYMOVETABWINUNDOACT_HXX
#include "QueryMoveTabWinUndoAct.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef DBAUI_QUERY_TABLEWINDOW_HXX
#include "QTableWindow.hxx"
-#endif
using namespace dbaui;
//------------------------------------------------------------------------------
void OJoinMoveTabWinUndoAct::TogglePosition()
@@ -54,3 +49,4 @@ void OJoinMoveTabWinUndoAct::TogglePosition()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx
index 1f6d16630..73b1a6671 100644
--- a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef DBAUI_OQUERYMOVETABWINUNDOACT_HXX
#define DBAUI_OQUERYMOVETABWINUNDOACT_HXX
-#ifndef DBAUI_QUERYDESIGNUNDOACTION_HXX
#include "QueryDesignUndoAction.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
-#endif
namespace dbaui
{
@@ -70,3 +65,4 @@ namespace dbaui
#endif // DBAUI_OQUERYMOVETABWINUNDOACT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx
index 83907451e..83bbafa6a 100644
--- a/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBAUI_QUERYSIZETABWINUNDOACT_HXX
#define DBAUI_QUERYSIZETABWINUNDOACT_HXX
-#ifndef DBAUI_QUERYDESIGNUNDOACTION_HXX
#include "QueryDesignUndoAction.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
namespace dbaui
{
@@ -86,3 +83,4 @@ namespace dbaui
#endif //DBAUI_QUERYSIZETABWINUNDOACT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
index 452f9314c..94aafe197 100644
--- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,27 +28,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYTABCONNUNDOACTION_HXX
#include "QueryTabConnUndoAction.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLECONNECTION_HXX
#include "QTableConnection.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef DBAUI_QUERYADDTABCONNUNDOACTION_HXX
#include "QueryAddTabConnUndoAction.hxx"
-#endif
-#ifndef DBAUI_QUERYTABWINSHOWUNDOACT_HXX
#include "QueryTabWinShowUndoAct.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
using namespace dbaui;
@@ -148,3 +135,5 @@ void OQueryTabWinDelUndoAct::Redo()
SetOwnership(sal_True);
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx
index 929a168d2..07d6d17ac 100644
--- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx
+++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBAUI_QUERYTABCONNUNDOACTION_HXX
#define DBAUI_QUERYTABCONNUNDOACTION_HXX
-#ifndef DBAUI_QUERYDESIGNUNDOACTION_HXX
#include "QueryDesignUndoAction.hxx"
-#endif
namespace dbaui
{
@@ -57,3 +56,4 @@ namespace dbaui
#endif // DBAUI_QUERYTABCONNUNDOACTION_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx
index e8abb5240..0a64becdc 100644
--- a/dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef DBAUI_QUERYTABWINSHOWUNDOACT_HXX
#define DBAUI_QUERYTABWINSHOWUNDOACT_HXX
-#ifndef DBAUI_QUERYTABWINUNDOACT_HXX
#include "QueryTabWinUndoAct.hxx"
-#endif
namespace dbaui
{
@@ -64,3 +63,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
index d6b66ff2a..112fc4763 100644
--- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,30 +28,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_OQueryTabWinUndoAct_HXX
#include "QueryTabWinUndoAct.hxx"
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef DBAUI_QUERY_TABLEWINDOW_HXX
#include "QTableWindow.hxx"
-#endif
-#ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
#include "QTableWindowData.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
-#endif
-#ifndef DBAUI_QUERYDESIGNFIELDUNDOACT_HXX
#include "QueryDesignFieldUndoAct.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
using namespace dbaui;
@@ -149,7 +134,4 @@ void OTabFieldMovedUndoAct::Undo()
}
// -----------------------------------------------------------------------------
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
index dd20a2f69..54b88b82f 100644
--- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBAUI_QUERYTABWINUNDOACT_HXX
#define DBAUI_QUERYTABWINUNDOACT_HXX
-#ifndef DBAUI_QUERYDESIGNUNDOACTION_HXX
#include "QueryDesignUndoAction.hxx"
-#endif
#ifndef INCLUDED_VECTOR
#define INCLUDED_VECTOR
#include <vector>
@@ -85,3 +84,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index cffad658b..06540ae15 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,100 +29,38 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef DBAUI_TABLEFIELDINFO_HXX
#include "TableFieldInfo.hxx"
-#endif
-#ifndef DBAUI_TABLEFIELDDESC_HXX
#include "TableFieldDescription.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
+#include <osl/diagnose.h>
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef DBAUI_QUERY_TABLEWINDOW_HXX
#include "QTableWindow.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLECONNECTION_HXX
#include "QTableConnection.hxx"
-#endif
-#ifndef DBAUI_QTABLECONNECTIONDATA_HXX
#include "QTableConnectionData.hxx"
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef DBAUI_QUERYADDTABCONNUNDOACTION_HXX
#include "QueryAddTabConnUndoAction.hxx"
-#endif
-#ifndef DBAUI_QUERYTABWINSHOWUNDOACT_HXX
#include "QueryTabWinShowUndoAct.hxx"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XKEYSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-#ifndef DBACCESS_JACCESS_HXX
#include "JAccess.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_KEYTYPE_HPP_
#include <com/sun/star/sdbcx/KeyType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
#include <com/sun/star/container/XIndexAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
-#ifndef DBAUI_QUERYDLG_HXX
#include "querydlg.hxx"
-#endif
-#ifndef DBAUI_JOINEXCHANGE_HXX
#include "JoinExchange.hxx"
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
using namespace dbaui;
using namespace ::com::sun::star::uno;
@@ -259,7 +198,7 @@ namespace
Reference<XPropertySet> xColumn;
if ( !( _rxSourceForeignKeyColumns->getByName(*pIter) >>= xColumn ) )
{
- OSL_ENSURE( false, "addConnections: invalid foreign key column!" );
+ OSL_FAIL( "addConnections: invalid foreign key column!" );
continue;
}
@@ -273,7 +212,7 @@ namespace
if(aFind.getLength())
pNewConnData->SetFieldIndex(JTCS_FROM,aFind[0]+1);
else
- OSL_ENSURE(0,"Column not found!");
+ OSL_FAIL("Column not found!");
}
// get the position inside the tabe
Reference<XNameAccess> xRefColumns = _rDest.GetOriginalColumns();
@@ -283,7 +222,7 @@ namespace
if(aFind.getLength())
pNewConnData->SetFieldIndex(JTCS_TO,aFind[0]+1);
else
- OSL_ENSURE(0,"Column not found!");
+ OSL_FAIL("Column not found!");
}
pNewConnData->AppendConnLine(*pIter,sRelatedColumn);
@@ -297,7 +236,6 @@ namespace
// automatically remove all connections adjacent to the win.
// (Because of this automatism we would have an ownerhsip ambiguity for
// the connection data if we would insert the conn-Undo-Action)
- // FS - 21.10.99 - 69183
}
}
}
@@ -345,7 +283,7 @@ void OQueryTableView::ReSync()
{
DBG_CHKTHIS(OQueryTableView,NULL);
TTableWindowData* pTabWinDataList = m_pView->getController().getTableWindowData();
- DBG_ASSERT((getTableConnections()->size()==0) && (GetTabWinMap()->size()==0),
+ OSL_ENSURE((getTableConnections()->size()==0) && (GetTabWinMap()->size()==0),
"vor OQueryTableView::ReSync() bitte ClearAll aufrufen !");
// ich brauche eine Sammlung aller Fensternamen, deren Anlegen schief geht, damit ich die entsprechenden Connections
@@ -501,7 +439,7 @@ void OQueryTableView::AddTabWin(const ::rtl::OUString& _rTableName, const ::rtl:
}
catch(SQLException&)
{
- OSL_ASSERT(!"qualifiedNameComponents");
+ OSL_FAIL("qualifiedNameComponents");
}
}
// -----------------------------------------------------------------------------
@@ -538,7 +476,7 @@ Reference<XPropertySet> getKeyReferencedTo(const Reference<XIndexAccess>& _rxKey
void OQueryTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& _rTableName, const ::rtl::OUString& strAlias, sal_Bool bNewTable)
{
DBG_CHKTHIS(OQueryTableView,NULL);
- DBG_ASSERT(_rTableName.getLength() || strAlias.getLength(), "OQueryTableView::AddTabWin : kein Tabellen- und kein Aliasname !");
+ OSL_ENSURE(_rTableName.getLength() || strAlias.getLength(), "OQueryTableView::AddTabWin : kein Tabellen- und kein Aliasname !");
// wenn der Tabellenname nicht gesetzt ist, steht das fuer ein Dummy-Fenster, das braucht aber wenigstens einen Alias-Namen
// neue Datenstruktur erzeugen
@@ -814,7 +752,7 @@ void OQueryTableView::KeyInput( const KeyEvent& rEvt )
OQueryTableWindow* OQueryTableView::FindTable(const String& rAliasName)
{
DBG_CHKTHIS(OQueryTableView,NULL);
- DBG_ASSERT(rAliasName.Len(), "OQueryTableView::FindTable : der AliasName sollte nicht leer sein !");
+ OSL_ENSURE(rAliasName.Len(), "OQueryTableView::FindTable : der AliasName sollte nicht leer sein !");
// (nicht dass es schadet, aber es ist sinnlos und weist vielleicht auf Fehler beim Aufrufer hin)
OTableWindowMap::const_iterator aIter = GetTabWinMap()->find(rAliasName);
if(aIter != GetTabWinMap()->end())
@@ -842,7 +780,7 @@ sal_Bool OQueryTableView::FindTableFromField(const String& rFieldName, OTableFie
void OQueryTableView::RemoveTabWin(OTableWindow* pTabWin)
{
DBG_CHKTHIS(OQueryTableView,NULL);
- DBG_ASSERT(pTabWin != NULL, "OQueryTableView::RemoveTabWin : Fenster sollte ungleich NULL sein !");
+ OSL_ENSURE(pTabWin != NULL, "OQueryTableView::RemoveTabWin : Fenster sollte ungleich NULL sein !");
// mein Parent brauche ich, da es vom Loeschen erfahren soll
OQueryDesignView* pParent = static_cast<OQueryDesignView*>(getDesignView());
@@ -873,7 +811,7 @@ void OQueryTableView::RemoveTabWin(OTableWindow* pTabWin)
if ( m_pAccessible )
m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD,
makeAny(pTabWin->GetAccessible()),
- Any()
+ Any()
);
}
@@ -893,8 +831,6 @@ void OQueryTableView::GetConnection(OQueryTableConnection* pConn)
// bei mir und dem Dokument einfuegen
addConnection( pConn );
- // invalidieren (damit es neu gezeichnet wird)
- // pConn->Invalidate();
}
//------------------------------------------------------------------------
@@ -911,7 +847,7 @@ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc
{
DBG_CHKTHIS(OQueryTableView,NULL);
OTableWindowMap* pTabWins = GetTabWinMap();
- DBG_ASSERT(pTabWins != NULL, "OQueryTableView::HideTabWin : habe keine TabWins !");
+ OSL_ENSURE(pTabWins != NULL, "OQueryTableView::HideTabWin : habe keine TabWins !");
if (pTabWin)
{
@@ -992,7 +928,7 @@ sal_Bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUn
if (pTabWin->Init())
{
TTableWindowData::value_type pData = pTabWin->GetData();
- DBG_ASSERT(pData != NULL, "OQueryTableView::ShowTabWin : TabWin hat keine Daten !");
+ OSL_ENSURE(pData != NULL, "OQueryTableView::ShowTabWin : TabWin hat keine Daten !");
// Wenn die Daten schon PosSize haben, diese benutzen
if (pData->HasPosition() && pData->HasSize())
{
@@ -1024,9 +960,6 @@ sal_Bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUn
for(;aIter != aEnd;++aIter)
addConnection(*aIter); // add all connections from the undo action
- // each connection should invalidated inside addConnection so we don't need this here any longer
-// if ( !pOwnList->empty() )
-// InvalidateConnections();
pTableCon->clear();
// und die Daten des Fensters ebenfalls in Liste (des Docs)
@@ -1062,7 +995,7 @@ sal_Bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUn
void OQueryTableView::InsertField(const OTableFieldDescRef& rInfo)
{
DBG_CHKTHIS(OQueryTableView,NULL);
- DBG_ASSERT(getDesignView() != NULL, "OQueryTableView::InsertField : habe kein Parent !");
+ OSL_ENSURE(getDesignView() != NULL, "OQueryTableView::InsertField : habe kein Parent !");
static_cast<OQueryDesignView*>(getDesignView())->InsertField(rInfo);
}
//------------------------------------------------------------------------------
@@ -1098,3 +1031,5 @@ bool OQueryTableView::supressCrossNaturalJoin(const TTableConnectionData::value_
return pQueryData && (pQueryData->GetJoinType() == CROSS_JOIN);
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryTextView.cxx b/dbaccess/source/ui/querydesign/QueryTextView.cxx
index 8744edfff..7d73fd9ff 100644
--- a/dbaccess/source/ui/querydesign/QueryTextView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTextView.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,48 +28,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYVIEW_TEXT_HXX
#include "QueryTextView.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTAINERWINDOW_HXX
#include "querycontainerwindow.hxx"
-#endif
-#ifndef DBAUI_QUERYVIEWSWITCH_HXX
#include "QueryViewSwitch.hxx"
-#endif
-#ifndef DBAUI_SQLEDIT_HXX
#include "sqledit.hxx"
-#endif
-#ifndef DBAUI_UNDOSQLEDIT_HXX
#include "undosqledit.hxx"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/unohlp.hxx>
-#endif
-#ifndef _SV_SPLIT_HXX
#include <vcl/split.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
using namespace dbaui;
using namespace ::com::sun::star::uno;
@@ -89,7 +62,6 @@ OQueryTextView::OQueryTextView(OQueryContainerWindow* _pParent)
m_pEdit->SaveValue();
m_pEdit->SetPosPixel( Point( 0, 0 ) );
m_pEdit->Show();
- // m_pEdit->GrabFocus();
}
// -----------------------------------------------------------------------------
OQueryTextView::~OQueryTextView()
@@ -177,3 +149,5 @@ void OQueryTextView::paste()
getContainerWindow()->getDesignView()->getController().setModified(sal_True);
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
index 29c437ffc..5bdd43273 100644
--- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
+++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,36 +28,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYVIEWSWITCH_HXX
#include "QueryViewSwitch.hxx"
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef DBAUI_QUERYVIEW_TEXT_HXX
#include "QueryTextView.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTAINERWINDOW_HXX
#include "querycontainerwindow.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef DBAUI_QYDLGTAB_HXX
#include "adtabdlg.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef DBAUI_SQLEDIT_HXX
#include "sqledit.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTAINERWINDOW_HXX
#include "querycontainerwindow.hxx"
-#endif
using namespace dbaui;
using namespace ::com::sun::star::uno;
@@ -359,3 +340,5 @@ void OQueryViewSwitch::setNoneVisbleRow(sal_Int32 _nRows)
m_pDesignView->setNoneVisbleRow(_nRows);
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index f0dee8ccd..57fd44c09 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,75 +28,29 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYDESIGN_OSELECTIONBROWSEBOX_HXX
#include "SelectionBrowseBox.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef DBAUI_TABLEFIELDINFO_HXX
#include "TableFieldInfo.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef DBAUI_QUERY_TABLEWINDOW_HXX
#include "QTableWindow.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBAUI_QUERYDESIGNFIELDUNDOACT_HXX
#include "QueryDesignFieldUndoAct.hxx"
-#endif
-#ifndef _SVX_DBEXCH_HRC
#include <svx/dbexch.hrc>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
+#include <osl/diagnose.h>
using namespace ::svt;
using namespace ::dbaui;
@@ -181,7 +136,6 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent )
| BROWSER_HEADERBAR_NEW ;
m_pTextCell = new Edit(&GetDataWindow(), 0);
- // m_pTextCell->EnableSpecialCheck(sal_False);
m_pVisibleCell = new CheckBoxControl(&GetDataWindow());
m_pTableCell = new ListBoxControl(&GetDataWindow()); m_pTableCell->SetDropDownLineCount( 20 );
m_pFieldCell = new ComboBoxControl(&GetDataWindow()); m_pFieldCell->SetDropDownLineCount( 20 );
@@ -198,9 +152,6 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent )
// TriState der ::com::sun::star::form::CheckBox abschalten
m_pVisibleCell->GetBox().EnableTriState( sal_False );
-// m_pEmptyEntry = new OTableFieldDesc();
-// m_pEmptyEntry->SetColWidth(DEFAULT_SIZE);
-
Font aTitleFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE,Window::GetSettings().GetLanguage(),DEFAULTFONT_FLAGS_ONLYONE);
aTitleFont.SetSize(Size(0, 6));
SetTitleFont(aTitleFont);
@@ -257,16 +208,16 @@ void OSelectionBrowseBox::initialize()
String sGroup = m_aFunctionStrings.GetToken(m_aFunctionStrings.GetTokenCount() - 1);
m_aFunctionStrings = m_aFunctionStrings.GetToken(0);
- for (size_t i = 0; i < sizeof(eFunctions)/sizeof(eFunctions[0]) ; ++i)
+ for (size_t i = 0; i < SAL_N_ELEMENTS(eFunctions); ++i)
{
m_aFunctionStrings += String(RTL_CONSTASCII_USTRINGPARAM(";"));
m_aFunctionStrings += String(ByteString(rContext.getIntlKeywordAscii(eFunctions[i])),RTL_TEXTENCODING_UTF8);
- } // for (sal_Int32 i = 0; i < sizeof(eFunctions)/sizeof(eFunctions[0]) ; ++i)
+ }
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();
@@ -381,11 +332,11 @@ void OSelectionBrowseBox::ColumnMoved( sal_uInt16 nColId,sal_Bool _bCreateUndo )
pUndoAct->SetTabFieldDescr(pOldEntry);
getDesignView()->getController().addUndoActionAndInvalidate(pUndoAct);
- } // if ( !m_bInUndoMode && _bCreateUndo )
+ }
}
}
else
- OSL_ENSURE(0,"Invalid column id!");
+ OSL_FAIL("Invalid column id!");
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox::Init()
@@ -407,12 +358,12 @@ void OSelectionBrowseBox::Init()
Size aHeight;
const Control* pControls[] = { m_pTextCell,m_pVisibleCell,m_pTableCell,m_pFieldCell };
- for(sal_Size i= 0; i < sizeof(pControls)/sizeof(pControls[0]);++i)
+ for(sal_Size i= 0; i < SAL_N_ELEMENTS(pControls);++i)
{
const Size aTemp( pControls[i]->GetOptimalSize(WINDOWSIZE_PREFERRED) );
if ( aTemp.Height() > aHeight.Height() )
aHeight.Height() = aTemp.Height();
- } // for(int i= 0; i < sizeof(pControls)/sizeof(pControls[0]);++i
+ }
SetDataRowHeight(aHeight.Height());
SetTitleLines(1);
// Anzahl der sichtbaren Zeilen ermitteln
@@ -436,7 +387,7 @@ void OSelectionBrowseBox::Init()
}
catch(const SQLException&)
{
- OSL_ENSURE(0,"Catched Exception when asking for database metadata options!");
+ OSL_FAIL("Catched Exception when asking for database metadata options!");
m_nMaxColumns = 0;
}
}
@@ -500,9 +451,9 @@ CellController* OSelectionBrowseBox::GetController(long nRow, sal_uInt16 nColId)
if ( nColId > getFields().size() )
return NULL;
OTableFieldDescRef pEntry = getFields()[nColId-1];
- DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::GetController : keine FieldDescription !");
+ OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::GetController : keine FieldDescription !");
- if (!pEntry.isValid())
+ if (!pEntry.is())
return NULL;
if (static_cast<OQueryController&>(getDesignView()->getController()).isReadOnly())
@@ -537,7 +488,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
if ( nPos == 0 || nPos == BROWSER_INVALIDID || nPos > getFields().size() )
return;
OTableFieldDescRef pEntry = getFields()[nPos-1];
- DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::InitController : keine FieldDescription !");
+ OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::InitController : keine FieldDescription !");
long nCellIndex = GetRealRow(nRow);
switch (nCellIndex)
@@ -689,7 +640,7 @@ sal_Bool OSelectionBrowseBox::fillColumnRef(const ::rtl::OUString& _sColumnName,
if ( pTabWinList )
{
sal_uInt16 nTabCount = 0;
- if ( !static_cast<OQueryTableView*>(getDesignView()->getTableView())->FindTableFromField(_sColumnName,_pEntry,nTabCount) ) // error occured: column not in table window
+ if ( !static_cast<OQueryTableView*>(getDesignView()->getTableView())->FindTableFromField(_sColumnName,_pEntry,nTabCount) ) // error occurred: column not in table window
{
String sErrorMsg(ModuleRes(RID_STR_FIELD_DOESNT_EXIST));
sErrorMsg.SearchAndReplaceAscii("$name$",_sColumnName);
@@ -761,7 +712,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
if ( _pEntry->isAggreateFunction() )
{
- DBG_ASSERT(_pEntry->GetFunction().getLength(),"Functionname darf hier nicht leer sein! ;-(");
+ OSL_ENSURE(_pEntry->GetFunction().getLength(),"Functionname darf hier nicht leer sein! ;-(");
::rtl::OUStringBuffer aTmpStr2( _pEntry->GetFunction());
aTmpStr2.appendAscii("(");
aTmpStr2.append(sSql);
@@ -812,7 +763,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
{
sal_uInt16 nColumnPostion;
aSelEntry = FindFirstFreeCol(nColumnPostion);
- if ( !aSelEntry.isValid() )
+ if ( !aSelEntry.is() )
{
AppendNewCol(1);
aSelEntry = FindFirstFreeCol(nColumnPostion);
@@ -895,7 +846,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
notifyFunctionFieldChanged(sOldLocalizedFunctionName,sLocalizedFunctionName,_bListAction, nColumnId);
}
else
- OSL_ENSURE(0,"Unsupported function inserted!");
+ OSL_FAIL("Unsupported function inserted!");
}
else
@@ -949,7 +900,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
}
}
- if ( i > 0 && InsertField(aSelEntry,BROWSER_INVALIDID,sal_True,sal_False).isEmpty() ) // may we have to append more than one field
+ if ( i > 0 && !InsertField(aSelEntry,BROWSER_INVALIDID,sal_True,sal_False).is() ) // may we have to append more than one field
{ // the field could not be isnerted
String sErrorMessage( ModuleRes( RID_STR_FIELD_DOESNT_EXIST ) );
sErrorMessage.SearchAndReplaceAscii("$name$",aSelEntry->GetField());
@@ -972,11 +923,11 @@ sal_Bool OSelectionBrowseBox::SaveModified()
if(getFields().size() > static_cast<sal_uInt16>(nCurrentColumnPos - 1))
pEntry = getEntry(nCurrentColumnPos - 1);
- sal_Bool bWasEmpty = pEntry.isValid() ? pEntry->IsEmpty() : sal_False;
+ sal_Bool bWasEmpty = pEntry.is() ? pEntry->IsEmpty() : sal_False;
sal_Bool bError = sal_False;
sal_Bool bListAction = sal_False;
- if (pEntry.isValid() && Controller().Is() && Controller()->IsModified())
+ if (pEntry.is() && Controller().Is() && Controller()->IsModified())
{
// fuer die Undo-Action
String strOldCellContents,sNewValue;
@@ -1117,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;
@@ -1183,7 +1134,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
delete pParseNode;
}
else
- {
+ {
if(xColumn.is())
{
sal_Int32 nType = 0;
@@ -1239,7 +1190,6 @@ sal_Bool OSelectionBrowseBox::SaveModified()
bError = sal_True;
}
}
- // }
}
strOldCellContents = pEntry->GetCriteria(nIdx);
pEntry->SetCriteria(nIdx, aCrit);
@@ -1269,7 +1219,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
}
// habe ich Daten in einer FieldDescription gespeichert, die vorher leer war und es nach den Aenderungen nicht mehr ist ?
- if ( pEntry.isValid() && bWasEmpty && !pEntry->IsEmpty() && !bError )
+ if ( pEntry.is() && bWasEmpty && !pEntry->IsEmpty() && !bError )
{
// Default auf sichtbar
pEntry->SetVisible(sal_True);
@@ -1311,7 +1261,7 @@ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const Rectangle& rRect,
if(getFields().size() > sal_uInt16(nPos - 1))
pEntry = getFields()[nPos - 1];
- if (!pEntry.isValid())
+ if (!pEntry.is())
return;
long nRow = GetRealRow(m_nSeekRow);
@@ -1346,7 +1296,7 @@ void OSelectionBrowseBox::RemoveColumn(sal_uInt16 _nColumnId)
sal_uInt16 nPos = GetColumnPos(_nColumnId);
// das Control sollte immer genau eine Spalte mehr haben, naemlich die HandleColumn
- DBG_ASSERT((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::RemoveColumn : invalid parameter nColId");
+ 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
sal_uInt16 nCurCol = GetCurColumnId();
@@ -1402,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() )
@@ -1476,7 +1426,7 @@ sal_Int8 OSelectionBrowseBox::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
{
if ( IsEditing() )
{
- // #100271# OJ allow the asterix again
+ // allow the asterix again
m_bDisableErrorBox = sal_True;
SaveModified();
m_bDisableErrorBox = sal_False;
@@ -1498,7 +1448,7 @@ sal_Int8 OSelectionBrowseBox::ExecuteDrop( const BrowserExecuteDropEvent& _rEvt
TransferableDataHelper aDropped(_rEvt.maDropEvent.Transferable);
if (!OJoinExchObj::isFormatAvailable(aDropped.GetDataFlavorExVector()))
{
- DBG_ERROR("OSelectionBrowseBox::ExecuteDrop: this should never have passed AcceptDrop!");
+ OSL_FAIL("OSelectionBrowseBox::ExecuteDrop: this should never have passed AcceptDrop!");
return DND_ACTION_NONE;
}
@@ -1573,7 +1523,7 @@ void OSelectionBrowseBox::SetColWidth(sal_uInt16 nColId, long nNewWidth)
// der FieldDescription Bescheid sagen
OTableFieldDescRef pEntry = getEntry(GetColumnPos(nColId) - 1);
- if (pEntry.isValid())
+ if (pEntry.is())
pEntry->SetColWidth(sal_uInt16(GetColumnWidth(nColId)));
if (bWasEditing)
@@ -1601,7 +1551,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _n
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
// das Control sollte immer genau eine Spalte mehr haben, naemlich die HandleColumn
- DBG_ASSERT(_nColumnPostion == BROWSER_INVALIDID || (_nColumnPostion <= (long)getFields().size()), "OSelectionBrowseBox::InsertColumn : invalid parameter nColId.");
+ OSL_ENSURE(_nColumnPostion == BROWSER_INVALIDID || (_nColumnPostion <= (long)getFields().size()), "OSelectionBrowseBox::InsertColumn : invalid parameter nColId.");
// -1 heisst ganz hinten, Count heisst ganz hinten, der Rest bezeichnet eine richtige Position
sal_uInt16 nCurCol = GetCurColumnId();
@@ -1638,7 +1588,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _n
getFields()[nOldPosition - 1] = pEntry;
ColumnMoved(pEntry->GetColumnId(),sal_False);
- } // if ( pEntry->GetColumnId() != nColumnId )
+ }
if ( pEntry->GetFunctionType() & (FKT_AGGREGATE) )
{
@@ -1724,7 +1674,7 @@ sal_uInt16 OSelectionBrowseBox::FieldsCount()
while (aIter != getFields().end())
{
- if ((*aIter).isValid() && !(*aIter)->IsEmpty())
+ if ((*aIter).is() && !(*aIter)->IsEmpty())
++nCount;
++aIter;
}
@@ -1745,7 +1695,7 @@ OTableFieldDescRef OSelectionBrowseBox::FindFirstFreeCol(sal_uInt16& _rColumnPos
{
++_rColumnPosition;
OTableFieldDescRef pEntry = (*aIter);
- if ( pEntry.isValid() && pEntry->IsEmpty() )
+ if ( pEntry.is() && pEntry->IsEmpty() )
return pEntry;
++aIter;
}
@@ -1761,7 +1711,7 @@ void OSelectionBrowseBox::CheckFreeColumns(sal_uInt16& _rColumnPosition)
{
// es ist voll, also einen Packen Spalten anhaengen
AppendNewCol(DEFAULT_QUERY_COLS);
- OSL_VERIFY(FindFirstFreeCol(_rColumnPosition).isValid());
+ OSL_VERIFY(FindFirstFreeCol(_rColumnPosition).is());
}
}
//------------------------------------------------------------------------------
@@ -1771,7 +1721,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt
if(!xConnection.is())
return;
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- DBG_ASSERT(!rInfo->IsEmpty(),"AddGroupBy:: OTableFieldDescRef sollte nicht Empty sein!");
+ OSL_ENSURE(!rInfo->IsEmpty(),"AddGroupBy:: OTableFieldDescRef sollte nicht Empty sein!");
OTableFieldDescRef pEntry;
const Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData();
const ::comphelper::UStringMixEqual bCase(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers());
@@ -1783,7 +1733,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt
for(;aIter != aEnd;++aIter)
{
pEntry = *aIter;
- OSL_ENSURE(pEntry.isValid(),"OTableFieldDescRef was null!");
+ OSL_ENSURE(pEntry.is(),"OTableFieldDescRef was null!");
const ::rtl::OUString aField = pEntry->GetField();
const ::rtl::OUString aAlias = pEntry->GetAlias();
@@ -1843,8 +1793,8 @@ void OSelectionBrowseBox::DuplicateConditionLevel( const sal_uInt16 nLevel)
++m_nVisibleCount;
}
m_bVisibleRow[BROW_CRIT1_ROW + nNewLevel] = sal_True;
- } // if (!pEntry->GetCriteria(nLevel).getLength() )
- } // for(;aIter != getFields().end();++aIter)
+ }
+ }
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const String& rValue, const sal_uInt16 nLevel,bool _bAddOrOnOneLine )
@@ -1853,7 +1803,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
if(!xConnection.is())
return;
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- DBG_ASSERT(rInfo.isValid() && !rInfo->IsEmpty(),"AddCondition:: OTableFieldDescRef sollte nicht Empty sein!");
+ OSL_ENSURE(rInfo.is() && !rInfo->IsEmpty(),"AddCondition:: OTableFieldDescRef sollte nicht Empty sein!");
OTableFieldDescRef pLastEntry;
Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData();
@@ -1878,7 +1828,6 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
pEntry->SetGroupBy(sal_False);
else
{
-// pEntry->SetGroupBy(rInfo->IsGroupBy());
if(!m_bGroupByUnRelated && pEntry->IsGroupBy())
pEntry->SetVisible(sal_True);
}
@@ -1893,14 +1842,14 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
}
m_bVisibleRow[BROW_CRIT1_ROW + nLevel] = sal_True;
break;
- } // if (!pEntry->GetCriteria(nLevel).getLength() )
+ }
if ( _bAddOrOnOneLine )
{
pLastEntry = pEntry;
}
}
- } // for(;aIter != getFields().end();++aIter)
- if ( pLastEntry.isValid() )
+ }
+ if ( pLastEntry.is() )
{
String sCriteria = rValue;
String sOldCriteria = pLastEntry->GetCriteria( nLevel );
@@ -1927,7 +1876,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, sal_False, sal_False );
if ( pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) // das GroupBy wird bereits von rInfo "ubernommen
pTmp->SetGroupBy(sal_False);
- if ( pTmp.isValid() )
+ if ( pTmp.is() )
{
pTmp->SetCriteria( nLevel, rValue);
if(nLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1))
@@ -1947,7 +1896,7 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde
if(!xConnection.is())
return;
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- DBG_ASSERT(!rInfo->IsEmpty(),"AddOrder:: OTableFieldDescRef sollte nicht Empty sein!");
+ OSL_ENSURE(!rInfo->IsEmpty(),"AddOrder:: OTableFieldDescRef sollte nicht Empty sein!");
OTableFieldDescRef pEntry;
Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData();
::comphelper::UStringMixEqual bCase(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers());
@@ -1982,7 +1931,7 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde
if (aIter == rFields.end())
{
OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, sal_False, sal_False );
- if(pTmp.isValid())
+ if(pTmp.is())
{
if ( !m_bOrderByUnRelated && !bAppend )
pTmp->SetVisible(sal_True);
@@ -2040,7 +1989,7 @@ void OSelectionBrowseBox::CellModified()
void OSelectionBrowseBox::Fill()
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- DBG_ASSERT(ColCount() >= 1, "OSelectionBrowseBox::Fill : please call only after inserting the handle column !");
+ OSL_ENSURE(ColCount() >= 1, "OSelectionBrowseBox::Fill : please call only after inserting the handle column !");
sal_uInt16 nColCount = ColCount() - 1;
if (nColCount < DEFAULT_QUERY_COLS)
@@ -2160,7 +2109,7 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt)
//------------------------------------------------------------------------------
sal_Bool OSelectionBrowseBox::IsRowVisible(sal_uInt16 _nWhich) const
{
- DBG_ASSERT(_nWhich<(m_bVisibleRow.size()), "OSelectionBrowseBox::IsRowVisible : invalid parameter !");
+ OSL_ENSURE(_nWhich<(m_bVisibleRow.size()), "OSelectionBrowseBox::IsRowVisible : invalid parameter !");
return m_bVisibleRow[_nWhich];
}
@@ -2168,7 +2117,7 @@ sal_Bool OSelectionBrowseBox::IsRowVisible(sal_uInt16 _nWhich) const
void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, sal_Bool _bVis)
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- DBG_ASSERT(_nWhich<m_bVisibleRow.size(), "OSelectionBrowseBox::SetRowVisible : invalid parameter !");
+ OSL_ENSURE(_nWhich<m_bVisibleRow.size(), "OSelectionBrowseBox::SetRowVisible : invalid parameter !");
sal_Bool bWasEditing = IsEditing();
if (bWasEditing)
@@ -2218,7 +2167,7 @@ long OSelectionBrowseBox::GetRealRow(long nRowId) const
break;
}
}
- DBG_ASSERT(nErg <= long(m_bVisibleRow.size()),"nErg kann nicht groesser als BROW_ROW_CNT sein!");
+ OSL_ENSURE(nErg <= long(m_bVisibleRow.size()),"nErg kann nicht groesser als BROW_ROW_CNT sein!");
return i;
}
static long nVisibleRowMask[] =
@@ -2241,7 +2190,7 @@ sal_Int32 OSelectionBrowseBox::GetNoneVisibleRows() const
{
sal_Int32 nErg(0);
// only the first 11 row are interesting
- sal_Int32 nSize = sizeof(nVisibleRowMask) / sizeof(nVisibleRowMask[0]);
+ sal_Int32 nSize = SAL_N_ELEMENTS(nVisibleRowMask);
for(sal_Int32 i=0;i<nSize;i++)
{
if(!m_bVisibleRow[i])
@@ -2253,7 +2202,7 @@ sal_Int32 OSelectionBrowseBox::GetNoneVisibleRows() const
void OSelectionBrowseBox::SetNoneVisbleRow(long nRows)
{
// only the first 11 row are interesting
- sal_Int32 nSize = sizeof(nVisibleRowMask) / sizeof(nVisibleRowMask[0]);
+ sal_Int32 nSize = SAL_N_ELEMENTS(nVisibleRowMask);
for(sal_Int32 i=0;i< nSize;i++)
m_bVisibleRow[i] = !(nRows & nVisibleRowMask[i]);
}
@@ -2265,7 +2214,7 @@ String OSelectionBrowseBox::GetCellText(long nRow, sal_uInt16 nColId) const
sal_uInt16 nPos = GetColumnPos(nColId);
OTableFieldDescRef pEntry = getFields()[nPos-1];
- DBG_ASSERT(pEntry != NULL, "OSelectionBrowseBox::GetCellText : invalid column id, prepare for GPF ... ");
+ OSL_ENSURE(pEntry != NULL, "OSelectionBrowseBox::GetCellText : invalid column id, prepare for GPF ... ");
if ( pEntry->IsEmpty() )
return String();
@@ -2384,13 +2333,12 @@ sal_Bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId,Strin
String OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId)
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- // DBG_ASSERT(nCellIndex < (GetRowCount()-1),"CellIndex ist zu gross");
if ( GetCurColumnId() == nColId && !m_bInUndoMode )
SaveModified();
sal_uInt16 nPos = GetColumnPos(nColId);
OTableFieldDescRef pEntry = getFields()[nPos - 1];
- DBG_ASSERT(pEntry != NULL, "OSelectionBrowseBox::GetCellContents : invalid column id, prepare for GPF ... ");
+ OSL_ENSURE(pEntry != NULL, "OSelectionBrowseBox::GetCellContents : invalid column id, prepare for GPF ... ");
switch (nCellIndex)
{
@@ -2418,7 +2366,7 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, con
sal_uInt16 nPos = GetColumnPos(nColId);
OTableFieldDescRef pEntry = getEntry(nPos - 1);
- DBG_ASSERT(pEntry != NULL, "OSelectionBrowseBox::SetCellContents : invalid column id, prepare for GPF ... ");
+ OSL_ENSURE(pEntry != NULL, "OSelectionBrowseBox::SetCellContents : invalid column id, prepare for GPF ... ");
switch (nRow)
@@ -2501,13 +2449,13 @@ void OSelectionBrowseBox::ColumnResized(sal_uInt16 nColId)
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
sal_uInt16 nPos = GetColumnPos(nColId);
- DBG_ASSERT(nPos <= getFields().size(),"ColumnResized:: nColId sollte nicht groesser als List::count sein!");
+ OSL_ENSURE(nPos <= getFields().size(),"ColumnResized:: nColId sollte nicht groesser als List::count sein!");
OTableFieldDescRef pEntry = getEntry(nPos-1);
- DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::ColumnResized : keine FieldDescription !");
+ OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::ColumnResized : keine FieldDescription !");
static_cast<OQueryController&>(getDesignView()->getController()).setModified( sal_True );
EditBrowseBox::ColumnResized(nColId);
- if ( pEntry.isValid())
+ if ( pEntry.is())
{
if ( !m_bInUndoMode )
{
@@ -2526,10 +2474,10 @@ sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRowId, sal_uInt16 nColId
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
sal_uInt16 nPos = GetColumnPos(nColId);
- DBG_ASSERT((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::GetTotalCellWidth : invalid parameter nColId");
+ OSL_ENSURE((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::GetTotalCellWidth : invalid parameter nColId");
OTableFieldDescRef pEntry = getFields()[nPos-1];
- DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::GetTotalCellWidth : invalid FieldDescription !");
+ OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::GetTotalCellWidth : invalid FieldDescription !");
long nRow = GetRealRow(nRowId);
String strText(GetCellText(nRow, nColId));
@@ -2730,8 +2678,8 @@ OTableFieldDescRef OSelectionBrowseBox::getEntry(OTableFields::size_type _nPos)
OSL_ENSURE(aFields.size() > _nPos,"ColID is to great!");
OTableFieldDescRef pEntry = aFields[_nPos];
- OSL_ENSURE(pEntry.isValid(),"Invalid entry!");
- if ( !pEntry.isValid() )
+ OSL_ENSURE(pEntry.is(),"Invalid entry!");
+ if ( !pEntry.is() )
{
pEntry = new OTableFieldDesc();
pEntry->SetColumnId(
@@ -2806,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
@@ -2859,7 +2807,7 @@ Reference< XAccessible > OSelectionBrowseBox::CreateAccessibleCell( sal_Int32 _n
if(getFields().size() > sal_uInt16(_nColumnPos - 1))
pEntry = getFields()[_nColumnPos - 1];
- if ( _nRow == BROW_VIS_ROW && pEntry.isValid() )
+ if ( _nRow == BROW_VIS_ROW && pEntry.is() )
return EditBrowseBox::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,pEntry->IsVisible() ? STATE_CHECK : STATE_NOCHECK );
return EditBrowseBox::CreateAccessibleCell( _nRow, _nColumnPos );
@@ -2875,7 +2823,7 @@ bool OSelectionBrowseBox::HasFieldByAliasName(const ::rtl::OUString& rFieldName,
{
if ( (*aIter)->GetFieldAlias() == rFieldName )
{
- rInfo.getBody() = (*aIter).getBody();
+ *rInfo = *(*aIter);
break;
}
}
@@ -2883,3 +2831,4 @@ bool OSelectionBrowseBox::HasFieldByAliasName(const ::rtl::OUString& rFieldName,
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
index 6b32ab817..8b100adbc 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,30 +28,13 @@
#ifndef DBAUI_QUERYDESIGN_OSELECTIONBROWSEBOX_HXX
#define DBAUI_QUERYDESIGN_OSELECTIONBROWSEBOX_HXX
-#ifndef _SVTOOLS_EDITBROWSEBOX_HXX_
#include <svtools/editbrowsebox.hxx>
-#endif
-//#ifndef DBAUI_QUERYCONTROLLER_HXX
-//#include "querycontroller.hxx"
-//#endif
-#ifndef DBAUI_TABLEFIELDDESC_HXX
#include "TableFieldDescription.hxx"
-#endif
-#ifndef DBAUI_JOINEXCHANGE_HXX
#include "JoinExchange.hxx"
-#endif
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
#include <com/sun/star/util/XNumberFormatter.hpp>
-#endif
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef _TRANSFER_HXX
#include <svtools/transfer.hxx>
-#endif
namespace connectivity
{
@@ -275,7 +259,7 @@ namespace dbaui
@param _bListAction
Will be set to <TRUE/> when we are in a list action otherwise <FALSE/>
@return
- <TRUE/> if an error occured otherwise <FALSE/>
+ <TRUE/> if an error occurred otherwise <FALSE/>
*/
sal_Bool saveField(const String& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction);
@@ -299,7 +283,7 @@ namespace dbaui
@param _bListAction
Will be set to <TRUE/> when we are in a list action otherwise <FALSE/>
@return
- <TRUE/> if an error occured otherwise <FALSE/>
+ <TRUE/> if an error occurred otherwise <FALSE/>
*/
sal_Bool fillColumnRef( const ::connectivity::OSQLParseNode* _pColumnRef,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
@@ -360,3 +344,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableConnection.cxx b/dbaccess/source/ui/querydesign/TableConnection.cxx
index 20634fa4b..4e6f5f90f 100644
--- a/dbaccess/source/ui/querydesign/TableConnection.cxx
+++ b/dbaccess/source/ui/querydesign/TableConnection.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,24 +28,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINE_HXX
#include "ConnectionLine.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef DBACCESS_CONNECTIONLINEACCESS_HXX
#include "ConnectionLineAccess.hxx"
-#endif
#include <algorithm>
@@ -254,3 +243,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx
index a342c1891..36ad3fdbc 100644
--- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx
+++ b/dbaccess/source/ui/querydesign/TableConnectionData.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
+#include <osl/diagnose.h>
#include <comphelper/stl_types.hxx>
-#endif
using namespace dbaui;
using namespace comphelper;
@@ -65,7 +61,7 @@ void OTableConnectionData::Init()
{
//////////////////////////////////////////////////////////////////////
// LineDataList mit Defaults initialisieren
- DBG_ASSERT(m_vConnLineData.size() == 0, "OTableConnectionData::Init() : nur mit leere Linienliste aufzurufen !");
+ OSL_ENSURE(m_vConnLineData.size() == 0, "OTableConnectionData::Init() : nur mit leere Linienliste aufzurufen !");
ResetConnLines(sal_True);
// das legt Defaults an
}
@@ -88,7 +84,6 @@ OTableConnectionData::~OTableConnectionData()
DBG_DTOR(OTableConnectionData,NULL);
// LineDataList loeschen
OConnectionLineDataVec().swap(m_vConnLineData);
- //ResetConnLines(sal_False);
}
//------------------------------------------------------------------------
@@ -126,7 +121,7 @@ sal_Bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const String& rSo
return AppendConnLine(rSourceFieldName, rDestFieldName);
OConnectionLineDataRef pConnLineData = m_vConnLineData[nIndex];
- DBG_ASSERT(pConnLineData != NULL, "OTableConnectionData::SetConnLine : habe ungueltiges LineData-Objekt");
+ OSL_ENSURE(pConnLineData != NULL, "OTableConnectionData::SetConnLine : habe ungueltiges LineData-Objekt");
pConnLineData->SetSourceFieldName( rSourceFieldName );
pConnLineData->SetDestFieldName( rDestFieldName );
@@ -147,7 +142,7 @@ sal_Bool OTableConnectionData::AppendConnLine( const ::rtl::OUString& rSourceFie
if(aIter == aEnd)
{
OConnectionLineDataRef pNew = new OConnectionLineData(rSourceFieldName, rDestFieldName);
- if (!pNew.isValid())
+ if (!pNew.is())
return sal_False;
m_vConnLineData.push_back(pNew);
@@ -200,3 +195,4 @@ void OTableConnectionData::normalizeLines()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
index 90a33f7fd..ce364be36 100644
--- a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
+++ b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEFIELDDESC_HXX
#include "TableFieldDescription.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
#include <comphelper/namedvaluecollection.hxx>
#include <functional>
@@ -65,8 +60,8 @@ OTableFieldDesc::OTableFieldDesc()
}
//------------------------------------------------------------------------------
OTableFieldDesc::OTableFieldDesc(const OTableFieldDesc& rRS)
- : ::vos::OReference()
-
+ : ::salhelper::SimpleReferenceObject()
+
{
DBG_CTOR(OTableFieldDesc,NULL);
*this = rRS;
@@ -244,3 +239,4 @@ void OTableFieldDesc::Save( ::comphelper::NamedValueCollection& o_rSettings, con
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableFieldInfo.cxx b/dbaccess/source/ui/querydesign/TableFieldInfo.cxx
index 4878cc631..652609cfb 100644
--- a/dbaccess/source/ui/querydesign/TableFieldInfo.cxx
+++ b/dbaccess/source/ui/querydesign/TableFieldInfo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,12 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEFIELDINFO_HXX
#include "TableFieldInfo.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
using namespace dbaui;
//==================================================================
@@ -57,3 +54,4 @@ OTableFieldInfo::~OTableFieldInfo()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableFieldInfo.hxx b/dbaccess/source/ui/querydesign/TableFieldInfo.hxx
index f1b9e47d0..e3191777f 100644
--- a/dbaccess/source/ui/querydesign/TableFieldInfo.hxx
+++ b/dbaccess/source/ui/querydesign/TableFieldInfo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBAUI_TABLEFIELDINFO_HXX
#define DBAUI_TABLEFIELDINFO_HXX
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
-#ifndef _SAL_TYPES_H_
#include <sal/types.h>
-#endif
namespace dbaui
{
@@ -55,3 +52,4 @@ namespace dbaui
#endif // DBAUI_TABLEFIELDINFO_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index 249af5f8f..61a47fcb3 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -27,36 +28,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#include "TableWindowListBox.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOWDATA_HXX
#include "TableWindowData.hxx"
-#endif
-#ifndef DBACCESS_IMAGEPROVIDER_HXX
#include "imageprovider.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _SV_SVAPP_HXX
+#include <osl/diagnose.h>
#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_WALL_HXX
#include <vcl/wall.hxx>
-#endif
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -140,10 +121,10 @@ OTableWindow::~OTableWindow()
OSL_ENSURE(m_pListBox->GetEntryCount()==0,"Forgot to call EmptyListbox()!");
::std::auto_ptr<Window> aTemp(m_pListBox);
m_pListBox = NULL;
- } // if (m_pListBox)
+ }
if ( m_pContainerListener.is() )
m_pContainerListener->dispose();
-
+
m_pAccessible = NULL;
}
// -----------------------------------------------------------------------------
@@ -207,13 +188,13 @@ sal_Bool OTableWindow::FillListBox()
m_pContainerListener = new ::comphelper::OContainerListenerAdapter(this,xContainer);
}
// mark all primary keys with special image
- ModuleRes TmpRes(isHiContrast(m_pListBox) ? IMG_JOINS_H : IMG_JOINS);
+ ModuleRes TmpRes(IMG_JOINS);
ImageList aImageList(TmpRes);
Image aPrimKeyImage = aImageList.GetImage(IMG_PRIMARY_KEY);
if (GetData()->IsShowAll())
{
- SvLBoxEntry* pEntry = m_pListBox->InsertEntry( ::rtl::OUString::createFromAscii("*") );
+ SvLBoxEntry* pEntry = m_pListBox->InsertEntry( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")) );
pEntry->SetUserData( createUserData(NULL,false) );
}
@@ -224,7 +205,7 @@ sal_Bool OTableWindow::FillListBox()
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception occured!");
+ OSL_FAIL("Exception occurred!");
}
try
{
@@ -253,7 +234,7 @@ sal_Bool OTableWindow::FillListBox()
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception occured!");
+ OSL_FAIL("Exception occurred!");
}
return sal_True;
@@ -292,17 +273,16 @@ void OTableWindow::impl_updateImage()
{
ImageProvider aImageProvider( getDesignView()->getController().getConnection() );
- Image aImage, aImageHC;
- aImageProvider.getImages( GetComposedName(), m_pData->isQuery() ? DatabaseObject::QUERY : DatabaseObject::TABLE, aImage, aImageHC );
+ Image aImage;
+ aImageProvider.getImages( GetComposedName(), m_pData->isQuery() ? DatabaseObject::QUERY : DatabaseObject::TABLE, aImage );
- if ( !aImage || !aImageHC )
+ if ( !aImage )
{
- OSL_ENSURE( false, "OTableWindow::impl_updateImage: no images!" );
+ OSL_FAIL( "OTableWindow::impl_updateImage: no images!" );
return;
}
- m_aTypeImage.SetModeImage( aImage, BMP_COLOR_NORMAL );
- m_aTypeImage.SetModeImage( aImageHC, BMP_COLOR_HIGHCONTRAST );
+ m_aTypeImage.SetModeImage( aImage );
m_aTypeImage.Show();
}
@@ -313,7 +293,7 @@ sal_Bool OTableWindow::Init()
if ( !m_pListBox )
{
m_pListBox = CreateListBox();
- DBG_ASSERT( m_pListBox != NULL, "OTableWindow::Init() : CreateListBox hat NULL geliefert !" );
+ OSL_ENSURE( m_pListBox != NULL, "OTableWindow::Init() : CreateListBox hat NULL geliefert !" );
m_pListBox->SetSelectionMode( MULTIPLE_SELECTION );
}
@@ -820,3 +800,4 @@ void OTableWindow::_elementReplaced( const container::ContainerEvent& /*_rEvent*
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
index 3474e3461..ae696c0fa 100644
--- a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,45 +28,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBACCESS_TABLEWINDOWACCESS_HXX
#include "TableWindowAccess.hxx"
-#endif
-#ifndef DBACCESS_JACCESS_HXX
#include "JAccess.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#include "TableWindowListBox.hxx"
-#endif
-#ifndef DBAUI_JOINDESIGNVIEW_HXX
#include "JoinDesignView.hxx"
-#endif
-#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
#include <com/sun/star/accessibility/AccessibleRole.hpp>
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLERELATIONTYPE_HPP_
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HPP_
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTID_HPP_
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
namespace dbaui
@@ -74,7 +49,6 @@ namespace dbaui
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
- // using namespace ::com::sun::star::awt;
using namespace ::com::sun::star;
OTableWindowAccess::OTableWindowAccess(OTableWindow* _pTable)
@@ -125,14 +99,14 @@ namespace dbaui
Sequence< ::rtl::OUString > OTableWindowAccess::getSupportedServiceNames_Static(void) throw( RuntimeException )
{
Sequence< ::rtl::OUString > aSupported(2);
- aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.accessibility.Accessible");
- aSupported[1] = ::rtl::OUString::createFromAscii("com.sun.star.accessibility.AccessibleContext");
+ aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.accessibility.Accessible"));
+ aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.accessibility.AccessibleContext"));
return aSupported;
}
// -----------------------------------------------------------------------------
::rtl::OUString OTableWindowAccess::getImplementationName_Static(void) throw( RuntimeException )
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.TableWindowAccessibility");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.TableWindowAccessibility"));
}
// -----------------------------------------------------------------------------
// XAccessibleContext
@@ -317,3 +291,4 @@ namespace dbaui
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableWindowData.cxx b/dbaccess/source/ui/querydesign/TableWindowData.cxx
index 69e8bb5cb..396b2d3e7 100644
--- a/dbaccess/source/ui/querydesign/TableWindowData.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowData.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEWINDOWDATA_HXX
#include "TableWindowData.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
@@ -155,3 +152,5 @@ void OTableWindowData::listen()
}
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
index fd2a7b6d3..ce87aec19 100644
--- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,36 +28,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#include "TableWindowListBox.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef DBAUI_JOINEXCHANGE_HXX
#include "JoinExchange.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
+#include <osl/diagnose.h>
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef _SVX_DBEXCH_HRC
#include <svx/dbexch.hrc>
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
using namespace dbaui;
using namespace ::com::sun::star::sdbc;
@@ -96,7 +77,7 @@ OTableWindowListBox::OTableWindowListBox( OTableWindow* pParent )
void OTableWindowListBox::dragFinished( )
{
// first show the error msg when existing
- m_pTabWin->getDesignView()->getController().showError(m_pTabWin->getDesignView()->getController().clearOccuredError());
+ m_pTabWin->getDesignView()->getController().showError(m_pTabWin->getDesignView()->getController().clearOccurredError());
// second look for ui activities which should happen after d&d
if (m_nUiEvent)
Application::RemoveUserEvent(m_nUiEvent);
@@ -185,7 +166,6 @@ long OTableWindowListBox::PreNotify(NotifyEvent& rNEvt)
if(m_pTabWin)
{
bHandled = m_pTabWin->HandleKeyInput(*pKeyEvent);
- // bHandled = sal_True;
}
break;
}
@@ -215,7 +195,6 @@ IMPL_LINK( OTableWindowListBox, ScrollUpHdl, SvTreeListBox*, /*pBox*/ )
ScrollOutputArea( -1 );
pEntry = GetEntry( m_aMousePos );
Select( pEntry, sal_True );
-// m_aScrollTimer.Start();
}
return 0;
@@ -233,7 +212,6 @@ IMPL_LINK( OTableWindowListBox, ScrollDownHdl, SvTreeListBox*, /*pBox*/ )
ScrollOutputArea( 1 );
pEntry = GetEntry( m_aMousePos );
Select( pEntry, sal_True );
-// m_aScrollTimer.Start();
}
return 0;
@@ -245,7 +223,7 @@ void OTableWindowListBox::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPi
OJoinTableView* pCont = m_pTabWin->getTableView();
if (!pCont->getDesignView()->getController().isReadOnly() && pCont->getDesignView()->getController().isConnected())
{
- // #100271# OJ asterix was not allowed to be copied to selection browsebox
+ // asterix was not allowed to be copied to selection browsebox
sal_Bool bFirstNotAllowed = FirstSelected() == First() && m_pTabWin->GetData()->IsShowAll();
EndSelection();
// create a description of the source
@@ -266,7 +244,6 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt )
&& OJoinExchObj::isFormatAvailable(GetDataFlavorExVector(),SOT_FORMATSTR_ID_SBA_JOIN) )
{ // don't drop into the window if it's the drag source itself
-
// remove the selection if the dragging operation is leaving the window
if (_rEvt.mbLeaving)
SelectAll(sal_False);
@@ -345,7 +322,7 @@ IMPL_LINK( OTableWindowListBox, DropHdl, void *, /*EMPTY_ARG*/)
catch(const SQLException& e)
{
// remember the exception so that we can show them later when d&d is finished
- m_pTabWin->getDesignView()->getController().setErrorOccured(::dbtools::SQLExceptionInfo(e));
+ m_pTabWin->getDesignView()->getController().setErrorOccurred(::dbtools::SQLExceptionInfo(e));
}
return 0L;
}
@@ -400,7 +377,7 @@ IMPL_LINK( OTableWindowListBox, OnDoubleClick, SvTreeListBox *, /*pBox*/ )
{
// meinem Elter Bescheid sagen
Window* pParent = Window::GetParent();
- DBG_ASSERT(pParent != NULL, "OTableWindowListBox::OnDoubleClick : habe kein Parent !");
+ OSL_ENSURE(pParent != NULL, "OTableWindowListBox::OnDoubleClick : habe kein Parent !");
static_cast<OTableWindow*>(pParent)->OnEntryDoubleClicked(GetHdlEntry());
@@ -421,3 +398,5 @@ void OTableWindowListBox::Command(const CommandEvent& rEvt)
}
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
index 3a603b509..ddc257f2e 100644
--- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,48 +28,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEWINDOWTITLE_HXX
#include "TableWindowTitle.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_HELP_HXX
#include <vcl/help.hxx>
-#endif
-#ifndef _SV_MENU_HXX
#include <vcl/menu.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _CNTIDS_HRC
#include <sfx2/cntids.hrc>
-#endif
-#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#include "TableWindowListBox.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
-#endif
#include <algorithm>
@@ -156,15 +129,6 @@ void OTableWindowTitle::Command( const CommandEvent& rEvt )
}
//------------------------------------------------------------------------------
-//void OTableWindowTitle::Paint( const Rectangle& rRect )
-//{
-// //////////////////////////////////////////////////////////////////////
-// // Ausgabe des Textes in der Titelzeile
-// Rectangle aWinRect( Point(0,0), GetSizePixel() );
-// DrawText( aWinRect, GetText(), TEXT_DRAW_CENTER|TEXT_DRAW_VCENTER|TEXT_DRAW_ENDELLIPSIS );
-//}
-
-//------------------------------------------------------------------------------
void OTableWindowTitle::KeyInput( const KeyEvent& rEvt )
{
if ( m_pTabWin )
@@ -243,6 +207,4 @@ void OTableWindowTitle::StateChanged( StateChangedType nType )
}
}
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/makefile.mk b/dbaccess/source/ui/querydesign/makefile.mk
deleted file mode 100644
index 36e36c960..000000000
--- a/dbaccess/source/ui/querydesign/makefile.mk
+++ /dev/null
@@ -1,89 +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=querydesign
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES =\
- $(SLO)$/ConnectionLineAccess.obj \
- $(SLO)$/TableWindowAccess.obj \
- $(SLO)$/JAccess.obj \
- $(SLO)$/JoinDesignView.obj \
- $(SLO)$/JoinController.obj \
- $(SLO)$/QueryDesignView.obj \
- $(SLO)$/SelectionBrowseBox.obj \
- $(SLO)$/querydlg.obj \
- $(SLO)$/QueryTabWinUndoAct.obj \
- $(SLO)$/QueryMoveTabWinUndoAct.obj \
- $(SLO)$/QueryTabConnUndoAction.obj \
- $(SLO)$/TableFieldDescription.obj \
- $(SLO)$/JoinTableView.obj \
- $(SLO)$/QueryViewSwitch.obj \
- $(SLO)$/QueryTableView.obj \
- $(SLO)$/TableWindowData.obj \
- $(SLO)$/QTableWindow.obj \
- $(SLO)$/TableWindow.obj \
- $(SLO)$/JoinExchange.obj \
- $(SLO)$/TableWindowListBox.obj \
- $(SLO)$/TableWindowTitle.obj \
- $(SLO)$/QueryTextView.obj \
- $(SLO)$/QTableConnection.obj \
- $(SLO)$/querycontroller.obj \
- $(SLO)$/querycontainerwindow.obj \
- $(SLO)$/queryview.obj \
- $(SLO)$/TableConnection.obj \
- $(SLO)$/TableConnectionData.obj
-
-SLOFILES =\
- $(EXCEPTIONSFILES) \
- $(SLO)$/TableFieldInfo.obj \
- $(SLO)$/QTableConnectionData.obj \
- $(SLO)$/QTableWindowData.obj \
- $(SLO)$/ConnectionLine.obj \
- $(SLO)$/ConnectionLineData.obj
-
-SRS1NAME=$(TARGET)
-SRC1FILES = query.src \
- querydlg.src \
-
-# --- Targets -------------------------------------------------------
-
-
-.INCLUDE : target.mk
-
-$(SRS)$/$(TARGET).srs: $(SOLARINCDIR)$/svx$/globlmn.hrc
-
-
diff --git a/dbaccess/source/ui/querydesign/query.src b/dbaccess/source/ui/querydesign/query.src
index eb1ad4121..e5d4b4d96 100644
--- a/dbaccess/source/ui/querydesign/query.src
+++ b/dbaccess/source/ui/querydesign/query.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -97,27 +97,11 @@ Menu RID_QUERYCOLPOPUPMENU
};
};
};
+
ImageList IMG_JOINS
{
Prefix = "jo";
- MaskColor = Color {
- Red = 0xffff;
- Green = 0x0000;
- Blue = 0xffff;
- };
- IdList = {
- IMG_PRIMARY_KEY; IMG_FOREIGN_KEY;
- };
- IdCount = { 2; };
-};
-ImageList IMG_JOINS_H
-{
- Prefix = "joh";
- MaskColor = Color {
- Red = 0xffff;
- Green = 0x0000;
- Blue = 0xffff;
- };
+ MaskColor = Color { Red = 0xffff; Green = 0x0000; Blue = 0xffff; };
IdList = {
IMG_PRIMARY_KEY; IMG_FOREIGN_KEY;
};
@@ -161,6 +145,7 @@ String STR_QUERY_UNDO_TABFIELDCREATE
{
Text [ en-US ] = "Add Column" ;
};
+
String RID_STR_TABLE_DOESNT_EXIST
{
Text [ en-US ] = "Invalid expression, table '$name$' does not exist.";
@@ -170,6 +155,7 @@ String RID_STR_FIELD_DOESNT_EXIST
{
Text [ en-US ] = "Invalid expression, field name '$name$' does not exist.";
};
+
String RID_STR_TOMUCHTABLES
{
Text [ en-US ] = "The query covers #num# tables. The selected database type, however, can only process a maximum of #maxnum# table(s) per statement.";
@@ -184,10 +170,12 @@ String STR_QUERY_UNDO_MODIFY_CELL
{
Text [ en-US ] = "Edit Column Description";
};
+
String STR_QUERY_UNDO_SIZE_COLUMN
{
Text [ en-US ] = "Adjust column width";
};
+
String STR_QUERY_SORTTEXT
{
Text [ en-US ] = "(not sorted);ascending;descending" ;
@@ -197,14 +185,17 @@ String STR_QUERY_FUNCTIONS
{
Text [ en-US ] = "(no function);Group";
};
+
String STR_QUERY_NOTABLE
{
Text [ en-US ] = "(no table)";
};
+
String STR_QRY_ORDERBY_UNRELATED
{
Text [ en-US ] = "The database only supports sorting for visible fields.";
};
+
Menu RID_QUERYFUNCTION_POPUPMENU
{
ItemList =
@@ -243,6 +234,7 @@ Menu RID_QUERYFUNCTION_POPUPMENU
};
};
};
+
String STR_QUERY_HANDLETEXT
{
Text [ en-US ] = "Field;Alias;Table;Sort;Visible;Function;Criterion;Or;Or";
@@ -257,30 +249,39 @@ ErrorBox ERR_QRY_CRITERIA_ON_ASTERISK
{
Message [ en-US ] = "A condition cannot be applied to field [*]" ;
};
+
String STR_QRY_TOO_LONG_STATEMENT
{
Text [ en-US ] = "The SQL statement created is too long.";
};
+
String STR_QRY_TOOCOMPLEX
{
Text [ en-US ] = "Query is too complex" ;
};
+
String STR_QRY_NOSELECT
{
Text [ en-US ] = "Nothing has been selected." ;
};
+
String STR_QRY_TOOMANYCOND
{
Text [ en-US ] = "Too many search criteria" ;
};
+
String STR_QRY_SYNTAX
{
Text [ en-US ] = "SQL syntax error" ;
};
+
ErrorBox ERR_QRY_ORDERBY_ON_ASTERISK
{
Message [ en-US ] = "[*] cannot be used as a sort criterion.";
};
+
+
+
String STR_QRY_TOO_MANY_TABLES
{
Text [ en-US ] = "There are too many tables.";
@@ -290,10 +291,12 @@ String STR_QRY_NATIVE
{
Text [ en-US ] = "The statement will not be applied when querying in the SQL dialect of the database." ;
};
+
ErrorBox ERR_QRY_AMB_FIELD
{
Message [ en-US ] = "Field name not found or not unique" ;
};
+
String STR_QRY_ILLEGAL_JOIN
{
Text [ en-US ] = "Join could not be processed" ;
diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
index f97210491..a81edd4ae 100644
--- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
+++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,42 +29,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYCONTAINERWINDOW_HXX
#include "querycontainerwindow.hxx"
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
-#endif
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/unohlp.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _SFXSIDS_HRC
#include <sfx2/sfxsids.hrc>
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XCLOSEABLE_HPP_
#include <com/sun/star/util/XCloseable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
//.........................................................................
namespace dbaui
@@ -109,12 +86,11 @@ namespace dbaui
m_xBeamer = NULL;
if(xCloseable.is())
xCloseable->close(sal_False); // false - holds the owner ship of this frame
- // m_xBeamer->setComponent(NULL,NULL);
- }
- {
- ::std::auto_ptr<Window> aTemp(m_pSplitter);
- m_pSplitter = NULL;
}
+
+ ::std::auto_ptr<Window> aTemp(m_pSplitter);
+ m_pSplitter = NULL;
+
}
// -----------------------------------------------------------------------------
bool OQueryContainerWindow::switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo )
@@ -230,7 +206,7 @@ namespace dbaui
::dbaui::notifySystemWindow(this,m_pBeamer,::comphelper::mem_fun(&TaskPaneList::AddWindow));
- Reference < XFrame > xBeamerFrame( m_pViewSwitch->getORB()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Frame")),UNO_QUERY );
+ Reference < XFrame > xBeamerFrame( m_pViewSwitch->getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Frame"))),UNO_QUERY );
m_xBeamer.set( xBeamerFrame );
OSL_ENSURE(m_xBeamer.is(),"No frame created!");
m_xBeamer->initialize( VCLUnoHelper::GetInterface ( m_pBeamer ) );
@@ -276,7 +252,7 @@ namespace dbaui
m_pSplitter->Show();
Resize();
- }
+ }
}
// -----------------------------------------------------------------------------
@@ -286,3 +262,4 @@ namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 3c891de78..df390e6f9 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,9 +90,10 @@
#include <svtools/localresaccess.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
extern "C" void SAL_CALL createRegistryInfo_OQueryControl()
{
@@ -123,12 +125,12 @@ namespace dbaui
// need by registration
static ::rtl::OUString getImplementationName_Static() throw( RuntimeException )
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.OViewDesign");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.OViewDesign"));
}
static Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( RuntimeException )
{
Sequence< ::rtl::OUString> aSupported(1);
- aSupported.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.ViewDesign");
+ aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ViewDesign"));
return aSupported;
}
static Reference< XInterface > SAL_CALL Create(const Reference< XMultiServiceFactory >& _rM)
@@ -155,11 +157,11 @@ namespace dbaui
if (!_pNode->isToken())
{
// Regelnamen als rule: ...
- rString = ::rtl::OUString::createFromAscii("RULE_ID: ");
+ rString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RULE_ID: "));
rString += ::rtl::OUString::valueOf( (sal_Int32)_pNode->getRuleID());
- rString+= ::rtl::OUString::createFromAscii("(");
+ rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("("));
rString += OSQLParser::RuleIDToStr(_pNode->getRuleID());
- rString+= ::rtl::OUString::createFromAscii(")");
+ rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")"));
_pParent = _pBox->InsertEntry(rString,_pParent);
@@ -180,53 +182,58 @@ namespace dbaui
case SQL_NODE_KEYWORD:
{
- rString+= ::rtl::OUString::createFromAscii("SQL_KEYWORD:");
+ rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_KEYWORD:"));
::rtl::OString sT = OSQLParser::TokenIDToStr(_pNode->getTokenID());
rString += ::rtl::OUString(sT,sT.getLength(),RTL_TEXTENCODING_UTF8);
break;}
case SQL_NODE_COMPARISON:
- {rString+= ::rtl::OUString::createFromAscii("SQL_COMPARISON:");
- rString += _pNode->getTokenValue(); // haenge Nodevalue an
+ {
+ rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_COMPARISON:"));
+ rString += _pNode->getTokenValue(); // haenge Nodevalue an
// und beginne neu Zeile
- break;}
+ break;}
case SQL_NODE_NAME:
- {rString+= ::rtl::OUString::createFromAscii("SQL_NAME:");
- rString+= ::rtl::OUString::createFromAscii("\"");
- rString += _pNode->getTokenValue();
- rString+= ::rtl::OUString::createFromAscii("\"");
-
- break;}
+ {
+ rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_NAME:"));
+ rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\""));
+ rString += _pNode->getTokenValue();
+ rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\""));
+ break;}
case SQL_NODE_STRING:
- {rString += ::rtl::OUString::createFromAscii("SQL_STRING:'");
- rString += _pNode->getTokenValue();
- break;}
+ {
+ rString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_STRING:'"));
+ rString += _pNode->getTokenValue();
+ break;}
case SQL_NODE_INTNUM:
- {rString += ::rtl::OUString::createFromAscii("SQL_INTNUM:");
- rString += _pNode->getTokenValue();
- break;}
+ {
+ rString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_INTNUM:"));
+ rString += _pNode->getTokenValue();
+ break;}
case SQL_NODE_APPROXNUM:
- {rString += ::rtl::OUString::createFromAscii("SQL_APPROXNUM:");
- rString += _pNode->getTokenValue();
- break;}
+ {
+ rString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_APPROXNUM:"));
+ rString += _pNode->getTokenValue();
+ break;}
case SQL_NODE_PUNCTUATION:
- {rString += ::rtl::OUString::createFromAscii("SQL_PUNCTUATION:");
- rString += _pNode->getTokenValue(); // haenge Nodevalue an
- break;}
+ {
+ rString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_PUNCTUATION:"));
+ rString += _pNode->getTokenValue(); // haenge Nodevalue an
+ break;}
case SQL_NODE_AMMSC:
- {rString += ::rtl::OUString::createFromAscii("SQL_AMMSC:");
- rString += _pNode->getTokenValue(); // haenge Nodevalue an
-
- break;}
+ {
+ rString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_AMMSC:"));
+ rString += _pNode->getTokenValue(); // haenge Nodevalue an
+ break;}
default:
- OSL_ASSERT("OSQLParser::ShowParseTree: unzulaessiger NodeType");
+ OSL_FAIL("OSQLParser::ShowParseTree: unzulaessiger NodeType");
rString += _pNode->getTokenValue();
}
_pBox->InsertEntry(rString,_pParent);
@@ -302,13 +309,13 @@ namespace
//------------------------------------------------------------------------------
::rtl::OUString OQueryController::getImplementationName_Static() throw( RuntimeException )
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.OQueryDesign");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.OQueryDesign"));
}
//------------------------------------------------------------------------------
Sequence< ::rtl::OUString> OQueryController::getSupportedServiceNames_Static(void) throw( RuntimeException )
{
Sequence< ::rtl::OUString> aSupported(1);
- aSupported.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.QueryDesign");
+ aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.QueryDesign"));
return aSupported;
}
//-------------------------------------------------------------------------
@@ -354,7 +361,7 @@ OQueryController::~OQueryController()
DBG_DTOR(OQueryController,NULL);
if ( !getBroadcastHelper().bDisposed && !getBroadcastHelper().bInDispose )
{
- OSL_ENSURE(0,"Please check who doesn't dispose this component!");
+ OSL_FAIL("Please check who doesn't dispose this component!");
// increment ref count to prevent double call of Dtor
osl_incrementInterlockedCount( &m_refCount );
dispose();
@@ -664,7 +671,7 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
}
}
}
- catch(const SQLException& e)
+ catch(const SQLException&)
{
aError = ::cppu::getCaughtException();
}
@@ -693,7 +700,6 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
if(m_bGraphicalDesign)
InvalidateFeature(ID_BROWSER_ADDTABLE);
}
- // InvalidateFeature(ID_BROWSER_QUERY_EXECUTE);
break;
case SID_QUERY_VIEW_FUNCTIONS:
case SID_QUERY_VIEW_TABLES:
@@ -719,29 +725,24 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
{
xCloseFrame->close( sal_True );
}
- catch( const Exception& )
+ catch(const Exception&)
{
- OSL_ENSURE( sal_False, "OQueryController::Execute(SID_DB_QUERY_PREVIEW): *nobody* is expected to veto closing the preview frame!" );
+ OSL_FAIL( "OQueryController::Execute(SID_DB_QUERY_PREVIEW): *nobody* is expected to veto closing the preview frame!" );
}
}
else
Execute(ID_BROWSER_QUERY_EXECUTE,Sequence< PropertyValue >());
}
- catch(Exception&)
+ catch(const Exception&)
{
}
break;
case ID_QUERY_ZOOM_IN:
{
-// m_aZoom *= Fraction(1,10);
-// static_cast<OQueryViewSwitch*>(getView())->zoomTableView(m_aZoom);
}
break;
case ID_QUERY_ZOOM_OUT:
{
-// if(m_aZoom != Fraction(1,1))
-// m_aZoom /= Fraction(1,10);
-// static_cast<OQueryViewSwitch*>(getView())->zoomTableView(m_aZoom);
}
break;
#if OSL_DEBUG_LEVEL > 1
@@ -778,11 +779,10 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
pNodeTmp = pTemp->getChild(1);
OSQLParseNode::compress(pNodeTmp);
pNodeTmp = pTemp->getChild(1);
- } // if ( pCondition ) // no where clause
+ }
::rtl::OUString sTemp;
pNode->parseNodeToStr(sTemp,getConnection());
getContainer()->setStatement(sTemp);
-
}
}
@@ -863,7 +863,7 @@ void OQueryController::impl_initialize()
::rtl::OUString sIndependentSQLCommand;
if ( rArguments.get_ensureType( "IndependentSQLCommand", sIndependentSQLCommand ) )
{
- OSL_ENSURE( false, "OQueryController::impl_initialize: IndependentSQLCommand is regognized for compatibility only!" );
+ OSL_FAIL( "OQueryController::impl_initialize: IndependentSQLCommand is regognized for compatibility only!" );
sCommand = sIndependentSQLCommand;
m_nCommandType = CommandType::COMMAND;
}
@@ -871,7 +871,7 @@ void OQueryController::impl_initialize()
::rtl::OUString sCurrentQuery;
if ( rArguments.get_ensureType( "CurrentQuery", sCurrentQuery ) )
{
- OSL_ENSURE( false, "OQueryController::impl_initialize: CurrentQuery is regognized for compatibility only!" );
+ OSL_FAIL( "OQueryController::impl_initialize: CurrentQuery is regognized for compatibility only!" );
sCommand = sCurrentQuery;
m_nCommandType = CommandType::QUERY;
}
@@ -879,7 +879,7 @@ void OQueryController::impl_initialize()
sal_Bool bCreateView( sal_False );
if ( rArguments.get_ensureType( "CreateView", bCreateView ) && bCreateView )
{
- OSL_ENSURE( false, "OQueryController::impl_initialize: CurrentQuery is regognized for compatibility only!" );
+ OSL_FAIL( "OQueryController::impl_initialize: CurrentQuery is regognized for compatibility only!" );
m_nCommandType = CommandType::TABLE;
}
@@ -903,7 +903,7 @@ void OQueryController::impl_initialize()
m_sName = ::rtl::OUString();
break;
default:
- OSL_ENSURE( false, "OQueryController::impl_initialize: logic error in code!" );
+ OSL_FAIL( "OQueryController::impl_initialize: logic error in code!" );
throw RuntimeException();
}
@@ -911,7 +911,7 @@ void OQueryController::impl_initialize()
sal_Bool bGraphicalDesign( sal_True );
if ( rArguments.get_ensureType( (::rtl::OUString)PROPERTY_QUERYDESIGNVIEW, bGraphicalDesign ) )
{
- OSL_ENSURE( false, "OQueryController::impl_initialize: QueryDesignView is regognized for compatibility only!" );
+ OSL_FAIL( "OQueryController::impl_initialize: QueryDesignView is regognized for compatibility only!" );
m_bGraphicalDesign = bGraphicalDesign;
}
@@ -1050,7 +1050,7 @@ void OQueryController::impl_initialize()
setModified(sal_False);
}
- catch(SQLException& e)
+ catch(const SQLException& e)
{
DBG_UNHANDLED_EXCEPTION();
// we caught an exception so we switch to text only mode
@@ -1078,7 +1078,7 @@ void OQueryController::onLoadedMenu(const Reference< ::com::sun::star::frame::XL
{
if ( !editingCommand() )
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
String aDefaultName = String( ModuleRes( editingView() ? STR_VIEW_TITLE : STR_QRY_TITLE ) );
sName = aDefaultName.GetToken(0,' ');
@@ -1101,7 +1101,7 @@ void OQueryController::setQueryComposer()
m_xComposer = xFactory->createQueryComposer();
getContainer()->setStatement(m_sStatement);
}
- catch (Exception&)
+ catch(const Exception&)
{
m_xComposer = NULL;
}
@@ -1159,12 +1159,12 @@ void OQueryController::impl_onModifyChanged()
// -----------------------------------------------------------------------------
void SAL_CALL OQueryController::disposing( const EventObject& Source ) throw(RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if ( getContainer() && Source.Source.is() )
{
if ( Source.Source == m_aCurrentFrame.getFrame() )
- { // our frame is beeing disposed -> close the preview window (if we have one)
+ { // our frame is being disposed -> close the preview window (if we have one)
Reference< XFrame > xPreviewFrame( getContainer()->getPreviewFrame() );
::comphelper::disposeComponent( xPreviewFrame );
}
@@ -1289,7 +1289,7 @@ void OQueryController::executeQuery()
InvalidateFeature(SID_DB_QUERY_PREVIEW);
URL aWantToDispatch;
- aWantToDispatch.Complete = ::rtl::OUString::createFromAscii(".component:DB/DataSourceBrowser");
+ aWantToDispatch.Complete = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".component:DB/DataSourceBrowser"));
::rtl::OUString sFrameName( FRAME_NAME_QUERY_PREVIEW );
sal_Int32 nSearchFlags = FrameSearchFlag::CHILDREN;
@@ -1350,12 +1350,12 @@ void OQueryController::executeQuery()
}
else
{
- OSL_ENSURE(0,"Couldn't create a beamer window!");
+ OSL_FAIL("Couldn't create a beamer window!");
}
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Couldn't create a beamer window!");
+ OSL_FAIL("Couldn't create a beamer window!");
}
}
}
@@ -1381,7 +1381,6 @@ sal_Bool OQueryController::askForNewName(const Reference<XNameAccess>& _xElement
{
String sName = String( ModuleRes( editingView() ? STR_VIEW_TITLE : STR_QRY_TITLE ) );
aDefaultName = sName.GetToken(0,' ');
- //aDefaultName = getPrivateTitle( );
aDefaultName = ::dbtools::createUniqueName(_xElements,aDefaultName);
}
@@ -1547,7 +1546,7 @@ bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs)
// now check if our datasource has set a tablefilter and if so, append the new table name to it
::dbaui::appendToFilter( getConnection(), m_sName, getORB(), getView() );
- } // if ( editingView() )
+ }
Reference< XTitleChangeListener> xEventListener(impl_getTitleHelper_throw(),UNO_QUERY);
if ( xEventListener.is() )
{
@@ -1561,13 +1560,13 @@ bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs)
bSuccess = true;
}
- catch( const SQLException& )
+ catch(const SQLException&)
{
if ( !bNew )
m_sName = sOriginalName;
aInfo = SQLExceptionInfo( ::cppu::getCaughtException() );
}
- catch(Exception&)
+ catch(const Exception&)
{
if ( !bNew )
m_sName = sOriginalName;
@@ -1612,11 +1611,11 @@ bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs)
m_xComposer->setQuery(sTranslatedStmt);
sTranslatedStmt = m_xComposer->getComposedQuery();
}
- catch(SQLException& e)
+ catch(const SQLException& e)
{
::dbtools::SQLExceptionInfo aInfo(e);
showError(aInfo);
- // an error occured so we clear the statement
+ // an error occurred so we clear the statement
sTranslatedStmt = ::rtl::OUString();
}
}
@@ -1635,7 +1634,7 @@ bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs)
// -----------------------------------------------------------------------------
short OQueryController::saveModified()
{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
short nRet = RET_YES;
if ( !isConnected() || !isModified() )
@@ -1698,7 +1697,7 @@ void OQueryController::impl_reset( const bool i_bForceCurrentControllerSettings
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OQueryController::impl_reset: could not retrieve the layout information from the query!" );
+ OSL_FAIL( "OQueryController::impl_reset: could not retrieve the layout information from the query!" );
}
}
}
@@ -1834,7 +1833,7 @@ bool OQueryController::allowViews() const
// -----------------------------------------------------------------------------
bool OQueryController::allowQueries() const
{
- DBG_ASSERT( getSdbMetaData().isConnected(), "OQueryController::allowQueries: illegal call!" );
+ OSL_ENSURE( getSdbMetaData().isConnected(), "OQueryController::allowQueries: illegal call!" );
if ( !getSdbMetaData().supportsSubqueriesInFrom() )
return false;
@@ -1866,3 +1865,4 @@ void SAL_CALL OQueryController::restoreViewData(const Any& /*Data*/) throw( Runt
} // namespace dbaui
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx
index 6f19b27e3..ff4c2b117 100644
--- a/dbaccess/source/ui/querydesign/querydlg.cxx
+++ b/dbaccess/source/ui/querydesign/querydlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,42 +28,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYDLG_HXX
#include "querydlg.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBAUI_QUERYDLG_HRC
#include "querydlg.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef DBAUI_QTABLECONNECTIONDATA_HXX
#include "QTableConnectionData.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef DBAUI_RELATIONCONTROL_HXX
#include "RelationControl.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
using namespace dbaui;
using namespace ::com::sun::star::uno;
@@ -278,12 +255,12 @@ IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ )
String sHelpText = String( ModuleRes( nResId ) );
if( nPos )
{
- sHelpText.SearchAndReplace( String( RTL_CONSTASCII_STRINGPARAM( "%1" ) ), sFirstWinName );
- sHelpText.SearchAndReplace( String( RTL_CONSTASCII_STRINGPARAM( "%2" ) ), sSecondWinName );
+ sHelpText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%1" ) ), sFirstWinName );
+ sHelpText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%2" ) ), sSecondWinName );
}
if ( bAddHint )
{
- sHelpText += String( RTL_CONSTASCII_STRINGPARAM( "\n" ) );
+ sHelpText += String( RTL_CONSTASCII_USTRINGPARAM( "\n" ) );
sHelpText += String( ModuleRes( STR_JOIN_TYPE_HINT ) );
}
@@ -343,8 +320,6 @@ TTableConnectionData::value_type DlgQryJoin::getConnectionData() const
// -----------------------------------------------------------------------------
void DlgQryJoin::setValid(sal_Bool _bValid)
{
- //LBChangeHdl(&aLB_JoinType);
-
aPB_OK.Enable(_bValid || eJoinType == CROSS_JOIN );
}
// -----------------------------------------------------------------------------
@@ -397,3 +372,4 @@ void DlgQryJoin::setJoinType(EJoinType _eNewJoinType)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/querydlg.hxx b/dbaccess/source/ui/querydesign/querydlg.hxx
index 89732cfe1..20e81bc30 100644
--- a/dbaccess/source/ui/querydesign/querydlg.hxx
+++ b/dbaccess/source/ui/querydesign/querydlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,31 +27,17 @@
************************************************************************/
#ifndef DBAUI_QUERYDLG_HXX
#define DBAUI_QUERYDLG_HXX
-#ifndef _SV_DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _SV_FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
-#ifndef DBAUI_RELCONTROLIFACE_HXX
#include "RelControliFace.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
namespace dbaui
@@ -118,3 +105,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/querydlg.src b/dbaccess/source/ui/querydesign/querydlg.src
index 658cffeeb..6a10478d1 100644
--- a/dbaccess/source/ui/querydesign/querydlg.src
+++ b/dbaccess/source/ui/querydesign/querydlg.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -183,13 +183,13 @@ String STR_QUERY_FULL_JOIN
{
Text [ en-US ] = "Contains ALL records from '%1' and from '%2'.";
};
+
String STR_QUERY_CROSS_JOIN
{
Text [ en-US ] = "Contains the cartesian product of ALL records from '%1' and from '%2'.";
};
+
String STR_QUERY_NATURAL_JOIN
{
Text [ en-US ] = "Contains only one column for each pair of equally-named columns from '%1' and from '%2'.";
};
-
-
diff --git a/dbaccess/source/ui/querydesign/queryview.cxx b/dbaccess/source/ui/querydesign/queryview.cxx
index 253292e3a..a46cd3b61 100644
--- a/dbaccess/source/ui/querydesign/queryview.cxx
+++ b/dbaccess/source/ui/querydesign/queryview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYVIEW_HXX
#include "queryview.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
using namespace dbaui;
@@ -60,3 +55,4 @@ OQueryView::~OQueryView()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/relationdesign/RTableConnection.cxx b/dbaccess/source/ui/relationdesign/RTableConnection.cxx
index 877a8a212..9ad172cc5 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnection.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnection.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,21 +28,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_RTABLECONNECTION_HXX
#include "RTableConnection.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef DBAUI_RELATION_TABLEVIEW_HXX
#include "RelationTableView.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef DBAUI_CONNECTIONLINE_HXX
#include "ConnectionLine.hxx"
-#endif
using namespace dbaui;
//========================================================================
@@ -155,3 +146,5 @@ void ORelationTableConnection::Draw( const Rectangle& rRect )
GetParent()->DrawText( aDestPos, aDestText, TEXT_DRAW_CLIP | TEXT_DRAW_CENTER | TEXT_DRAW_BOTTOM);
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/relationdesign/RTableConnection.hxx b/dbaccess/source/ui/relationdesign/RTableConnection.hxx
index 7d6ca2c78..73793dcff 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnection.hxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnection.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBAUI_RTABLECONNECTION_HXX
#define DBAUI_RTABLECONNECTION_HXX
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef DBAUI_RTABLECONNECTIONDATA_HXX
#include "RTableConnectionData.hxx"
-#endif
namespace dbaui
{
@@ -57,3 +54,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
index 64b0ae979..df24b8343 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -415,7 +416,7 @@ xKey.clear();
}
}
xKey.clear();
- } // for(sal_Int32 i=0;i<xKeys->getCount();++i)
+ }
if ( bDropRelation )
{
DropRelation();
@@ -423,8 +424,6 @@ xKey.clear();
::dbtools::throwGenericSQLException(sError,NULL);
}
-// OSL_ENSURE(xKey.is(),"No key found have insertion!");
-
// The fields the relation marks may not be the same as our LineDatas mark after the relation has been updated
if ( xColSup.is() )
{
@@ -453,8 +452,8 @@ xKey.clear();
m_vConnLineData.push_back(pNewData);
}
}
- } // if ( xColSup.is() )
- // NOTE : the caller is resposible for updating any other objects referencing the old LineDatas (for instance a ConnLine)
+ }
+ // NOTE : the caller is responsible for updating any other objects referencing the old LineDatas (for instance a ConnLine)
////////////////////////////////////////////////////////////
// Kardinalitaet bestimmen
@@ -464,3 +463,4 @@ xKey.clear();
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/relationdesign/RTableWindow.hxx b/dbaccess/source/ui/relationdesign/RTableWindow.hxx
index a0d8aefc0..e1b11aa9a 100644
--- a/dbaccess/source/ui/relationdesign/RTableWindow.hxx
+++ b/dbaccess/source/ui/relationdesign/RTableWindow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBAUI_RELTABLEWINDOW_HXX
#define DBAUI_RELTABLEWINDOW_HXX
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
namespace dbaui
{
@@ -49,3 +48,4 @@ namespace dbaui
#endif //DBAUI_RELTABLEWINDOW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index c0e439614..54c8cfdb5 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,7 +73,7 @@
#include <tools/diagnose_ex.h>
#include <vcl/waitobj.hxx>
#include <osl/thread.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#define MAX_THREADS 10
@@ -95,8 +96,6 @@ using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::ui::dialogs;
using namespace ::com::sun::star::util;
-// using namespace ::com::sun::star::sdbcx;
-// using namespace ::connectivity;
using namespace ::dbtools;
using namespace ::dbaui;
using namespace ::comphelper;
@@ -111,13 +110,13 @@ using namespace ::osl;
//------------------------------------------------------------------------------
::rtl::OUString ORelationController::getImplementationName_Static() throw( RuntimeException )
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.ORelationDesign");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.ORelationDesign"));
}
//------------------------------------------------------------------------------
Sequence< ::rtl::OUString> ORelationController::getSupportedServiceNames_Static(void) throw( RuntimeException )
{
Sequence< ::rtl::OUString> aSupported(1);
- aSupported.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.RelationDesign");
+ aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.RelationDesign"));
return aSupported;
}
//-------------------------------------------------------------------------
@@ -347,7 +346,7 @@ namespace
{
::comphelper::disposeComponent(xResult);
loadTableData(m_xTables->getByName(*pIter));
- } // if ( xResult.is() && xResult->next() )
+ }
}
catch( const Exception& )
{
@@ -366,12 +365,10 @@ namespace
Reference<XPropertySet> xTableProp(_aTable,UNO_QUERY);
const ::rtl::OUString sSourceName = ::dbtools::composeTableName( m_xMetaData, xTableProp, ::dbtools::eInTableDefinitions, false, false, false );
TTableDataHelper::iterator aFind = m_aTableData.find(sSourceName);
- bool bNotFound = true, bAdded = false;
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(sal_False);
- bAdded = true;
}
TTableWindowData::value_type pReferencingTable = aFind->second;
Reference<XIndexAccess> xKeys = pReferencingTable->getKeys();
@@ -393,7 +390,6 @@ namespace
xKey->getPropertyValue(PROPERTY_TYPE) >>= nKeyType;
if ( KeyType::FOREIGN == nKeyType )
{
- bNotFound = false;
::rtl::OUString sReferencedTable;
xKey->getPropertyValue(PROPERTY_REFERENCEDTABLE) >>= sReferencedTable;
//////////////////////////////////////////////////////////////////////
@@ -409,7 +405,7 @@ namespace
}
else
continue; // table name could not be found so we do not show this table releation
- } // if ( aFind == m_aTableData.end() )
+ }
TTableWindowData::value_type pReferencedTable = aRefFind->second;
::rtl::OUString sKeyName;
@@ -453,7 +449,7 @@ namespace
pTabConnData->SetCardinality();
}
}
- } // if ( xKeys.is() )
+ }
}
}
@@ -477,7 +473,7 @@ void ORelationController::mergeData(const TTableConnectionData& _aConnectionData
{
m_vTableData.push_back((*aConnDataIter)->getReferencedTable());
}
- } // for(;aConnDataIter != aConnDataEnd;++aConnDataIter)
+ }
if ( m_nThreadEvent )
{
--m_nThreadEvent;
@@ -488,7 +484,7 @@ void ORelationController::mergeData(const TTableConnectionData& _aConnectionData
// -----------------------------------------------------------------------------
IMPL_LINK( ORelationController, OnThreadFinished, void*, /*NOTINTERESTEDIN*/ )
{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
try
{
@@ -534,8 +530,8 @@ void ORelationController::loadData()
nStart = nEnd;
nEnd += nMaxElements;
nEnd = ::std::min(nEnd,nCount);
- } // for(;pIter != pEnd;++pIter)
- } // if ( aMeta.supportsThreads() )
+ }
+ }
else
{
RelationLoader* pThread = new RelationLoader(this,xMetaData,m_xTables,aNames,0,nCount);
@@ -613,3 +609,4 @@ bool ORelationController::allowQueries() const
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/relationdesign/RelationDesignView.cxx b/dbaccess/source/ui/relationdesign/RelationDesignView.cxx
index 2585b2c13..f08036e9a 100644
--- a/dbaccess/source/ui/relationdesign/RelationDesignView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationDesignView.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,66 +28,26 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_RELATIONDESIGNVIEW_HXX
#include "RelationDesignView.hxx"
-#endif
-#ifndef DBAUI_RELATION_TABLEVIEW_HXX
#include "RelationTableView.hxx"
-#endif
-#ifndef DBAUI_RELATIONCONTROLLER_HXX
#include "RelationController.hxx"
-#endif
-#ifndef _UNDO_HXX
#include <svl/undo.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _DBU_REL_HRC_
#include "dbu_rel.hrc"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef DBAUI_RTABLECONNECTION_HXX
#include "RTableConnection.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINE_HXX
#include "ConnectionLine.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
-#endif
-#ifndef DBAUI_RTABLECONNECTIONDATA_HXX
#include "RTableConnectionData.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
using namespace ::dbaui;
using namespace ::com::sun::star::uno;
@@ -151,3 +112,4 @@ void ORelationDesignView::GetFocus()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index a0d37b58b..f853ae67c 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,33 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-
#include "RelationTableView.hxx"
-
-
#include "JoinExchange.hxx"
-
-
#include <comphelper/extract.hxx>
-
-
#include "browserids.hxx"
-
-
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-
-
#include <com/sun/star/sdbc/XConnection.hpp>
-
-
#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
-
-
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-
-
#include <com/sun/star/sdbcx/KeyType.hpp>
-
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -179,7 +162,7 @@ void ORelationTableView::ReSync()
pTabConnDataList->erase( ::std::remove(pTabConnDataList->begin(),pTabConnDataList->end(),*aConIter),pTabConnDataList->end() );
continue;
}
- } // if ( !arrInvalidTables.empty() )
+ }
addConnection( new ORelationTableConnection(this, *aConIter), sal_False ); // don't add the data again
}
@@ -251,7 +234,7 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const
}
catch(const Exception&)
{
- OSL_ENSURE(0,"ORelationTableView::AddConnection: Exception oocured!");
+ OSL_FAIL("ORelationTableView::AddConnection: Exception oocured!");
}
}
}
@@ -318,7 +301,7 @@ bool ORelationTableView::RemoveConnection( OTableConnection* pConn ,sal_Bool /*_
}
catch(Exception&)
{
- OSL_ENSURE(0,"ORelationTableView::RemoveConnection: Something other than SQLException occured!");
+ OSL_FAIL("ORelationTableView::RemoveConnection: Something other than SQLException occurred!");
}
return false;
}
@@ -384,7 +367,6 @@ void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin )
}
}
-// -----------------------------------------------------------------------------
void ORelationTableView::lookForUiActivities()
{
if(m_pExistingConnection)
@@ -453,7 +435,7 @@ void ORelationTableView::_elementRemoved( const container::ContainerEvent& _rEve
m_pView->getController().InvalidateFeature(ID_BROWSER_UNDO);
m_pView->getController().InvalidateFeature(ID_BROWSER_REDO);
}
- } // if ( _rEvent.Accessor >>= sName )
+ }
m_bInRemove = false;
}
// -----------------------------------------------------------------------------
@@ -461,3 +443,4 @@ void ORelationTableView::_elementReplaced( const container::ContainerEvent& /*_r
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/relationdesign/makefile.mk b/dbaccess/source/ui/relationdesign/makefile.mk
deleted file mode 100644
index cdaaa8722..000000000
--- a/dbaccess/source/ui/relationdesign/makefile.mk
+++ /dev/null
@@ -1,58 +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=relationdesign
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES =\
- $(SLO)$/RTableConnection.obj \
- $(SLO)$/RTableConnectionData.obj \
- $(SLO)$/RelationTableView.obj \
- $(SLO)$/RelationDesignView.obj \
- $(SLO)$/RelationController.obj
-
-SRS1NAME=$(TARGET)
-SRC1FILES = relation.src
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-$(SRS)$/$(TARGET).srs: $(SOLARINCDIR)$/svx$/globlmn.hrc
-
-
diff --git a/dbaccess/source/ui/relationdesign/relation.src b/dbaccess/source/ui/relationdesign/relation.src
index 0a5f3e00f..4420ade06 100644
--- a/dbaccess/source/ui/relationdesign/relation.src
+++ b/dbaccess/source/ui/relationdesign/relation.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,22 +44,27 @@ String STR_QUERY_REL_EDIT_RELATION
{
Text [ en-US ] = "This relation already exists. Do you want to edit it or create a new one?" ;
};
+
String STR_QUERY_REL_EDIT
{
Text [ en-US ] = "Edit..." ;
};
+
String STR_QUERY_REL_CREATE
{
Text [ en-US ] = "Create..." ;
};
+
String STR_RELATIONDESIGN
{
Text [ en-US ] = " - %PRODUCTNAME Base: Relation design" ;
};
+
String STR_RELATIONDESIGN_NOT_AVAILABLE
{
Text [ en-US ] = "The database does not support relations." ;
};
+
QueryBox RELATION_DESIGN_SAVEMODIFIED
{
Buttons = WB_YES_NO_CANCEL ;
@@ -76,55 +81,3 @@ String STR_QUERY_REL_COULD_NOT_CREATE
{
Text [ en-US ] = "The database could not create the relation. May be foreign keys for this kind of table aren't supported.\nPlease check your documentation of the database.";
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
index dd7bab906..e42a2b3c0 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,27 +28,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEFIELDDESCGENPAGE_HXX
#include "FieldDescGenWin.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
+#include <osl/diagnose.h>
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef DBAUI_TABLEDESIGNHELPBAR_HXX
#include "TableDesignHelpBar.hxx"
-#endif
-#ifndef DBAUI_TABLEFIELDCONTROL_HXX
#include "TableFieldControl.hxx"
-#endif
-#ifndef DBAUI_TABLEDESIGNVIEW_HXX
#include "TableDesignView.hxx"
-#endif
-#ifndef DBAUI_TABLEEDITORCONTROL_HXX
#include "TEditControl.hxx"
-#endif
using namespace dbaui;
//==================================================================
@@ -75,7 +62,7 @@ OFieldDescGenWin::~OFieldDescGenWin()
//------------------------------------------------------------------------------
void OFieldDescGenWin::Init()
{
- DBG_ASSERT(GetEditorCtrl() != NULL, "OFieldDescGenWin::Init : have no editor control !");
+ OSL_ENSURE(GetEditorCtrl() != NULL, "OFieldDescGenWin::Init : have no editor control !");
m_pFieldControl->Init();
}
@@ -123,11 +110,6 @@ OTableEditorCtrl* OFieldDescGenWin::GetEditorCtrl()
}
#endif
//------------------------------------------------------------------------------
-//short OFieldDescGenWin::GetFormatCategory(OFieldDescription* pFieldDescr)
-//{
-// return m_pFieldControl->GetFormatCategory(pFieldDescr);
-//}
-//------------------------------------------------------------------------------
void OFieldDescGenWin::SaveData( OFieldDescription* pFieldDescr )
{
DBG_CHKTHIS(OFieldDescGenWin,NULL);
@@ -197,7 +179,4 @@ void OFieldDescGenWin::paste()
}
// -----------------------------------------------------------------------------
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
index ab947d4b6..5f9872de1 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBAUI_TABLEFIELDDESCGENPAGE_HXX
#define DBAUI_TABLEFIELDDESCGENPAGE_HXX
-#ifndef _SV_TABPAGE_HXX
#include <vcl/tabpage.hxx>
-#endif
-#ifndef DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
#include "IClipBoardTest.hxx"
-#endif
namespace dbaui
{
@@ -86,3 +83,4 @@ namespace dbaui
}
#endif // DBAUI_TABLEFIELDDESCGENPAGE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
index 4573f3790..32498e250 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,38 +28,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
#include "FieldDescriptions.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _DBU_TBL_HRC_
#include "dbu_tbl.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _COM_SUN_STAR_UTIL_NUMBERFORMAT_HPP_
#include <com/sun/star/util/NumberFormat.hpp>
-#endif
-#define DEFAULT_VARCHAR_PRECSION 50
+#define DEFAULT_VARCHAR_PRECSION 100
#define DEFAULT_OTHER_PRECSION 16
#define DEFAULT_NUMERIC_PRECSION 5
#define DEFAULT_NUMERIC_SCALE 0
@@ -580,7 +561,7 @@ sal_Int32 OFieldDescription::GetPrecision() const
if ( !nPrec )
nPrec = pTypeInfo->nPrecision;
break;
- } // switch ( pTypeInfo->nType )
+ }
}
return nPrec;
@@ -698,3 +679,5 @@ void OFieldDescription::copyColumnSettingsTo(const Reference< XPropertySet >& _r
}
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 013ccdcc7..401e004f5 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,84 +28,32 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEEDITORCONTROL_HXX
#include "TEditControl.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XALTERTABLE_HPP_
#include <com/sun/star/sdbcx/XAlterTable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDROP_HPP_
#include <com/sun/star/sdbcx/XDrop.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTYPES_HPP_
#include <com/sun/star/util/XNumberFormatTypes.hpp>
-#endif
-#ifndef _DBU_TBL_HRC_
#include "dbu_tbl.hrc"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONCONTROL_HXX
#include "FieldDescControl.hxx"
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
#include "FieldDescriptions.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBAUI_TABLEUNDO_HXX
#include "TableUndo.hxx"
-#endif
-#ifndef DBUI_TABLECONTROLLER_HXX
#include "TableController.hxx"
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef DBAUI_SQLNAMEEDIT_HXX
#include "SqlNameEdit.hxx"
-#endif
-#ifndef DBAUI_TABLEROW_EXCHANGE_HXX
#include "TableRowExchange.hxx"
-#endif
-#ifndef _SOT_STORAGE_HXX
#include <sot/storage.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONCONTROL_HXX
#include "FieldDescControl.hxx"
-#endif
-#ifndef DBAUI_TABLEFIELDCONTROL_HXX
#include "TableFieldControl.hxx"
-#endif
#include "dsntypes.hxx"
#include "dbaccess_slotid.hrc"
@@ -294,11 +243,6 @@ void OTableEditorCtrl::SetReadOnly( sal_Bool bRead )
DeactivateCell();
//////////////////////////////////////////////////////////////////////
- // ::com::sun::star::beans::Property Controls disablen
-// if (pDescrWin)
-// pDescrWin->SetReadOnly(bReadOnly || !SetDataPtr(nRow) || GetActRow()->IsReadOnly());
-
- //////////////////////////////////////////////////////////////////////
// Cursor des Browsers anpassen
BrowserMode nMode(BROWSER_COLUMNSELECTION | BROWSER_MULTISELECTION | BROWSER_KEEPSELECTION |
BROWSER_HLINESFULL | BROWSER_VLINESFULL|BROWSER_AUTOSIZE_LASTCOL);
@@ -333,7 +277,7 @@ void OTableEditorCtrl::InitCellController()
}
catch(SQLException&)
{
- OSL_ASSERT(!"getMaxColumnNameLength");
+ OSL_FAIL("getMaxColumnNameLength");
}
pNameCell = new OSQLNameEdit( &GetDataWindow(), sExtraNameChars,WB_LEFT );
@@ -361,12 +305,12 @@ void OTableEditorCtrl::InitCellController()
Size aHeight;
const Control* pControls[] = { pTypeCell,pDescrCell,pNameCell,pHelpTextCell};
- for(sal_Size i= 0; i < sizeof(pControls)/sizeof(pControls[0]);++i)
+ for(sal_Size i= 0; i < SAL_N_ELEMENTS(pControls);++i)
{
const Size aTemp( pControls[i]->GetOptimalSize(WINDOWSIZE_PREFERRED) );
if ( aTemp.Height() > aHeight.Height() )
aHeight.Height() = aTemp.Height();
- } // for(int i= 0; i < sizeof(pControls)/sizeof(pControls[0]);++i
+ }
SetDataRowHeight(aHeight.Height());
ClearModified();
@@ -462,7 +406,7 @@ CellController* OTableEditorCtrl::GetController(long nRow, sal_uInt16 nColumnId)
Reference<XPropertySet> xTable = GetView()->getController().getTable();
if (IsReadOnly() || ( xTable.is() &&
xTable->getPropertySetInfo()->hasPropertyByName(PROPERTY_TYPE) &&
- ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW")))
+ ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW"))))
return NULL;
//////////////////////////////////////////////////////////////////////
@@ -758,15 +702,6 @@ sal_Bool OTableEditorCtrl::SaveModified()
switch( nColId )
{
//////////////////////////////////////////////////////////////
- // NameCell
- case FIELD_NAME:
- {
- // removed the former duplicate-check. this is done in OTableDocShell::CheckDefConsistency now.
- // FS - 07.12.99 - 69575
-
- } break;
-
- //////////////////////////////////////////////////////////////
// TypeCell
case FIELD_TYPE:
{
@@ -1183,7 +1118,7 @@ void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const TOTypeIn
SwitchType( _pTypeInfo );
break;
default:
- OSL_ENSURE(sal_False, "OTableEditorCtrl::SetCellData: invalid column!");
+ OSL_FAIL("OTableEditorCtrl::SetCellData: invalid column!");
}
SetControlText(nRow,nColId,_pTypeInfo.get() ? _pTypeInfo->aUIName : ::rtl::OUString());
}
@@ -1210,7 +1145,7 @@ void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const ::com::s
break;
case FIELD_TYPE:
- OSL_ENSURE(sal_False, "OTableEditorCtrl::SetCellData: invalid column!");
+ OSL_FAIL("OTableEditorCtrl::SetCellData: invalid column!");
break;
case COLUMN_DESCRIPTION:
@@ -1238,8 +1173,7 @@ void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const ::com::s
break;
case FIELD_PROPERTY_NUMTYPE:
- // pFieldDescr->SetNumType( _rNewData );
- OSL_ENSURE(sal_False, "OTableEditorCtrl::SetCellData: invalid column!");
+ OSL_FAIL("OTableEditorCtrl::SetCellData: invalid column!");
break;
case FIELD_PROPERTY_AUTOINC:
@@ -1322,8 +1256,8 @@ Any OTableEditorCtrl::GetCellData( long nRow, sal_uInt16 nColId )
break;
case FIELD_PROPERTY_NUMTYPE:
- OSL_ENSURE(sal_False, "OTableEditorCtrl::GetCellData: invalid column!");
- // return pFieldDescr->GetNumType();
+ OSL_FAIL("OTableEditorCtrl::GetCellData: invalid column!");
+ break;
case FIELD_PROPERTY_AUTOINC:
sValue = pFieldDescr->IsAutoIncrement() ? strYes : strNo;
@@ -1369,7 +1303,7 @@ OFieldDescription* OTableEditorCtrl::GetFieldDescr( long nRow )
m_pRowList->size());
if( (nRow<0) || (sal::static_int_cast< unsigned long >(nRow)>=nListCount) )
{
- OSL_ENSURE(0,"(nRow<0) || (nRow>=nListCount)");
+ OSL_FAIL("(nRow<0) || (nRow>=nListCount)");
return NULL;
}
::boost::shared_ptr<OTableRow> pRow = (*m_pRowList)[ nRow ];
@@ -1407,11 +1341,6 @@ sal_Bool OTableEditorCtrl::IsCutAllowed( long nRow )
}
}
-// Reference<XPropertySet> xTable = GetView()->getController().getTable();
-// if( !IsCopyAllowed(nRow) || (xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW")))
-// return sal_False;
-
- // return bCutAllowed && IsDeleteAllowed( nRow );
return bIsCutAllowed;
}
@@ -1429,7 +1358,7 @@ sal_Bool OTableEditorCtrl::IsCopyAllowed( long /*nRow*/ )
else if(m_eChildFocus == ROW)
{
Reference<XPropertySet> xTable = GetView()->getController().getTable();
- if( !GetSelectRowCount() || (xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW")))
+ if( !GetSelectRowCount() || (xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW"))))
return sal_False;
//////////////////////////////////////////////////////////////////////
@@ -1596,9 +1525,9 @@ sal_Bool OTableEditorCtrl::IsPrimaryKeyAllowed( long /*nRow*/ )
Reference<XPropertySet> xTable = rController.getTable();
//////////////////////////////////////////////////////////////
// Key darf nicht veraendert werden
- // Dies gilt jedoch nur, wenn die Tabelle nicht neu ist und keine ::com::sun::star::sdbcx::View. Ansonsten wird kein DROP ausgeführt
+ // Dies gilt jedoch nur, wenn die Tabelle nicht neu ist und keine ::com::sun::star::sdbcx::View. Ansonsten wird kein DROP ausgef�hrt
- if(xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW"))
+ if(xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW")))
return sal_False;
//////////////////////////////////////////////////////////////
// Wenn leeres Feld, kein PrimKey
@@ -1618,7 +1547,7 @@ sal_Bool OTableEditorCtrl::IsPrimaryKeyAllowed( long /*nRow*/ )
{
//////////////////////////////////////////////////////////////
// Wenn Feldtyp Memo oder Image, kein PrimKey
- // oder wenn Spalten nicht gedroped werden können und das Required Flag ist nicht gesetzt
+ // oder wenn Spalten nicht gedroped werden k�nnen und das Required Flag ist nicht gesetzt
// oder wenn eine ::com::sun::star::sdbcx::View vorhanden ist und das Required Flag nicht gesetzt ist
TOTypeInfoSP pTypeInfo = pFieldDescr->getTypeInfo();
if( pTypeInfo->nSearchType == ColumnSearch::NONE
@@ -1826,7 +1755,7 @@ void OTableEditorCtrl::AdjustFieldDescription(OFieldDescription* _pFieldDesc,
{
_pFieldDesc->SetIsNullable(ColumnValue::NO_NULLS);
_pFieldDesc->SetControlDefault(Any());
- } // if(!_bSet && _pFieldDesc->getTypeInfo()->bNullable)
+ }
if ( _pFieldDesc->IsAutoIncrement() && !_bPrimaryKey )
{
OTableController& rController = GetView()->getController();
@@ -1850,7 +1779,6 @@ void OTableEditorCtrl::SetPrimaryKey( sal_Bool bSet )
// Evtl. vorhandene Primary Keys loeschen
MultiSelection aDeletedPrimKeys;
aDeletedPrimKeys.SetTotalRange( Range(0,GetRowCount()) );
- long nIndex = 0;
::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aIter = m_pRowList->begin();
::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aEnd = m_pRowList->end();
@@ -1869,7 +1797,7 @@ void OTableEditorCtrl::SetPrimaryKey( sal_Bool bSet )
aInsertedPrimKeys.SetTotalRange( Range(0,GetRowCount()) );
if( bSet )
{
- nIndex = FirstSelectedRow();
+ long nIndex = FirstSelectedRow();
while( nIndex >= 0 && nIndex < static_cast<long>(m_pRowList->size()) )
{
//////////////////////////////////////////////////////////////////////
@@ -2009,3 +1937,4 @@ long OTableEditorCtrl::PreNotify( NotifyEvent& rNEvt )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx
index acdad569f..66e2627e6 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,24 +28,12 @@
#ifndef DBAUI_TABLEEDITORCONTROL_HXX
#define DBAUI_TABLEEDITORCONTROL_HXX
-#ifndef DBAUI_TABLEDESIGNCONTROL_HXX
#include "TableDesignControl.hxx"
-#endif
-#ifndef DBAUI_TABLEDESIGNVIEW_HXX
#include "TableDesignView.hxx"
-#endif
-#ifndef DBAUI_TABLEFIELDDESCRIPTION_HXX
#include "TableFieldDescWin.hxx"
-#endif
-#ifndef DBAUI_TABLEROW_HXX
#include "TableRow.hxx"
-#endif
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
-#ifndef DBAUI_TYPEINFO_HXX
#include "TypeInfo.hxx"
-#endif
class Edit;
class SfxUndoManager;
@@ -230,3 +219,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 2b87a3c77..646df4a47 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -144,13 +145,13 @@ namespace
//------------------------------------------------------------------------------
::rtl::OUString OTableController::getImplementationName_Static() throw( RuntimeException )
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.OTableDesign");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.OTableDesign"));
}
//------------------------------------------------------------------------------
Sequence< ::rtl::OUString> OTableController::getSupportedServiceNames_Static(void) throw( RuntimeException )
{
Sequence< ::rtl::OUString> aSupported(1);
- aSupported.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.TableDesign");
+ aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.TableDesign"));
return aSupported;
}
//-------------------------------------------------------------------------
@@ -348,7 +349,6 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs)
{
String aName = String(ModuleRes(STR_TBL_TITLE));
aDefaultName = aName.GetToken(0,' ');
- //aDefaultName = getPrivateTitle();
aDefaultName = ::dbtools::createUniqueName(xTables,aDefaultName);
}
@@ -368,7 +368,7 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs)
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "OTableController::doSaveDoc: nothing is expected to happen here!");
+ OSL_FAIL("OTableController::doSaveDoc: nothing is expected to happen here!");
}
sal_Bool bAlter = sal_False;
@@ -379,7 +379,6 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs)
// check the columns for double names
if(!checkColumns(bNew || !xTables->hasByName(m_sName)))
{
- // #105323# OJ
return sal_False;
}
@@ -474,7 +473,6 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs)
stopTableListening();
m_xTable = NULL;
}
- // reload(); // a error occured so we have to reload
}
return ! (aInfo.isValid() || bError);
}
@@ -507,7 +505,7 @@ void OTableController::doEditIndexes()
OSL_ENSURE(xIndexes.is(), "OTableController::doEditIndexes: no keys got from the indexes supplier!");
}
else
- OSL_ENSURE(sal_False, "OTableController::doEditIndexes: should never have reached this (no indexes supplier)!");
+ OSL_FAIL("OTableController::doEditIndexes: should never have reached this (no indexes supplier)!");
// get the field names
Reference< XColumnsSupplier > xColSupp(m_xTable, UNO_QUERY);
@@ -581,8 +579,6 @@ sal_Bool OTableController::Construct(Window* pParent)
{
setView( * new OTableDesignView( pParent, getORB(), *this ) );
OTableController_BASE::Construct(pParent);
-// m_pView->Construct();
-// m_pView->Show();
return sal_True;
}
// -----------------------------------------------------------------------------
@@ -591,7 +587,7 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti
if ( getBroadcastHelper().bInDispose || getBroadcastHelper().bDisposed )
return sal_True;
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
if ( getView() && getView()->IsInModalMode() )
return sal_False;
@@ -633,7 +629,7 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti
}
catch(const Exception&)
{
- OSL_ENSURE(sal_False, "OTableController::suspend: nothing is expected to happen here!");
+ OSL_FAIL("OTableController::suspend: nothing is expected to happen here!");
}
}
@@ -645,10 +641,7 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti
}
}
}
-/*
- if ( bCheck )
- OSingleDocumentController::suspend(_bSuspend);
-*/
+
return bCheck;
}
// -----------------------------------------------------------------------------
@@ -770,7 +763,7 @@ void OTableController::appendColumns(Reference<XColumnsSupplier>& _rxColSup,sal_
}
else
{
- OSL_ENSURE(sal_False, "OTableController::appendColumns: invalid field name!");
+ OSL_FAIL("OTableController::appendColumns: invalid field name!");
}
}
@@ -906,7 +899,6 @@ void OTableController::loadData()
{
pActFieldDescr->SetName(sName);
pActFieldDescr->SetFormatKey(nFormatKey);
- // pActFieldDescr->SetPrimaryKey(pPrimary->GetValue());
pActFieldDescr->SetDescription(sDescription);
pActFieldDescr->SetHelpText(sHelpText);
pActFieldDescr->SetAutoIncrement(bIsAutoIncrement);
@@ -1018,10 +1010,10 @@ sal_Bool OTableController::checkColumns(sal_Bool _bNew) throw(::com::sun::star::
pNewRow->SetFieldType( pTypeInfo );
OFieldDescription* pActFieldDescr = pNewRow->GetActFieldDescr();
- pActFieldDescr->SetAutoIncrement(sal_False); // #95927# pTypeInfo->bAutoIncrement
+ pActFieldDescr->SetAutoIncrement(sal_False);
pActFieldDescr->SetIsNullable(ColumnValue::NO_NULLS);
- pActFieldDescr->SetName( createUniqueName(::rtl::OUString::createFromAscii("ID") ));
+ pActFieldDescr->SetName( createUniqueName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ID")) ));
pActFieldDescr->SetPrimaryKey( sal_True );
m_vRowList.insert(m_vRowList.begin(),pNewRow);
@@ -1097,14 +1089,13 @@ void OTableController::alterColumns()
try { xColumn->getPropertyValue(PROPERTY_TYPENAME) >>= sTypeName; }
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "no TypeName property?!" );
+ OSL_FAIL( "no TypeName property?!" );
// since this is a last minute fix for #i41785#, I want to be on the safe side,
// and catch errors here as early as possible (instead of the whole process of altering
// the columns failing)
// Normally, sdbcx::Column objects are expected to have a TypeName property
}
- // xColumn->getPropertyValue(PROPERTY_ISCURRENCY,::cppu::bool2any(pField->IsCurrency()));
// check if something changed
if((nType != pField->GetType() ||
sTypeName != pField->GetTypeName() ||
@@ -1150,7 +1141,7 @@ void OTableController::alterColumns()
xAppend->appendByDescriptor(xNewColumn);
}
catch(const SQLException&)
- { // an error occured so we try to reactivate the old one
+ { // an error occurred so we try to reactivate the old one
xAppend->appendByDescriptor(xColumn);
throw;
}
@@ -1181,7 +1172,7 @@ void OTableController::alterColumns()
}
else
{
- OSL_ENSURE(sal_False, "OTableController::alterColumns: invalid column (2)!");
+ OSL_FAIL("OTableController::alterColumns: invalid column (2)!");
}
}
catch(const SQLException&)
@@ -1208,7 +1199,7 @@ void OTableController::alterColumns()
}
else
bReload = sal_True;
- } // for(sal_Int32 nPos = 0;aIter != aEnd;++aIter,++nPos)
+ }
// alter column settings
aIter = m_vRowList.begin();
@@ -1239,7 +1230,7 @@ void OTableController::alterColumns()
xColumn->setPropertyValue(PROPERTY_FORMATKEY,makeAny(pField->GetFormatKey()));
if(xInfo->hasPropertyByName(PROPERTY_ALIGN))
xColumn->setPropertyValue(PROPERTY_ALIGN,makeAny(dbaui::mapTextAllign(pField->GetHorJustify())));
- } // if ( xColumns->hasByName(pField->GetName()) )
+ }
}
// second drop all columns which could be found by name
Reference<XNameAccess> xKeyColumns = getKeyColumns();
@@ -1281,7 +1272,7 @@ void OTableController::alterColumns()
SQLException aNewException;
aNewException.Message = sError;
- aNewException.SQLState = ::rtl::OUString::createFromAscii( "S1000" );
+ aNewException.SQLState = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000"));
aNewException.NextException = ::cppu::getCaughtException();
throw aNewException;
@@ -1317,7 +1308,7 @@ void OTableController::alterColumns()
}
else
{
- OSL_ENSURE(sal_False, "OTableController::alterColumns: invalid column!");
+ OSL_FAIL("OTableController::alterColumns: invalid column!");
}
}
}
@@ -1452,7 +1443,6 @@ void OTableController::assignTable()
}
}
}
- //updateTitle();
}
// -----------------------------------------------------------------------------
sal_Bool OTableController::isAddAllowed() const
@@ -1606,3 +1596,5 @@ bool OTableController::isAutoIncrementPrimaryKey() const
return getSdbMetaData().isAutoIncrementPrimaryKey();
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
index 60ea357f2..6c40a8e69 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,30 +29,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEDESIGNCONTROL_HXX
#include "TableDesignControl.hxx"
-#endif
-#ifndef _DBU_TBL_HRC_
#include "dbu_tbl.hrc"
-#endif
-#ifndef DBAUI_TABLEDESIGNVIEW_HXX
#include "TableDesignView.hxx"
-#endif
-#ifndef DBUI_TABLECONTROLLER_HXX
#include "TableController.hxx"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _COM_SUN_STAR_UTIL_URL_HPP_
#include <com/sun/star/util/URL.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
using namespace ::dbaui;
using namespace ::svt;
@@ -90,9 +75,6 @@ void OTableRowView::Init()
{
EditBrowseBox::Init();
-// SetMapMode( MapMode(MAP_TWIP) );
-// GetDataWindow().SetMapMode( GetMapMode() );
-
Font aFont( GetDataWindow().GetFont() );
aFont.SetWeight( WEIGHT_NORMAL );
GetDataWindow().SetFont( aFont );
@@ -128,7 +110,7 @@ void OTableRowView::KeyInput( const KeyEvent& rEvt )
if( rEvt.GetKeyCode().GetCode() == KEY_F2 )
{
::com::sun::star::util::URL aUrl;
- aUrl.Complete =::rtl::OUString::createFromAscii(".uno:DSBEditDoc");
+ aUrl.Complete =::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DSBEditDoc"));
GetView()->getController().dispatch( aUrl,Sequence< PropertyValue >() );
}
}
@@ -219,7 +201,7 @@ void OTableRowView::copy()
//------------------------------------------------------------------------------
void OTableRowView::paste()
{
- OSL_ENSURE(0,"OTableRowView::Paste : (pseudo-) abstract method called !");
+ OSL_FAIL("OTableRowView::Paste : (pseudo-) abstract method called !");
}
//------------------------------------------------------------------------------
@@ -239,3 +221,4 @@ EditBrowseBox::RowStatus OTableRowView::GetRowStatus(long nRow) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx
index db9197f14..3b1c3b95b 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,18 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEDESIGNHELPBAR_HXX
#include "TableDesignHelpBar.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _SVEDIT_HXX
#include <svtools/svmedit.hxx>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
#include <memory>
using namespace dbaui;
#define STANDARD_MARGIN 6
@@ -128,3 +121,5 @@ void OTableDesignHelpBar::copy()
void OTableDesignHelpBar::paste()
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
index 02af2d252..ad45287fe 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,45 +28,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEDESIGNVIEW_HXX
#include "TableDesignView.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef DBUI_TABLECONTROLLER_HXX
#include "TableController.hxx"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
#include "FieldDescriptions.hxx"
-#endif
-#ifndef DBAUI_TABLEEDITORCONTROL_HXX
#include "TEditControl.hxx"
-#endif
-#ifndef DBAUI_TABLEFIELDDESCRIPTION_HXX
#include "TableFieldDescWin.hxx"
-#endif
-#ifndef DBAUI_TABLEROW_HXX
#include "TableRow.hxx"
-#endif
-#ifndef _UTL_CONFIGMGR_HXX_
#include <unotools/configmgr.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBOARD_XCLIPBOARD_HPP_
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
-#endif
-#ifndef INCLUDED_SVTOOLS_SYSLOCALE_HXX
#include <unotools/syslocale.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
using namespace ::dbaui;
@@ -173,7 +148,6 @@ void OTableBorderWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground,
if ( IsControlFont() )
aFont.Merge( GetControlFont() );
SetPointFont( aFont );
-// Set/*Zoomed*/PointFont( aFont );
}
if ( bFont || bForeground )
@@ -398,3 +372,4 @@ void OTableDesignView::GetFocus()
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
index c97ba3024..87a2bf138 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,36 +28,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEFIELDCONTROL_HXX
#include "TableFieldControl.hxx"
-#endif
-#ifndef DBUI_TABLECONTROLLER_HXX
#include "TableController.hxx"
-#endif
-#ifndef DBAUI_TABLEDESIGNVIEW_HXX
#include "TableDesignView.hxx"
-#endif
-#ifndef DBAUI_TABLEEDITORCONTROL_HXX
#include "TEditControl.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef DBAUI_TYPEINFO_HXX
#include "TypeInfo.hxx"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
@@ -85,9 +66,9 @@ sal_Bool OTableFieldControl::IsReadOnly()
sal_Bool bRead(GetCtrl()->IsReadOnly());
if( !bRead )
{
- // Die Spalten einer ::com::sun::star::sdbcx::View können nicht verändert werden
+ // Die Spalten einer ::com::sun::star::sdbcx::View k�nnen nicht ver�ndert werden
Reference<XPropertySet> xTable = GetCtrl()->GetView()->getController().getTable();
- if(xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW"))
+ if(xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW")))
bRead = sal_True;
else
{
@@ -172,6 +153,4 @@ sal_Bool OTableFieldControl::isAutoIncrementValueEnabled() const
}
// -----------------------------------------------------------------------------
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx
index e6e3e9726..8b78d42f5 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef DBAUI_TABLEFIELDCONTROL_HXX
#define DBAUI_TABLEFIELDCONTROL_HXX
-#ifndef DBAUI_FIELDDESCRIPTIONCONTROL_HXX
#include "FieldDescControl.hxx"
-#endif
namespace dbaui
{
@@ -70,3 +69,4 @@ namespace dbaui
#endif // DBAUI_TABLEFIELDCONTROL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
index 71370d20b..1dd4208b1 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,33 +29,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEFIELDDESCRIPTION_HXX
#include "TableFieldDescWin.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
+#include <osl/diagnose.h>
#include "FieldDescriptions.hxx"
-#endif
-#ifndef _DBU_TBL_HRC_
#include "dbu_tbl.hrc"
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
#include "FieldDescriptions.hxx"
-#endif
-#ifndef DBAUI_TABLEDESIGNHELPBAR_HXX
#include "TableDesignHelpBar.hxx"
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
#include <memory>
#define STANDARD_MARGIN 6
@@ -128,7 +111,7 @@ OTableFieldDescWin::~OTableFieldDescWin()
//------------------------------------------------------------------------------
void OTableFieldDescWin::Init()
{
- DBG_ASSERT(getGenPage() != NULL, "OTableFieldDescWin::Init : ups ... no GenericPage ... this will crash ...");
+ OSL_ENSURE(getGenPage() != NULL, "OTableFieldDescWin::Init : ups ... no GenericPage ... this will crash ...");
getGenPage()->Init();
}
@@ -334,4 +317,4 @@ long OTableFieldDescWin::PreNotify( NotifyEvent& rNEvt )
return bHandled ? 1L : TabPage::PreNotify(rNEvt);
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx
index 3df94efc4..f1c19a9df 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef DBAUI_TABLEFIELDDESCRIPTION_HXX
#define DBAUI_TABLEFIELDDESCRIPTION_HXX
-#ifndef _SV_TABPAGE_HXX
#include <vcl/tabpage.hxx>
-#endif
-#ifndef DBAUI_TABLEFIELDDESCGENPAGE_HXX
#include "FieldDescGenWin.hxx"
-#endif
-#ifndef DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
#include "IClipBoardTest.hxx"
-#endif
class FixedText;
namespace dbaui
@@ -45,7 +40,7 @@ namespace dbaui
class OFieldDescription;
//==================================================================
// Ableitung von TabPage ist ein Trick von TH,
- // um Aenderungen der Systemfarben zu bemerken (Bug #53905)
+ // um Aenderungen der Systemfarben zu bemerken
class OTableFieldDescWin : public TabPage
,public IClipboardTest
{
@@ -113,3 +108,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableRow.cxx b/dbaccess/source/ui/tabledesign/TableRow.cxx
index e7fbc7158..fe553b058 100644
--- a/dbaccess/source/ui/tabledesign/TableRow.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRow.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEROW_HXX
#include "TableRow.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
#include "FieldDescriptions.hxx"
-#endif
#include <algorithm>
#include <comphelper/types.hxx>
@@ -161,7 +156,7 @@ namespace dbaui
_rStr << sal_Int32(pFieldDesc->IsAutoIncrement() ? 1 : 0);
_rStr << sal_Int32(pFieldDesc->IsPrimaryKey() ? 1 : 0);
_rStr << sal_Int32(pFieldDesc->IsCurrency() ? 1 : 0);
- } // if(pFieldDesc)
+ }
else
_rStr << (sal_Int32)0;
return _rStr;
@@ -231,5 +226,4 @@ namespace dbaui
// -----------------------------------------------------------------------------
}
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
index f380fabee..2f4b6e977 100644
--- a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,18 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEROW_EXCHANGE_HXX
#include "TableRowExchange.hxx"
-#endif
-#ifndef _SOT_FORMATS_HXX
#include <sot/formats.hxx>
-#endif
-#ifndef _SOT_STORAGE_HXX
#include <sot/storage.hxx>
-#endif
-#ifndef DBAUI_TABLEROW_HXX
#include "TableRow.hxx"
-#endif
namespace dbaui
{
@@ -88,10 +81,4 @@ namespace dbaui
// -----------------------------------------------------------------------------
}
-
-
-
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx
index 2fa3b2fa7..09bdba369 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.cxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,33 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEUNDO_HXX
#include "TableUndo.hxx"
-#endif
-#ifndef _DBU_TBL_HRC_
#include "dbu_tbl.hrc"
-#endif
-#ifndef DBAUI_TABLEEDITORCONTROL_HXX
#include "TEditControl.hxx"
-#endif
-#ifndef DBAUI_TABLEROW_HXX
#include "TableRow.hxx"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef DBUI_TABLECONTROLLER_HXX
#include "TableController.hxx"
-#endif
-#ifndef DBAUI_TABLEDESIGNVIEW_HXX
#include "TableDesignView.hxx"
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
#include "FieldDescriptions.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
using namespace dbaui;
using namespace ::svt;
@@ -490,6 +473,4 @@ void OPrimKeyUndoAct::Redo()
OTableEditorUndoAct::Redo();
}
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.hxx b/dbaccess/source/ui/tabledesign/TableUndo.hxx
index f73c803c6..0e3b04a59 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.hxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,21 +28,13 @@
#ifndef DBAUI_TABLEUNDO_HXX
#define DBAUI_TABLEUNDO_HXX
-#ifndef DBAUI_GENERALUNDO_HXX
#include "GeneralUndo.hxx"
-#endif
-#ifndef _SV_MULTISEL_HXX
#include <tools/multisel.hxx>
-#endif
#include <vector>
-#ifndef _COM_SUN_STAR_UNO_ANY_H_
#include <com/sun/star/uno/Any.h>
-#endif
-#ifndef DBAUI_TYPEINFO_HXX
#include "TypeInfo.hxx"
-#endif
namespace dbaui
{
@@ -176,3 +169,4 @@ namespace dbaui
#endif // DBAUI_TABLEUNDO_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/makefile.mk b/dbaccess/source/ui/tabledesign/makefile.mk
deleted file mode 100644
index 5e52041ec..000000000
--- a/dbaccess/source/ui/tabledesign/makefile.mk
+++ /dev/null
@@ -1,65 +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=tabledesign
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES =\
- $(SLO)$/TableDesignControl.obj \
- $(SLO)$/TableFieldDescWin.obj \
- $(SLO)$/TableController.obj \
- $(SLO)$/TableDesignView.obj \
- $(SLO)$/TEditControl.obj \
- $(SLO)$/TableFieldControl.obj \
- $(SLO)$/TableDesignHelpBar.obj \
- $(SLO)$/FieldDescGenWin.obj \
- $(SLO)$/FieldDescriptions.obj \
- $(SLO)$/TableRow.obj \
- $(SLO)$/TableRowExchange.obj \
- $(SLO)$/TableUndo.obj
-
-
-SRS1NAME=$(TARGET)
-SRC1FILES = table.src
-
-# --- Targets -------------------------------------------------------
-
-
-.INCLUDE : target.mk
-
-$(SRS)$/$(TARGET).srs: $(SOLARINCDIR)$/svx$/globlmn.hrc
diff --git a/dbaccess/source/ui/tabledesign/table.src b/dbaccess/source/ui/tabledesign/table.src
index edddc4728..06f3f5a24 100644
--- a/dbaccess/source/ui/tabledesign/table.src
+++ b/dbaccess/source/ui/tabledesign/table.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -65,18 +65,22 @@ String STR_VALUE_YES
{
Text [ en-US ] = "Yes" ;
};
+
String STR_VALUE_NO
{
Text [ en-US ] = "No" ;
};
+
String STR_VALUE_ASC
{
Text [ en-US ] = "Ascending" ;
};
+
String STR_VALUE_DESC
{
Text [ en-US ] = "Descending" ;
};
+
String STR_VALUE_NONE
{
// Bemerkung : sollte auch in anderen Sprachen irgendwie zum Wort 'Wert' passen : Wert - keiner ....
@@ -87,46 +91,57 @@ String STR_TAB_FIELD_NAME
{
Text [ en-US ] = "Field name" ;
};
+
String STR_TAB_FIELD_COLUMN_NAME
{
Text [ en-US ] = "Field Name" ;
};
+
String STR_TAB_FIELD_DATATYPE
{
Text [ en-US ] = "Field ~type" ;
};
+
String STR_TAB_FIELD_COLUMN_DATATYPE
{
Text [ en-US ] = "Field Type" ;
};
+
String STR_TAB_FIELD_LENGTH
{
Text [ en-US ] = "Field length" ;
};
+
String STR_TAB_HELP_TEXT
{
Text [ en-US ] = "Description" ;
};
+
String STR_COLUMN_DESCRIPTION
{
Text [ en-US ] = "Column Description" ;
};
+
String STR_TAB_FIELD_NULLABLE
{
Text [ en-US ] = "Input required" ;
};
+
String STR_FIELD_AUTOINCREMENT
{
Text [ en-US ] = "~AutoValue";
};
+
String STR_TAB_PROPERTIES
{
Text [ en-US ] = "Field Properties" ;
};
+
String STR_TABPAGE_GENERAL
{
Text [ en-US ] = "General" ;
};
+
String STR_TAB_TABLE_DESCRIPTION
{
Text [ en-US ] = "Description:";
@@ -156,61 +171,67 @@ Menu RID_TABLEDESIGNROWPOPUPMENU
{
ItemList =
{
- MenuItem
- {
- ITEM_EDIT_CUT
- };
- MenuItem
- {
- ITEM_EDIT_COPY
- };
- MenuItem
- {
- ITEM_EDIT_PASTE
- };
- MenuItem
- {
- ITEM_EDIT_DELETE
- };
- MenuItem
- {
- Identifier = SID_TABLEDESIGN_INSERTROWS ;
- HelpID = HID_TABLEDESIGN_INSERTROWS ;
- Text [ en-US ] = "Insert Rows" ;
+ MenuItem
+ {
+ ITEM_EDIT_CUT
};
- MenuItem
- {
- Separator = TRUE ;
- };
- MenuItem
- {
- Identifier = SID_TABLEDESIGN_TABED_PRIMARYKEY ;
- HelpID = HID_TABLEDESIGN_TABED_PRIMARYKEY ;
- Checkable = TRUE ;
- Text [ en-US ] = "Primary Key" ;
+ MenuItem
+ {
+ ITEM_EDIT_COPY
+ };
+ MenuItem
+ {
+ ITEM_EDIT_PASTE
+ };
+ MenuItem
+ {
+ ITEM_EDIT_DELETE
+ };
+ MenuItem
+ {
+ Identifier = SID_TABLEDESIGN_INSERTROWS ;
+ HelpID = HID_TABLEDESIGN_INSERTROWS ;
+ Text [ en-US ] = "Insert Rows" ;
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Identifier = SID_TABLEDESIGN_TABED_PRIMARYKEY ;
+ HelpID = HID_TABLEDESIGN_TABED_PRIMARYKEY ;
+ Checkable = TRUE ;
+ Text [ en-US ] = "Primary Key" ;
};
};
};
+
String STR_TABED_UNDO_CELLMODIFIED
{
Text [ en-US ] = "Modify cell" ;
};
+
String STR_TABED_UNDO_ROWDELETED
{
Text [ en-US ] = "Delete row" ;
};
+
String STR_TABED_UNDO_TYPE_CHANGED
{
Text [ en-US ] = "Modify field type";
};
+
String STR_TABED_UNDO_ROWINSERTED
{
Text [ en-US ] = "Insert row" ;
};
+
String STR_TABED_UNDO_NEWROWINSERTED
{
Text [ en-US ] = "Insert new row" ;
};
+
String STR_TABED_UNDO_PRIMKEY
{
Text [ en-US ] = "Insert/remove primary key" ;
@@ -220,114 +241,141 @@ String STR_DEFAULT_VALUE
{
Text [ en-US ] = "~Default value" ;
};
+
String STR_FIELD_REQUIRED
{
Text [ en-US ] = "~Entry required" ;
};
+
String STR_TEXT_LENGTH
{
Text [ en-US ] = "~Length" ;
};
+
String STR_NUMERIC_TYPE
{
Text [ en-US ] = "~Type" ;
};
+
String STR_LENGTH
{
Text [ en-US ] = "~Length" ;
};
+
String STR_SCALE
{
Text [ en-US ] = "Decimal ~places" ;
};
+
String STR_FORMAT
{
Text [ en-US ] = "Format example";
};
+
String STR_HELP_BOOL_DEFAULT
{
Text [ en-US ] = "Select a value that is to appear in all new records as default.\nIf the field is not to have a default value, select the empty string.";
};
+
String STR_HELP_DEFAULT_VALUE
{
Text [ en-US ] = "Enter a default value for this field.\n\nWhen you later enter data in the table, this string will be used in each new record for the field selected. It should, therefore, correspond to the cell format that needs to be entered below." ;
};
+
String STR_HELP_FIELD_REQUIRED
{
Text [ en-US ] = "Activate this option if this field cannot contain NULL values, i.e. the user must always enter data." ;
};
+
String STR_HELP_TEXT_LENGTH
{
Text [ en-US ] = "Enter the maximum text length permitted." ;
};
+
String STR_HELP_NUMERIC_TYPE
{
Text [ en-US ] = "Enter the number format." ;
};
+
String STR_HELP_LENGTH
{
Text [ en-US ] = "Determine the length data can have in this field.\n\nIf decimal fields, then the maximum length of the number to be entered, if binary fields, then the length of the data block.\nThe value will be corrected accordingly when it exceeds the maximum for this database." ;
};
+
String STR_HELP_SCALE
{
Text [ en-US ] = "Specify the number of decimal places permitted in this field." ;
};
+
String STR_HELP_FORMAT_CODE
{
Text [ en-US ] = "This is where you see how the data would be displayed in the current format (use the button on the right to modify the format).";
};
+
String STR_HELP_FORMAT_BUTTON
{
Text [ en-US ] = "This is where you determine the output format of the data.";
};
+
String STR_HELP_AUTOINCREMENT
{
Text [ en-US ] = "Choose if this field should contain AutoIncrement values.\n\nYou can not enter data in fields of this type. An intrinsic value will be assigned to each new record automatically (resulting from the increment of the previous record)." ;
};
+
PushButton PB_FORMAT
{
TabStop = TRUE ;
Text [ en-US ] = "~...";
};
+
String STR_TABLEDESIGN_DUPLICATE_NAME
{
Text [ en-US ] = "The table cannot be saved because column name \"$column$\" was assigned twice.";
};
+
String STR_TBL_COLUMN_IS_KEYCOLUMN
{
Text [ en-US ] = "The column \"$column$\" belongs to the primary key. If the column is deleted, the primary key will also be deleted. Do you really want to continue?";
};
+
String STR_TBL_COLUMN_IS_KEYCOLUMN_TITLE
{
Text [ en-US ] = "Primary Key Affected";
};
+
String STR_COLUMN_NAME
{
Text [ en-US ] = "Column";
};
+
String STR_QRY_CONTINUE
{
Text [ en-US ] = "Continue anyway?" ;
};
+
String STR_STAT_WARNING
{
Text [ en-US ] = "Warning!" ;
};
+
QueryBox TABLE_DESIGN_SAVEMODIFIED
{
Buttons = WB_YES_NO_CANCEL ;
DefButton = WB_DEF_YES ;
Message [ en-US ] = "The table has been changed.\nDo you want to save the changes?" ;
};
+
QueryBox TABLE_QUERY_CONNECTION_LOST
{
Buttons = WB_YES_NO ;
Message [ en-US ] = "The connection to the database was lost! The table design can only be used with limited functionality without a connection.\nReconnect?" ;
};
+
String STR_TABLEDESIGN_CONNECTION_MISSING
{
Text [ en-US ] = "The table could not be saved due to problems connecting to the database.";
};
+
String STR_TABLEDESIGN_DATASOURCE_DELETED
{
Text [ en-US ] = "The table filter could not be adjusted because the data source has been deleted.";
@@ -339,14 +387,18 @@ QueryBox QUERY_SAVE_TABLE_EDIT_INDEXES
Buttons = WB_YES_NO ;
};
+
String STR_TABLEDESIGN_NO_PRIM_KEY_HEAD
{
Text [ en-US ] = "No primary key" ;
};
+
String STR_TABLEDESIGN_NO_PRIM_KEY
{
Text [ en-US ] = "A unique index or primary key is required for data record identification in this database.\nYou can only enter data into this table when one of these two structural conditions has been met.\n\nShould a primary key be created now?" ;
};
+
+
String STR_TABLEDESIGN_TITLE
{
Text [ en-US ] = " - %PRODUCTNAME Base: Table Design";
@@ -382,6 +434,7 @@ String STR_AUTOINCREMENT_VALUE
{
Text [ en-US ] = "A~uto-increment statement";
};
+
String STR_HELP_AUTOINCREMENT_VALUE
{
Text [ en-US ] = "Enter an SQL statement for the auto-increment field.\n\nThis statement will be directly transferred to the database when the table is created.";
diff --git a/dbaccess/source/ui/uno/AdabasSettingsDlg.cxx b/dbaccess/source/ui/uno/AdabasSettingsDlg.cxx
index 8bb4c9dbd..98b51282c 100644
--- a/dbaccess/source/ui/uno/AdabasSettingsDlg.cxx
+++ b/dbaccess/source/ui/uno/AdabasSettingsDlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef _DBAUI_ADABASSETTINGSDLG_HXX
#include "AdabasSettingsDlg.hxx"
-#endif
-#ifndef DBAUI_ADABASSTATDLG_HXX
#include "AdabasStatDlg.hxx"
-#endif
using namespace dbaui;
@@ -131,3 +126,4 @@ Dialog* OAdabasSettingsDialog::createDialog(Window* _pParent)
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/AdabasSettingsDlg.hxx b/dbaccess/source/ui/uno/AdabasSettingsDlg.hxx
index a80cfc355..1a82443f4 100644
--- a/dbaccess/source/ui/uno/AdabasSettingsDlg.hxx
+++ b/dbaccess/source/ui/uno/AdabasSettingsDlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,3 +79,4 @@ protected:
#endif // _DBAUI_ADABASSETTINGSDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
index f80ab3de3..56bb6409c 100644
--- a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
+++ b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -157,3 +158,5 @@ extern "C" void SAL_CALL createRegistryInfo_OAdvancedSettingsDialog()
{
static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OAdvancedSettingsDialog > aAutoRegistration;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/ColumnControl.cxx b/dbaccess/source/ui/uno/ColumnControl.cxx
index ccbe8d325..ea9167b22 100644
--- a/dbaccess/source/ui/uno/ColumnControl.cxx
+++ b/dbaccess/source/ui/uno/ColumnControl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,24 +28,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_COLUMNCONTROL_HXX
#include "ColumnControl.hxx"
-#endif
-#ifndef DBAUI_COLUMNPEER_HXX
#include "ColumnPeer.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _COM_SUN_STAR_AWT_POSSIZE_HPP_
#include <com/sun/star/awt/PosSize.hpp>
-#endif
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
extern "C" void SAL_CALL createRegistryInfo_OColumnControl()
{
@@ -149,3 +138,5 @@ void SAL_CALL OColumnControl::createPeer(const Reference< XToolkit >& /*rToolkit
//.........................................................................
} // namespace dbaui
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/ColumnControl.hxx b/dbaccess/source/ui/uno/ColumnControl.hxx
index 243004e59..6b4fe0e23 100644
--- a/dbaccess/source/ui/uno/ColumnControl.hxx
+++ b/dbaccess/source/ui/uno/ColumnControl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#ifndef DBAUI_COLUMNCONTROL_HXX
#define DBAUI_COLUMNCONTROL_HXX
-#ifndef _TOOLKIT_CONTROLS_UNOCONTROL_HXX_
#include <toolkit/controls/unocontrol.hxx>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
namespace dbaui
{
@@ -55,3 +52,5 @@ namespace dbaui
//.........................................................................
#endif // DBAUI_COLUMNCONTROL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/ColumnModel.cxx b/dbaccess/source/ui/uno/ColumnModel.cxx
index 327d94d70..b70827ddc 100644
--- a/dbaccess/source/ui/uno/ColumnModel.cxx
+++ b/dbaccess/source/ui/uno/ColumnModel.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,37 +29,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_COLUMNMODEL_HXX
#include "ColumnModel.hxx"
-#endif
-#ifndef _COM_SUN_STAR_AWT_FONTRELIEF_HPP_
#include <com/sun/star/awt/FontRelief.hpp>
-#endif
-#ifndef _COM_SUN_STAR_AWT_FONTEMPHASISMARK_HPP_
#include <com/sun/star/awt/FontEmphasisMark.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _CPPUHELPER_QUERYINTERFACE_HXX_
#include <cppuhelper/queryinterface.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef _TOOLKIT_UNOHLP_HXX
#include <toolkit/helper/vclunohelper.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
#include <comphelper/property.hxx>
-#endif
extern "C" void SAL_CALL createRegistryInfo_OColumnControlModel()
{
@@ -124,8 +105,6 @@ void OColumnControlModel::registerProperties()
&m_xConnection, ::getCppuType( &m_xConnection ) );
Any a;
a <<= m_xColumn;
-// registerMayBeVoidProperty( PROPERTY_COLUMN, PROPERTY_ID_COLUMN, PropertyAttribute::TRANSIENT | PropertyAttribute::BOUND| PropertyAttribute::MAYBEVOID,
-// &a, ::getCppuType( &m_xColumn ) );
registerProperty( PROPERTY_COLUMN, PROPERTY_ID_COLUMN, PropertyAttribute::TRANSIENT | PropertyAttribute::BOUND,
&m_xColumn, ::getCppuType( &m_xColumn ) );
@@ -186,3 +165,4 @@ void OColumnControlModel::read(const Reference<XObjectInputStream>& /*_rxInStrea
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/ColumnModel.hxx b/dbaccess/source/ui/uno/ColumnModel.hxx
index c2fbf3115..79ba39b00 100644
--- a/dbaccess/source/ui/uno/ColumnModel.hxx
+++ b/dbaccess/source/ui/uno/ColumnModel.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,39 +28,17 @@
#ifndef DBAUI_COLUMNMODEL_HXX
#define DBAUI_COLUMNMODEL_HXX
-#ifndef _COM_SUN_STAR_AWT_XCONTROLMODEL_HPP_
#include <com/sun/star/awt/XControlModel.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XCLONEABLE_HPP_
#include <com/sun/star/util/XCloneable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_XPERSISTOBJECT_HPP_
#include <com/sun/star/io/XPersistObject.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
#include <comphelper/proparrhlp.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTYCONTAINER_HXX_
#include <comphelper/propertycontainer.hxx>
-#endif
-#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
#include <comphelper/broadcasthelper.hxx>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _CPPUHELPER_COMPBASE4_HXX_
#include <cppuhelper/compbase4.hxx>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
//.........................................................................
namespace dbaui
@@ -132,3 +111,5 @@ public:
} // namespace dbaui
//.........................................................................
#endif // DBAUI_COLUMNMODEL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/ColumnPeer.cxx b/dbaccess/source/ui/uno/ColumnPeer.cxx
index 1c8b0defb..574c4caab 100644
--- a/dbaccess/source/ui/uno/ColumnPeer.cxx
+++ b/dbaccess/source/ui/uno/ColumnPeer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,21 +28,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_COLUMNPEER_HXX
#include "ColumnPeer.hxx"
-#endif
-#ifndef DBAUI_COLUMNCONTROLWINDOW_HXX
#include "ColumnControlWindow.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
#include "FieldDescriptions.hxx"
-#endif
//.........................................................................
namespace dbaui
@@ -68,7 +59,7 @@ OColumnPeer::OColumnPeer(Window* _pParent,const Reference<XMultiServiceFactory>&
// -----------------------------------------------------------------------------
void OColumnPeer::setEditWidth(sal_Int32 _nWidth)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
OColumnControlWindow* pFieldControl = static_cast<OColumnControlWindow*>( GetWindow() );
if ( pFieldControl )
@@ -79,7 +70,7 @@ void OColumnPeer::setEditWidth(sal_Int32 _nWidth)
// -----------------------------------------------------------------------------
void OColumnPeer::setColumn(const Reference< XPropertySet>& _xColumn)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
OColumnControlWindow* pFieldControl = static_cast<OColumnControlWindow*>( GetWindow() );
if ( pFieldControl )
@@ -106,7 +97,7 @@ void OColumnPeer::setColumn(const Reference< XPropertySet>& _xColumn)
_xColumn->getPropertyValue(PROPERTY_PRECISION) >>= nPrecision;
_xColumn->getPropertyValue(PROPERTY_ISAUTOINCREMENT) >>= bAutoIncrement;
}
- catch(Exception)
+ catch(const Exception&)
{
}
@@ -127,7 +118,7 @@ void OColumnPeer::setColumn(const Reference< XPropertySet>& _xColumn)
// -----------------------------------------------------------------------------
void OColumnPeer::setConnection(const Reference< XConnection>& _xCon)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
OColumnControlWindow* pFieldControl = static_cast<OColumnControlWindow*>( GetWindow() );
if ( pFieldControl )
pFieldControl->setConnection(_xCon);
@@ -135,7 +126,7 @@ void OColumnPeer::setConnection(const Reference< XConnection>& _xCon)
//------------------------------------------------------------------------------
void OColumnPeer::setProperty( const ::rtl::OUString& _rPropertyName, const Any& Value) throw( RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if ( 0 == _rPropertyName.compareToAscii( PROPERTY_COLUMN ) )
{
@@ -170,3 +161,5 @@ Any OColumnPeer::getProperty( const ::rtl::OUString& _rPropertyName ) throw( Run
//.........................................................................
} // namespace dbaui
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/ColumnPeer.hxx b/dbaccess/source/ui/uno/ColumnPeer.hxx
index eb1f00480..34473a1be 100644
--- a/dbaccess/source/ui/uno/ColumnPeer.hxx
+++ b/dbaccess/source/ui/uno/ColumnPeer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,18 +28,10 @@
#ifndef DBAUI_COLUMNPEER_HXX
#define DBAUI_COLUMNPEER_HXX
-#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_
#include <toolkit/awt/vclxwindow.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
//.........................................................................
namespace dbaui
@@ -68,3 +61,4 @@ namespace dbaui
#endif //DBAUI_COLUMNPEER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
index a42d4566e..598407cd3 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef DBAUI_DBTYPEWIZDLG_HXX
#include "DBTypeWizDlg.hxx"
-#endif
-#ifndef DBAUI_DBWIZ_HXX
#include "dbwiz.hxx"
-#endif
using namespace dbaui;
@@ -130,3 +125,4 @@ Dialog* ODBTypeWizDialog::createDialog(Window* _pParent)
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlg.hxx b/dbaccess/source/ui/uno/DBTypeWizDlg.hxx
index 1b65b6365..8f7ea65ca 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlg.hxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,3 +79,4 @@ protected:
#endif // DBAUI_DBTYPEWIZDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
index 0ebbc52cc..04c1a71b6 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,30 +29,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTLISTENER_HPP_
#include <com/sun/star/document/XEventListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XSET_HPP_
#include <com/sun/star/container/XSet.hpp>
-#endif
-#ifndef DBAUI_DBTYPEWIZDLGSETUP_HXX
#include "DBTypeWizDlgSetup.hxx"
-#endif
-#ifndef DBAUI_DBWIZSETUP_HXX
#include "dbwizsetup.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDB_XOFFICEDATABASEDOCUMENT_HPP_
#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_
#include <com/sun/star/sdbc/XDataSource.hpp>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
using namespace dbaui;
namespace css = ::com::sun::star;
@@ -164,3 +149,4 @@ void ODBTypeWizDialogSetup::executedDialog(sal_Int16 _nExecutionResult)
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx
index fe8d932ef..3214b1ef3 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,4 @@ protected:
#endif // DBAUI_DBTYPEWIZDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/TableFilterDlg.cxx b/dbaccess/source/ui/uno/TableFilterDlg.cxx
index 65be6879b..675b621ae 100644
--- a/dbaccess/source/ui/uno/TableFilterDlg.cxx
+++ b/dbaccess/source/ui/uno/TableFilterDlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef _DBAUI_TABLEFILTERDLG_HXX
#include "TableFilterDlg.hxx"
-#endif
-#ifndef _DBAUI_TABLESSINGLEDLG_HXX_
#include "TablesSingleDlg.hxx"
-#endif
using namespace dbaui;
@@ -131,3 +126,4 @@ Dialog* OTableFilterDialog::createDialog(Window* _pParent)
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/TableFilterDlg.hxx b/dbaccess/source/ui/uno/TableFilterDlg.hxx
index de2555458..76ef653f3 100644
--- a/dbaccess/source/ui/uno/TableFilterDlg.hxx
+++ b/dbaccess/source/ui/uno/TableFilterDlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,3 +79,4 @@ protected:
#endif // _DBAUI_TABLEFILTERDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/UserSettingsDlg.cxx b/dbaccess/source/ui/uno/UserSettingsDlg.cxx
index 9ad66a33b..b60ae4fd5 100644
--- a/dbaccess/source/ui/uno/UserSettingsDlg.cxx
+++ b/dbaccess/source/ui/uno/UserSettingsDlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef _DBAUI_USERSETTINGSDLG_HXX
#include "UserSettingsDlg.hxx"
-#endif
-#ifndef DBAUI_USERADMINDLG_HXX
#include "UserAdminDlg.hxx"
-#endif
using namespace dbaui;
@@ -131,3 +126,4 @@ Dialog* OUserSettingsDialog::createDialog(Window* _pParent)
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/UserSettingsDlg.hxx b/dbaccess/source/ui/uno/UserSettingsDlg.hxx
index 9a2192c81..18cd0b775 100644
--- a/dbaccess/source/ui/uno/UserSettingsDlg.hxx
+++ b/dbaccess/source/ui/uno/UserSettingsDlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,3 +79,4 @@ protected:
#endif // _DBAUI_USERSETTINGSDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/admindlg.cxx b/dbaccess/source/ui/uno/admindlg.cxx
index 5027a9a16..ac20fefca 100644
--- a/dbaccess/source/ui/uno/admindlg.cxx
+++ b/dbaccess/source/ui/uno/admindlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef _DBAUI_ADMINDLG_HXX
#include "admindlg.hxx"
-#endif
-#ifndef _DBAUI_DBADMIN_HXX_
#include "dbadmin.hxx"
-#endif
using namespace dbaui;
@@ -137,3 +132,4 @@ Dialog* ODataSourcePropertyDialog::createDialog(Window* _pParent)
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/admindlg.hxx b/dbaccess/source/ui/uno/admindlg.hxx
index 0fa3feab8..a77279978 100644
--- a/dbaccess/source/ui/uno/admindlg.hxx
+++ b/dbaccess/source/ui/uno/admindlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,3 +79,4 @@ protected:
#endif // _DBAUI_ADMINDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/composerdialogs.cxx b/dbaccess/source/ui/uno/composerdialogs.cxx
index 7b51eeaed..fc4d5a16e 100644
--- a/dbaccess/source/ui/uno/composerdialogs.cxx
+++ b/dbaccess/source/ui/uno/composerdialogs.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,36 +29,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBACCESS_SOURCE_UI_UNO_COMPOSERDIALOGS_HXX
#include "composerdialogs.hxx"
-#endif
/** === begin UNO includes === **/
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
/** === end UNO includes === **/
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef DBAUI_QUERYFILTER_HXX
#include "queryfilter.hxx"
-#endif
-#ifndef DBAUI_QUERYORDER_HXX
#include "queryorder.hxx"
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
+#include <osl/diagnose.h>
extern "C" void SAL_CALL createRegistryInfo_ComposerDialogs()
{
@@ -141,13 +124,13 @@ namespace dbaui
if ( !xColumns.is() || !xColumns->hasElements() )
{ // perhaps the composer can supply us with columns? This is necessary for cases
// where the dialog is invoked for a rowset which is not yet loaded
- // #i22878# - 2003-12-16 - fs@openoffice.org
+ // #i22878#
xSuppColumns = xSuppColumns.query( m_xComposer );
if ( xSuppColumns.is() )
xColumns = xSuppColumns->getColumns();
}
- DBG_ASSERT( xColumns.is() && xColumns->hasElements(), "ComposerDialog::createDialog: not much fun without any columns!" );
+ OSL_ENSURE( xColumns.is() && xColumns->hasElements(), "ComposerDialog::createDialog: not much fun without any columns!" );
}
catch( const Exception& )
{
@@ -225,3 +208,4 @@ namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/composerdialogs.hxx b/dbaccess/source/ui/uno/composerdialogs.hxx
index b5fa576eb..343929173 100644
--- a/dbaccess/source/ui/uno/composerdialogs.hxx
+++ b/dbaccess/source/ui/uno/composerdialogs.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,32 +30,16 @@
#define DBACCESS_SOURCE_UI_UNO_COMPOSERDIALOGS_HXX
/** === begin UNO includes === **/
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSER_HPP_
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROWSET_HPP_
#include <com/sun/star/sdbc/XRowSet.hpp>
-#endif
/** === end UNO includes === **/
-#ifndef _SVT_GENERICUNODIALOG_HXX_
#include <svtools/genericunodialog.hxx>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
//.........................................................................
namespace dbaui
@@ -158,3 +143,4 @@ namespace dbaui
#endif // DBACCESS_SOURCE_UI_UNO_COMPOSERDIALOGS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index 49b5b19c7..f11420b3e 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -329,7 +330,7 @@ namespace dbaui
const Reference< XPropertySet >& _rxDestTable
);
- /** processes an error which occured during copying
+ /** processes an error which occurred during copying
First, all listeners are ask. If a listener tells to cancel or continue copying, this is reported to the
method's caller. If a listener tells to ask the user, this is done, and the user's decision is
@@ -748,7 +749,7 @@ void CopyTableWizard::impl_checkForUnsupportedSettings_throw( const Reference< X
const ::rtl::OUString aSettings[] = {
PROPERTY_FILTER, PROPERTY_ORDER, PROPERTY_HAVING_CLAUSE, PROPERTY_GROUP_BY
};
- for ( size_t i=0; i < sizeof( aSettings ) / sizeof( aSettings[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS( aSettings ); ++i )
{
if ( lcl_hasNonEmptyStringValue_throw( _rxSourceDescriptor, xPSI, aSettings[i] ) )
{
@@ -1096,7 +1097,7 @@ bool CopyTableWizard::impl_processCopyError_nothrow( const CopyTableRowEvent& _r
case CopyTableContinuation::AskUser: break; // stop asking the listeners, ask the user
default:
- OSL_ENSURE( false, "CopyTableWizard::impl_processCopyError_nothrow: invalid listener response!" );
+ OSL_FAIL( "CopyTableWizard::impl_processCopyError_nothrow: invalid listener response!" );
// ask next listener
continue;
}
@@ -1113,7 +1114,7 @@ bool CopyTableWizard::impl_processCopyError_nothrow( const CopyTableRowEvent& _r
{
SQLContext aError;
aError.Context = *this;
- aError.Message = String( ModuleRes( STR_ERROR_OCCURED_WHILE_COPYING ) );
+ aError.Message = String( ModuleRes( STR_ERROR_OCCURRED_WHILE_COPYING ) );
::dbtools::SQLExceptionInfo aInfo( _rEvent.Error );
if ( aInfo.isValid() )
@@ -1398,7 +1399,7 @@ void CopyTableWizard::impl_doCopy_nothrow()
if( !xTable.is() )
{
- OSL_ENSURE( false, "CopyTableWizard::impl_doCopy_nothrow: createTable should throw here, shouldn't it?" );
+ OSL_FAIL( "CopyTableWizard::impl_doCopy_nothrow: createTable should throw here, shouldn't it?" );
break;
}
@@ -1415,7 +1416,7 @@ void CopyTableWizard::impl_doCopy_nothrow()
xTable = rWizard.createTable();
if ( !xTable.is() )
{
- OSL_ENSURE( false, "CopyTableWizard::impl_doCopy_nothrow: createTable should throw here, shouldn't it?" );
+ OSL_FAIL( "CopyTableWizard::impl_doCopy_nothrow: createTable should throw here, shouldn't it?" );
break;
}
}
@@ -1463,7 +1464,7 @@ void CopyTableWizard::impl_doCopy_nothrow()
break;
default:
- OSL_ENSURE( false, "CopyTableWizard::impl_doCopy_nothrow: What operation, please?" );
+ OSL_FAIL( "CopyTableWizard::impl_doCopy_nothrow: What operation, please?" );
break;
}
}
@@ -1516,7 +1517,7 @@ void CopyTableWizard::impl_doCopy_nothrow()
sColumns.append(aDestColumnNames[aPosIter->second - 1]);
sColumns.append(sQuote);
}
- } // for ( ; aPosIter != aColumnMapping.end() ; ++aPosIter )
+ }
::rtl::OUStringBuffer sSql;
sSql.appendAscii("INSERT INTO ");
const ::rtl::OUString sComposedTableName = ::dbtools::composeTableName( xDestMetaData, _xTable, ::dbtools::eInDataManipulation, false, false, true );
@@ -1640,3 +1641,5 @@ extern "C" void SAL_CALL createRegistryInfo_CopyTableWizard()
{
static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::CopyTableWizard > aAutoRegistration;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/copytablewizard.src b/dbaccess/source/ui/uno/copytablewizard.src
index c153b79d1..a0dd16eab 100644
--- a/dbaccess/source/ui/uno/copytablewizard.src
+++ b/dbaccess/source/ui/uno/copytablewizard.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -66,14 +66,17 @@ String STR_CTW_ERROR_DURING_INITIALIZATION
{
Text [ en-US ] = "An error occurred during initialization.";
};
+
String STR_CTW_ERROR_UNSUPPORTED_SETTING
{
Text [ en-US ] = "Unsupported setting in the copy source descriptor: $name$.";
};
+
String STR_CTW_ERROR_NO_QUERY
{
Text [ en-US ] = "To copy a query, your connection must be able to provide queries.";
};
+
String STR_CTW_ERROR_INVALID_INTERACTIONHANDLER
{
Text [ en-US ] = "The given interaction handler is invalid.";
diff --git a/dbaccess/source/ui/uno/dbinteraction.cxx b/dbaccess/source/ui/uno/dbinteraction.cxx
index ce7d19f4c..0b17fe56b 100755..100644
--- a/dbaccess/source/ui/uno/dbinteraction.cxx
+++ b/dbaccess/source/ui/uno/dbinteraction.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,66 +29,26 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_INTERACTION_HXX_
#include "dbinteraction.hxx"
-#endif
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _SV_MSGBOX_HXX
+#include <osl/diagnose.h>
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONAPPROVE_HPP_
#include <com/sun/star/task/XInteractionApprove.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONDISAPPROVE_HPP_
#include <com/sun/star/task/XInteractionDisapprove.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONRETRY_HPP_
#include <com/sun/star/task/XInteractionRetry.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONABORT_HPP_
#include <com/sun/star/task/XInteractionAbort.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XINTERACTIONSUPPLYPARAMETERS_HPP_
#include <com/sun/star/sdb/XInteractionSupplyParameters.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XINTERACTIONDOCUMENTSAVE_HPP_
#include <com/sun/star/sdb/XInteractionDocumentSave.hpp>
-#endif
-#ifndef SFX_QUERYSAVEDOCUMENT_HXX
#include <sfx2/QuerySaveDocument.hxx>
-#endif
-#ifndef _DBU_UNO_HRC_
#include "dbu_uno.hrc"
-#endif
-#ifndef _DBAUI_PARAMDIALOG_HXX_
#include "paramdialog.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _VOS_MUTEX_HXX_
-#include <vos/mutex.hxx>
-#endif
-#ifndef DBAUI_COLLECTIONVIEW_HXX
+#include <osl/mutex.hxx>
#include "CollectionView.hxx"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
//==========================================================================
@@ -138,7 +99,7 @@ namespace dbaui
sal_Bool BasicInteractionHandler::impl_handle_throw( const Reference< XInteractionRequest >& i_Request )
{
Any aRequest( i_Request->getRequest() );
- DBG_ASSERT(aRequest.hasValue(), "BasicInteractionHandler::handle: invalid request!");
+ OSL_ENSURE(aRequest.hasValue(), "BasicInteractionHandler::handle: invalid request!");
if ( !aRequest.hasValue() )
// no request -> no handling
return sal_False;
@@ -176,7 +137,7 @@ namespace dbaui
//-------------------------------------------------------------------------
void BasicInteractionHandler::implHandle(const ParametersRequest& _rParamRequest, const Sequence< Reference< XInteractionContinuation > >& _rContinuations)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// want to open a dialog ....
sal_Int32 nAbortPos = getContinuation(ABORT, _rContinuations);
@@ -185,12 +146,7 @@ namespace dbaui
Reference< XInteractionSupplyParameters > xParamCallback;
if (-1 != nParamPos)
xParamCallback = Reference< XInteractionSupplyParameters >(_rContinuations[nParamPos], UNO_QUERY);
- DBG_ASSERT(xParamCallback.is(), "BasicInteractionHandler::implHandle(ParametersRequest): can't set the parameters without an appropriate interaction handler!s");
-
- // determine the style of the dialog, dependent on the present continuation types
- WinBits nDialogStyle = WB_OK | WB_DEF_OK;
- if (-1 != nAbortPos)
- nDialogStyle = WB_OK_CANCEL;
+ OSL_ENSURE(xParamCallback.is(), "BasicInteractionHandler::implHandle(ParametersRequest): can't set the parameters without an appropriate interaction handler!s");
OParameterDialog aDlg(NULL, _rParamRequest.Parameters, _rParamRequest.Connection, m_xORB);
sal_Int16 nResult = aDlg.Execute();
@@ -220,7 +176,7 @@ namespace dbaui
//-------------------------------------------------------------------------
void BasicInteractionHandler::implHandle(const SQLExceptionInfo& _rSqlInfo, const Sequence< Reference< XInteractionContinuation > >& _rContinuations)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// want to open a dialog ....
sal_Int32 nApprovePos = getContinuation(APPROVE, _rContinuations);
@@ -247,7 +203,7 @@ namespace dbaui
nDialogStyle = WB_RETRY_CANCEL | WB_DEF_RETRY;
}
- // excute the dialog
+ // execute the dialog
OSQLMessageBox aDialog(NULL, _rSqlInfo, nDialogStyle);
// TODO: need a way to specify the parent window
sal_Int16 nResult = aDialog.Execute();
@@ -267,7 +223,7 @@ namespace dbaui
if ( nDisapprovePos != -1 )
_rContinuations[ nDisapprovePos ]->select();
else
- OSL_ENSURE( false, "BasicInteractionHandler::implHandle: no handler for NO!" );
+ OSL_FAIL( "BasicInteractionHandler::implHandle: no handler for NO!" );
break;
case RET_CANCEL:
@@ -276,13 +232,13 @@ namespace dbaui
else if ( nDisapprovePos != -1 )
_rContinuations[ nDisapprovePos ]->select();
else
- OSL_ENSURE( false, "BasicInteractionHandler::implHandle: no handler for CANCEL!" );
+ OSL_FAIL( "BasicInteractionHandler::implHandle: no handler for CANCEL!" );
break;
case RET_RETRY:
if ( nRetryPos != -1 )
_rContinuations[ nRetryPos ]->select();
else
- OSL_ENSURE( false, "BasicInteractionHandler::implHandle: where does the RETRY come from?" );
+ OSL_FAIL( "BasicInteractionHandler::implHandle: where does the RETRY come from?" );
break;
}
}
@@ -294,7 +250,7 @@ namespace dbaui
//-------------------------------------------------------------------------
void BasicInteractionHandler::implHandle(const DocumentSaveRequest& _rDocuRequest, const Sequence< Reference< XInteractionContinuation > >& _rContinuations)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// want to open a dialog ....
sal_Int32 nApprovePos = getContinuation(APPROVE, _rContinuations);
@@ -321,12 +277,7 @@ namespace dbaui
if (-1 != nDocuPos)
{
Reference< XInteractionDocumentSave > xCallback(_rContinuations[nDocuPos], UNO_QUERY);
- DBG_ASSERT(xCallback.is(), "BasicInteractionHandler::implHandle(DocumentSaveRequest): can't save document without an appropriate interaction handler!s");
-
- // determine the style of the dialog, dependent on the present continuation types
- WinBits nDialogStyle = WB_OK | WB_DEF_OK;
- if (-1 != nAbortPos)
- nDialogStyle = WB_OK_CANCEL;
+ OSL_ENSURE(xCallback.is(), "BasicInteractionHandler::implHandle(DocumentSaveRequest): can't save document without an appropriate interaction handler!s");
OCollectionView aDlg(NULL,_rDocuRequest.Content,_rDocuRequest.Name,m_xORB);
sal_Int16 nResult = aDlg.Execute();
@@ -425,3 +376,4 @@ namespace dbaui
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/dbinteraction.hxx b/dbaccess/source/ui/uno/dbinteraction.hxx
index 847fc7859..2d96ec23e 100644
--- a/dbaccess/source/ui/uno/dbinteraction.hxx
+++ b/dbaccess/source/ui/uno/dbinteraction.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef _DBAUI_INTERACTION_HXX_
#define _DBAUI_INTERACTION_HXX_
-#ifndef _CPPUHELPER_IMPLBASE2_HXX_
#include <cppuhelper/implbase2.hxx>
-#endif
#include "moduledbu.hxx"
#include "apitools.hxx"
@@ -125,7 +124,7 @@ namespace dbaui
SUPPLY_DOCUMENTSAVE
};
/** check if a given continuation sequence contains a given continuation type<p/>
- @return the index within <arg>_rContinuations</arg> of the first occurence of a continuation
+ @return the index within <arg>_rContinuations</arg> of the first occurrence of a continuation
of the requested type, -1 of no such continuation exists
*/
sal_Int32 getContinuation(
@@ -186,3 +185,4 @@ namespace dbaui
#endif // _DBAUI_INTERACTION_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/dbinteraction.src b/dbaccess/source/ui/uno/dbinteraction.src
index 67f72b20f..3d4c33d8a 100644
--- a/dbaccess/source/ui/uno/dbinteraction.src
+++ b/dbaccess/source/ui/uno/dbinteraction.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/ui/uno/makefile.mk b/dbaccess/source/ui/uno/makefile.mk
deleted file mode 100644
index 987e67241..000000000
--- a/dbaccess/source/ui/uno/makefile.mk
+++ /dev/null
@@ -1,76 +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=uiuno
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files -------------------------------------
-
-# ... resource files ............................
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- dbinteraction.src \
- copytablewizard.src
-
-# ... object files ............................
-# workaround for issue http://qa.openoffice.org/issues/show_bug.cgi?id=102305 Linux specific
-.IF "$(COM)" == "GCC"
-NOOPTFILES=\
- $(SLO)$/copytablewizard.obj
-.ENDIF
-
-SLOFILES= \
- $(SLO)$/copytablewizard.obj \
- $(SLO)$/composerdialogs.obj \
- $(SLO)$/unosqlmessage.obj \
- $(SLO)$/unoadmin.obj \
- $(SLO)$/admindlg.obj \
- $(SLO)$/TableFilterDlg.obj \
- $(SLO)$/AdvancedSettingsDlg.obj \
- $(SLO)$/unoDirectSql.obj \
- $(SLO)$/DBTypeWizDlg.obj \
- $(SLO)$/DBTypeWizDlgSetup.obj \
- $(SLO)$/UserSettingsDlg.obj \
- $(SLO)$/ColumnModel.obj \
- $(SLO)$/ColumnControl.obj \
- $(SLO)$/ColumnPeer.obj \
- $(SLO)$/dbinteraction.obj \
- $(SLO)$/textconnectionsettings_uno.obj
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
diff --git a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
index b14a9326b..3d81f1bee 100644
--- a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
+++ b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -261,3 +262,4 @@ extern "C" void SAL_CALL createRegistryInfo_OTextConnectionSettingsDialog()
static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OTextConnectionSettingsDialog > aAutoRegistration;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/unoDirectSql.cxx b/dbaccess/source/ui/uno/unoDirectSql.cxx
index 2af396faf..a953664c4 100644
--- a/dbaccess/source/ui/uno/unoDirectSql.cxx
+++ b/dbaccess/source/ui/uno/unoDirectSql.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,36 +29,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_UNODIRECTSQL_HXX
#include "unoDirectSql.hxx"
-#endif
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONNECTION_XCONNECTION_HPP_
#include <com/sun/star/connection/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_
#include <com/sun/star/container/XNamed.hpp>
-#endif
-#ifndef _DBACCESS_UI_DIRECTSQL_HXX_
#include "directsql.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _DBAUI_DATASOURCECONNECTOR_HXX_
#include "datasourceconnector.hxx"
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
extern "C" void SAL_CALL createRegistryInfo_ODirectSQLDialog()
@@ -154,3 +135,4 @@ DBG_NAME(ODirectSQLDialog)
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/unoDirectSql.hxx b/dbaccess/source/ui/uno/unoDirectSql.hxx
index 407082d37..652c774b7 100644
--- a/dbaccess/source/ui/uno/unoDirectSql.hxx
+++ b/dbaccess/source/ui/uno/unoDirectSql.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,27 +29,13 @@
#ifndef DBAUI_UNODIRECTSQL_HXX
#define DBAUI_UNODIRECTSQL_HXX
-#ifndef _SVT_GENERICUNODIALOG_HXX_
#include <svtools/genericunodialog.hxx>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSER_HPP_
#include <com/sun/star/sdb/XSQLQueryComposer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROWSET_HPP_
#include <com/sun/star/sdbc/XRowSet.hpp>
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
#include "moduledbu.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
//.........................................................................
namespace dbaui
@@ -92,3 +79,4 @@ namespace dbaui
#endif // DBAUI_UNODIRECTSQL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/unoadmin.cxx b/dbaccess/source/ui/uno/unoadmin.cxx
index df140b047..6596946e0 100644
--- a/dbaccess/source/ui/uno/unoadmin.cxx
+++ b/dbaccess/source/ui/uno/unoadmin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,44 +29,22 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_
#include <toolkit/awt/vclxwindow.hxx>
-#endif
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
#ifndef _DBAUI_UNOADMIN_
#include "unoadmin.hxx"
#endif
-#ifndef _DBAUI_DBADMIN_HXX_
#include "dbadmin.hxx"
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
#include <comphelper/property.hxx>
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
// --- needed because of the solar mutex
-#ifndef _VOS_MUTEX_HXX_
-#include <vos/mutex.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
-#endif
// ---
#define THISREF() static_cast< XServiceInfo* >(this)
@@ -143,3 +122,4 @@ void ODatabaseAdministrationDialog::implInitialize(const Any& _rValue)
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/uno/unosqlmessage.cxx b/dbaccess/source/ui/uno/unosqlmessage.cxx
index c0a8cf202..afa236373 100644
--- a/dbaccess/source/ui/uno/unosqlmessage.cxx
+++ b/dbaccess/source/ui/uno/unosqlmessage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,24 +29,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef _DBAUI_UNOSQLMESSAGE_HXX_
#include "unosqlmessage.hxx"
-#endif
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
using namespace dbaui;
using namespace dbtools;
@@ -100,7 +89,7 @@ Reference< XInterface > SAL_CALL OSQLMessageDialog::Create(const Reference< XMul
//-------------------------------------------------------------------------
::rtl::OUString OSQLMessageDialog::getImplementationName_Static() throw(RuntimeException)
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.OSQLMessageDialog");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.OSQLMessageDialog"));
}
//-------------------------------------------------------------------------
@@ -113,7 +102,7 @@ Reference< XInterface > SAL_CALL OSQLMessageDialog::Create(const Reference< XMul
::comphelper::StringSequence OSQLMessageDialog::getSupportedServiceNames_Static() throw(RuntimeException)
{
::comphelper::StringSequence aSupported(1);
- aSupported.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.ErrorMessageDialog");
+ aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ErrorMessageDialog"));
return aSupported;
}
@@ -166,7 +155,7 @@ Dialog* OSQLMessageDialog::createDialog(Window* _pParent)
if ( m_aException.hasValue() )
return new OSQLMessageBox( _pParent, SQLExceptionInfo( m_aException ), WB_OK | WB_DEF_OK, m_sHelpURL );
- OSL_ENSURE(sal_False, "OSQLMessageDialog::createDialog : You should use the SQLException property to specify the error to display!");
+ OSL_FAIL("OSQLMessageDialog::createDialog : You should use the SQLException property to specify the error to display!");
return new OSQLMessageBox(_pParent, SQLException());
}
@@ -174,3 +163,4 @@ Dialog* OSQLMessageDialog::createDialog(Window* _pParent)
} // namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/uiconfig/dbapp/menubar/menubar.xml b/dbaccess/uiconfig/dbapp/menubar/menubar.xml
index baafddcae..a76fda58c 100644
--- a/dbaccess/uiconfig/dbapp/menubar/menubar.xml
+++ b/dbaccess/uiconfig/dbapp/menubar/menubar.xml
@@ -133,9 +133,9 @@
<menu:menuitem menu:id=".uno:HelpIndex"/>
<menu:menuitem menu:id=".uno:ExtendedHelp"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/dbaccess/uiconfig/dbquery/menubar/menubar.xml b/dbaccess/uiconfig/dbquery/menubar/menubar.xml
index a3a965290..2d6ec8d05 100644
--- a/dbaccess/uiconfig/dbquery/menubar/menubar.xml
+++ b/dbaccess/uiconfig/dbquery/menubar/menubar.xml
@@ -74,9 +74,9 @@
<menu:menuitem menu:id=".uno:HelpIndex"/>
<menu:menuitem menu:id=".uno:ExtendedHelp"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/dbaccess/uiconfig/dbrelation/menubar/menubar.xml b/dbaccess/uiconfig/dbrelation/menubar/menubar.xml
index 542395e58..b7460a447 100644
--- a/dbaccess/uiconfig/dbrelation/menubar/menubar.xml
+++ b/dbaccess/uiconfig/dbrelation/menubar/menubar.xml
@@ -57,9 +57,9 @@
<menu:menuitem menu:id=".uno:HelpIndex"/>
<menu:menuitem menu:id=".uno:ExtendedHelp"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/dbaccess/uiconfig/dbtable/menubar/menubar.xml b/dbaccess/uiconfig/dbtable/menubar/menubar.xml
index 18bdde9ec..ede5eed2c 100644
--- a/dbaccess/uiconfig/dbtable/menubar/menubar.xml
+++ b/dbaccess/uiconfig/dbtable/menubar/menubar.xml
@@ -58,9 +58,9 @@
<menu:menuitem menu:id=".uno:HelpIndex"/>
<menu:menuitem menu:id=".uno:ExtendedHelp"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/dbaccess/uiconfig/dbtdata/menubar/menubar.xml b/dbaccess/uiconfig/dbtdata/menubar/menubar.xml
index 6b261670f..79fe68a2d 100644
--- a/dbaccess/uiconfig/dbtdata/menubar/menubar.xml
+++ b/dbaccess/uiconfig/dbtdata/menubar/menubar.xml
@@ -66,9 +66,9 @@
<menu:menuitem menu:id=".uno:HelpIndex"/>
<menu:menuitem menu:id=".uno:ExtendedHelp"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/dbaccess/util/hidother.src b/dbaccess/util/hidother.src
index 16f4f6606..1fe5b6ca2 100644
--- a/dbaccess/util/hidother.src
+++ b/dbaccess/util/hidother.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/util/makefile.mk b/dbaccess/util/makefile.mk
deleted file mode 100644
index d59855961..000000000
--- a/dbaccess/util/makefile.mk
+++ /dev/null
@@ -1,261 +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=..
-PRJNAME=dbaccess
-TARGET=dba
-TARGET2=dbu
-TARGET3=sdbt
-USE_DEFFILE=TRUE
-GEN_HID=TRUE
-GEN_HID_OTHER=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-
-LDUMP=ldump2.exe
-
-# --- database core (dba) -----------------------------------
-.IF "$(L10N_framework)"==""
-LIB1TARGET=$(SLB)$/$(TARGET).lib
-LIB1FILES=\
- $(SLB)$/api.lib \
- $(SLB)$/dataaccess.lib \
- $(SLB)$/recovery.lib \
- $(SLB)$/misc.lib \
- $(SLB)$/core_resource.lib
-
-SHL1TARGET=$(TARGET)$(DLLPOSTFIX)
-
-SHL1STDLIBS= \
- $(SVTOOLLIB) \
- $(VCLLIB) \
- $(UNOTOOLSLIB) \
- $(TOOLSLIB) \
- $(I18NISOLANGLIB) \
- $(DBTOOLSLIB) \
- $(COMPHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(UCBHELPERLIB) \
- $(SVLLIB) \
- $(CPPULIB) \
- $(SALLIB) \
- $(SFXLIB) \
- $(BASICLIB) \
- $(FWELIB) \
- $(SALHELPERLIB) \
- $(XMLOFFLIB)
-
-SHL1DEPN=
-SHL1IMPLIB=i$(TARGET)
-SHL1LIBS=$(LIB1TARGET)
-SHL1DEF=$(MISC)$/$(SHL1TARGET).def
-DEF1NAME=$(SHL1TARGET)
-DEFLIB1NAME=$(TARGET)
-DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt \
- $(SLB)$/$(TARGET).lib
-SHL1USE_EXPORTS=name
-
-.ENDIF
-# --- .res file ----------------------------------------------------------
-
-RES1FILELIST=\
- $(SRS)$/core_strings.srs
-
-RESLIB1NAME=$(TARGET)
-RESLIB1IMAGES=$(PRJ)$/res
-RESLIB1SRSFILES=$(RES1FILELIST)
-
-# --- database ui (dbu) -----------------------------------
-.IF "$(L10N_framework)"==""
-
-LIB2TARGET=$(SLB)$/$(TARGET2).lib
-LIB2FILES=\
- $(SLB)$/relationdesign.lib \
- $(SLB)$/tabledesign.lib \
- $(SLB)$/querydesign.lib \
- $(SLB)$/uimisc.lib \
- $(SLB)$/uidlg.lib \
- $(SLB)$/dbushared.lib \
- $(SLB)$/browser.lib \
- $(SLB)$/uiuno.lib \
- $(SLB)$/app.lib \
- $(SLB)$/uicontrols.lib
-
-SHL2TARGET=$(TARGET2)$(DLLPOSTFIX)
-
-SHL2STDLIBS= \
- $(SVXCORELIB) \
- $(SVXLIB) \
- $(SFXLIB) \
- $(SVTOOLLIB) \
- $(FWELIB) \
- $(TKLIB) \
- $(VCLLIB) \
- $(SVLLIB) \
- $(SOTLIB) \
- $(UNOTOOLSLIB) \
- $(TOOLSLIB) \
- $(UCBHELPERLIB) \
- $(DBTOOLSLIB) \
- $(COMPHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SO2LIB) \
- $(VOSLIB) \
- $(SALLIB)
-
-.IF "$(GUI)"=="OS2"
-SHL2STDLIBS+= $(LB)$/i$(TARGET).lib
-SHL2DEPN=$(LB)$/i$(TARGET).lib
-.ELIF "$(GUI)"!="WNT" || "$(COM)"=="GCC"
-SHL2STDLIBS+= \
- -l$(TARGET)$(DLLPOSTFIX)
-SHL2DEPN=$(SHL1TARGETN)
-.ELSE
-SHL2STDLIBS+= \
- $(LB)$/i$(TARGET).lib
-SHL2DEPN=$(LB)$/i$(TARGET).lib
-.ENDIF
-
-SHL2IMPLIB=i$(TARGET2)
-SHL2LIBS=$(LIB2TARGET)
-SHL2DEF=$(MISC)$/$(SHL2TARGET).def
-DEF2NAME=$(SHL2TARGET)
-DEFLIB2NAME=$(TARGET2)
-DEF2DEPN= $(MISC)$/$(SHL2TARGET).flt \
- $(SLB)$/$(TARGET2).lib
-SHL2USE_EXPORTS=name
-
-ALL: \
- $(LIB1TARGET) \
- $(LIB2TARGET) \
- ALLTAR
-
-.ENDIF
-# --- .res file ----------------------------------------------------------
-
-RES2FILELIST=\
- $(SRS)$/uidlg.srs \
- $(SRS)$/app.srs \
- $(SRS)$/uicontrols.srs \
- $(SRS)$/browser.srs \
- $(SRS)$/uiuno.srs \
- $(SRS)$/querydesign.srs \
- $(SRS)$/tabledesign.srs \
- $(SRS)$/relationdesign.srs \
- $(SRS)$/uiimglst.srs \
- $(SRS)$/uimisc.srs
-
-.IF "$(GUI)"=="WNT"
-#needed by $(SLO)$/adodatalinks.obj
-SHL2STDLIBS+= $(OLE32LIB) \
- $(OLEAUT32LIB) \
- $(UUIDLIB)
-.ENDIF
-
-RESLIB2NAME=$(TARGET2)
-RESLIB2IMAGES=$(PRJ)$/res
-RESLIB2SRSFILES=$(RES2FILELIST)
-
-# --- database tools (sdbt) -----------------------------------
-.IF "$(L10N_framework)"==""
-LIB3TARGET=$(SLB)$/$(TARGET3).lib
-LIB3FILES=\
- $(SLB)$/conntools.lib \
- $(SLB)$/sdbtmisc.lib \
- $(SLB)$/sdbtshared.lib
-
-SHL3TARGET=$(TARGET3)$(DLLPOSTFIX)
-
-SHL3STDLIBS= \
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(UNOTOOLSLIB) \
- $(COMPHELPERLIB) \
- $(TOOLSLIB) \
- $(DBTOOLSLIB) \
- $(SALLIB)
-
-SHL3LIBS=$(LIB3TARGET)
-SHL3DEF=$(MISC)$/$(SHL3TARGET).def
-DEF3NAME=$(SHL3TARGET)
-SHL3VERSIONMAP=$(SOLARENV)/src/component.map
-
-.END
-
-# --- .res file ----------------------------------------------------------
-
-RES3FILELIST=\
- $(SRS)$/sdbt_strings.srs
-
-RESLIB3NAME=$(TARGET3)
-RESLIB3IMAGES=$(PRJ)$/res
-RESLIB3SRSFILES=$(RES3FILELIST)
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-.IF "$(depend)"==""
-
-.IF "$(L10N_framework)"==""
-
-$(MISC)$/$(SHL2TARGET).flt: makefile.mk
- @echo ------------------------------
- @echo CLEAR_THE_FILE > $@
- @echo _TI >>$@
- @echo _real >>$@
-
-$(MISC)$/$(SHL1TARGET).flt: makefile.mk
- @echo ------------------------------
- @echo CLEAR_THE_FILE > $@
- @echo _TI >>$@
- @echo _real >>$@
-.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/win32/source/odbcconfig/makefile.mk b/dbaccess/win32/source/odbcconfig/makefile.mk
deleted file mode 100644
index 72d81e395..000000000
--- a/dbaccess/win32/source/odbcconfig/makefile.mk
+++ /dev/null
@@ -1,54 +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=..$/..$/..
-
-PRJNAME=dbaccess
-TARGET=odbcconfig
-LIBTARGET=NO
-TARGETTYPE=GUI
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/odbcconfig.obj
-
-# SQLManageDataSources wrapper
-APP1TARGET=$(TARGET)
-APP1NOSAL=TRUE
-APP1OBJS = \
- $(OBJ)$/odbcconfig.obj
-
-# --- Targets ------------------------------------------------------
-
-
-.INCLUDE : target.mk
-
diff --git a/dbaccess/win32/source/odbcconfig/odbcconfig.cxx b/dbaccess/win32/source/odbcconfig/odbcconfig.cxx
index dc4e8ffce..b5f11e793 100644
--- a/dbaccess/win32/source/odbcconfig/odbcconfig.cxx
+++ b/dbaccess/win32/source/odbcconfig/odbcconfig.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -157,3 +158,4 @@ extern "C" int APIENTRY _tWinMain( HINSTANCE _hAppInstance, HINSTANCE, LPTSTR, i
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/AllLangResTarget_rpt.mk b/reportdesign/AllLangResTarget_rpt.mk
index 094f2ca90..00b1d2022 100644
--- a/reportdesign/AllLangResTarget_rpt.mk
+++ b/reportdesign/AllLangResTarget_rpt.mk
@@ -1,47 +1,48 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platdbam 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 dba A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 dba 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>
-# dba a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-$(eval $(call gb_AllLangResTarget_AllLangResTarget,rpt))
-
-$(eval $(call gb_AllLangResTarget_set_reslocation,rpt,reportdesign))
-
-$(eval $(call gb_AllLangResTarget_add_srs,rpt,reportdesign/rpt))
-
-$(eval $(call gb_SrsTarget_SrsTarget,reportdesign/rpt))
-
-$(eval $(call gb_SrsTarget_set_include,reportdesign/rpt,\
- $$(INCLUDE) \
- -I$(OUTDIR)/inc \
- -I$(SRCDIR)/reportdesign/source/core/inc \
- -I$(SRCDIR)/reportdesign/inc \
-))
-
-$(eval $(call gb_SrsTarget_add_files,reportdesign/rpt,\
- reportdesign/source/core/resource/strings.src \
-))
-
-# vim: set noet sw=4 ts=4:
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_AllLangResTarget_AllLangResTarget,rpt))
+
+$(eval $(call gb_AllLangResTarget_set_reslocation,rpt,reportdesign))
+
+$(eval $(call gb_AllLangResTarget_add_srs,rpt,\
+ reportdesign/res \
+))
+
+$(eval $(call gb_SrsTarget_SrsTarget,reportdesign/res))
+
+$(eval $(call gb_SrsTarget_set_include,reportdesign/res,\
+ $$(INCLUDE) \
+ -I$(realpath $(SRCDIR)/reportdesign/source/core/inc) \
+ -I$(OUTDIR)/inc \
+))
+
+$(eval $(call gb_SrsTarget_add_files,reportdesign/res,\
+ reportdesign/source/core/resource/strings.src \
+))
+
+# vim: set noet ts=4 sw=4:
diff --git a/reportdesign/Library_rpt.mk b/reportdesign/Library_rpt.mk
index 731ee504e..832ab7880 100644
--- a/reportdesign/Library_rpt.mk
+++ b/reportdesign/Library_rpt.mk
@@ -1,113 +1,107 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2011 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.
-#
-#*************************************************************************
-
-$(eval $(call gb_Library_Library,rpt))
-$(eval $(call gb_Library_add_package_headers,rpt,reportdesign_inc))
-$(eval $(call gb_Library_add_precompiled_header,rpt,$(SRCDIR)/reportdesign/inc/pch/precompiled_reportdesign))
-
-$(eval $(call gb_Library_set_componentfile,rpt,reportdesign/util/rpt))
-
-$(eval $(call gb_Library_set_include,rpt,\
- -I$(SRCDIR)/reportdesign/inc \
- -I$(SRCDIR)/reportdesign/source/core/inc \
- -I$(SRCDIR)/reportdesign/source/inc \
- -I$(SRCDIR)/reportdesign/inc/pch \
- $$(SOLARINC) \
- -I$(OUTDIR)/inc/offuh \
-))
-
-$(eval $(call gb_Library_add_defs,rpt,\
- -DREPORTDESIGN_DLLIMPLEMENTATION \
-))
-
-$(eval $(call gb_Library_add_linked_libs,rpt,\
- editeng \
- sb \
- tl \
- svt \
- svl \
- cppuhelper \
- cppu \
- comphelper \
- dbtools \
- dbui \
- utl \
- vcl \
- sal \
- stl \
- i18nisolang1 \
- ucbhelper \
- sfx \
- salhelper \
- fwe \
- svx \
- svxcore \
- tk \
- $(gb_STDLIBS) \
-))
-
-$(eval $(call gb_Library_add_exception_objects,rpt,\
- reportdesign/source/core/api/FormattedField \
- reportdesign/source/core/api/Groups \
- reportdesign/source/core/api/Group \
- reportdesign/source/core/api/Section \
- reportdesign/source/core/api/services \
- reportdesign/source/core/api/FixedText \
- reportdesign/source/core/api/ImageControl \
- reportdesign/source/core/api/ReportDefinition \
- reportdesign/source/core/api/ReportComponent \
- reportdesign/source/core/api/ReportEngineJFree \
- reportdesign/source/core/api/Tools \
- reportdesign/source/core/api/Function \
- reportdesign/source/core/api/Functions \
- reportdesign/source/core/api/ReportControlModel \
- reportdesign/source/core/api/FormatCondition \
- reportdesign/source/core/api/ReportVisitor \
- reportdesign/source/core/api/Shape \
- reportdesign/source/core/api/FixedLine \
- reportdesign/source/core/misc/conditionalexpression \
- reportdesign/source/core/misc/conditionupdater \
- reportdesign/source/core/misc/reportformula \
- reportdesign/source/core/resource/core_resource \
- reportdesign/source/core/sdr/RptModel \
- reportdesign/source/core/sdr/RptPage \
- reportdesign/source/core/sdr/UndoActions \
- reportdesign/source/core/sdr/RptObject \
- reportdesign/source/core/sdr/RptObjectListener \
- reportdesign/source/core/sdr/ModuleHelper \
- reportdesign/source/core/sdr/PropertyForward \
- reportdesign/source/core/sdr/ReportDrawPage \
- reportdesign/source/core/sdr/ReportUndoFactory \
- reportdesign/source/core/sdr/UndoEnv \
- reportdesign/source/core/sdr/formatnormalizer \
-))
-
-$(eval $(call gb_Library_add_noexception_objects,rpt,\
- reportdesign/source/shared/corestrings \
-))
-
-# vim: set noet sw=4 ts=4:
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_Library_Library,rpt))
+
+$(eval $(call gb_Library_add_precompiled_header,rpt,$(SRCDIR)/reportdesign/inc/pch/precompiled_reportdesign))
+
+$(eval $(call gb_Library_set_include,rpt,\
+ $$(INCLUDE) \
+ -I$(realpath $(SRCDIR)/reportdesign/inc) \
+ -I$(realpath $(SRCDIR)/reportdesign/inc/pch) \
+ -I$(realpath $(SRCDIR)/reportdesign/source/inc) \
+ -I$(realpath $(SRCDIR)/reportdesign/source/core/inc) \
+ -I$(OUTDIR)/inc \
+ -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_Library_add_defs,rpt,\
+ -DREPORTDESIGN_DLLIMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_add_linked_libs,rpt,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ dbtools \
+ dbu \
+ editeng \
+ fwe \
+ i18nisolang1 \
+ sal \
+ sfx \
+ svl \
+ svt \
+ svxcore \
+ svx \
+ tk \
+ tl \
+ utl \
+ vcl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_set_componentfile,rpt,reportdesign/util/rpt))
+
+$(eval $(call gb_Library_add_exception_objects,rpt,\
+ reportdesign/source/core/api/FixedLine \
+ reportdesign/source/core/api/FixedText \
+ reportdesign/source/core/api/FormatCondition \
+ reportdesign/source/core/api/FormattedField \
+ reportdesign/source/core/api/Function \
+ reportdesign/source/core/api/Functions \
+ reportdesign/source/core/api/Group \
+ reportdesign/source/core/api/Groups \
+ reportdesign/source/core/api/ImageControl \
+ reportdesign/source/core/api/ReportComponent \
+ reportdesign/source/core/api/ReportControlModel \
+ reportdesign/source/core/api/ReportDefinition \
+ reportdesign/source/core/api/ReportEngineJFree \
+ reportdesign/source/core/api/ReportVisitor \
+ reportdesign/source/core/api/Section \
+ reportdesign/source/core/api/services \
+ reportdesign/source/core/api/Shape \
+ reportdesign/source/core/api/Tools \
+ reportdesign/source/core/misc/conditionalexpression \
+ reportdesign/source/core/misc/conditionupdater \
+ reportdesign/source/core/misc/reportformula \
+ reportdesign/source/core/resource/core_resource \
+ reportdesign/source/core/sdr/formatnormalizer \
+ reportdesign/source/core/sdr/ModuleHelper \
+ reportdesign/source/core/sdr/PropertyForward \
+ reportdesign/source/core/sdr/ReportDrawPage \
+ reportdesign/source/core/sdr/ReportUndoFactory \
+ reportdesign/source/core/sdr/RptModel \
+ reportdesign/source/core/sdr/RptObject \
+ reportdesign/source/core/sdr/RptObjectListener \
+ reportdesign/source/core/sdr/RptPage \
+ reportdesign/source/core/sdr/UndoActions \
+ reportdesign/source/core/sdr/UndoEnv \
+ reportdesign/source/shared/corestrings \
+))
+
+# vim: set noet ts=4 sw=4:
diff --git a/reportdesign/Library_rptui.mk b/reportdesign/Library_rptui.mk
index 674ad0592..c532117ce 100644
--- a/reportdesign/Library_rptui.mk
+++ b/reportdesign/Library_rptui.mk
@@ -1,116 +1,113 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2011 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.
-#
-#*************************************************************************
-
-$(eval $(call gb_Library_Library,rptui))
-$(eval $(call gb_Library_add_precompiled_header,rptui,$(SRCDIR)/reportdesign/inc/pch/precompiled_rptui))
-
-$(eval $(call gb_Library_set_componentfile,rptui,reportdesign/util/rptui))
-
-$(eval $(call gb_Library_set_include,rptui,\
- -I$(SRCDIR)/reportdesign/inc \
- -I$(SRCDIR)/reportdesign/source/ui/inc \
- -I$(SRCDIR)/reportdesign/source/inc \
- -I$(SRCDIR)/reportdesign/inc/pch \
- $$(SOLARINC) \
- -I$(OUTDIR)/inc/offuh \
-))
-
-$(eval $(call gb_Library_add_linked_libs,rptui,\
- editeng \
- comphelper \
- cppuhelper \
- cppu \
- dbtools \
- i18nisolang1 \
- fwe \
- sal \
- salhelper \
- sfx \
- svl \
- svt \
- stl \
- vcl \
- for \
- tl \
- utl \
- ucbhelper \
- svxcore \
- svx \
- tk \
- sot \
- dba \
- vos3 \
- forui \
- dbui \
- rpt \
- $(gb_STDLIBS) \
-))
-
-$(eval $(call gb_Library_add_exception_objects,rptui,\
- reportdesign/source/ui/dlg/dlgpage \
- reportdesign/source/ui/dlg/Condition \
- reportdesign/source/ui/dlg/CondFormat \
- reportdesign/source/ui/dlg/GroupExchange \
- reportdesign/source/ui/dlg/PageNumber \
- reportdesign/source/ui/dlg/DateTime \
- reportdesign/source/ui/dlg/AddField \
- reportdesign/source/ui/dlg/Navigator \
- reportdesign/source/ui/dlg/GroupsSorting \
- reportdesign/source/ui/dlg/Formula \
- reportdesign/source/ui/inspection/DefaultInspection \
- reportdesign/source/ui/inspection/ReportComponentHandler \
- reportdesign/source/ui/inspection/GeometryHandler \
- reportdesign/source/ui/inspection/DataProviderHandler \
- reportdesign/source/ui/inspection/metadata \
- reportdesign/source/ui/misc/RptUndo \
- reportdesign/source/ui/misc/ColorListener \
- reportdesign/source/ui/misc/UITools \
- reportdesign/source/ui/misc/rptuiservices \
- reportdesign/source/ui/misc/toolboxcontroller \
- reportdesign/source/ui/misc/statusbarcontroller \
- reportdesign/source/ui/misc/FunctionHelper \
- reportdesign/source/ui/report/SectionWindow \
- reportdesign/source/ui/report/ReportController \
- reportdesign/source/ui/report/ReportControllerObserver \
- reportdesign/source/ui/report/FormattedFieldBeautifier \
- reportdesign/source/ui/report/FixedTextColor \
- reportdesign/source/ui/report/ReportSection \
- reportdesign/source/ui/report/SectionView \
- reportdesign/source/ui/report/ViewsWindow \
- reportdesign/source/ui/report/ScrollHelper \
- reportdesign/source/ui/report/StartMarker \
- reportdesign/source/ui/report/EndMarker \
- reportdesign/source/ui/report/dlgedfunc \
- reportdesign/source/ui/report/dlgedfac \
- reportdesign/source/ui/report/dlgedclip \
- reportdesign/source/ui/report/ReportWindow \
- reportdesign/source/ui/report/DesignView \
- reportdesign/source/ui/report/propbrw \
- reportdesign/source/shared/uistrings \
-))
-
-# vim: set noet sw=4 ts=4:
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_Library_Library,rptui))
+
+$(eval $(call gb_Library_add_precompiled_header,rptui,$(SRCDIR)/reportdesign/inc/pch/precompiled_reportdesign))
+
+$(eval $(call gb_Library_set_include,rptui,\
+ $$(INCLUDE) \
+ -I$(realpath $(SRCDIR)/reportdesign/inc) \
+ -I$(realpath $(SRCDIR)/reportdesign/inc/pch) \
+ -I$(realpath $(SRCDIR)/reportdesign/source/inc) \
+ -I$(realpath $(SRCDIR)/reportdesign/source/ui/inc) \
+ -I$(OUTDIR)/inc \
+ -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_Library_add_linked_libs,rptui,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ dbtools \
+ dbu \
+ editeng \
+ for \
+ forui \
+ fwe \
+ i18nisolang1 \
+ rpt \
+ sal \
+ sfx \
+ sot \
+ svl \
+ svt \
+ svxcore \
+ svx \
+ tk \
+ tl \
+ utl \
+ vcl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_set_componentfile,rptui,reportdesign/util/rptui))
+
+$(eval $(call gb_Library_add_exception_objects,rptui,\
+ reportdesign/source/shared/uistrings \
+ reportdesign/source/ui/dlg/AddField \
+ reportdesign/source/ui/dlg/CondFormat \
+ reportdesign/source/ui/dlg/Condition \
+ reportdesign/source/ui/dlg/DateTime \
+ reportdesign/source/ui/dlg/dlgpage \
+ reportdesign/source/ui/dlg/Formula \
+ reportdesign/source/ui/dlg/GroupExchange \
+ reportdesign/source/ui/dlg/GroupsSorting \
+ reportdesign/source/ui/dlg/Navigator \
+ reportdesign/source/ui/dlg/PageNumber \
+ reportdesign/source/ui/inspection/DataProviderHandler \
+ reportdesign/source/ui/inspection/DefaultInspection \
+ reportdesign/source/ui/inspection/GeometryHandler \
+ reportdesign/source/ui/inspection/metadata \
+ reportdesign/source/ui/inspection/ReportComponentHandler \
+ reportdesign/source/ui/misc/ColorListener \
+ reportdesign/source/ui/misc/FunctionHelper \
+ reportdesign/source/ui/misc/rptuiservices \
+ reportdesign/source/ui/misc/RptUndo \
+ reportdesign/source/ui/misc/statusbarcontroller \
+ reportdesign/source/ui/misc/toolboxcontroller \
+ reportdesign/source/ui/misc/UITools \
+ reportdesign/source/ui/report/DesignView \
+ reportdesign/source/ui/report/dlgedclip \
+ reportdesign/source/ui/report/dlgedfac \
+ reportdesign/source/ui/report/dlgedfunc \
+ reportdesign/source/ui/report/EndMarker \
+ reportdesign/source/ui/report/FixedTextColor \
+ reportdesign/source/ui/report/FormattedFieldBeautifier \
+ reportdesign/source/ui/report/propbrw \
+ reportdesign/source/ui/report/ReportController \
+ reportdesign/source/ui/report/ReportControllerObserver \
+ reportdesign/source/ui/report/ReportSection \
+ reportdesign/source/ui/report/ReportWindow \
+ reportdesign/source/ui/report/ScrollHelper \
+ reportdesign/source/ui/report/SectionView \
+ reportdesign/source/ui/report/SectionWindow \
+ reportdesign/source/ui/report/StartMarker \
+ reportdesign/source/ui/report/ViewsWindow \
+))
+
+# vim: set noet ts=4 sw=4:
diff --git a/reportdesign/Library_rptxml.mk b/reportdesign/Library_rptxml.mk
index e62028e51..5333cfd75 100644
--- a/reportdesign/Library_rptxml.mk
+++ b/reportdesign/Library_rptxml.mk
@@ -1,98 +1,95 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2011 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.
-#
-#*************************************************************************
-
-$(eval $(call gb_Library_Library,rptxml))
-$(eval $(call gb_Library_add_precompiled_header,rptxml,$(SRCDIR)/reportdesign/inc/pch/precompiled_rptxml))
-
-$(eval $(call gb_Library_set_componentfile,rptxml,reportdesign/source/filter/xml/rptxml))
-
-$(eval $(call gb_Library_set_include,rptxml,\
- -I$(SRCDIR)/reportdesign/inc \
- -I$(SRCDIR)/reportdesign/source/filter/xml \
- -I$(SRCDIR)/reportdesign/source/inc \
- -I$(SRCDIR)/reportdesign/inc/pch \
- $$(SOLARINC) \
- -I$(OUTDIR)/inc/offuh \
-))
-
-$(eval $(call gb_Library_add_linked_libs,rptxml,\
- tl \
- svl \
- cppuhelper \
- cppu \
- comphelper \
- utl \
- vcl \
- sal \
- sfx \
- dbtools \
- xo \
- sot \
- tk \
- dba \
- stl \
- editeng \
- rpt \
- $(gb_STDLIBS) \
-))
-
-$(eval $(call gb_Library_add_exception_objects,rptxml,\
- reportdesign/source/filter/xml/xmlfilter \
- reportdesign/source/filter/xml/xmlReport \
- reportdesign/source/filter/xml/xmlMasterFields \
- reportdesign/source/filter/xml/xmlGroup \
- reportdesign/source/filter/xml/xmlHelper \
- reportdesign/source/filter/xml/xmlSection \
- reportdesign/source/filter/xml/xmlComponent \
- reportdesign/source/filter/xml/xmlControlProperty \
- reportdesign/source/filter/xml/xmlFormattedField \
- reportdesign/source/filter/xml/xmlReportElement \
- reportdesign/source/filter/xml/xmlReportElementBase \
- reportdesign/source/filter/xml/xmlCondPrtExpr \
- reportdesign/source/filter/xml/xmlImage \
- reportdesign/source/filter/xml/xmlFunction \
- reportdesign/source/filter/xml/xmlStyleImport \
- reportdesign/source/filter/xml/xmlAutoStyle \
- reportdesign/source/filter/xml/xmlExport \
- reportdesign/source/filter/xml/dbloader2 \
- reportdesign/source/filter/xml/xmlFormatCondition \
- reportdesign/source/filter/xml/xmlPropertyHandler \
- reportdesign/source/filter/xml/xmlColumn \
- reportdesign/source/filter/xml/xmlCell \
- reportdesign/source/filter/xml/xmlTable \
- reportdesign/source/filter/xml/xmlFixedContent \
- reportdesign/source/filter/xml/xmlSubDocument \
- reportdesign/source/filter/xml/xmlservices \
- reportdesign/source/filter/xml/xmlImportDocumentHandler \
- reportdesign/source/filter/xml/xmlExportDocumentHandler \
-))
-
-$(eval $(call gb_Library_add_noexception_objects,rptxml, \
- reportdesign/source/shared/xmlstrings \
-))
-
-# vim: set noet sw=4 ts=4:
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_Library_Library,rptxml))
+
+$(eval $(call gb_Library_add_precompiled_header,rptxml,$(SRCDIR)/reportdesign/inc/pch/precompiled_reportdesign))
+
+$(eval $(call gb_Library_set_include,rptxml,\
+ $$(INCLUDE) \
+ -I$(realpath $(SRCDIR)/reportdesign/inc) \
+ -I$(realpath $(SRCDIR)/reportdesign/inc/pch) \
+ -I$(realpath $(SRCDIR)/reportdesign/source/inc) \
+ -I$(OUTDIR)/inc \
+ -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_Library_add_linked_libs,rptxml,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ dbtools \
+ editeng \
+ rpt \
+ sal \
+ sfx \
+ sot \
+ svl \
+ svxcore \
+ tl \
+ ucbhelper \
+ utl \
+ vcl \
+ xo \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_set_componentfile,rptxml,reportdesign/util/rptxml))
+
+$(eval $(call gb_Library_add_exception_objects,rptxml,\
+ reportdesign/source/filter/xml/dbloader2 \
+ reportdesign/source/filter/xml/xmlAutoStyle \
+ reportdesign/source/filter/xml/xmlCell \
+ reportdesign/source/filter/xml/xmlColumn \
+ reportdesign/source/filter/xml/xmlComponent \
+ reportdesign/source/filter/xml/xmlCondPrtExpr \
+ reportdesign/source/filter/xml/xmlControlProperty \
+ reportdesign/source/filter/xml/xmlExport \
+ reportdesign/source/filter/xml/xmlExportDocumentHandler \
+ reportdesign/source/filter/xml/xmlfilter \
+ reportdesign/source/filter/xml/xmlFixedContent \
+ reportdesign/source/filter/xml/xmlFormatCondition \
+ reportdesign/source/filter/xml/xmlFormattedField \
+ reportdesign/source/filter/xml/xmlFunction \
+ reportdesign/source/filter/xml/xmlGroup \
+ reportdesign/source/filter/xml/xmlHelper \
+ reportdesign/source/filter/xml/xmlImage \
+ reportdesign/source/filter/xml/xmlImportDocumentHandler \
+ reportdesign/source/filter/xml/xmlMasterFields \
+ reportdesign/source/filter/xml/xmlPropertyHandler \
+ reportdesign/source/filter/xml/xmlReport \
+ reportdesign/source/filter/xml/xmlReportElement \
+ reportdesign/source/filter/xml/xmlReportElementBase \
+ reportdesign/source/filter/xml/xmlSection \
+ reportdesign/source/filter/xml/xmlservices \
+ reportdesign/source/filter/xml/xmlStyleImport \
+ reportdesign/source/filter/xml/xmlSubDocument \
+ reportdesign/source/filter/xml/xmlTable \
+ reportdesign/source/shared/xmlstrings \
+))
+
+# vim: set noet ts=4 sw=4:
diff --git a/reportdesign/Makefile b/reportdesign/Makefile
index 90947b2e5..c898975e5 100644
--- a/reportdesign/Makefile
+++ b/reportdesign/Makefile
@@ -1,8 +1,8 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
diff --git a/reportdesign/Module_reportdesign.mk b/reportdesign/Module_reportdesign.mk
index 71eeb22db..e06ff36c7 100644
--- a/reportdesign/Module_reportdesign.mk
+++ b/reportdesign/Module_reportdesign.mk
@@ -1,46 +1,46 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2011 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.
-#
-#*************************************************************************
-
-$(eval $(call gb_Module_Module,reportdesign))
-
-$(eval $(call gb_Module_add_targets,reportdesign,\
- AllLangResTarget_rpt \
- AllLangResTarget_rptui \
- Library_rpt \
- Library_rptxml \
- Library_rptui \
- Package_uiconfig \
- Package_xml \
-))
-
-# deactivated since sb123;
-# apparently fails because OOo does not find JVM?
-#$(eval $(call gb_Module_add_subsequentcheck_targets,reportdesign,\
- JunitTest_reportdesign_complex \
-))
-
-# vim: set noet ts=4 sw=4:
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_Module_Module,reportdesign))
+
+$(eval $(call gb_Module_add_targets,reportdesign,\
+ AllLangResTarget_rpt \
+ AllLangResTarget_rptui \
+ Library_rpt \
+ Library_rptui \
+ Library_rptxml \
+ Package_uiconfig \
+))
+
+# deactivated since sb123;
+# apparently fails because OOo does not find JVM?
+#$(eval $(call gb_Module_add_subsequentcheck_targets,reportdesign,\
+ JunitTest_reportdesign_complex \
+))
+
+
+# vim: set noet ts=4 sw=4: \ No newline at end of file
diff --git a/reportdesign/Package_uiconfig.mk b/reportdesign/Package_uiconfig.mk
index 89802be51..ac773f044 100644
--- a/reportdesign/Package_uiconfig.mk
+++ b/reportdesign/Package_uiconfig.mk
@@ -1,45 +1,47 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2011 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.
-#
-#*************************************************************************
-
-$(eval $(call gb_Package_Package,reportdesign_uiconfig,$(SRCDIR)/reportdesign/uiconfig))
-
-$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/menubar/menubar.xml,dbreport/menubar/menubar.xml))
-$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/statusbar/statusbar.xml,dbreport/statusbar/statusbar.xml))
-$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/toolbar.xml,dbreport/toolbar/toolbar.xml))
-$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/Formatting.xml,dbreport/toolbar/Formatting.xml))
-$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/alignmentbar.xml,dbreport/toolbar/alignmentbar.xml))
-$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/arrowshapes.xml,dbreport/toolbar/arrowshapes.xml))
-$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/basicshapes.xml,dbreport/toolbar/basicshapes.xml))
-$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/calloutshapes.xml,dbreport/toolbar/calloutshapes.xml))
-$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/drawbar.xml,dbreport/toolbar/drawbar.xml))
-$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/flowchartshapes.xml,dbreport/toolbar/flowchartshapes.xml))
-$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/reportcontrols.xml,dbreport/toolbar/reportcontrols.xml))
-$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/resizebar.xml,dbreport/toolbar/resizebar.xml))
-$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/sectionalignmentbar.xml,dbreport/toolbar/sectionalignmentbar.xml))
-$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/sectionshrinkbar.xml,dbreport/toolbar/sectionshrinkbar.xml))
-$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/starshapes.xml,dbreport/toolbar/starshapes.xml))
-$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/symbolshapes.xml,dbreport/toolbar/symbolshapes.xml))
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# David Tardon, Red Hat Inc. <dtardon@redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_Package_Package,reportdesign_uiconfig,$(SRCDIR)/reportdesign/uiconfig/dbreport))
+
+$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/menubar/menubar.xml,menubar/menubar.xml))
+$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/statusbar/statusbar.xml,statusbar/statusbar.xml))
+$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/alignmentbar.xml,toolbar/alignmentbar.xml))
+$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/arrowshapes.xml,toolbar/arrowshapes.xml))
+$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/basicshapes.xml,toolbar/basicshapes.xml))
+$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/calloutshapes.xml,toolbar/calloutshapes.xml))
+$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/drawbar.xml,toolbar/drawbar.xml))
+$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/flowchartshapes.xml,toolbar/flowchartshapes.xml))
+$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/Formatting.xml,toolbar/Formatting.xml))
+$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/reportcontrols.xml,toolbar/reportcontrols.xml))
+$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/resizebar.xml,toolbar/resizebar.xml))
+$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/sectionalignmentbar.xml,toolbar/sectionalignmentbar.xml))
+$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/sectionshrinkbar.xml,toolbar/sectionshrinkbar.xml))
+$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/starshapes.xml,toolbar/starshapes.xml))
+$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/symbolshapes.xml,toolbar/symbolshapes.xml))
+$(eval $(call gb_Package_add_file,reportdesign_uiconfig,xml/uiconfig/modules/dbreport/toolbar/toolbar.xml,toolbar/toolbar.xml))
+
+# vim: set noet ts=4 sw=4:
diff --git a/reportdesign/inc/ModuleHelper.hxx b/reportdesign/inc/ModuleHelper.hxx
index 4b99e3090..3173fd70d 100644
--- a/reportdesign/inc/ModuleHelper.hxx
+++ b/reportdesign/inc/ModuleHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -98,3 +99,4 @@ namespace rptui
#endif // _RPTUI_MODULE_HELPER_RPT_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/inc/PropertyForward.hxx b/reportdesign/inc/PropertyForward.hxx
index 185c8126c..5a99848ed 100644
--- a/reportdesign/inc/PropertyForward.hxx
+++ b/reportdesign/inc/PropertyForward.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90,3 +91,4 @@ namespace rptui
//........................................................................
#endif // RPTUI_PROPERTYSETFORWARD_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/inc/ReportDefinition.hxx b/reportdesign/inc/ReportDefinition.hxx
index 5459d7bae..4d3363278 100755..100644
--- a/reportdesign/inc/ReportDefinition.hxx
+++ b/reportdesign/inc/ReportDefinition.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,7 +74,7 @@ namespace comphelper
namespace reportdesign
{
class OReportComponentProperties;
- typedef ::comphelper::WeakComponentImplHelper13 < ::com::sun::star::report::XReportDefinition
+ typedef ::comphelper::PartialWeakComponentImplHelper13 < ::com::sun::star::report::XReportDefinition
, ::com::sun::star::document::XEventBroadcaster
, ::com::sun::star::lang::XServiceInfo
, ::com::sun::star::frame::XModule
@@ -412,3 +413,4 @@ namespace reportdesign
// =============================================================================
#endif // REPORTDESIGN_API_REPORTDEFINITION_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/inc/ReportHelperDefines.hxx b/reportdesign/inc/ReportHelperDefines.hxx
index a5d63bb33..8f1090efd 100644
--- a/reportdesign/inc/ReportHelperDefines.hxx
+++ b/reportdesign/inc/ReportHelperDefines.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -193,3 +194,4 @@
#endif // INCLUDED_REPORTHELPERDEFINES_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/inc/ReportVisitor.hxx b/reportdesign/inc/ReportVisitor.hxx
index 2aa6920ba..1496542c7 100644
--- a/reportdesign/inc/ReportVisitor.hxx
+++ b/reportdesign/inc/ReportVisitor.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,4 @@ namespace reportdesign
// =============================================================================
#endif // INCLUDED_REPORT_VISTITOR_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/inc/RptDef.hxx b/reportdesign/inc/RptDef.hxx
index 5d6d35ec5..fae60c6a7 100644
--- a/reportdesign/inc/RptDef.hxx
+++ b/reportdesign/inc/RptDef.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118,3 +119,5 @@ template<typename T> void setStyleProperty(const ::com::sun::star::uno::Referenc
}
#endif // _REPORT_RPTUIDEF_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/inc/RptModel.hxx b/reportdesign/inc/RptModel.hxx
index d54c1fa1a..0f07d39c4 100644
--- a/reportdesign/inc/RptModel.hxx
+++ b/reportdesign/inc/RptModel.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,7 +71,7 @@ public:
virtual ~OReportModel();
virtual void SetChanged(sal_Bool bFlg = sal_True);
- virtual SdrPage* AllocPage(FASTBOOL bMasterPage);
+ virtual SdrPage* AllocPage(bool bMasterPage);
virtual Window* GetCurDocViewWin();
virtual SdrPage* RemovePage(sal_uInt16 nPgNum);
/** returns the numbering type that is used to format page fields in drawing shapes */
@@ -101,3 +102,4 @@ public:
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/inc/RptObject.hxx b/reportdesign/inc/RptObject.hxx
index ef40c4dd9..d58950be1 100644
--- a/reportdesign/inc/RptObject.hxx
+++ b/reportdesign/inc/RptObject.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -160,7 +161,7 @@ protected:
virtual void NbcMove( const Size& rSize );
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
virtual void NbcSetLogicRect(const Rectangle& rRect);
- virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd);
+ virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd);
virtual void SetSnapRectImpl(const Rectangle& _rRect);
virtual SdrPage* GetImplPage() const;
@@ -203,7 +204,7 @@ protected:
virtual void NbcMove( const Size& rSize );
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
virtual void NbcSetLogicRect(const Rectangle& rRect);
- virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd);
+ virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd);
virtual void SetSnapRectImpl(const Rectangle& _rRect);
virtual SdrPage* GetImplPage() const;
@@ -220,7 +221,7 @@ public:
virtual sal_uInt16 GetObjIdentifier() const;
virtual sal_uInt32 GetObjInventor() const;
// Clone() soll eine komplette Kopie des Objektes erzeugen.
- virtual SdrObject* Clone() const;
+ virtual OOle2Obj* Clone() const;
virtual void initializeOle();
void initializeChart( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>& _xModel);
@@ -249,7 +250,7 @@ protected:
virtual void NbcMove( const Size& rSize );
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
virtual void NbcSetLogicRect(const Rectangle& rRect);
- virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd);
+ virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd);
virtual void SetSnapRectImpl(const Rectangle& _rRect);
virtual SdrPage* GetImplPage() const;
@@ -272,7 +273,7 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoShape();
virtual sal_uInt16 GetObjIdentifier() const;
virtual sal_uInt32 GetObjInventor() const;
- virtual SdrObject* Clone() const;
+ virtual OUnoObject* Clone() const;
private:
void impl_setReportComponent_nothrow();
@@ -284,3 +285,4 @@ private:
//============================================================================
#endif // _REPORT_RPTUIOBJ_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/inc/RptPage.hxx b/reportdesign/inc/RptPage.hxx
index 1724ae05c..891414d64 100644
--- a/reportdesign/inc/RptPage.hxx
+++ b/reportdesign/inc/RptPage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,6 @@ namespace rptui
//============================================================================
class OReportModel;
-//class OReportSection;
class REPORTDESIGN_DLLPUBLIC OReportPage : public SdrPage
{
@@ -63,7 +63,7 @@ public:
OReportPage( OReportModel& rModel
,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
- ,FASTBOOL bMasterPage=sal_False );
+ ,bool bMasterPage = false );
virtual SdrPage* Clone() const;
@@ -96,3 +96,5 @@ public:
};
}
#endif //_REPORT_RPTUIPAGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/inc/RptResId.hrc b/reportdesign/inc/RptResId.hrc
index 1fecb7569..62be3d1dc 100644
--- a/reportdesign/inc/RptResId.hrc
+++ b/reportdesign/inc/RptResId.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -234,7 +234,6 @@
#define RID_STR_PARAADJUST (RID_STRING_START + 161)
-// #define RID_STR_ (RID_STRING_START + 130)
// -----------------------------------------------------------------------
#define RID_PAGEDIALOG_PAGE ( RID_PAGE_START + 1 )
#define RID_PAGEDIALOG_BACKGROUND ( RID_PAGE_START + 2 )
@@ -251,8 +250,6 @@
// -----------------------------------------------------------------------
#define RID_IMG_TREENODE_COLLAPSED ( RID_IMAGE_START + 1 )
#define RID_IMG_TREENODE_EXPANDED ( RID_IMAGE_START + 2 )
-#define RID_IMG_TREENODE_COLLAPSED_HC ( RID_IMAGE_START + 3 )
-#define RID_IMG_TREENODE_EXPANDED_HC ( RID_IMAGE_START + 4 )
#define REPORT_TREE_ICON ( RID_IMAGE_START + 5 )
// menu -----------------------------------------------------------------------
#define RID_MENU_REPORT ( RID_MENU_START + 0 )
@@ -262,17 +259,16 @@
// image lists -----------------------------------------------------------------------
#define IMG_CONDFORMAT_DLG_SC (RID_IMAGELIST_START + 0)
-#define IMG_CONDFORMAT_DLG_SCH (RID_IMAGELIST_START + 1)
+// free
#define IMG_CONDFORMAT_DLG_LC (RID_IMAGELIST_START + 2)
-#define IMG_CONDFORMAT_DLG_LCH (RID_IMAGELIST_START + 3)
+// free
#define RID_SVXIMGLIST_RPTEXPL (RID_IMAGELIST_START + 4)
-#define RID_SVXIMGLIST_RPTEXPL_HC (RID_IMAGELIST_START + 5)
#define IMGLST_GROUPSORT_DLG_SC (RID_IMAGELIST_START + 6)
-#define IMGLST_GROUPSORT_DLG_SCH (RID_IMAGELIST_START + 7)
+// free
#define IMG_ADDFIELD_DLG_SC (RID_IMAGELIST_START + 8)
-#define IMG_ADDFIELD_DLG_SCH (RID_IMAGELIST_START + 9)
+// free
#define IMG_ADDFIELD_DLG_LC (RID_IMAGELIST_START + 10)
-#define IMG_ADDFIELD_DLG_LCH (RID_IMAGELIST_START + 11)
+// free
#define ADDFIELD_FL_HELP_SEPARATOR (RID_IMAGELIST_START + 12)
#define ADDFIELD_HELP_FIELD (RID_IMAGELIST_START + 13)
diff --git a/reportdesign/inc/UndoActions.hxx b/reportdesign/inc/UndoActions.hxx
index a369f5889..908741e1e 100644
--- a/reportdesign/inc/UndoActions.hxx
+++ b/reportdesign/inc/UndoActions.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -330,3 +331,4 @@ namespace rptui
}
#endif //RPTUI_UNDOACTIONS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/inc/UndoEnv.hxx b/reportdesign/inc/UndoEnv.hxx
index 6d3ced2bb..a2b160907 100644
--- a/reportdesign/inc/UndoEnv.hxx
+++ b/reportdesign/inc/UndoEnv.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -148,3 +149,4 @@ namespace rptui
}
#endif //
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/inc/conditionalexpression.hxx b/reportdesign/inc/conditionalexpression.hxx
index b60a6203f..2580a44d5 100644
--- a/reportdesign/inc/conditionalexpression.hxx
+++ b/reportdesign/inc/conditionalexpression.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -121,3 +122,5 @@ namespace rptui
//........................................................................
#endif // CONDITIONALEXPRESSION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/inc/dllapi.h b/reportdesign/inc/dllapi.h
index bb5bc2637..a64a26e84 100644
--- a/reportdesign/inc/dllapi.h
+++ b/reportdesign/inc/dllapi.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,3 +40,4 @@
#endif /* INCLUDED_REPORTDESIGNDLLAPI_H */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/inc/pch/precompiled_reportdesign.cxx b/reportdesign/inc/pch/precompiled_reportdesign.cxx
index 7efa434c6..c52af4709 100644
--- a/reportdesign/inc/pch/precompiled_reportdesign.cxx
+++ b/reportdesign/inc/pch/precompiled_reportdesign.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,3 +28,4 @@
#include "precompiled_reportdesign.hxx"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/inc/pch/precompiled_reportdesign.hxx b/reportdesign/inc/pch/precompiled_reportdesign.hxx
index 30f208343..508d26098 100644
--- a/reportdesign/inc/pch/precompiled_reportdesign.hxx
+++ b/reportdesign/inc/pch/precompiled_reportdesign.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#ifdef PRECOMPILED_HEADERS
#include "com/sun/star/sdb/CommandType.hpp"
-//#include "com/sun/star/chart2/data/DatabaseDataProvider.hpp"
#include "com/sun/star/chart2/data/XDataReceiver.hpp"
#include "com/sun/star/reflection/XProxyFactory.hpp"
#include "com/sun/star/sdb/CommandType.hpp"
@@ -72,3 +72,5 @@
#include "xmloff/xmltkmap.hxx"
#include "xmloff/xmlnmspe.hxx"
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/inc/reportformula.hxx b/reportdesign/inc/reportformula.hxx
index 0f34073e8..b7561e916 100644
--- a/reportdesign/inc/reportformula.hxx
+++ b/reportdesign/inc/reportformula.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,7 +89,7 @@ namespace rptui
If the formula denotes an expression, then the <em>undecorated content</em> is the expression
itself.
*/
- const ::rtl::OUString& getUndecoratedContent() const;// { return m_sUndecoratedContent; }
+ const ::rtl::OUString& getUndecoratedContent() const;
/// convenience alias for <code>getUndecoratedContent</code>, which asserts (in a non-product build) when used on an expression
inline ::rtl::OUString getFieldName() const;
@@ -132,3 +133,5 @@ namespace rptui
//........................................................................
#endif // REPORTFORMULA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/prj/build.lst b/reportdesign/prj/build.lst
index ebbef11ac..c08517e01 100644
--- a/reportdesign/prj/build.lst
+++ b/reportdesign/prj/build.lst
@@ -1,2 +1,3 @@
-rd reportdesign : L10N:l10n BOOST:boost comphelper dbaccess formula LIBXSLT:libxslt NULL
+rd reportdesign : TRANSLATIONS:translations BOOST:boost comphelper dbaccess formula LIBXSLT:libxslt NULL
rd reportdesign\prj nmake - all rd_prj NULL
+rd reportdesign\prj nmake - all rd_prj NULL
diff --git a/reportdesign/prj/makefile.mk b/reportdesign/prj/makefile.mk
deleted file mode 100644
index 88cd9dfe0..000000000
--- a/reportdesign/prj/makefile.mk
+++ /dev/null
@@ -1,40 +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=..
-TARGET=prj
-
-.INCLUDE : settings.mk
-
-.IF "$(VERBOSE)"!=""
-VERBOSEFLAG :=
-.ELSE
-VERBOSEFLAG := -s
-.ENDIF
-
-all:
- cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java b/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java
index 446efacef..5238edf92 100755..100644
--- a/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java
+++ b/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java
@@ -47,9 +47,6 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface;
import com.sun.star.util.XCloseable;
-// import util.BasicMacroTools;
-// import util.DesktopTools;
-// import util.dbg;
// import complexlib.ComplexTestCase;
// import util.utils;
import helper.OfficeProvider;
@@ -58,24 +55,6 @@ import helper.URLHelper;
import convwatch.DB;
-// import java.util.Date;
-// import java.text.SimpleDateFormat;
-// import java.text.ParsePosition;
-// import java.sql.Time;
-//
-// import java.io.BufferedReader;
-// import java.io.File;
-// import java.io.FileReader;
-// import java.io.IOException;
-// import java.io.FilenameFilter;
-//
-// import java.util.Vector;
-//
-// import helper.AppProvider;
-// import java.text.DecimalFormat;
-// import util.DynamicClassLoader;
-// import java.util.StringTokenizer;
-
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
@@ -84,7 +63,6 @@ import org.junit.Test;
import org.openoffice.test.OfficeConnection;
import static org.junit.Assert.*;
-
class PropertySetHelper
{
XPropertySet m_xPropertySet;
@@ -295,18 +273,12 @@ public class ReportDesignerTest
m_sUPDMinor = System.getProperty("UPDMINOR");
m_sCWS_WORK_STAMP = System.getProperty("CWS_WORK_STAMP");
- // createDBEntry();
System.out.println("Current CWS: " + m_sCWS_WORK_STAMP);
System.out.println("Current MWS: " + m_sUPDMinor);
- // System.exit(1);
-
// sAppExecutionCommand = sAppExecutionCommand.replaceAll( "\\$\\{USERNAME\\}", sUser);
// System.out.println("sAppExecutionCommand='" + sAppExecutionCommand + "'");
//
- // an other way to replace strings
- // sAppExecutionCommand = utils.replaceAll13(sAppExecutionCommand, "${USERNAME}", sUser);
-
// checkIfOfficeExists(sAppExecutionCommand);
// param.put("AppExecutionCommand", new String(sAppExecutionCommand));
@@ -347,15 +319,6 @@ public class ReportDesignerTest
System.out.println("Load done");
assertNotNull("Can't load document ", xDocComponent);
- // context = createUnoService("com.sun.star.sdb.DatabaseContext")
-// oDataBase = context.getByName("hh")
-// oDBDoc = oDataBase.DatabaseDocument
-//
-// dim args(1) as new com.sun.star.beans.PropertyValue
-// args(0).Name = "ActiveConnection"
-// args(0).Value = oDBDoc.getCurrentController().getPropertyValue("ActiveConnection")
-// reportContainer = oDBDoc.getReportDocuments()
-// report = reportContainer.loadComponentFromURL("Report40","",0,args)
try
{
@@ -366,47 +329,26 @@ public class ReportDesignerTest
XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, x);
showElements(xNameAccess);
Object aObj = xNameAccess.getByName(sFileURL);
-// System.out.println("1");
- // PropertySetHelper aHelper = new PropertySetHelper(aObj);
XDocumentDataSource xDataSource = UnoRuntime.queryInterface(XDocumentDataSource.class, aObj);
-// Object aDatabaseDocmuent = aHelper.getPropertyValueAsObject("DatabaseDocument");
XOfficeDatabaseDocument xOfficeDBDoc = xDataSource.getDatabaseDocument();
- // XOfficeDatabaseDocument xOfficeDBDoc = (XOfficeDatabaseDocument)UnoRuntime.queryInterface(XOfficeDatabaseDocument.class, aDatabaseDocument);
assertNotNull("can't access DatabaseDocument", xOfficeDBDoc);
-// System.out.println("2");
XModel xDBSource = UnoRuntime.queryInterface(XModel.class, xOfficeDBDoc);
Object aController = xDBSource.getCurrentController();
assertNotNull("Controller of xOfficeDatabaseDocument is empty!", aController);
-// System.out.println("3");
XDatabaseDocumentUI aDBDocUI = UnoRuntime.queryInterface(XDatabaseDocumentUI.class, aController);
/* boolean isConnect = */
// TODO: throws an exception in DEV300m78
aDBDocUI.connect();
-// if (isConnect)
-// {
-// System.out.println("true");
-// }
-// else
-// {
-// System.out.println("false");
-// }
-// System.out.println("4");
-
- // aHelper = new PropertySetHelper(aController);
-
- // Object aActiveConnectionObj = aHelper.getPropertyValueAsObject("ActiveConnection");
Object aActiveConnectionObj = aDBDocUI.getActiveConnection();
assertNotNull("ActiveConnection is empty", aActiveConnectionObj);
-// System.out.println("5");
XReportDocumentsSupplier xSupplier = UnoRuntime.queryInterface(XReportDocumentsSupplier.class, xOfficeDBDoc);
xNameAccess = xSupplier.getReportDocuments();
assertNotNull("xOfficeDatabaseDocument returns no Report Document", xNameAccess);
-// System.out.println("5");
showElements(xNameAccess);
@@ -425,11 +367,6 @@ public class ReportDesignerTest
fail("ERROR: Exception caught" + e.getMessage());
}
- // String mTestDocumentPath = (String) param.get("TestDocumentPath");
- // System.out.println("mTestDocumentPath: '" + mTestDocumentPath + "'");
- // // workaround for issue using deprecated "DOCPTH" prop
- // System.setProperty("DOCPTH", mTestDocumentPath);
-
// Close the document
closeComponent(xDocComponent);
}
@@ -462,8 +399,6 @@ public class ReportDesignerTest
// sDestinationVersion, sDestinationName, sDestinationCreatorType,
// sDocumentPoolDir, sDocumentPoolName, m_sMailAddress,
// sSpecial);
- // DB.test();
- // System.exit(1);
}
private void loadAndStoreReports(XNameAccess _xNameAccess, ArrayList _aPropertyList, int _nType)
@@ -527,9 +462,6 @@ public class ReportDesignerTest
sOutputPath += "tmp_123";
sOutputPath += System.getProperty("file.separator");
- // sOutputPath += getFileFormat(_nType);
- // sOutputPath += System.getProperty("file.separator");
-
File aOutputFile = new File(sOutputPath); // create the directory of the given output path
aOutputFile.mkdirs();
diff --git a/reportdesign/qa/complex/reportdesign/test_documents/RPTCalcTests.odb b/reportdesign/qa/complex/reportdesign/test_documents/RPTCalcTests.odb
index 0e91d633d..0e91d633d 100755..100644
--- a/reportdesign/qa/complex/reportdesign/test_documents/RPTCalcTests.odb
+++ b/reportdesign/qa/complex/reportdesign/test_documents/RPTCalcTests.odb
Binary files differ
diff --git a/reportdesign/qa/complex/reportdesign/test_documents/RPTWriterTests.odb b/reportdesign/qa/complex/reportdesign/test_documents/RPTWriterTests.odb
index 7099b1abf..7099b1abf 100755..100644
--- a/reportdesign/qa/complex/reportdesign/test_documents/RPTWriterTests.odb
+++ b/reportdesign/qa/complex/reportdesign/test_documents/RPTWriterTests.odb
Binary files differ
diff --git a/reportdesign/source/core/api/FixedLine.cxx b/reportdesign/source/core/api/FixedLine.cxx
index 2d9d3a2cc..2cd1c8eb6 100644
--- a/reportdesign/source/core/api/FixedLine.cxx
+++ b/reportdesign/source/core/api/FixedLine.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,8 @@
#include "precompiled_reportdesign.hxx"
#include "FixedLine.hxx"
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#ifndef REPORTDESIGN_SHARED_CORESTRINGS_HRC
#include "corestrings.hrc"
-#endif
-#ifndef REPORTDESIGN_CORE_RESOURCE_HRC_
#include "core_resource.hrc"
-#endif
#include "core_resource.hxx"
#include <comphelper/sequence.hxx>
#include <tools/debug.hxx>
@@ -138,7 +135,7 @@ uno::Sequence< ::rtl::OUString > lcl_getLineOptionals()
};
- return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0]));
+ return uno::Sequence< ::rtl::OUString >(pProps,SAL_N_ELEMENTS(pProps));
}
DBG_NAME(rpt_OFixedLine)
// -----------------------------------------------------------------------------
@@ -192,7 +189,7 @@ OFixedLine::OFixedLine(uno::Reference< uno::XComponentContext > const & _xContex
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"OFixedLine::OFixedLine: Exception caught!");
+ OSL_FAIL("OFixedLine::OFixedLine: Exception caught!");
}
osl_decrementInterlockedCount( &m_refCount );
}
@@ -202,7 +199,6 @@ OFixedLine::~OFixedLine()
DBG_DTOR(rpt_OFixedLine,NULL);
}
// -----------------------------------------------------------------------------
-//IMPLEMENT_FORWARD_XINTERFACE2(OFixedLine,FixedLineBase,FixedLinePropertySet)
IMPLEMENT_FORWARD_REFCOUNT( OFixedLine, FixedLineBase )
// --------------------------------------------------------------------------------
uno::Any SAL_CALL OFixedLine::queryInterface( const uno::Type& _rType ) throw (uno::RuntimeException)
@@ -584,3 +580,4 @@ void SAL_CALL OFixedLine::setPrintRepeatedValues( ::sal_Bool /*_printrepeatedval
} // namespace reportdesign
// =============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/FixedText.cxx b/reportdesign/source/core/api/FixedText.cxx
index 0dc4d8cc3..ef46c2db4 100644
--- a/reportdesign/source/core/api/FixedText.cxx
+++ b/reportdesign/source/core/api/FixedText.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,13 +28,9 @@
#include "precompiled_reportdesign.hxx"
#include "FixedText.hxx"
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#ifndef REPORTDESIGN_SHARED_CORESTRINGS_HRC
#include "corestrings.hrc"
-#endif
#include <com/sun/star/beans/XPropertyState.hpp>
-#ifndef REPORTDESIGN_CORE_RESOURCE_HRC_
#include "core_resource.hrc"
-#endif
#include "core_resource.hxx"
#include <comphelper/sequence.hxx>
#include "Tools.hxx"
@@ -51,7 +48,7 @@ namespace reportdesign
uno::Sequence< ::rtl::OUString > lcl_getFixedTextOptionals()
{
::rtl::OUString pProps[] = { PROPERTY_DATAFIELD,PROPERTY_MASTERFIELDS,PROPERTY_DETAILFIELDS };
- return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0]));
+ return uno::Sequence< ::rtl::OUString >(pProps,SAL_N_ELEMENTS(pProps));
}
DBG_NAME( rpt_OFixedText )
// -----------------------------------------------------------------------------
@@ -101,7 +98,6 @@ uno::Any SAL_CALL OFixedText::queryInterface( const uno::Type& _rType ) throw (u
return aReturn.hasValue() ? aReturn : (m_aProps.aComponent.m_xProxy.is() ? m_aProps.aComponent.m_xProxy->queryAggregation(_rType) : aReturn);
}
-//IMPLEMENT_FORWARD_XINTERFACE2(OFixedText,FixedTextBase,FixedTextPropertySet)
// -----------------------------------------------------------------------------
void SAL_CALL OFixedText::dispose() throw(uno::RuntimeException)
{
@@ -123,9 +119,8 @@ void SAL_CALL OFixedText::dispose() throw(uno::RuntimeException)
//--------------------------------------------------------------------------
uno::Sequence< ::rtl::OUString > OFixedText::getSupportedServiceNames_Static( ) throw(uno::RuntimeException)
{
- uno::Sequence< ::rtl::OUString > aServices(1);//2);
+ uno::Sequence< ::rtl::OUString > aServices(1);
aServices.getArray()[0] = SERVICE_FIXEDTEXT;
- //aServices.getArray()[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.FixedText"));
return aServices;
}
@@ -346,3 +341,4 @@ void SAL_CALL OFixedText::setSize( const awt::Size& aSize ) throw (beans::Proper
} // namespace reportdesign
// =============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/FormatCondition.cxx b/reportdesign/source/core/api/FormatCondition.cxx
index 640f1bef5..fcdba509a 100644
--- a/reportdesign/source/core/api/FormatCondition.cxx
+++ b/reportdesign/source/core/api/FormatCondition.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -163,3 +164,5 @@ REPORTCONTROLFORMAT_IMPL(OFormatCondition,m_aFormatProperties)
// =============================================================================
} // namespace reportdesign
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/FormattedField.cxx b/reportdesign/source/core/api/FormattedField.cxx
index 9b8bc8b41..07200ae22 100644
--- a/reportdesign/source/core/api/FormattedField.cxx
+++ b/reportdesign/source/core/api/FormattedField.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,12 +29,8 @@
#include "FormattedField.hxx"
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
-#ifndef REPORTDESIGN_SHARED_CORESTRINGS_HRC
#include "corestrings.hrc"
-#endif
-#ifndef REPORTDESIGN_CORE_RESOURCE_HRC_
#include "core_resource.hrc"
-#endif
#include "core_resource.hxx"
#include <comphelper/sequence.hxx>
#include <tools/debug.hxx>
@@ -58,7 +55,7 @@ uno::Reference< uno::XInterface > OFormattedField::create(uno::Reference< uno::X
uno::Sequence< ::rtl::OUString > lcl_getFormattedFieldOptionals()
{
::rtl::OUString pProps[] = { PROPERTY_MASTERFIELDS,PROPERTY_DETAILFIELDS };
- return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0]));
+ return uno::Sequence< ::rtl::OUString >(pProps,SAL_N_ELEMENTS(pProps));
}
DBG_NAME( rpt_OFormattedField )
// -----------------------------------------------------------------------------
@@ -95,7 +92,6 @@ OFormattedField::~OFormattedField()
DBG_DTOR( rpt_OFormattedField,NULL);
}
// -----------------------------------------------------------------------------
-//IMPLEMENT_FORWARD_XINTERFACE2(OFormattedField,FormattedFieldBase,FormattedFieldPropertySet)
IMPLEMENT_FORWARD_REFCOUNT( OFormattedField, FormattedFieldBase )
// --------------------------------------------------------------------------------
uno::Any SAL_CALL OFormattedField::queryInterface( const uno::Type& _rType ) throw (uno::RuntimeException)
@@ -386,3 +382,5 @@ void SAL_CALL OFormattedField::setSize( const awt::Size& aSize ) throw (beans::P
// =============================================================================
} // namespace reportdesign
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/Function.cxx b/reportdesign/source/core/api/Function.cxx
index 43280b0a9..3eb66b325 100644
--- a/reportdesign/source/core/api/Function.cxx
+++ b/reportdesign/source/core/api/Function.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#include "precompiled_reportdesign.hxx"
#include "Function.hxx"
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#ifndef REPORTDESIGN_SHARED_CORESTRINGS_HRC
#include "corestrings.hrc"
-#endif
#include <tools/debug.hxx>
#include <connectivity/dbtools.hxx>
#include <comphelper/sequence.hxx>
@@ -221,3 +220,5 @@ void SAL_CALL OFunction::setParent( const uno::Reference< uno::XInterface >& Par
// =============================================================================
} // namespace reportdesign
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/Functions.cxx b/reportdesign/source/core/api/Functions.cxx
index 1373186ea..9707736db 100644
--- a/reportdesign/source/core/api/Functions.cxx
+++ b/reportdesign/source/core/api/Functions.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include "Function.hxx"
#include <tools/debug.hxx>
#include "core_resource.hxx"
-#ifndef REPORTDESIGN_CORE_RESOURCE_HRC_
#include "core_resource.hrc"
-#endif
#include <comphelper/property.hxx>
#include <boost/bind.hpp>
#include <algorithm>
@@ -113,7 +112,7 @@ void SAL_CALL OFunctions::removeByIndex( ::sal_Int32 Index ) throw (lang::IndexO
{
uno::Reference< report::XFunction > xFunction;
{
- ::osl::MutexGuard aGuard(m_aMutex);
+ ::osl::MutexGuard aGuard(m_aMutex);
checkIndex(Index);
TFunctions::iterator aPos = m_aFunctions.begin();
::std::advance(aPos,Index);
@@ -203,3 +202,5 @@ void OFunctions::checkIndex(sal_Int32 _nIndex)
// =============================================================================
}
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/Group.cxx b/reportdesign/source/core/api/Group.cxx
index 4253b8d50..e3a8a39d6 100644
--- a/reportdesign/source/core/api/Group.cxx
+++ b/reportdesign/source/core/api/Group.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,12 +31,8 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/report/GroupOn.hpp>
#include <com/sun/star/report/KeepTogether.hpp>
-#ifndef REPORTDESIGN_SHARED_CORESTRINGS_HRC
#include "corestrings.hrc"
-#endif
-#ifndef REPORTDESIGN_CORE_RESOURCE_HRC_
#include "core_resource.hrc"
-#endif
#include "core_resource.hxx"
#include "Tools.hxx"
#include <tools/debug.hxx>
@@ -80,13 +77,13 @@ void OGroup::copyGroup(const uno::Reference< report::XGroup >& _xSource)
{
setHeaderOn(sal_True);
OSection::lcl_copySection(_xSource->getHeader(),m_xHeader);
- } // if ( _xSource->getHeaderOn() )
+ }
if ( _xSource->getFooterOn() )
{
setFooterOn(sal_True);
OSection::lcl_copySection(_xSource->getFooter(),m_xFooter);
- } // if ( _xSource->getFooterOn() )
+ }
}
//--------------------------------------------------------------------------
IMPLEMENT_FORWARD_XINTERFACE2(OGroup,GroupBase,GroupPropertySet)
@@ -125,8 +122,6 @@ void SAL_CALL OGroup::disposing()
{
m_xHeader.clear();
m_xFooter.clear();
- //::comphelper::disposeComponent(m_xHeader);
- //::comphelper::disposeComponent(m_xFooter);
::comphelper::disposeComponent(m_xFunctions);
m_xContext.clear();
}
@@ -154,8 +149,6 @@ void SAL_CALL OGroup::setHeaderOn( ::sal_Bool _headeron ) throw (uno::RuntimeExc
if ( _headeron != m_xHeader.is() )
{
::rtl::OUString sName(RPT_RESSTRING(RID_STR_GROUP_HEADER,m_xContext->getServiceManager()));
- /*const ::rtl::OUString sPlaceHolder(RTL_CONSTASCII_USTRINGPARAM("%1"));
- sName = sName.replaceAt(sName.indexOf(sPlaceHolder),sPlaceHolder.getLength(),m_aProps.m_sExpression);*/
setSection(PROPERTY_HEADERON,_headeron,sName,m_xHeader);
}
}
@@ -171,8 +164,6 @@ void SAL_CALL OGroup::setFooterOn( ::sal_Bool _footeron ) throw (uno::RuntimeExc
if ( _footeron != m_xFooter.is() )
{
::rtl::OUString sName(RPT_RESSTRING(RID_STR_GROUP_FOOTER,m_xContext->getServiceManager()));
- /*const ::rtl::OUString sPlaceHolder(RTL_CONSTASCII_USTRINGPARAM("%1"));
- sName = sName.replaceAt(sName.indexOf(sPlaceHolder),sPlaceHolder.getLength(),m_aProps.m_sExpression);*/
setSection(PROPERTY_FOOTERON,_footeron,sName,m_xFooter);
}
}
@@ -298,7 +289,6 @@ void SAL_CALL OGroup::setParent( const uno::Reference< uno::XInterface >& /*Pare
// -----------------------------------------------------------------------------
uno::Reference< beans::XPropertySetInfo > SAL_CALL OGroup::getPropertySetInfo( ) throw(uno::RuntimeException)
{
- // return uno::Reference< beans::XPropertySetInfo >();
return GroupPropertySet::getPropertySetInfo();
}
// -----------------------------------------------------------------------------
@@ -356,3 +346,4 @@ uno::Reference< report::XFunctions > SAL_CALL OGroup::getFunctions() throw (uno:
} // namespace reportdesign
// =============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/Groups.cxx b/reportdesign/source/core/api/Groups.cxx
index e2af4206c..9a1753bc0 100644
--- a/reportdesign/source/core/api/Groups.cxx
+++ b/reportdesign/source/core/api/Groups.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include "Group.hxx"
#include <tools/debug.hxx>
#include "core_resource.hxx"
-#ifndef REPORTDESIGN_CORE_RESOURCE_HRC_
#include "core_resource.hrc"
-#endif
#include <boost/bind.hpp>
#include <algorithm>
// =============================================================================
@@ -61,12 +60,12 @@ void OGroups::copyGroups(const uno::Reference< report::XGroups >& _xSource)
{
sal_Int32 nCount = _xSource->getCount();
for (sal_Int32 i = 0; i != nCount; ++i)
- {
+ {
OGroup* pGroup = new OGroup(this,m_xContext);
m_aGroups.push_back(pGroup);
uno::Reference<report::XGroup> xGroup(_xSource->getByIndex(i),uno::UNO_QUERY);
pGroup->copyGroup(xGroup);
- }
+ }
}
// -----------------------------------------------------------------------------
void SAL_CALL OGroups::dispose() throw(uno::RuntimeException)
@@ -216,3 +215,5 @@ void OGroups::checkIndex(sal_Int32 _nIndex)
// =============================================================================
}
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/ImageControl.cxx b/reportdesign/source/core/api/ImageControl.cxx
index 5adc09964..99eb0b539 100644
--- a/reportdesign/source/core/api/ImageControl.cxx
+++ b/reportdesign/source/core/api/ImageControl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -117,7 +118,7 @@ uno::Sequence< ::rtl::OUString > lcl_getImageOptionals()
, PROPERTY_CHARLOCALECOMPLEX
};
- return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0]));
+ return uno::Sequence< ::rtl::OUString >(pProps,SAL_N_ELEMENTS(pProps));
}
DBG_NAME( rpt_OImageControl )
@@ -218,7 +219,6 @@ sal_Bool SAL_CALL OImageControl::supportsService(const ::rtl::OUString& ServiceN
REPORTCOMPONENT_IMPL(OImageControl,m_aProps.aComponent)
REPORTCOMPONENT_IMPL2(OImageControl,m_aProps.aComponent)
REPORTCOMPONENT_NOMASTERDETAIL(OImageControl)
-//REPORTCONTROLFORMAT_IMPL(OImageControl,m_aProps.aFormatProperties)
NO_REPORTCONTROLFORMAT_IMPL(OImageControl)
::rtl::OUString SAL_CALL OImageControl::getHyperLinkURL() throw (uno::RuntimeException, beans::UnknownPropertyException)
{
@@ -500,3 +500,4 @@ void SAL_CALL OImageControl::setPreserveIRI( ::sal_Bool _preserveiri ) throw (un
} // namespace reportdesign
// =============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/ReportComponent.cxx b/reportdesign/source/core/api/ReportComponent.cxx
index 49e1b5e2c..ca7f2c13e 100644
--- a/reportdesign/source/core/api/ReportComponent.cxx
+++ b/reportdesign/source/core/api/ReportComponent.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,7 +56,7 @@ void lcl_getDefaultFonts( Font& rLatinFont, Font& rCJKFont, Font& rCTLFont,Langu
{
LanguageType eLatin = _eLatin;
- // #108374# / #107782#: If the UI language is Korean, the default Latin font has to
+ // If the UI language is Korean, the default Latin font has to
// be queried for Korean, too (the Latin language from the document can't be Korean).
// This is the same logic as in SwDocShell::InitNew.
LanguageType eUiLanguage = Application::GetSettings().GetUILanguage();
@@ -115,7 +116,6 @@ OFormatProperties::OFormatProperties()
}
aFontDescriptor.Weight = awt::FontWeight::NORMAL;
aFontDescriptor.CharacterWidth = awt::FontWidth::NORMAL;
- // aCharLocale = SvtSysLocale().GetLocaleData().getLocale();
}
// -----------------------------------------------------------------------------
void OReportComponentProperties::setShape(uno::Reference< drawing::XShape >& _xShape,const uno::Reference< report::XReportComponent>& _xTunnel,oslInterlockedCount& _rRefCount)
@@ -150,3 +150,4 @@ OReportComponentProperties::~OReportComponentProperties()
// =============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/ReportControlModel.cxx b/reportdesign/source/core/api/ReportControlModel.cxx
index 1c946ed2c..f3f1011de 100644
--- a/reportdesign/source/core/api/ReportControlModel.cxx
+++ b/reportdesign/source/core/api/ReportControlModel.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,7 +86,6 @@ void OReportControlModel::insertByIndex( ::sal_Int32 Index, const uno::Any& Elem
if ( Index > static_cast<sal_Int32>(m_aFormatConditions.size()) )
throw lang::IndexOutOfBoundsException();
- //m_aFormatConditions.resize(m_aFormatConditions.size() + 1);
m_aFormatConditions.insert(m_aFormatConditions.begin() + Index,xElement);
}
@@ -157,3 +157,4 @@ bool OReportControlModel::isInterfaceForbidden(const uno::Type& _rType)
// -----------------------------------------------------------------------------
} // reportdesign
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 6d70a24a0..5ebf76f4f 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -122,7 +123,6 @@
#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>
@@ -243,8 +243,7 @@ void lcl_extractAndStartStatusIndicator( const ::comphelper::MediaDescriptor& _r
}
catch( const uno::Exception& )
{
- OSL_ENSURE( sal_False, "lcl_extractAndStartStatusIndicator: caught an exception!" );
-// DBG_UNHANDLED_EXCEPTION();
+ OSL_FAIL( "lcl_extractAndStartStatusIndicator: caught an exception!" );
}
}
// -----------------------------------------------------------------------------
@@ -323,30 +322,23 @@ OStyle::OStyle()
registerPropertyNoMember( PROPERTY_NAME, ++i,nBound,::getCppuType( static_cast< ::rtl::OUString *>(NULL) ), &sName );
registerPropertyNoMember(PROPERTY_BACKCOLOR, ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nTransparent);
- //registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_GRAPHICFILT), ++i,nBound,::getCppuType((const ::rtl::OUString*)0) ,&sEmpty);
registerPropertyNoMember(PROPERTY_BACKGRAPHICLOCATION, ++i,nBound,::getCppuType((const style::GraphicLocation*)0) ,&eGraphicLocation);
- //registerPropertyNoMember(PROPERTY_BACKGRAPHICURL, ++i,nBound,::getCppuType((const ::rtl::OUString*)0) ,&sEmpty);
registerPropertyNoMember(PROPERTY_BACKTRANSPARENT, ++i,nBound,::getBooleanCppuType() ,&bTrue);
- //registerPropertyNoMember(MAP_CHAR_LEN(OLD_UNO_PAGE_BACKCOLOR), ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_BORDERDIST), ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_BOTTBORDER), ++i,nBound,::getCppuType((const table::BorderLine*)0) ,&eBorderLine);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_BOTTBRDDIST), ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(PROPERTY_BOTTOMMARGIN, ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nMargin);
registerPropertyNoMember(MAP_CHAR_LEN("DisplayName"), ++i,nBound,::getCppuType((rtl::OUString*)0) ,&sEmpty);
- //registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FIRSTPAGE), ++i,nBound,::getCppuType((const sal_Int16*)0) ,&n16Zero);
- //
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRBACKCOL), ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nTransparent);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRGRFFILT), ++i,nBound,::getCppuType((const ::rtl::OUString*)0) ,&sEmpty);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRGRFLOC), ++i,nBound,::getCppuType((const style::GraphicLocation*)0) ,&eGraphicLocation);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRGRFURL), ++i,nBound,::getCppuType((const ::rtl::OUString*)0) ,&sEmpty);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRBACKTRAN), ++i,nBound,::getBooleanCppuType() ,&bTrue);
- //registerPropertyNoMember(MAP_CHAR_LEN(OLD_UNO_PAGE_FTRBACKCOL), ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRBODYDIST), ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRBRDDIST), ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRBOTTBOR), ++i,nBound,::getCppuType((const table::BorderLine*)0) ,&eBorderLine);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRBOTTBDIS), ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nZero);
- //registerPropertyNoMember(MAP_CHAR_LEN(OLD_UNO_PAGE_FTRDYNAMIC), ++i,nBound,::getBooleanCppuType() ,&bFalse);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRHEIGHT), ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRDYNAMIC), ++i,nBound,::getBooleanCppuType() ,&bFalse);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRON), ++i,nBound,::getBooleanCppuType() ,&bFalse);
@@ -354,12 +346,10 @@ OStyle::OStyle()
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRLEFTBOR), ++i,nBound,::getCppuType((const table::BorderLine*)0) ,&eBorderLine);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRLEFTBDIS), ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRLEFTMAR), ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nZero);
- //registerPropertyNoMember(MAP_CHAR_LEN(OLD_UNO_PAGE_FTRON), ++i,nBound,::getBooleanCppuType() ,&bFalse);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRRIGHTBOR), ++i,nBound,::getCppuType((const table::BorderLine*)0) ,&eBorderLine);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRRIGHTBDIS),++i,nBound,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRRIGHTMAR), ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRSHADOW), ++i,nBound,::getCppuType((const table::ShadowFormat*)0) ,&eShadowFormat);
- //registerPropertyNoMember(MAP_CHAR_LEN(OLD_UNO_PAGE_FTRSHARED), ++i,nBound,::getBooleanCppuType() ,&bFalse);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRTOPBOR), ++i,nBound,::getCppuType((const table::BorderLine*)0) ,&eBorderLine);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_FTRTOPBDIS), ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nZero);
//
@@ -368,12 +358,10 @@ OStyle::OStyle()
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRGRFLOC), ++i,nBound|nMayBeVoid,::getCppuType((const style::GraphicLocation*)0) ,&eGraphicLocation);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRGRFURL), ++i,nBound|nMayBeVoid,::getCppuType((const ::rtl::OUString*)0) ,&sEmpty);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRBACKTRAN), ++i,nBound|nMayBeVoid,::getBooleanCppuType() ,&bTrue);
- //registerPropertyNoMember(MAP_CHAR_LEN(OLD_UNO_PAGE_HDRBACKCOL), ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRBODYDIST), ++i,nBound|nMayBeVoid,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRBRDDIST), ++i,nBound|nMayBeVoid,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRBOTTBOR), ++i,nBound|nMayBeVoid,::getCppuType((const table::BorderLine*)0) ,&eBorderLine);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRBOTTBDIS), ++i,nBound|nMayBeVoid,::getCppuType((const sal_Int32*)0) ,&nZero);
- //registerPropertyNoMember(MAP_CHAR_LEN(OLD_UNO_PAGE_HDRDYNAMIC), ++i,nBound,::getBooleanCppuType() ,&bFalse);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRHEIGHT), ++i,nBound|nMayBeVoid,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRDYNAMIC), ++i,nBound|nMayBeVoid,::getBooleanCppuType() ,&bFalse);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRON), ++i,nBound|nMayBeVoid,::getBooleanCppuType() ,&bFalse);
@@ -381,23 +369,18 @@ OStyle::OStyle()
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRLEFTBOR), ++i,nBound|nMayBeVoid,::getCppuType((const table::BorderLine*)0) ,&eBorderLine);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRLEFTBDIS), ++i,nBound|nMayBeVoid,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRLEFTMAR), ++i,nBound|nMayBeVoid,::getCppuType((const sal_Int32*)0) ,&nZero);
- //registerPropertyNoMember(MAP_CHAR_LEN(OLD_UNO_PAGE_HDRON), ++i,nBound,::getBooleanCppuType() ,&bFalse);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRRIGHTBOR), ++i,nBound|nMayBeVoid,::getCppuType((const table::BorderLine*)0) ,&eBorderLine);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRRIGHTBDIS),++i,nBound|nMayBeVoid,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRRIGHTMAR), ++i,nBound|nMayBeVoid,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRSHADOW), ++i,nBound|nMayBeVoid,::getCppuType((const table::ShadowFormat*)0) ,&eShadowFormat);
- //registerPropertyNoMember(MAP_CHAR_LEN(OLD_UNO_PAGE_HDRSHARED), ++i,nBound,::getBooleanCppuType() ,&bFalse);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRTOPBOR), ++i,nBound|nMayBeVoid,::getCppuType((const table::BorderLine*)0) ,&eBorderLine);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_HDRTOPBDIS), ++i,nBound|nMayBeVoid,::getCppuType((const sal_Int32*)0) ,&nZero);
//
registerProperty(PROPERTY_HEIGHT, ++i,nBound,&m_aSize.Height, ::getCppuType((const sal_Int32*)0) );
- //registerPropertyNoMember(MAP_CHAR_LEN(OLD_UNO_PAGE_BACKTRANS), ++i,nBound, ::getBooleanCppuType() ,&bFalse);
registerPropertyNoMember(PROPERTY_ISLANDSCAPE, ++i,nBound, ::getBooleanCppuType() ,&bFalse);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_LEFTBORDER), ++i,nBound, ::getCppuType((const table::BorderLine*)0) ,&eBorderLine);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_LEFTBRDDIST), ++i,nBound, ::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(PROPERTY_LEFTMARGIN, ++i,beans::PropertyAttribute::BOUND, ::getCppuType((const sal_Int32*)0) ,&nMargin);
- //registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_LEFTFTRCONT), ++i,nBound,::getCppuType((const uno::Reference< sheet::XHeaderFooterContent >*)0) ,NULL);
- //registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_LEFTHDRCONT), ++i,nBound,::getCppuType((const uno::Reference< sheet::XHeaderFooterContent >*)0) ,NULL);
registerPropertyNoMember(PROPERTY_NUMBERINGTYPE, ++i,nBound,::getCppuType((const sal_Int16*)0) ,&nNummeringType);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_SCALEVAL), ++i,nBound,::getCppuType((const sal_Int16*)0) ,&n16Zero);
registerPropertyNoMember(PROPERTY_PAGESTYLELAYOUT, ++i,nBound,::getCppuType((const style::PageStyleLayout*)0) ,&ePageStyleLayout);
@@ -406,8 +389,6 @@ OStyle::OStyle()
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_RIGHTBORDER), ++i,nBound,::getCppuType((const table::BorderLine*)0) ,&eBorderLine);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_RIGHTBRDDIST),++i,nBound,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(PROPERTY_RIGHTMARGIN, ++i,beans::PropertyAttribute::BOUND,::getCppuType((const sal_Int32*)0) ,&nMargin);
- //registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_RIGHTFTRCON), ++i,nBound,::getCppuType((const uno::Reference< sheet::XHeaderFooterContent >*)0) ,NULL);
- //registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_RIGHTHDRCON), ++i,nBound,::getCppuType((const uno::Reference< sheet::XHeaderFooterContent >*)0) ,NULL);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_SCALETOPAG), ++i,nBound,::getCppuType((const sal_Int16*)0) ,&n16Zero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_SCALETOX), ++i,nBound,::getCppuType((const sal_Int16*)0) ,&n16Zero);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_SCALETOY), ++i,nBound,::getCppuType((const sal_Int16*)0) ,&n16Zero);
@@ -416,12 +397,9 @@ OStyle::OStyle()
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_TOPBORDER), ++i,nBound,::getCppuType((const table::BorderLine*)0) ,&eBorderLine);
registerPropertyNoMember(MAP_CHAR_LEN(SC_UNO_PAGE_TOPBRDDIST), ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nZero);
registerPropertyNoMember(PROPERTY_TOPMARGIN, ++i,nBound,::getCppuType((const sal_Int32*)0) ,&nMargin);
- //registerPropertyNoMember(MAP_CHAR_LEN(OLD_UNO_PAGE_FTRBACKTRAN),++i,nBound,::getBooleanCppuType() ,&bFalse);
- //registerPropertyNoMember(MAP_CHAR_LEN(OLD_UNO_PAGE_HDRBACKTRAN),++i,nBound,::getBooleanCppuType() ,&bFalse);
uno::Reference< container::XNameContainer> xAttribs = ::comphelper::NameContainer_createInstance(::getCppuType(static_cast< xml::AttributeData* >(NULL)));
registerPropertyNoMember(MAP_CHAR_LEN("UserDefinedAttributes"), ++i,nBound,::getCppuType((uno::Reference<container::XNameContainer>*)0) ,&xAttribs);
registerProperty(PROPERTY_WIDTH, ++i,nBound,&m_aSize.Width,::getCppuType((const sal_Int32*)0) );
- //registerPropertyNoMember(MAP_CHAR_LEN(SC_UNONAME_WRITING), ++i,nBound,:.getCppuType((sal_Int16*)0) ,&n16Zero);
registerPropertyNoMember(MAP_CHAR_LEN("PrinterName"), ++i,nBound,::getCppuType((const ::rtl::OUString*)0),&sEmpty);
uno::Sequence<sal_Int8> aSe;
registerPropertyNoMember(MAP_CHAR_LEN("PrinterSetup"), ++i,nBound,::getCppuType((const uno::Sequence<sal_Int8>*)0),&aSe);
@@ -824,7 +802,7 @@ void SAL_CALL OReportDefinition::disposing()
m_pImpl->m_aStorageChangeListeners.disposeAndClear( aDisposeEvent );
// SYNCHRONIZED --->
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::ResettableMutexGuard aGuard(m_aMutex);
m_pImpl->m_aControllers.clear();
@@ -835,18 +813,13 @@ void SAL_CALL OReportDefinition::disposing()
m_pImpl->m_xPageHeader.clear();
m_pImpl->m_xPageFooter.clear();
m_pImpl->m_xDetail.clear();
- //::comphelper::disposeComponent(m_pImpl->m_xReportHeader);
- //::comphelper::disposeComponent(m_pImpl->m_xReportFooter);
- //::comphelper::disposeComponent(m_pImpl->m_xPageHeader);
- //::comphelper::disposeComponent(m_pImpl->m_xPageFooter);
- //::comphelper::disposeComponent(m_pImpl->m_xDetail);
::comphelper::disposeComponent(m_pImpl->m_xFunctions);
//::comphelper::disposeComponent(m_pImpl->m_xStorage);
// don't dispose, this currently is the task of either the ref count going to
// 0, or of the embedded object (if we're embedded, which is the only possible
// case so far)
- // #i78366# / 2007-06-18 / frank.schoenheit@sun.com
+ // #i78366#
m_pImpl->m_xStorage.clear();
m_pImpl->m_xViewData.clear();
m_pImpl->m_xCurrentController.clear();
@@ -1220,7 +1193,7 @@ void SAL_CALL OReportDefinition::setParent( const uno::Reference< uno::XInterfac
// XCloneable
uno::Reference< util::XCloneable > SAL_CALL OReportDefinition::createClone( ) throw (uno::RuntimeException)
{
- OSL_ENSURE(0,"Not yet implemented correctly");
+ OSL_FAIL("Not yet implemented correctly");
uno::Reference< report::XReportComponent> xSource = this;
uno::Reference< report::XReportDefinition> xSet(cloneObject(xSource,m_aProps->m_xFactory,SERVICE_REPORTDEFINITION),uno::UNO_QUERY_THROW);
return xSet.get();
@@ -1259,7 +1232,7 @@ void SAL_CALL OReportDefinition::removeCloseListener( const uno::Reference< util
// XCloseable
void SAL_CALL OReportDefinition::close( ::sal_Bool _bDeliverOwnership ) throw (util::CloseVetoException, uno::RuntimeException)
{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::ResettableMutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
@@ -1287,7 +1260,7 @@ void SAL_CALL OReportDefinition::close( ::sal_Bool _bDeliverOwnership ) throw (u
catch( const util::CloseVetoException& ) { throw; }
catch( const uno::Exception& )
{
- OSL_ENSURE( sal_False, "ODatabaseDocument::impl_closeControllerFrames: caught an unexpected exception!" );
+ OSL_FAIL( "ODatabaseDocument::impl_closeControllerFrames: caught an unexpected exception!" );
}
}
}
@@ -1303,7 +1276,7 @@ void SAL_CALL OReportDefinition::close( ::sal_Bool _bDeliverOwnership ) throw (u
::sal_Bool SAL_CALL OReportDefinition::attachResource( const ::rtl::OUString& /*_rURL*/, const uno::Sequence< beans::PropertyValue >& _aArguments ) throw (uno::RuntimeException)
{
// LLA: we had a deadlock problem in our context, so we get the SolarMutex earlier.
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed( ReportDefinitionBase::rBHelper.bDisposed );
@@ -1429,10 +1402,6 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::getCurrentSelectio
void OReportDefinition::impl_loadFromStorage_nolck_throw( const uno::Reference< embed::XStorage >& _xStorageToLoadFrom,
const uno::Sequence< beans::PropertyValue >& _aMediaDescriptor )
{
-// ::osl::MutexGuard aGuard(m_aMutex);
-// ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
-//
-
m_pImpl->m_xStorage = _xStorageToLoadFrom;
::comphelper::MediaDescriptor aDescriptor( _aMediaDescriptor );
@@ -1489,7 +1458,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS
if ( !_xStorageToSaveTo.is() )
throw lang::IllegalArgumentException(RPT_RESSTRING(RID_STR_ARGUMENT_IS_NULL,m_aProps->m_xContext->getServiceManager()),*this,1);
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
// create XStatusIndicator
@@ -1532,7 +1501,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS
{
const ::rtl::OUString sVal( aDescriptor.getUnpackedValueOrDefault(aDescriptor.PROP_DOCUMENTBASEURL(),::rtl::OUString()) );
xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BaseURI")), uno::makeAny(sVal));
- } // if ( aSaveOpt.IsSaveRelFSys() )
+ }
const ::rtl::OUString sHierarchicalDocumentName( aDescriptor.getUnpackedValueOrDefault(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HierarchicalDocumentName")),::rtl::OUString()) );
xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath")), uno::makeAny(sHierarchicalDocumentName));
@@ -1585,7 +1554,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS
sWarnFile = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("meta.xml"));
}
}
- } // if( !bErr )
+ }
if( !bErr )
{
@@ -1614,7 +1583,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS
bErr = sal_True;
sErrFile = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("content.xml"));
}
- } // if ( !bErr )
+ }
uno::Any aImage;
uno::Reference< embed::XVisualObject > xCurrentController(getCurrentController(),uno::UNO_QUERY);
@@ -1652,7 +1621,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS
}
catch(uno::Exception)
{
- OSL_ENSURE(0,"Exception Caught: Could not commit report storage!");
+ OSL_FAIL("Exception Caught: Could not commit report storage!");
throw io::IOException();
}
@@ -1890,7 +1859,7 @@ void SAL_CALL OReportDefinition::load( const uno::Sequence< beans::PropertyValue
aArguments.get_ensureType( "ReadOnly", bReadOnly );
nFirstOpenMode = bReadOnly ? 1 : 0;
}
- const size_t nLastOpenMode = sizeof( nOpenModes ) / sizeof( nOpenModes[0] ) - 1;
+ const size_t nLastOpenMode = SAL_N_ELEMENTS( nOpenModes ) - 1;
for ( size_t i=nFirstOpenMode; i <= nLastOpenMode; ++i )
{
uno::Sequence< uno::Any > aStorageCreationArgs(2);
@@ -1905,7 +1874,7 @@ void SAL_CALL OReportDefinition::load( const uno::Sequence< beans::PropertyValue
{
if ( i == nLastOpenMode )
throw lang::WrappedTargetException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "An error occured while creating the document storage." ) ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "An error occurred while creating the document storage." ) ),
// TODO: resource
*this,
::cppu::getCaughtException()
@@ -1928,15 +1897,12 @@ void SAL_CALL OReportDefinition::setVisualAreaSize( ::sal_Int64 _nAspect, const
{
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
- //if( nAspect == embed::Aspects::MSOLE_CONTENT )
- {
bool bChanged =
(m_pImpl->m_aVisualAreaSize.Width != _aSize.Width ||
m_pImpl->m_aVisualAreaSize.Height != _aSize.Height);
m_pImpl->m_aVisualAreaSize = _aSize;
if( bChanged )
setModified( sal_True );
- }
m_pImpl->m_nAspect = _nAspect;
}
// -----------------------------------------------------------------------------
@@ -2100,8 +2066,6 @@ uno::Reference< container::XIndexAccess > SAL_CALL OReportDefinition::getViewDat
{
m_pImpl->m_xViewData.set(m_aProps->m_xContext->getServiceManager()->createInstanceWithContext(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.IndexedPropertyValues")),m_aProps->m_xContext ),uno::UNO_QUERY);
- //uno::Sequence< beans::PropertyValue > aProps;
- //m_pImpl->m_xViewData->insertByIndex(m_pImpl->m_xViewData->getCount(),uno::makeAny(aProps));
uno::Reference< container::XIndexContainer > xContainer(m_pImpl->m_xViewData,uno::UNO_QUERY);
::std::vector< uno::Reference< frame::XController> >::iterator aIter = m_pImpl->m_aControllers.begin();
::std::vector< uno::Reference< frame::XController> >::iterator aEnd = m_pImpl->m_aControllers.end();
@@ -2116,7 +2080,7 @@ uno::Reference< container::XIndexAccess > SAL_CALL OReportDefinition::getViewDat
catch(uno::Exception&)
{
}
- } // if ( aIter->is() )
+ }
}
}
@@ -2197,14 +2161,9 @@ void SAL_CALL OReportDefinition::setMimeType( const ::rtl::OUString& _mimetype )
// -----------------------------------------------------------------------------
uno::Sequence< ::rtl::OUString > SAL_CALL OReportDefinition::getAvailableMimeTypes( ) throw (lang::DisposedException, uno::Exception, uno::RuntimeException)
{
- static uno::Sequence< ::rtl::OUString > s_aList;
- if ( !s_aList.hasElements() )
- {
- s_aList.realloc(2);
- s_aList[0] = MIMETYPE_OASIS_OPENDOCUMENT_TEXT;
- s_aList[1] = MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET;
- }
-
+ uno::Sequence< ::rtl::OUString > s_aList(2);
+ s_aList[0] = MIMETYPE_OASIS_OPENDOCUMENT_TEXT;
+ s_aList[1] = MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET;
return s_aList;
}
// -----------------------------------------------------------------------------
@@ -2288,9 +2247,9 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstanceWith
{
beans::NamedValue aValue;
*pIter >>= aValue;
- if( aValue.Name.equalsAscii( "Storage" ) )
+ if( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Storage" ) ) )
aValue.Value >>= xStorage;
- } // for(;pIter != pEnd ;++pIter)
+ }
m_pImpl->m_pObjectContainer->SwitchPersistence(xStorage);
xRet = static_cast< ::cppu::OWeakObject* >(SvXMLEmbeddedObjectHelper::Create( xStorage,*this, EMBEDDEDOBJECTHELPER_MODE_READ ));
}
@@ -2302,7 +2261,7 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstance( co
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
uno::Reference< drawing::XShape > xShape;
- if ( aServiceSpecifier.indexOf( ::rtl::OUString::createFromAscii("com.sun.star.report.") ) == 0 )
+ if ( aServiceSpecifier.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.report.")) ) == 0 )
{
if ( aServiceSpecifier == SERVICE_SHAPE )
xShape.set(SvxUnoDrawMSFactory::createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CustomShape")) ),uno::UNO_QUERY_THROW);
@@ -2314,7 +2273,7 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstance( co
else
xShape.set(SvxUnoDrawMSFactory::createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape")) ),uno::UNO_QUERY_THROW);
}
- else if ( aServiceSpecifier.indexOf( ::rtl::OUString::createFromAscii("com.sun.star.form.component.") ) == 0 )
+ else if ( aServiceSpecifier.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.")) ) == 0 )
{
xShape.set(m_aProps->m_xContext->getServiceManager()->createInstanceWithContext(aServiceSpecifier,m_aProps->m_xContext),uno::UNO_QUERY);
}
@@ -2346,35 +2305,30 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstance( co
{
if ( !m_pImpl->m_xGradientTable.is() )
m_pImpl->m_xGradientTable.set(SvxUnoGradientTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY);
- //comphelper::NameContainer_createInstance( ::getCppuType( (const awt::Gradient*) 0 ) ).get();
return m_pImpl->m_xGradientTable;
}
else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.HatchTable") ) == 0 )
{
if ( !m_pImpl->m_xHatchTable.is() )
m_pImpl->m_xHatchTable.set(SvxUnoHatchTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY);
- //comphelper::NameContainer_createInstance( ::getCppuType( (const drawing::Hatch*) 0 ) ).get();
return m_pImpl->m_xHatchTable;
}
else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.BitmapTable") ) == 0 )
{
if ( !m_pImpl->m_xBitmapTable.is() )
m_pImpl->m_xBitmapTable.set(SvxUnoBitmapTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY);
- //comphelper::NameContainer_createInstance( ::getCppuType( (const ::rtl::OUString*) 0 ) ).get();
return m_pImpl->m_xBitmapTable;
}
else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TransparencyGradientTable") ) == 0 )
{
if ( !m_pImpl->m_xTransparencyGradientTable.is() )
m_pImpl->m_xTransparencyGradientTable.set(SvxUnoTransGradientTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY);
- //comphelper::NameContainer_createInstance( ::getCppuType( (const awt::Gradient*) 0 ) ).get();
return m_pImpl->m_xTransparencyGradientTable;
}
else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.DashTable") ) == 0 )
{
if ( !m_pImpl->m_xDashTable.is() )
m_pImpl->m_xDashTable.set(SvxUnoDashTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY);
- //comphelper::NameContainer_createInstance( ::getCppuType( (const drawing::LineDash*) 0 ) ).get();
return m_pImpl->m_xDashTable;
}
else if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MarkerTable") ) )
@@ -2447,7 +2401,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL OReportDefinition::getAvailableService
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.MarkerTable"))
};
- static const sal_uInt16 nSvxComponentServiceNameListCount = sizeof(aSvxComponentServiceNameList) / sizeof ( aSvxComponentServiceNameList[0] );
+ static const sal_uInt16 nSvxComponentServiceNameListCount = SAL_N_ELEMENTS(aSvxComponentServiceNameList);
uno::Sequence< ::rtl::OUString > aSeq( nSvxComponentServiceNameListCount );
::rtl::OUString* pStrings = aSeq.getArray();
@@ -2746,7 +2700,7 @@ bool OReportDefinition::isEnableSetModified() const
}
uno::Reference< frame::XTitle > OReportDefinition::impl_getTitleHelper_throw()
{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
@@ -2768,7 +2722,7 @@ uno::Reference< frame::XTitle > OReportDefinition::impl_getTitleHelper_throw()
// -----------------------------------------------------------------------------
uno::Reference< frame::XUntitledNumbers > OReportDefinition::impl_getUntitledHelper_throw()
{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
@@ -2780,7 +2734,7 @@ uno::Reference< frame::XUntitledNumbers > OReportDefinition::impl_getUntitledHel
m_pImpl->m_xNumberedControllers = uno::Reference< frame::XUntitledNumbers >(static_cast< ::cppu::OWeakObject* >(pHelper), uno::UNO_QUERY_THROW);
pHelper->setOwner (xThis);
- pHelper->setUntitledPrefix (::rtl::OUString::createFromAscii(" : "));
+ pHelper->setUntitledPrefix (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" : ")));
}
return m_pImpl->m_xNumberedControllers;
@@ -2791,7 +2745,7 @@ uno::Reference< frame::XUntitledNumbers > OReportDefinition::impl_getUntitledHel
throw (uno::RuntimeException)
{
// SYNCHRONIZED ->
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
@@ -2804,7 +2758,7 @@ void SAL_CALL OReportDefinition::setTitle( const ::rtl::OUString& sTitle )
throw (uno::RuntimeException)
{
// SYNCHRONIZED ->
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
@@ -2817,7 +2771,7 @@ void SAL_CALL OReportDefinition::addTitleChangeListener( const uno::Reference< f
throw (uno::RuntimeException)
{
// SYNCHRONIZED ->
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
@@ -2832,7 +2786,7 @@ void SAL_CALL OReportDefinition::removeTitleChangeListener( const uno::Reference
throw (uno::RuntimeException)
{
// SYNCHRONIZED ->
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
@@ -2848,7 +2802,7 @@ void SAL_CALL OReportDefinition::removeTitleChangeListener( const uno::Reference
uno::RuntimeException )
{
// object already disposed?
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
@@ -2861,7 +2815,7 @@ void SAL_CALL OReportDefinition::releaseNumber( ::sal_Int32 nNumber )
uno::RuntimeException )
{
// object already disposed?
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
@@ -2874,7 +2828,7 @@ void SAL_CALL OReportDefinition::releaseNumberForComponent( const uno::Reference
uno::RuntimeException )
{
// object already disposed?
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
@@ -2886,7 +2840,7 @@ void SAL_CALL OReportDefinition::releaseNumberForComponent( const uno::Reference
throw (uno::RuntimeException)
{
// object already disposed?
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
@@ -2964,3 +2918,4 @@ uno::Reference< document::XUndoManager > SAL_CALL OReportDefinition::getUndoMana
}// namespace reportdesign
// =============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx
index 4a2df1009..9877d3158 100644
--- a/reportdesign/source/core/api/ReportEngineJFree.cxx
+++ b/reportdesign/source/core/api/ReportEngineJFree.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -198,7 +199,7 @@ void SAL_CALL OReportEngineJFree::setStatusIndicator( const uno::Reference< task
{
xStorageProp->setPropertyValue( s_sMediaType, uno::makeAny(sMimeType));
}
- m_xReport->storeToStorage(xTemp,aEmpty); // store to temp file because it may contain information which aren't in the database yet.
+ m_xReport->storeToStorage(xTemp,aEmpty); // store to temp file because it may contain information which isn't in the database yet.
uno::Sequence< beans::NamedValue > aConvertedProperties(8);
sal_Int32 nPos = 0;
@@ -262,7 +263,6 @@ void SAL_CALL OReportEngineJFree::setStatusIndicator( const uno::Reference< task
xJob->execute(aConvertedProperties);
if ( xStorageProp.is() )
{
- //xStorageProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL"))) >>= sOutputName;
sOutputName = sFileURL;
}
}
@@ -333,7 +333,6 @@ uno::Reference< frame::XModel > SAL_CALL OReportEngineJFree::createDocumentAlive
}
uno::Reference< lang::XMultiServiceFactory > xFac(m_xContext->getServiceManager(),uno::UNO_QUERY);
- /*::comphelper::MimeConfigurationHelper aHelper(xFac);*/
xModel.set( xFrameLoad->loadComponentFromURL(
sOutputName,
::rtl::OUString(), // empty frame name
@@ -425,3 +424,5 @@ void SAL_CALL OReportEngineJFree::setMaxRows( ::sal_Int32 _MaxRows ) throw (uno:
// =============================================================================
} // namespace reportdesign
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/ReportVisitor.cxx b/reportdesign/source/core/api/ReportVisitor.cxx
index 9c5f0dfd6..2c085fd1f 100644
--- a/reportdesign/source/core/api/ReportVisitor.cxx
+++ b/reportdesign/source/core/api/ReportVisitor.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -92,3 +93,5 @@ void OReportVisitor::start(const uno::Reference< report::XGroup>& _xGroup)
// =============================================================================
} // namespace reportdesign
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/Section.cxx b/reportdesign/source/core/api/Section.cxx
index 1349d73dc..75c6af2ae 100644
--- a/reportdesign/source/core/api/Section.cxx
+++ b/reportdesign/source/core/api/Section.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,13 +33,9 @@
#include <com/sun/star/report/ForceNewPage.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#ifndef REPORTDESIGN_SHARED_CORESTRINGS_HRC
#include "corestrings.hrc"
-#endif
#include "core_resource.hxx"
-#ifndef REPORTDESIGN_CORE_RESOURCE_HRC_
#include "core_resource.hrc"
-#endif
#include <tools/debug.hxx>
#include "Tools.hxx"
#include "RptModel.hxx"
@@ -64,7 +61,7 @@ uno::Sequence< ::rtl::OUString> lcl_getGroupAbsent()
,PROPERTY_CANSHRINK
};
- return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0]));
+ return uno::Sequence< ::rtl::OUString >(pProps,SAL_N_ELEMENTS(pProps));
}
// -----------------------------------------------------------------------------
@@ -105,7 +102,7 @@ uno::Sequence< ::rtl::OUString> lcl_getAbsent(bool _bPageSection)
,PROPERTY_CANSHRINK
,PROPERTY_REPEATSECTION
};
- return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0]));
+ return uno::Sequence< ::rtl::OUString >(pProps,SAL_N_ELEMENTS(pProps));
}
::rtl::OUString pProps[] = {
@@ -114,7 +111,7 @@ uno::Sequence< ::rtl::OUString> lcl_getAbsent(bool _bPageSection)
,PROPERTY_REPEATSECTION
};
- return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0]));
+ return uno::Sequence< ::rtl::OUString >(pProps,SAL_N_ELEMENTS(pProps));
}
// -----------------------------------------------------------------------------
OSection::OSection(const uno::Reference< report::XReportDefinition >& _xParent
@@ -140,7 +137,6 @@ OSection::OSection(const uno::Reference< report::XReportDefinition >& _xParent
{
DBG_CTOR( rpt_OSection,NULL);
init();
- //.getSdrModel()->createNewPage(m_xSection);
}
//--------------------------------------------------------------------------
// TODO: VirtualFunctionFinder: This is virtual function!
@@ -183,28 +179,6 @@ void SAL_CALL OSection::disposing()
lang::EventObject aDisposeEvent( static_cast< ::cppu::OWeakObject* >( this ) );
m_aContainerListeners.disposeAndClear( aDisposeEvent );
m_xContext.clear();
- //m_xDrawPage.clear();
-
- /*uno::Reference< report::XReportDefinition> xReport = getReportDefinition();
- ::boost::shared_ptr<rptui::OReportModel> pModel = OReportDefinition::getSdrModel(xReport);
- osl_incrementInterlockedCount( &m_refCount );
- while( m_xDrawPage.is() && m_xDrawPage->hasElements() )
- {
- try
- {
- uno::Reference< drawing::XShape> xShape(m_xDrawPage->getByIndex(0),uno::UNO_QUERY);
- m_xDrawPage->remove(xShape);
- ::comphelper::disposeComponent(xShape);
- }
- catch(const uno::Exception&)
- {}
- }
- if ( pModel )
- {
- uno::Reference< report::XSection> xSection = this;
- pModel->DeletePage(pModel->getPage(xSection)->GetPageNum());
- }
- osl_decrementInterlockedCount( &m_refCount );*/
}
//--------------------------------------------------------------------------
::rtl::OUString SAL_CALL OSection::getImplementationName( ) throw(uno::RuntimeException)
@@ -475,7 +449,7 @@ const ::std::vector< ::rtl::OUString >& lcl_getControlModelMap()
s_sControlModels.push_back( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageControl")) );
s_sControlModels.push_back( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FormattedField")) );
s_sControlModels.push_back( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Shape")) );
- } // if ( s_sMap.empty() )
+ }
return s_sControlModels;
}
@@ -508,9 +482,8 @@ uno::Reference< report::XReportComponent > SAL_CALL OSection::createReportCompon
xRet.set(xFac->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape"))),uno::UNO_QUERY);
break;
default:
- //xRet = new OShape(m_xContext);
break;
- } // switch( aRet.begin() - aFind )
+ }
return xRet;
}
// -----------------------------------------------------------------------------
@@ -722,3 +695,5 @@ void OSection::notifyElementRemoved(const uno::Reference< drawing::XShape >& xSh
// =============================================================================
} // namespace reportdesign
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx
index 1588325fc..64bddc657 100644
--- a/reportdesign/source/core/api/Shape.cxx
+++ b/reportdesign/source/core/api/Shape.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,7 +59,7 @@ uno::Sequence< ::rtl::OUString > lcl_getShapeOptionals()
,PROPERTY_CONTROLBACKGROUND
,PROPERTY_CONTROLBACKGROUNDTRANSPARENT
};
- return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0]));
+ return uno::Sequence< ::rtl::OUString >(pProps,SAL_N_ELEMENTS(pProps));
}
DBG_NAME( rpt_OShape )
@@ -322,11 +323,9 @@ uno::Reference< util::XCloneable > SAL_CALL OShape::createClone( ) throw (uno::
if ( pClone )
{
xSet.set(pClone->getUnoShape(),uno::UNO_QUERY_THROW );
-
- // ::comphelper::copyProperties(xSource.get(),xSet.get());
}
}
- } // if ( pShape )
+ }
}
catch(const uno::Exception&)
{
@@ -345,11 +344,6 @@ void SAL_CALL OShape::setParent( const uno::Reference< uno::XInterface >& Parent
{
::osl::MutexGuard aGuard(m_aMutex);
m_aProps.aComponent.m_xParent = uno::Reference< container::XChild >(Parent,uno::UNO_QUERY);
- // not supported by the shape
- //uno::Reference< container::XChild > xChild;
- //comphelper::query_aggregation(m_aProps.aComponent.m_xProxy,xChild);
- //if ( xChild.is() )
- // xChild->setParent(Parent);
}
uno::Reference< report::XFormatCondition > SAL_CALL OShape::createFormatCondition( ) throw (uno::Exception, uno::RuntimeException)
{
@@ -521,3 +515,5 @@ void SAL_CALL OShape::setCustomShapeGeometry( const uno::Sequence< beans::Proper
// =============================================================================
}// namespace reportdesign
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/Tools.cxx b/reportdesign/source/core/api/Tools.cxx
index 7cccabc49..6a405ae83 100644
--- a/reportdesign/source/core/api/Tools.cxx
+++ b/reportdesign/source/core/api/Tools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,5 @@ uno::Reference< util::XCloneable > cloneObject(const uno::Reference< report::XRe
// =============================================================================
} // namespace reportdesign
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/services.cxx b/reportdesign/source/core/api/services.cxx
index 80e2740b5..54a4ffe37 100644
--- a/reportdesign/source/core/api/services.cxx
+++ b/reportdesign/source/core/api/services.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -91,3 +92,5 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
}
} // extern "C"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/FixedLine.hxx b/reportdesign/source/core/inc/FixedLine.hxx
index f6da07222..bc551a8ff 100644
--- a/reportdesign/source/core/inc/FixedLine.hxx
+++ b/reportdesign/source/core/inc/FixedLine.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -173,3 +174,4 @@ namespace reportdesign
}
#endif //RPT_FIXEDLINE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/FixedText.hxx b/reportdesign/source/core/inc/FixedText.hxx
index eb1e1d02d..0c5aae05c 100644
--- a/reportdesign/source/core/inc/FixedText.hxx
+++ b/reportdesign/source/core/inc/FixedText.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -158,3 +159,4 @@ namespace reportdesign
}
#endif //RPT_FIXEDTEXT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/FormatCondition.hxx b/reportdesign/source/core/inc/FormatCondition.hxx
index a4152a9cc..8a74766f4 100644
--- a/reportdesign/source/core/inc/FormatCondition.hxx
+++ b/reportdesign/source/core/inc/FormatCondition.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115,3 +116,4 @@ namespace reportdesign
}
#endif //RPT_FORMATCONDITION_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/FormattedField.hxx b/reportdesign/source/core/inc/FormattedField.hxx
index 581d73f07..d47ad7bc9 100644
--- a/reportdesign/source/core/inc/FormattedField.hxx
+++ b/reportdesign/source/core/inc/FormattedField.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -165,3 +166,4 @@ namespace reportdesign
}
#endif //RPT_FORMATTEDFIELD_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/Function.hxx b/reportdesign/source/core/inc/Function.hxx
index 767e5c7c6..719f911c2 100644
--- a/reportdesign/source/core/inc/Function.hxx
+++ b/reportdesign/source/core/inc/Function.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#define RPT_FUNCTION_HXX
#include <cppuhelper/propertysetmixin.hxx>
-#ifndef _COM_SUN_STAR_REPORT_XFunction_HPP_
#include <com/sun/star/report/XFunction.hpp>
-#endif
#include <cppuhelper/basemutex.hxx>
#include "ReportControlModel.hxx"
#include <cppuhelper/compbase2.hxx>
@@ -127,3 +126,4 @@ namespace reportdesign
}
#endif //RPT_FUNCTION_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/Functions.hxx b/reportdesign/source/core/inc/Functions.hxx
index ef001e5bd..776039265 100644
--- a/reportdesign/source/core/inc/Functions.hxx
+++ b/reportdesign/source/core/inc/Functions.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,3 +104,4 @@ namespace reportdesign
}
#endif // REPORTDESIGN_API_FUNCTIONS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/Group.hxx b/reportdesign/source/core/inc/Group.hxx
index 2b437a453..b6678c68b 100644
--- a/reportdesign/source/core/inc/Group.hxx
+++ b/reportdesign/source/core/inc/Group.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -161,3 +162,5 @@ namespace reportdesign
} // namespace reportdesign
// =============================================================================
#endif //
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/Groups.hxx b/reportdesign/source/core/inc/Groups.hxx
index 0ac608f5a..c5819cec5 100644
--- a/reportdesign/source/core/inc/Groups.hxx
+++ b/reportdesign/source/core/inc/Groups.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -106,3 +107,4 @@ namespace reportdesign
}
#endif // REPORTDESIGN_API_GROUPS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/ImageControl.hxx b/reportdesign/source/core/inc/ImageControl.hxx
index 26d1448bf..49daa5ffd 100644
--- a/reportdesign/source/core/inc/ImageControl.hxx
+++ b/reportdesign/source/core/inc/ImageControl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -162,3 +163,4 @@ namespace reportdesign
}
#endif //RPT_IMAGECONTROL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/ReportComponent.hxx b/reportdesign/source/core/inc/ReportComponent.hxx
index f5f0dbb71..a2ec036be 100644
--- a/reportdesign/source/core/inc/ReportComponent.hxx
+++ b/reportdesign/source/core/inc/ReportComponent.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,3 +87,4 @@ namespace reportdesign
}
#endif // RPT_REPORTCOMPONENT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/ReportControlModel.hxx b/reportdesign/source/core/inc/ReportControlModel.hxx
index afb636e58..1b3f42b67 100644
--- a/reportdesign/source/core/inc/ReportControlModel.hxx
+++ b/reportdesign/source/core/inc/ReportControlModel.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -135,3 +136,4 @@ namespace reportdesign
}
#endif // RPT_REPORTCONTROLMODEL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/ReportDrawPage.hxx b/reportdesign/source/core/inc/ReportDrawPage.hxx
index fd5af5f69..9fc3197c7 100644
--- a/reportdesign/source/core/inc/ReportDrawPage.hxx
+++ b/reportdesign/source/core/inc/ReportDrawPage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,3 +49,4 @@ namespace reportdesign
}
#endif //REPORTDRAWPAGE_HXX_INCLUDED
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/ReportEngineJFree.hxx b/reportdesign/source/core/inc/ReportEngineJFree.hxx
index b25b6ce80..43bb35df8 100644
--- a/reportdesign/source/core/inc/ReportEngineJFree.hxx
+++ b/reportdesign/source/core/inc/ReportEngineJFree.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -136,3 +137,5 @@ namespace reportdesign
};
}
#endif //REPORTDESIGN_API_REPORTENGINEJFREE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/ReportHelperImpl.hxx b/reportdesign/source/core/inc/ReportHelperImpl.hxx
index a3ad7dea9..5d27f230e 100644
--- a/reportdesign/source/core/inc/ReportHelperImpl.hxx
+++ b/reportdesign/source/core/inc/ReportHelperImpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1289,3 +1290,4 @@ void SAL_CALL clazz::setCharPosture( awt::FontSlant /*_charposture*/ ) throw (be
#endif //INCLUDED_REPORTHELPERIMPL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/ReportUndoFactory.hxx b/reportdesign/source/core/inc/ReportUndoFactory.hxx
index 8a44c53f2..ee4af6f0d 100644
--- a/reportdesign/source/core/inc/ReportUndoFactory.hxx
+++ b/reportdesign/source/core/inc/ReportUndoFactory.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -83,3 +84,4 @@ namespace rptui
#endif // REPORT_UNDOFACTORY_HXX_INCLUDED
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/RptObjectListener.hxx b/reportdesign/source/core/inc/RptObjectListener.hxx
index 45e48ef26..b053be589 100644
--- a/reportdesign/source/core/inc/RptObjectListener.hxx
+++ b/reportdesign/source/core/inc/RptObjectListener.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,3 +62,5 @@ public:
};
}
#endif // _REPORT_RPTUILIST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/Section.hxx b/reportdesign/source/core/inc/Section.hxx
index 16d20a3ba..5dbd00c3e 100644
--- a/reportdesign/source/core/inc/Section.hxx
+++ b/reportdesign/source/core/inc/Section.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -206,3 +207,5 @@ namespace reportdesign
};
}
#endif //REPORTDESIGN_API_SECTION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/Shape.hxx b/reportdesign/source/core/inc/Shape.hxx
index 62d801725..3bb22a9d7 100644
--- a/reportdesign/source/core/inc/Shape.hxx
+++ b/reportdesign/source/core/inc/Shape.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -180,3 +181,4 @@ namespace reportdesign
}
#endif //RPT_SHAPE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/Tools.hxx b/reportdesign/source/core/inc/Tools.hxx
index 905395290..377171e8e 100644
--- a/reportdesign/source/core/inc/Tools.hxx
+++ b/reportdesign/source/core/inc/Tools.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,6 +38,7 @@
#include <com/sun/star/report/XFixedText.hpp>
#include <com/sun/star/report/XFormattedField.hpp>
+#include <sal/macros.h>
#include "Section.hxx"
#include "corestrings.hrc"
@@ -48,7 +50,6 @@ namespace reportdesign
if ( _bOn && !_xSection.is() )
_xSection = new OSection(_xParent,_xParent->getContext(),_bPageSection);
else if ( !_bOn )
- //_xSection.clear();
::comphelper::disposeComponent(_xSection);
}
@@ -94,7 +95,7 @@ namespace reportdesign
public:
template<typename T> static void setSize(const ::com::sun::star::awt::Size& aSize,T* _pShape)
{
- OSL_ENSURE(aSize.Width >= 0 && aSize.Height >= 0,"Illegal with or height!");
+ OSL_ENSURE(aSize.Width >= 0 && aSize.Height >= 0,"Illegal width or height!");
::osl::MutexGuard aGuard(_pShape->m_aMutex);
if ( _pShape->m_aProps.aComponent.m_xShape.is() )
@@ -116,7 +117,7 @@ namespace reportdesign
if ( _pShape->m_aProps.aComponent.m_xShape.is() )
{
::com::sun::star::awt::Size aSize = _pShape->m_aProps.aComponent.m_xShape->getSize();
- OSL_ENSURE(aSize.Width >= 0 && aSize.Height >= 0,"Illegal with or height!");
+ OSL_ENSURE(aSize.Width >= 0 && aSize.Height >= 0,"Illegal width or height!");
return aSize;
}
return ::com::sun::star::awt::Size(_pShape->m_aProps.aComponent.m_nWidth,_pShape->m_aProps.aComponent.m_nHeight);
@@ -152,7 +153,6 @@ namespace reportdesign
if ( _pShape->m_aProps.aComponent.m_xShape.is() )
{
::com::sun::star::awt::Point aPosition = _pShape->m_aProps.aComponent.m_xShape->getPosition();
-// OSL_ENSURE(aPosition.X >= 0 && aPosition.Y >= 0,"Illegal position!");
return aPosition;
}
return ::com::sun::star::awt::Point(_pShape->m_aProps.aComponent.m_nPosX,_pShape->m_aProps.aComponent.m_nPosY);
@@ -181,3 +181,4 @@ namespace reportdesign
// =============================================================================
#endif // REPORTDESIGN_TOOLS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/conditionupdater.hxx b/reportdesign/source/core/inc/conditionupdater.hxx
index 22f94d559..03f061116 100644
--- a/reportdesign/source/core/inc/conditionupdater.hxx
+++ b/reportdesign/source/core/inc/conditionupdater.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,3 +74,5 @@ namespace rptui
//........................................................................
#endif // CONDITIONUPDATER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/core_resource.hxx b/reportdesign/source/core/inc/core_resource.hxx
index 28253046d..714771a62 100644
--- a/reportdesign/source/core/inc/core_resource.hxx
+++ b/reportdesign/source/core/inc/core_resource.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,3 +77,4 @@ namespace reportdesign
#endif // REPORTDESIGN_CORE_RESOURCE_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/misc/conditionalexpression.cxx b/reportdesign/source/core/misc/conditionalexpression.cxx
index 0cb37da76..c17e9a91e 100644
--- a/reportdesign/source/core/misc/conditionalexpression.cxx
+++ b/reportdesign/source/core/misc/conditionalexpression.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,7 +67,7 @@ namespace rptui
if ( pReplace == NULL )
{
- OSL_ENSURE( false, "ConditionalExpression::assembleExpression: illegal pattern!" );
+ OSL_FAIL( "ConditionalExpression::assembleExpression: illegal pattern!" );
break;
}
@@ -103,16 +104,16 @@ namespace rptui
sal_Int32 nLHSIndex( sMatchExpression.indexOf( sLHSPattern ) );
sal_Int32 nRHSIndex( sMatchExpression.indexOf( sRHSPattern ) );
- // now we should have at most one occurance of $1 and $2, resp.
+ // now we should have at most one occurrence of $1 and $2, resp.
OSL_ENSURE( sMatchExpression.indexOf( sLHSPattern, nLHSIndex + 1 ) == -1,
- "ConditionalExpression::matchExpression: unsupported pattern (more than one LHS occurance)!" );
+ "ConditionalExpression::matchExpression: unsupported pattern (more than one LHS occurrence)!" );
OSL_ENSURE( sMatchExpression.indexOf( sRHSPattern, nRHSIndex + 1 ) == -1,
- "ConditionalExpression::matchExpression: unsupported pattern (more than one RHS occurance)!" );
+ "ConditionalExpression::matchExpression: unsupported pattern (more than one RHS occurrence)!" );
// Also, an LHS must be present, and precede the RHS (if present)
OSL_ENSURE( ( nLHSIndex != -1 ) && ( ( nLHSIndex < nRHSIndex ) || ( nRHSIndex == -1 ) ),
"ConditionalExpression::matchExpression: no LHS, or an RHS preceeding the LHS - this is not supported!" );
- // up to the occurance of the LHS (which must exist, see above), the two expressions
+ // up to the occurrence of the LHS (which must exist, see above), the two expressions
// must be identical
if ( _rExpression.getLength() < nLHSIndex )
return false;
@@ -122,7 +123,7 @@ namespace rptui
// the left-most expression parts do not match
return false;
- // after the occurance of the RHS (or the LHS, if there is no RHS), the two expressions
+ // after the occurrence of the RHS (or the LHS, if there is no RHS), the two expressions
// must be identical, too
bool bHaveRHS( nRHSIndex != -1 );
sal_Int32 nRightMostIndex( bHaveRHS ? nRHSIndex : nLHSIndex );
@@ -202,3 +203,5 @@ namespace rptui
//........................................................................
} // namespace rptui
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/misc/conditionupdater.cxx b/reportdesign/source/core/misc/conditionupdater.cxx
index bd76f8023..5aeb11c95 100644
--- a/reportdesign/source/core/misc/conditionupdater.cxx
+++ b/reportdesign/source/core/misc/conditionupdater.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,7 +70,7 @@ namespace rptui
return;
Reference< XReportControlModel > xRptControlModel( _rEvent.Source, UNO_QUERY );
- if ( xRptControlModel.is() && _rEvent.PropertyName.equalsAscii( "DataField" ) )
+ if ( xRptControlModel.is() && _rEvent.PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DataField" ) ) )
{
::rtl::OUString sOldDataSource, sNewDataSource;
OSL_VERIFY( _rEvent.OldValue >>= sOldDataSource );
@@ -133,3 +134,5 @@ namespace rptui
//........................................................................
} // namespace rptui
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/misc/reportformula.cxx b/reportdesign/source/core/misc/reportformula.cxx
index eb75436ab..fc4d855a2 100644
--- a/reportdesign/source/core/misc/reportformula.cxx
+++ b/reportdesign/source/core/misc/reportformula.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -98,7 +99,7 @@ namespace rptui
}
break;
default:
- OSL_ENSURE( false, "ReportFormula::ReportFormula: illegal bind type!" );
+ OSL_FAIL( "ReportFormula::ReportFormula: illegal bind type!" );
return;
}
@@ -181,3 +182,4 @@ namespace rptui
} // namespace rptui
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/resource/core_resource.cxx b/reportdesign/source/core/resource/core_resource.cxx
index 8e7f0e7eb..e18cac387 100644
--- a/reportdesign/source/core/resource/core_resource.cxx
+++ b/reportdesign/source/core/resource/core_resource.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,9 +39,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <rtl/uri.hxx>
-#ifndef _SOLAR_HRC
#include <svl/solar.hrc>
-#endif
#include "ModuleHelper.hxx"
//.........................................................................
namespace reportdesign
@@ -67,8 +66,7 @@ namespace reportdesign
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
- rtl::OString sResLibName = rtl::OString( "rpt" );
- m_pImpl = SimpleResMgr::Create(sResLibName, aLocale);
+ m_pImpl = SimpleResMgr::Create("rpt", aLocale);
}
}
@@ -88,3 +86,4 @@ namespace reportdesign
}
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/resource/strings.src b/reportdesign/source/core/resource/strings.src
index f7d3d3a76..bdc636486 100644
--- a/reportdesign/source/core/resource/strings.src
+++ b/reportdesign/source/core/resource/strings.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,26 +31,32 @@ String RID_STR_DETAIL
{
Text [ en-US ] = "Detail";
};
+
String RID_STR_PAGE_HEADER
{
Text [ en-US ] = "Page Header";
};
+
String RID_STR_PAGE_FOOTER
{
Text [ en-US ] = "Page Footer";
};
+
String RID_STR_GROUP_HEADER
{
Text [ en-US ] = "Group Header";
};
+
String RID_STR_GROUP_FOOTER
{
Text [ en-US ] = "Group Footer";
};
+
String RID_STR_REPORT_HEADER
{
Text [ en-US ] = "Report Header";
};
+
String RID_STR_REPORT_FOOTER
{
Text [ en-US ] = "Report Footer";
@@ -65,30 +71,37 @@ String RID_STR_ERROR_WRONG_ARGUMENT
{
Text [ en-US ] = "You tried to set an illegal argument. Please have a look at '#1' for valid arguments.";
};
+
String RID_STR_ARGUMENT_IS_NULL
{
Text [ en-US ] = "The element is invalid.";
};
+
String RID_STR_FIXEDTEXT
{
Text [ en-US ] = "Label field" ;
};
+
String RID_STR_FORMATTEDFIELD
{
Text [ en-US ] = "Formatted field";
};
+
String RID_STR_IMAGECONTROL
{
Text [ en-US ] = "Image control" ;
};
+
String RID_STR_REPORT
{
Text [ en-US ] = "Report";
};
+
String RID_STR_SHAPE
{
Text [ en-US ] = "Shape";
};
+
String RID_STR_FIXEDLINE
{
Text [ en-US ] = "Fixed line";
diff --git a/reportdesign/source/core/sdr/ModuleHelper.cxx b/reportdesign/source/core/sdr/ModuleHelper.cxx
index 345b2ae31..5ad6abfa6 100644
--- a/reportdesign/source/core/sdr/ModuleHelper.cxx
+++ b/reportdesign/source/core/sdr/ModuleHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,9 +35,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <rtl/uri.hxx>
#include <tools/debug.hxx>
-#ifndef _SOLAR_HRC
#include <svl/solar.hrc>
-#endif
#define EXPAND_PROTOCOL "vnd.sun.star.expand:"
#define ENTER_MOD_METHOD() \
@@ -92,8 +91,7 @@ ResMgr* OModuleImpl::getResManager()
if (!m_pRessources)
{
// create a manager with a fixed prefix
- rtl::OString sName = rtl::OString( "rptui" );
- m_pRessources = ResMgr::CreateResMgr(sName);
+ m_pRessources = ResMgr::CreateResMgr("rptui");
}
return m_pRessources;
}
@@ -140,3 +138,5 @@ void OModule::ensureImpl()
//.........................................................................
} // namespace dbaui
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/sdr/PropertyForward.cxx b/reportdesign/source/core/sdr/PropertyForward.cxx
index 8252ed108..7024af6b9 100644
--- a/reportdesign/source/core/sdr/PropertyForward.cxx
+++ b/reportdesign/source/core/sdr/PropertyForward.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,6 +34,7 @@
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
#include "corestrings.hrc"
+#include <o3tl/compat_functional.hxx>
//........................................................................
namespace rptui
@@ -94,7 +96,7 @@ OPropertyMediator::OPropertyMediator(const Reference< XPropertySet>& _xSource
DBG_UNHANDLED_EXCEPTION();
(void)e;
}
- } // if ( m_xDest.is() && m_xSource.is() )
+ }
osl_decrementInterlockedCount(&m_refCount);
}
// -----------------------------------------------------------------------------
@@ -131,9 +133,9 @@ void SAL_CALL OPropertyMediator::propertyChange( const PropertyChangeEvent& evt
aFind = ::std::find_if(
m_aNameMap.begin(),
m_aNameMap.end(),
- ::std::compose1(
+ ::o3tl::compose1(
::std::bind2nd(::std::equal_to< ::rtl::OUString >(), evt.PropertyName),
- ::std::compose1(::std::select1st<TPropertyConverter>(),::std::select2nd<TPropertyNamePair::value_type>())
+ ::o3tl::compose1(::o3tl::select1st<TPropertyConverter>(),::o3tl::select2nd<TPropertyNamePair::value_type>())
)
);
if ( aFind != m_aNameMap.end() )
@@ -163,7 +165,7 @@ void SAL_CALL OPropertyMediator::propertyChange( const PropertyChangeEvent& evt
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched!");
+ OSL_FAIL("Exception catched!");
}
m_bInChange = sal_False;
}
@@ -204,3 +206,4 @@ void OPropertyMediator::startListening()
} // namespace dbaccess
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx
index 25357d46c..6ce5a8e01 100644
--- a/reportdesign/source/core/sdr/ReportDrawPage.cxx
+++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -133,7 +134,6 @@ uno::Reference< drawing::XShape > OReportDrawPage::_CreateShape( SdrObject *pOb
SvxOle2Shape* pShape = new SvxOle2Shape( pObj );
xShape.set(*pShape,uno::UNO_QUERY);
pShape->setShapeKind(pObj->GetObjIdentifier());
- //xShape = new SvxOle2Shape( pOle2Obj );
}
if ( !xShape.is() )
@@ -154,3 +154,5 @@ uno::Reference< drawing::XShape > OReportDrawPage::_CreateShape( SdrObject *pOb
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/sdr/ReportUndoFactory.cxx b/reportdesign/source/core/sdr/ReportUndoFactory.cxx
index 338b5787e..d0a69d11a 100644
--- a/reportdesign/source/core/sdr/ReportUndoFactory.cxx
+++ b/reportdesign/source/core/sdr/ReportUndoFactory.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96,7 +97,6 @@ SdrUndoAction* OReportUndoFactory::CreateUndoInsertObject( SdrObject& rObject, b
SdrUndoAction* OReportUndoFactory::CreateUndoDeleteObject( SdrObject& rObject, bool /*bOrdNumDirect*/ )
{
return lcl_createUndo(rObject,rptui::Removed,RID_STR_UNDO_DELETE_CONTROL);
- //return m_pUndoFactory->CreateUndoDeleteObject( rObject, bOrdNumDirect ? sal_True : sal_False );
}
SdrUndoAction* OReportUndoFactory::CreateUndoNewObject( SdrObject& rObject, bool /*bOrdNumDirect*/ )
@@ -180,3 +180,4 @@ SdrUndoAction* OReportUndoFactory::CreateUndoPageChangeMasterPage(SdrPage& rChan
} //rptui
//==================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/sdr/RptModel.cxx b/reportdesign/source/core/sdr/RptModel.cxx
index 2a82cff90..26dddb617 100644
--- a/reportdesign/source/core/sdr/RptModel.cxx
+++ b/reportdesign/source/core/sdr/RptModel.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,13 +71,6 @@ OReportModel::OReportModel(::reportdesign::OReportDefinition* _pReportDefinition
m_pUndoEnv = new OXUndoEnvironment(*this);
m_pUndoEnv->acquire();
SetSdrUndoFactory(new OReportUndoFactory);
-
- // SvxFontNameToolBoxControl::RegisterControl(SID_ATTR_CHAR_FONT);
- //SvxFontHeightToolBoxControl::RegisterControl(SID_ATTR_CHAR_FONTHEIGHT);
- //SvxFontColorToolBoxControl::RegisterControl(SID_ATTR_CHAR_COLOR);
- //SvxFontColorExtToolBoxControl::RegisterControl(SID_ATTR_CHAR_COLOR2);
- //SvxFontColorExtToolBoxControl::RegisterControl(SID_ATTR_CHAR_COLOR_BACKGROUND);
- //SvxColorToolBoxControl::RegisterControl(SID_BACKGROUND_COLOR);
}
//----------------------------------------------------------------------------
@@ -96,10 +90,10 @@ void OReportModel::detachController()
m_pUndoEnv->Clear(OXUndoEnvironment::Accessor());
}
//----------------------------------------------------------------------------
-SdrPage* OReportModel::AllocPage(FASTBOOL /*bMasterPage*/)
+SdrPage* OReportModel::AllocPage(bool /*bMasterPage*/)
{
DBG_CHKTHIS( rpt_OReportModel, 0);
- OSL_ENSURE(0,"Who called me!");
+ OSL_FAIL("Who called me!");
return NULL;
}
@@ -133,10 +127,6 @@ void OReportModel::SetModified(sal_Bool _bModified)
SdrPage* OReportModel::RemovePage(sal_uInt16 nPgNum)
{
OReportPage* pPage = dynamic_cast<OReportPage*>(SdrModel::RemovePage(nPgNum));
- //if ( pPage )
- //{
- // m_pUndoEnv->RemoveSection(pPage);
- //}
return pPage;
}
// -----------------------------------------------------------------------------
@@ -231,3 +221,5 @@ uno::Reference< uno::XInterface > OReportModel::createShape(const ::rtl::OUStrin
//==================================================================
} //rptui
//==================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 4e97ace9b..8e2917653 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -171,7 +172,7 @@ SdrObject* OObjectBase::createObject(const uno::Reference< report::XReportCompon
pNewObj = OOle2Obj::Create( _xComponent,nType );
break;
default:
- OSL_ENSURE(0,"Unknown object id");
+ OSL_FAIL("Unknown object id");
break;
}
@@ -204,9 +205,9 @@ namespace
nTextAlign = style::ParagraphAdjust_RIGHT;
break;
default:
- OSL_ENSURE(0,"Illegal text alignment value!");
+ OSL_FAIL("Illegal text alignment value!");
break;
- } // switch(nTextAlign)
+ }
aRet <<= (style::ParagraphAdjust)nTextAlign;
}
else
@@ -227,9 +228,9 @@ namespace
nTextAlign = awt::TextAlign::RIGHT;
break;
default:
- OSL_ENSURE(0,"Illegal text alignment value!");
+ OSL_FAIL("Illegal text alignment value!");
break;
- } // switch(eParagraphAdjust)
+ }
aRet <<= nTextAlign;
}
return aRet;
@@ -250,7 +251,6 @@ const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId)
s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBACKGROUND,TPropertyConverter(PROPERTY_BACKGROUNDCOLOR,aNoConverter)));
s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDER,TPropertyConverter(PROPERTY_BORDER,aNoConverter)));
s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDERCOLOR,TPropertyConverter(PROPERTY_BORDERCOLOR,aNoConverter)));
- //s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_PARAADJUST,PROPERTY_ALIGN));
}
return s_aNameMap;
}
@@ -291,7 +291,6 @@ const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId)
s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLTEXTEMPHASISMARK,TPropertyConverter(PROPERTY_FONTEMPHASISMARK,aNoConverter)));
s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDER,TPropertyConverter(PROPERTY_BORDER,aNoConverter)));
s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDERCOLOR,TPropertyConverter(PROPERTY_BORDERCOLOR,aNoConverter)));
- //s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_PARAADJUST,TPropertyConverter(PROPERTY_ALIGN,aNoConverter)));
::boost::shared_ptr<AnyConverter> aParaAdjust(new ParaAdjust());
s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_PARAADJUST,TPropertyConverter(PROPERTY_ALIGN,aParaAdjust)));
}
@@ -397,7 +396,7 @@ void OObjectBase::EndListening(sal_Bool /*bRemoveListener*/)
}
catch(uno::Exception)
{
- OSL_ENSURE(0,"OObjectBase::EndListening: Exception caught!");
+ OSL_FAIL("OObjectBase::EndListening: Exception caught!");
}
}
m_xPropertyChangeListener.clear();
@@ -533,7 +532,7 @@ sal_Int32 OCustomShape::GetStep() const
{
// get step property
sal_Int32 nStep = 0;
- OSL_ENSURE(0,"Who called me!");
+ OSL_FAIL("Who called me!");
return nStep;
}
//----------------------------------------------------------------------------
@@ -573,9 +572,9 @@ void OCustomShape::NbcSetLogicRect(const Rectangle& rRect)
SetPropsFromRect(rRect);
}
//----------------------------------------------------------------------------
-FASTBOOL OCustomShape::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
+bool OCustomShape::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
{
- FASTBOOL bResult = SdrObjCustomShape::EndCreate(rStat, eCmd);
+ bool bResult = SdrObjCustomShape::EndCreate(rStat, eCmd);
if ( bResult )
{
OReportModel* pRptModel = static_cast<OReportModel*>(GetModel());
@@ -719,7 +718,7 @@ sal_Int32 OUnoObject::GetStep() const
DBG_CHKTHIS( rpt_OUnoObject,NULL);
// get step property
sal_Int32 nStep = 0;
- OSL_ENSURE(0,"Who called me!");
+ OSL_FAIL("Who called me!");
return nStep;
}
@@ -748,11 +747,6 @@ void OUnoObject::NbcMove( const Size& rSize )
// LLA: why there exists getPositionX and getPositionY and NOT getPosition() which return a Point?
int nNewX = m_xReportComponent->getPositionX() + rSize.A();
- // can this hinder us to set components outside the area?
- // if (nNewX < 0)
- // {
- // nNewX = 0;
- // }
m_xReportComponent->setPositionX(nNewX);
int nNewY = m_xReportComponent->getPositionY() + rSize.B();
if (nNewY < 0 && !bUndoMode)
@@ -808,10 +802,10 @@ void OUnoObject::NbcSetLogicRect(const Rectangle& rRect)
}
//----------------------------------------------------------------------------
-FASTBOOL OUnoObject::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
+bool OUnoObject::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
{
DBG_CHKTHIS( rpt_OUnoObject,NULL);
- FASTBOOL bResult = SdrUnoObj::EndCreate(rStat, eCmd);
+ bool bResult = SdrUnoObj::EndCreate(rStat, eCmd);
if ( bResult )
{
impl_setReportComponent_nothrow();
@@ -948,16 +942,16 @@ uno::Reference< uno::XInterface > OUnoObject::getUnoShape()
return OObjectBase::getUnoShapeOf( *this );
}
// -----------------------------------------------------------------------------
-SdrObject* OUnoObject::Clone() const
+OUnoObject* OUnoObject::Clone() const
{
- SdrObject* pClone = SdrUnoObj::Clone();
+ OUnoObject* pClone = CloneHelper< OUnoObject >();
if ( pClone )
{
Reference<XPropertySet> xSource(const_cast<OUnoObject*>(this)->getUnoShape(),uno::UNO_QUERY);
Reference<XPropertySet> xDest(pClone->getUnoShape(),uno::UNO_QUERY);
if ( xSource.is() && xDest.is() )
comphelper::copyProperties(xSource.get(),xDest.get());
- } // if ( pClone )
+ }
return pClone;
}
//----------------------------------------------------------------------------
@@ -1019,7 +1013,7 @@ sal_Int32 OOle2Obj::GetStep() const
DBG_CHKTHIS( rpt_OOle2Obj,NULL);
// get step property
sal_Int32 nStep = 0;
- OSL_ENSURE(0,"Who called me!");
+ OSL_FAIL("Who called me!");
return nStep;
}
@@ -1108,10 +1102,10 @@ void OOle2Obj::NbcSetLogicRect(const Rectangle& rRect)
}
//----------------------------------------------------------------------------
-FASTBOOL OOle2Obj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
+bool OOle2Obj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
{
DBG_CHKTHIS( rpt_OOle2Obj,NULL);
- FASTBOOL bResult = SdrOle2Obj::EndCreate(rStat, eCmd);
+ bool bResult = SdrOle2Obj::EndCreate(rStat, eCmd);
if ( bResult )
{
OReportModel* pRptModel = static_cast<OReportModel*>(GetModel());
@@ -1157,14 +1151,14 @@ uno::Reference< chart2::data::XDatabaseDataProvider > lcl_getDataProvider(const
{
xSource.set(xChartDoc->getDataProvider(),uno::UNO_QUERY);
}
- } // if( xCompSupp.is())
+ }
return xSource;
}
// -----------------------------------------------------------------------------
// Clone() soll eine komplette Kopie des Objektes erzeugen.
-SdrObject* OOle2Obj::Clone() const
+OOle2Obj* OOle2Obj::Clone() const
{
- OOle2Obj* pObj = static_cast<OOle2Obj*>(SdrOle2Obj::Clone());
+ OOle2Obj* pObj = CloneHelper< OOle2Obj >();
OReportModel* pRptModel = static_cast<OReportModel*>(GetModel());
svt::EmbeddedObjectRef::TryRunningState( pObj->GetObjRef() );
pObj->impl_createDataProvider_nothrow(pRptModel->getReportDefinition().get());
@@ -1193,7 +1187,7 @@ void OOle2Obj::impl_createDataProvider_nothrow(const uno::Reference< frame::XMod
uno::Reference< lang::XMultiServiceFactory> xFac(_xModel,uno::UNO_QUERY);
uno::Reference< chart2::data::XDatabaseDataProvider > xDataProvider( xFac->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.data.DataProvider"))),uno::UNO_QUERY);
xReceiver->attachDataProvider( xDataProvider.get() );
- } // if( xReceiver.is() )
+ }
}
catch(uno::Exception)
{
@@ -1273,3 +1267,5 @@ uno::Reference< style::XStyle> getUsedStyle(const uno::Reference< report::XRepor
//============================================================================
} // rptui
//============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/sdr/RptObjectListener.cxx b/reportdesign/source/core/sdr/RptObjectListener.cxx
index 319f9b392..679b30196 100644
--- a/reportdesign/source/core/sdr/RptObjectListener.cxx
+++ b/reportdesign/source/core/sdr/RptObjectListener.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,13 +56,6 @@ OObjectListener::~OObjectListener()
void SAL_CALL OObjectListener::disposing( const ::com::sun::star::lang::EventObject& ) throw( ::com::sun::star::uno::RuntimeException)
{
- /*
- // disconnect the listener
- if (m_pObject)
- {
- (m_pObject->m_xPropertyChangeListener).clear();
- }
- */
}
// XPropertyChangeListener
@@ -93,3 +87,5 @@ DlgEdHint::~DlgEdHint()
}
//----------------------------------------------------------------------------
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/sdr/RptPage.cxx b/reportdesign/source/core/sdr/RptPage.cxx
index fe7583d57..60ed6d4e1 100644
--- a/reportdesign/source/core/sdr/RptPage.cxx
+++ b/reportdesign/source/core/sdr/RptPage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,13 +43,13 @@ TYPEINIT1( OReportPage, SdrPage );
DBG_NAME( rpt_OReportPage )
OReportPage::OReportPage( OReportModel& _rModel
,const uno::Reference< report::XSection >& _xSection
- ,FASTBOOL bMasterPage )
+ ,bool bMasterPage )
:SdrPage( _rModel, bMasterPage )
,rModel(_rModel)
,m_xSection(_xSection)
,m_bSpecialInsertMode(false)
{
- DBG_CTOR( rpt_OReportPage,NULL);
+ DBG_CTOR( rpt_OReportPage,NULL);
}
//----------------------------------------------------------------------------
@@ -92,7 +93,7 @@ sal_uLong OReportPage::getIndexOf(const uno::Reference< report::XReportComponent
{
break;
}
- } // for (; i < nCount; ++i)
+ }
return i;
}
//----------------------------------------------------------------------------
@@ -106,7 +107,7 @@ void OReportPage::removeSdrObject(const uno::Reference< report::XReportComponent
OSL_ENSURE(pBase,"Why is this not a OObjectBase?");
if ( pBase )
pBase->EndListening();
- /*delete */RemoveObject(nPos);
+ RemoveObject(nPos);
}
}
// -----------------------------------------------------------------------------
@@ -132,26 +133,11 @@ SdrObject* OReportPage::RemoveObject(sal_uLong nObjNum)
return pObj;
}
//----------------------------------------------------------------------------
-//namespace
-//{
-// ::rtl::OUString lcl_getControlName(const uno::Reference< lang::XServiceInfo >& _xServiceInfo)
-// {
-// if ( _xServiceInfo->supportsService( SERVICE_FIXEDTEXT ))
-// return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.FixedText"));
-// if ( _xServiceInfo->supportsService( SERVICE_FORMATTEDFIELD ))
-// return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.FormattedField"));
-// if ( _xServiceInfo->supportsService( SERVICE_IMAGECONTROL))
-// return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.DatabaseImageControl"));
-//
-// return ::rtl::OUString();
-// }
-//}
-//----------------------------------------------------------------------------
void OReportPage::insertObject(const uno::Reference< report::XReportComponent >& _xObject)
{
DBG_CHKTHIS( rpt_OReportPage,NULL);
OSL_ENSURE(_xObject.is(),"Object is not valid to create a SdrObject!");
- if ( !_xObject.is() ) // || !m_pView )
+ if ( !_xObject.is() )
return;
sal_uLong nPos = getIndexOf(_xObject);
if ( nPos < GetObjCount() )
@@ -186,7 +172,6 @@ void OReportPage::removeTempObject(SdrObject *_pToRemoveObj)
SdrObject* pObject = RemoveObject(i);
(void)pObject;
break;
- // delete pObject;
}
}
}
@@ -232,14 +217,6 @@ void OReportPage::NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInse
uno::Reference< drawing::XShape> xShape(pObj->getUnoShape(),uno::UNO_QUERY);
pSection->notifyElementAdded(xShape);
- //// check if we are a shape
- //uno::Reference<beans::XPropertySet> xProp(xShape,uno::UNO_QUERY);
- //if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CLSID"))) )
- //{
- // // use MimeConfigurationHelper::GetStringClassIDRepresentation(MimeConfigurationHelper::GetSequenceClassID(SO3_SCH_OLE_EMBED_CLASSID_8))
- // xProp->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CLSID")),uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("12dcae26-281f-416f-a234-c3086127382e"))));
- //}
-
// now that the shape is inserted into its structures, we can allow the OObjectBase
// to release the reference to it
OObjectBase* pObjectBase = dynamic_cast< OObjectBase* >( pObj );
@@ -250,3 +227,5 @@ void OReportPage::NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInse
//============================================================================
} // rptui
//============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx
index b8ed8275b..98a8f8f18 100644
--- a/reportdesign/source/core/sdr/UndoActions.cxx
+++ b/reportdesign/source/core/sdr/UndoActions.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,7 +55,7 @@
#include <vcl/svapp.hxx>
#include <dbaccess/dbsubcomponentcontroller.hxx>
#include <svx/unoshape.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
namespace rptui
{
@@ -223,13 +224,13 @@ void OUndoContainerAction::Undo()
implReInsert();
break;
default:
- OSL_ENSURE(0,"Illegal case value");
+ OSL_FAIL("Illegal case value");
break;
}
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OUndoContainerAction::Undo: caught an exception!" );
+ OSL_FAIL( "OUndoContainerAction::Undo: caught an exception!" );
}
}
}
@@ -251,13 +252,13 @@ void OUndoContainerAction::Redo()
implReRemove();
break;
default:
- OSL_ENSURE(0,"Illegal case value");
+ OSL_FAIL("Illegal case value");
break;
}
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OUndoContainerAction::Redo: caught an exception!" );
+ OSL_FAIL( "OUndoContainerAction::Redo: caught an exception!" );
}
}
}
@@ -396,7 +397,7 @@ void ORptUndoPropertyAction::setProperty(sal_Bool _bOld)
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "ORptUndoPropertyAction::Redo: caught an exception!" );
+ OSL_FAIL( "ORptUndoPropertyAction::Redo: caught an exception!" );
}
}
}
@@ -447,3 +448,4 @@ Reference< XPropertySet> OUndoPropertyReportSectionAction::getObject()
} // rptui
//============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx
index 6e2ef7092..19d0d1c50 100644
--- a/reportdesign/source/core/sdr/UndoEnv.cxx
+++ b/reportdesign/source/core/sdr/UndoEnv.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,7 +57,7 @@
#include <vcl/svapp.hxx>
#include <dbaccess/dbsubcomponentcontroller.hxx>
#include <svx/unoshape.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
namespace rptui
{
@@ -87,7 +88,7 @@ struct PropertyInfo
}
};
-typedef ::std::hash_map< ::rtl::OUString, PropertyInfo, ::rtl::OUStringHash > PropertiesInfo;
+typedef ::boost::unordered_map< ::rtl::OUString, PropertyInfo, ::rtl::OUStringHash > PropertiesInfo;
struct ObjectInfo
{
@@ -244,8 +245,6 @@ void SAL_CALL OXUndoEnvironment::disposing(const EventObject& e) throw( RuntimeE
RemoveSection(xSection);
else
RemoveElement(xSourceSet);
- /*if (!m_pImpl->m_aPropertySetCache.empty())
- m_pImpl->m_aPropertySetCache.erase(xSourceSet);*/
}
}
@@ -253,6 +252,7 @@ void SAL_CALL OXUndoEnvironment::disposing(const EventObject& e) throw( RuntimeE
//------------------------------------------------------------------------------
void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEvent ) throw(uno::RuntimeException)
{
+
::osl::ClearableMutexGuard aGuard( m_pImpl->m_aMutex );
if ( IsLocked() )
@@ -358,7 +358,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv
// TODO: this is a potential race condition: two threads here could in theory
// add their undo actions out-of-order
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
ORptUndoPropertyAction* pUndo = NULL;
try
{
@@ -403,7 +403,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv
//------------------------------------------------------------------------------
void SAL_CALL OXUndoEnvironment::elementInserted(const ContainerEvent& evt) throw(uno::RuntimeException)
{
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
// neues Object zum lauschen
@@ -454,14 +454,13 @@ void SAL_CALL OXUndoEnvironment::elementInserted(const ContainerEvent& evt) thro
//------------------------------------------------------------------------------
void OXUndoEnvironment::implSetModified()
{
- //if ( !IsLocked() )
m_pImpl->m_rModel.SetModified( sal_True );
}
//------------------------------------------------------------------------------
void SAL_CALL OXUndoEnvironment::elementReplaced(const ContainerEvent& evt) throw(uno::RuntimeException)
{
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
Reference< XInterface > xIface(evt.ReplacedElement,uno::UNO_QUERY);
@@ -477,7 +476,7 @@ void SAL_CALL OXUndoEnvironment::elementReplaced(const ContainerEvent& evt) thro
//------------------------------------------------------------------------------
void SAL_CALL OXUndoEnvironment::elementRemoved(const ContainerEvent& evt) throw(uno::RuntimeException)
{
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
Reference< uno::XInterface > xIface( evt.Element, UNO_QUERY );
@@ -608,7 +607,6 @@ void OXUndoEnvironment::switchListening( const Reference< XIndexAccess >& _rxCon
// be notified of any changes in the container elements
Reference< XContainer > xSimpleContainer( _rxContainer, UNO_QUERY );
- // OSL_ENSURE( xSimpleContainer.is(), "OXUndoEnvironment::switchListening: how are we expected to be notified of changes in the container?" );
if ( xSimpleContainer.is() )
{
if ( _bStartListening )
@@ -653,7 +651,6 @@ void OXUndoEnvironment::switchListening( const Reference< XInterface >& _rxObjec
}
catch( const Exception& )
{
- //OSL_ENSURE( sal_False, "OXUndoEnvironment::switchListening: caught an exception!" );
}
}
@@ -696,3 +693,5 @@ sal_Bool OXUndoEnvironment::IsUndoMode() const
//============================================================================
} // rptui
//============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/sdr/formatnormalizer.cxx b/reportdesign/source/core/sdr/formatnormalizer.cxx
index 579a49be2..6839b11b9 100644
--- a/reportdesign/source/core/sdr/formatnormalizer.cxx
+++ b/reportdesign/source/core/sdr/formatnormalizer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -126,9 +127,9 @@ namespace rptui
//--------------------------------------------------------------------
void FormatNormalizer::impl_onDefinitionPropertyChange( const ::rtl::OUString& _rChangedPropName )
{
- if ( !_rChangedPropName.equalsAscii( "Command" )
- && !_rChangedPropName.equalsAscii( "CommandType" )
- && !_rChangedPropName.equalsAscii( "EscapeProcessing" )
+ if ( !_rChangedPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Command" ) )
+ && !_rChangedPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CommandType" ) )
+ && !_rChangedPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "EscapeProcessing" ) )
)
// nothing we're interested in
return;
@@ -138,7 +139,7 @@ namespace rptui
//--------------------------------------------------------------------
void FormatNormalizer::impl_onFormattedProperttyChange( const Reference< XFormattedField >& _rxFormatted, const ::rtl::OUString& _rChangedPropName )
{
- if ( !_rChangedPropName.equalsAscii( "DataField" ) )
+ if ( !_rChangedPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DataField" ) ) )
// nothing we're interested in
return;
@@ -246,7 +247,7 @@ namespace rptui
if ( sDataField.getStr()[ sDataField.getLength() - 1 ] != ']' )
{
// last character is not the closing brace
- OSL_ENSURE( false, "FormatNormalizer::impl_adjustFormatToDataFieldType_nothrow: suspicious data field value!" );
+ OSL_FAIL( "FormatNormalizer::impl_adjustFormatToDataFieldType_nothrow: suspicious data field value!" );
return;
}
sDataField = sDataField.copy( sFieldPrefix.getLength(), sDataField.getLength() - sFieldPrefix.getLength() - 1 );
@@ -277,3 +278,5 @@ namespace rptui
//........................................................................
} // namespace rptui
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/sdr/formatnormalizer.hxx b/reportdesign/source/core/sdr/formatnormalizer.hxx
index fd80df7eb..f1b6979cc 100644
--- a/reportdesign/source/core/sdr/formatnormalizer.hxx
+++ b/reportdesign/source/core/sdr/formatnormalizer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -92,3 +93,5 @@ namespace rptui
//........................................................................
#endif // REPORTDESIGN_FORMATNORMALIZER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/dbloader2.cxx b/reportdesign/source/filter/xml/dbloader2.cxx
index 023d59623..0380fce70 100644
--- a/reportdesign/source/filter/xml/dbloader2.cxx
+++ b/reportdesign/source/filter/xml/dbloader2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,10 +74,10 @@ ORptTypeDetection::ORptTypeDetection(Reference< XComponentContext > const & xCon
{
::rtl::OUString sMediaType;
xProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ) >>= sMediaType;
- if ( sMediaType.equalsAscii(MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII) )
+ if ( sMediaType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII)) )
return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StarBaseReport"));
::comphelper::disposeComponent(xProp);
- } // if ( xProp.is() )
+ }
}
catch(Exception&)
{
@@ -115,7 +116,7 @@ Sequence< ::rtl::OUString > SAL_CALL ORptTypeDetection::getSupportedServiceNames
Sequence< ::rtl::OUString > ORptTypeDetection::getSupportedServiceNames_Static(void) throw( RuntimeException )
{
Sequence< ::rtl::OUString > aSNS( 1 );
- aSNS.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.document.ExtendedTypeDetection");
+ aSNS.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExtendedTypeDetection"));
return aSNS;
}
// -----------------------------------------------------------------------------
@@ -123,3 +124,4 @@ Sequence< ::rtl::OUString > ORptTypeDetection::getSupportedServiceNames_Static(v
}//rptxml
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/dbloader2.hxx b/reportdesign/source/filter/xml/dbloader2.hxx
index 532bca25b..9a8ca2680 100644
--- a/reportdesign/source/filter/xml/dbloader2.hxx
+++ b/reportdesign/source/filter/xml/dbloader2.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90,7 +91,7 @@ public:
// static methods
static ::rtl::OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException )
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.report.ORptTypeDetection");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.ORptTypeDetection"));
}
static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
@@ -100,3 +101,5 @@ public:
};
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlAutoStyle.cxx b/reportdesign/source/filter/xml/xmlAutoStyle.cxx
index 1a4839eda..90b39e2f8 100644
--- a/reportdesign/source/filter/xml/xmlAutoStyle.cxx
+++ b/reportdesign/source/filter/xml/xmlAutoStyle.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,3 +98,5 @@ OXMLAutoStylePoolP::~OXMLAutoStylePoolP()
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlAutoStyle.hxx b/reportdesign/source/filter/xml/xmlAutoStyle.hxx
index 314df6466..abdd342b0 100644
--- a/reportdesign/source/filter/xml/xmlAutoStyle.hxx
+++ b/reportdesign/source/filter/xml/xmlAutoStyle.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,4 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLAUTOSTYLE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlCell.cxx b/reportdesign/source/filter/xml/xmlCell.cxx
index 5909894ba..fcae7541a 100644
--- a/reportdesign/source/filter/xml/xmlCell.cxx
+++ b/reportdesign/source/filter/xml/xmlCell.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,15 +38,11 @@
#include "xmlStyleImport.hxx"
#include <comphelper/namecontainer.hxx>
#include <comphelper/genericpropertyset.hxx>
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HXX_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
#include <com/sun/star/report/XShape.hpp>
#include <com/sun/star/report/XFixedLine.hpp>
#include <com/sun/star/table/BorderLine.hpp>
-#ifndef RPT_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
#include "xmlTable.hxx"
#include "xmlFormattedField.hxx"
#include "xmlImage.hxx"
@@ -248,7 +245,7 @@ void OXMLCell::EndElement()
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"OXMLCell::EndElement -> exception catched");
+ OSL_FAIL("OXMLCell::EndElement -> exception catched");
}
}
}
@@ -291,3 +288,4 @@ void OXMLCell::setContainsShape(bool _bContainsShape)
} // namespace rptxml
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlCell.hxx b/reportdesign/source/filter/xml/xmlCell.hxx
index ba2ca5694..8360a691f 100644
--- a/reportdesign/source/filter/xml/xmlCell.hxx
+++ b/reportdesign/source/filter/xml/xmlCell.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,3 +73,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLCELL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlColumn.cxx b/reportdesign/source/filter/xml/xmlColumn.cxx
index 8174d8272..bd2451a01 100644
--- a/reportdesign/source/filter/xml/xmlColumn.cxx
+++ b/reportdesign/source/filter/xml/xmlColumn.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,9 +27,7 @@
************************************************************************/
#include "precompiled_rptxml.hxx"
-#ifndef RPT_XMLCOLUMN_HXX
#include "xmlColumn.hxx"
-#endif
#include <xmloff/xmluconv.hxx>
#include "xmlfilter.hxx"
#include <xmloff/xmltoken.hxx>
@@ -41,12 +40,8 @@
#include "xmlTable.hxx"
#include <comphelper/namecontainer.hxx>
#include <comphelper/genericpropertyset.hxx>
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HXX_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef RPT_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
#define PROPERTY_ID_WIDTH 1
#define PROPERTY_ID_HEIGHT 2
@@ -188,3 +183,5 @@ void OXMLRowColumn::EndElement()
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlColumn.hxx b/reportdesign/source/filter/xml/xmlColumn.hxx
index 9c72b6a47..47c57dbb7 100644
--- a/reportdesign/source/filter/xml/xmlColumn.hxx
+++ b/reportdesign/source/filter/xml/xmlColumn.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,3 +63,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLCOLUMN_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlComponent.cxx b/reportdesign/source/filter/xml/xmlComponent.cxx
index 008cdbf09..08f667663 100644
--- a/reportdesign/source/filter/xml/xmlComponent.cxx
+++ b/reportdesign/source/filter/xml/xmlComponent.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,9 +34,7 @@
#include <xmloff/nmspmap.hxx>
#include "xmlEnums.hxx"
#include "xmlHelper.hxx"
-#ifndef RPT_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
#include "xmlStyleImport.hxx"
#include <ucbhelper/content.hxx>
#include <tools/debug.hxx>
@@ -43,9 +42,7 @@
#include <comphelper/genericpropertyset.hxx>
#include <com/sun/star/awt/FontDescriptor.hpp>
#include <com/sun/star/report/XReportControlModel.hpp>
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HXX_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
#include <tools/debug.hxx>
namespace rptxml
@@ -101,7 +98,7 @@ OXMLComponent::OXMLComponent( ORptFilter& _rImport
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Exception catched while putting props into report component!");
+ OSL_FAIL("Exception catched while putting props into report component!");
}
}
}
@@ -115,3 +112,5 @@ OXMLComponent::~OXMLComponent()
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlComponent.hxx b/reportdesign/source/filter/xml/xmlComponent.hxx
index b45bcc2ae..0dd9d586a 100644
--- a/reportdesign/source/filter/xml/xmlComponent.hxx
+++ b/reportdesign/source/filter/xml/xmlComponent.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,7 +43,7 @@ namespace rptxml
::rtl::OUString m_sTextStyleName;
OXMLComponent(const OXMLComponent&);
- void operator =(const OXMLComponent&);
+ OXMLComponent operator =(const OXMLComponent&);
public:
OXMLComponent( ORptFilter& rImport
@@ -58,3 +59,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLCOMPONENT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx b/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
index 98db072a7..68e93b4bc 100644
--- a/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
+++ b/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,9 +34,7 @@
#include "xmlEnums.hxx"
#include "xmlControlProperty.hxx"
#include "xmlComponent.hxx"
-#ifndef REPORTDESIGN_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
#include <tools/debug.hxx>
namespace rptxml
@@ -82,7 +81,7 @@ OXMLCondPrtExpr::OXMLCondPrtExpr( ORptFilter& _rImport,
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Exception catched while putting Function props!");
+ OSL_FAIL("Exception catched while putting Function props!");
}
}
// -----------------------------------------------------------------------------
@@ -101,3 +100,5 @@ void OXMLCondPrtExpr::Characters( const ::rtl::OUString& rChars )
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlCondPrtExpr.hxx b/reportdesign/source/filter/xml/xmlCondPrtExpr.hxx
index 2fdcd0ba3..fd457de45 100644
--- a/reportdesign/source/filter/xml/xmlCondPrtExpr.hxx
+++ b/reportdesign/source/filter/xml/xmlCondPrtExpr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,3 +57,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLCONDPRTEXPR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx b/reportdesign/source/filter/xml/xmlControlProperty.cxx
index fb6c02255..8d308fcb0 100644
--- a/reportdesign/source/filter/xml/xmlControlProperty.cxx
+++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,7 +82,7 @@ OXMLControlProperty::OXMLControlProperty( ORptFilter& rImport
switch( rTokenMap.Get( nPrefix, sLocalName ) )
{
case XML_TOK_LIST_PROPERTY:
- m_bIsList = sValue.equalsAscii("true");
+ m_bIsList = sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true"));
break;
case XML_TOK_VALUE_TYPE:
{
@@ -164,7 +165,7 @@ void OXMLControlProperty::EndElement()
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Unknown property found!");
+ OSL_FAIL("Unknown property found!");
}
}
}
@@ -204,7 +205,7 @@ Any OXMLControlProperty::convertString(const ::com::sun::star::uno::Type& _rExpe
{
case TypeClass_BOOLEAN: // sal_Bool
{
- sal_Bool bValue;
+ bool bValue;
#if OSL_DEBUG_LEVEL > 0
sal_Bool bSuccess =
#endif
@@ -236,7 +237,7 @@ Any OXMLControlProperty::convertString(const ::com::sun::star::uno::Type& _rExpe
}
case TypeClass_HYPER:
{
- OSL_ENSURE(sal_False, "OXMLControlProperty::convertString: 64-bit integers not implemented yet!");
+ OSL_FAIL("OXMLControlProperty::convertString: 64-bit integers not implemented yet!");
}
break;
case TypeClass_DOUBLE:
@@ -320,11 +321,11 @@ Any OXMLControlProperty::convertString(const ::com::sun::star::uno::Type& _rExpe
}
}
else
- OSL_ENSURE(sal_False, "OPropertyImport::convertString: unsupported property type!");
+ OSL_FAIL("OPropertyImport::convertString: unsupported property type!");
}
break;
default:
- OSL_ENSURE(sal_False, "OXMLControlProperty::convertString: invalid type class!");
+ OSL_FAIL("OXMLControlProperty::convertString: invalid type class!");
}
return aReturn;
@@ -358,3 +359,5 @@ Any OXMLControlProperty::convertString(const ::com::sun::star::uno::Type& _rExpe
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlControlProperty.hxx b/reportdesign/source/filter/xml/xmlControlProperty.hxx
index 9ac0e1716..646a7e1ee 100644
--- a/reportdesign/source/filter/xml/xmlControlProperty.hxx
+++ b/reportdesign/source/filter/xml/xmlControlProperty.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLCONTROLPROPERTY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlEnums.hxx b/reportdesign/source/filter/xml/xmlEnums.hxx
index 2bd2a3b6d..af293e902 100644
--- a/reportdesign/source/filter/xml/xmlEnums.hxx
+++ b/reportdesign/source/filter/xml/xmlEnums.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -177,3 +178,5 @@ namespace rptxml
} // namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLENUMS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index 8e9b88a20..7c6cc86a4 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,7 +64,8 @@
#include "RptDef.hxx"
// for locking SolarMutex: svapp + mutex
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
+#include <sal/macros.h>
#include <boost/bind.hpp>
@@ -86,13 +88,13 @@ namespace rptxml
//---------------------------------------------------------------------
::rtl::OUString ORptExportHelper::getImplementationName_Static( ) throw (RuntimeException)
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.report.XMLSettingsExporter");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.XMLSettingsExporter"));
}
//---------------------------------------------------------------------
Sequence< ::rtl::OUString > ORptExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aSupported(1);
- aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.document.ExportFilter");
+ aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter"));
return aSupported;
}
//---------------------------------------------------------------------
@@ -103,13 +105,13 @@ namespace rptxml
//---------------------------------------------------------------------
::rtl::OUString ORptContentExportHelper::getImplementationName_Static( ) throw (RuntimeException)
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.report.XMLContentExporter");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.XMLContentExporter"));
}
//---------------------------------------------------------------------
Sequence< ::rtl::OUString > ORptContentExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aSupported(1);
- aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.document.ExportFilter");
+ aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter"));
return aSupported;
}
@@ -122,13 +124,13 @@ namespace rptxml
//---------------------------------------------------------------------
::rtl::OUString ORptStylesExportHelper::getImplementationName_Static( ) throw (RuntimeException)
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.report.XMLStylesExporter");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.XMLStylesExporter"));
}
//---------------------------------------------------------------------
Sequence< ::rtl::OUString > ORptStylesExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aSupported(1);
- aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.document.ExportFilter");
+ aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter"));
return aSupported;
}
@@ -140,13 +142,13 @@ namespace rptxml
//---------------------------------------------------------------------
::rtl::OUString ORptMetaExportHelper::getImplementationName_Static( ) throw (RuntimeException)
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.report.XMLMetaExporter");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.XMLMetaExporter"));
}
//---------------------------------------------------------------------
Sequence< ::rtl::OUString > ORptMetaExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aSupported(1);
- aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.document.ExportFilter");
+ aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter"));
return aSupported;
}
@@ -158,13 +160,13 @@ namespace rptxml
//---------------------------------------------------------------------
::rtl::OUString ODBFullExportHelper::getImplementationName_Static( ) throw (RuntimeException)
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.report.XMLFullExporter");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.XMLFullExporter"));
}
//---------------------------------------------------------------------
Sequence< ::rtl::OUString > ODBFullExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aSupported(1);
- aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.document.ExportFilter");
+ aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter"));
return aSupported;
}
@@ -282,7 +284,6 @@ ORptExport::ORptExport(const Reference< XMultiServiceFactory >& _rxMSF,sal_uInt1
xTableStylesPropertySetMapper1->AddMapperEntry(xTableStylesPropertySetMapper2);
m_xTableStylesExportPropertySetMapper = new SvXMLExportPropertyMapper(xTableStylesPropertySetMapper1);
- //m_xTableStylesExportPropertySetMapper->ChainExportMapper(xTableStylesPropertySetMapper2);
m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylePropertyMap();
m_xCellStylesExportPropertySetMapper = new OSpecialHanldeXMLExportPropertyMapper(m_xCellStylesPropertySetMapper);
@@ -296,7 +297,6 @@ ORptExport::ORptExport(const Reference< XMultiServiceFactory >& _rxMSF,sal_uInt1
UniReference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA ));
m_xParaPropMapper = new OSpecialHanldeXMLExportPropertyMapper( xPropMapper);
- // m_xParaPropMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(*this));
::rtl::OUString sFamily( GetXMLToken(XML_PARAGRAPH) );
::rtl::OUString aPrefix( String( 'P' ) );
@@ -403,13 +403,12 @@ void ORptExport::exportReport(const Reference<XReportDefinition>& _xReportDefini
{
exportFunctions(_xReportDefinition->getFunctions().get());
exportGroupsExpressionAsFunction(_xReportDefinition->getGroups());
- //exportMasterDetailFields(_xReportDefinition.get());
if ( _xReportDefinition->getReportHeaderOn() )
{
SvXMLElementExport aGroupSection(*this,XML_NAMESPACE_REPORT, XML_REPORT_HEADER, sal_True, sal_True);
exportSection(_xReportDefinition->getReportHeader());
- } // if ( _xReportDefinition->getReportHeaderOn() )
+ }
if ( _xReportDefinition->getPageHeaderOn() )
{
::rtl::OUStringBuffer sValue;
@@ -420,7 +419,7 @@ void ORptExport::exportReport(const Reference<XReportDefinition>& _xReportDefini
SvXMLElementExport aGroupSection(*this,XML_NAMESPACE_REPORT, XML_PAGE_HEADER, sal_True, sal_True);
exportSection(_xReportDefinition->getPageHeader(),true);
- } // if ( _xReportDefinition->getPageHeaderOn() )
+ }
exportGroup(_xReportDefinition,0);
@@ -433,13 +432,13 @@ void ORptExport::exportReport(const Reference<XReportDefinition>& _xReportDefini
AddAttribute(XML_NAMESPACE_REPORT, XML_PAGE_PRINT_OPTION,sValue.makeStringAndClear());
SvXMLElementExport aGroupSection(*this,XML_NAMESPACE_REPORT, XML_PAGE_FOOTER, sal_True, sal_True);
exportSection(_xReportDefinition->getPageFooter(),true);
- } // if ( _xReportDefinition->getPageFooterOn() )
+ }
if ( _xReportDefinition->getReportFooterOn() )
{
SvXMLElementExport aGroupSection(*this,XML_NAMESPACE_REPORT, XML_REPORT_FOOTER, sal_True, sal_True);
exportSection(_xReportDefinition->getReportFooter());
- } // if ( _xReportDefinition->getReportFooterOn() )
- }
+ }
+ }
}
// -----------------------------------------------------------------------------
void ORptExport::exportComponent(const Reference<XReportComponent>& _xReportComponent)
@@ -470,11 +469,11 @@ void ORptExport::exportFormatConditions(const Reference<XReportControlModel>& _x
exportStyleName(xCond.get(),GetAttrList(),m_sCellStyle);
SvXMLElementExport aElem(*this,XML_NAMESPACE_REPORT, XML_FORMAT_CONDITION, sal_True, sal_True);
- } // for (sal_Int32 i = 0; i < nCount ; ++i)
+ }
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Can not access format condition!");
+ OSL_FAIL("Can not access format condition!");
}
}
// -----------------------------------------------------------------------------
@@ -498,7 +497,7 @@ void ORptExport::exportReportElement(const Reference<XReportControlModel>& _xRep
{
exportFormula(XML_FORMULA,sExpr);
SvXMLElementExport aPrintExpr(*this,XML_NAMESPACE_REPORT, XML_CONDITIONAL_PRINT_EXPRESSION, sal_True, sal_True);
- } // if ( sExpr.getLength() )
+ }
// only export when parent exists
uno::Reference< report::XSection> xParent(_xReportElement->getParent(),uno::UNO_QUERY);
@@ -700,7 +699,7 @@ void ORptExport::exportReportComponentAutoStyles(const Reference<XSection>& _xPr
{
UniReference< XMLShapeExport > xShapeExport = GetShapeExport();
xShapeExport->seekShapes(_xProp.get());
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
xShapeExport->collectShapeAutoStyles(xShape.get());
}
else
@@ -717,11 +716,11 @@ void ORptExport::exportReportComponentAutoStyles(const Reference<XSection>& _xPr
{
uno::Reference< report::XFormatCondition > xCond(xFormattedField->getByIndex(j),uno::UNO_QUERY);
exportAutoStyle(xCond.get(),xFormattedField);
- } // for (sal_Int32 j = 0; j < nCount ; ++j)
+ }
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Can not access format condition!");
+ OSL_FAIL("Can not access format condition!");
}
}
}
@@ -969,7 +968,7 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection)
exportSection(xSection);
}
}
- } // if ( aColIter->xElement.is() )
+ }
else if ( !bShapeHandled )
{
bShapeHandled = true;
@@ -987,7 +986,7 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection)
}
}
- } // for (sal_Int32 i = 0 ; i< nCount ; ++i)
+ }
if ( nEmptyCellColSpan )
{
{
@@ -1035,21 +1034,6 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection)
::rtl::OUString sFormula = _sFormula;
if ( _sFormula.equalsAsciiL("rpt:",4) )
sFormula = ::rtl::OUString();
- //sal_Int32 nLength = _sFormula.getLength();
- //if ( nLength )
- //{
- // sal_Int32 nPos = 0;
- // if ( _sFormula.matchAsciiL("=",1) != 0 )
- // {
- // nPos = 1;
- // --nLength;
- // }
- // bool bFormula = _sFormula.indexOf('[') != -1 || _sFormula.indexOf('(') != -1;
- // if ( bFormula )
- // sFormula = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:")) + _sFormula.copy(nPos,nLength);
- // else
- // sFormula = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("field:[")) + _sFormula.copy(nPos,nLength) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]"));;
- //}
return sFormula;
}
// -----------------------------------------------------------------------------
@@ -1155,7 +1139,7 @@ sal_Bool ORptExport::exportGroup(const Reference<XReportDefinition>& _xReportDef
AddAttribute(XML_NAMESPACE_REPORT, XML_REPEAT_SECTION,XML_TRUE );
SvXMLElementExport aGroupSection(*this,XML_NAMESPACE_REPORT, XML_GROUP_FOOTER, sal_True, sal_True);
exportSection(xSection);
- } // if ( xGroup->getFooterOn() )
+ }
}
}
else if ( _bExportAutoStyle )
@@ -1257,37 +1241,6 @@ void ORptExport::exportAutoStyle(XPropertySet* _xProp,const Reference<XFormatted
}
else
{
- //sal_Int32 nTextAlignIndex = m_xCellStylesExportPropertySetMapper->getPropertySetMapper()->FindEntryIndex( CTF_SD_SHAPE_PARA_ADJUST );
- //if ( nTextAlignIndex != -1 )
- //{
- // ::std::vector< XMLPropertyState >::iterator aIter = aPropertyStates.begin();
- // ::std::vector< XMLPropertyState >::iterator aEnd = aPropertyStates.end();
- // for (; aIter != aEnd; ++aIter)
- // {
- // if ( aIter->mnIndex == nTextAlignIndex )
- // {
- // sal_Int16 nTextAlign = 0;
- // aIter->maValue >>= nTextAlign;
- // switch(nTextAlign)
- // {
- // case awt::TextAlign::LEFT:
- // nTextAlign = style::ParagraphAdjust_LEFT;
- // break;
- // case awt::TextAlign::CENTER:
- // nTextAlign = style::ParagraphAdjust_CENTER;
- // break;
- // case awt::TextAlign::RIGHT:
- // nTextAlign = style::ParagraphAdjust_RIGHT;
- // break;
- // default:
- // OSL_ENSURE(0,"Illegal text alignment value!");
- // break;
- // }
- // aIter->maValue <<= nTextAlign;
- // break;
- // }
- // }
- //}
const Reference<XFormattedField> xFormattedField(_xProp,uno::UNO_QUERY);
if ( (_xParentFormattedField.is() || xFormattedField.is()) && !aPropertyStates.empty() )
{
@@ -1304,8 +1257,7 @@ void ORptExport::exportAutoStyle(XPropertySet* _xProp,const Reference<XFormatted
}
}
}
-
-
+
if ( !aPropertyStates.empty() )
m_aAutoStyleNames.insert( TPropertyStyleMap::value_type(_xProp,GetAutoStylePool()->Add( XML_STYLE_FAMILY_TABLE_CELL, aPropertyStates )));
}
@@ -1419,13 +1371,7 @@ void ORptExport::_ExportAutoStyles()
,GetMM100UnitConverter()
,GetNamespaceMap()
);
-
-
- /*GetAutoStylePool()->exportXML(XML_STYLE_FAMILY_REPORT_ID
- ,GetDocHandler()
- ,GetMM100UnitConverter()
- ,GetNamespaceMap()
- );*/
+
exportDataStyles();
GetShapeExport()->exportAutoStyles();
}
@@ -1643,7 +1589,7 @@ void ORptExport::exportGroupsExpressionAsFunction(const Reference< XGroups>& _xG
if ( sFunction.getLength() )
{
sal_Unicode pReplaceChars[] = { '(',')',';',',','+','-','[',']','/','*'};
- for(sal_uInt32 j= 0; j < sizeof(pReplaceChars)/sizeof(pReplaceChars[0]);++j)
+ for(sal_uInt32 j= 0; j < SAL_N_ELEMENTS(pReplaceChars);++j)
sFunctionName = sFunctionName.replace(pReplaceChars[j],'_');
xFunction->setName(sFunctionName);
@@ -1670,3 +1616,4 @@ void ORptExport::exportGroupsExpressionAsFunction(const Reference< XGroups>& _xG
}// rptxml
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlExport.hxx b/reportdesign/source/filter/xml/xmlExport.hxx
index 78fbe8957..cae6da3de 100644
--- a/reportdesign/source/filter/xml/xmlExport.hxx
+++ b/reportdesign/source/filter/xml/xmlExport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -279,3 +280,5 @@ public:
} // rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLEXPORT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index cfe98f6ed..41d75cbf3 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -158,7 +159,7 @@ void SAL_CALL ExportDocumentHandler::endDocument() throw (uno::RuntimeException,
void SAL_CALL ExportDocumentHandler::startElement(const ::rtl::OUString & _sName, const uno::Reference< xml::sax::XAttributeList > & xAttribs) throw (uno::RuntimeException, xml::sax::SAXException)
{
bool bExport = true;
- if ( _sName.equalsAscii("office:chart") )
+ if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("office:chart")) )
{
SvXMLAttributeList* pList = new SvXMLAttributeList();
uno::Reference< xml::sax::XAttributeList > xNewAttribs = pList;
@@ -167,7 +168,6 @@ void SAL_CALL ExportDocumentHandler::startElement(const ::rtl::OUString & _sName
{
{ XML_TABLE, sdb::CommandType::TABLE },
{ XML_QUERY, sdb::CommandType::QUERY },
- // { XML_COMMAND, CommandType::COMMAND }, // default
{ XML_TOKEN_INVALID, 0 }
};
if ( SvXMLUnitConverter::convertEnum( sValue, static_cast<sal_uInt16>(m_xDatabaseDataProvider->getCommandType()),aXML_CommnadTypeEnumMap ) )
@@ -202,20 +202,20 @@ void SAL_CALL ExportDocumentHandler::startElement(const ::rtl::OUString & _sName
m_xDelegatee->endElement(sTableCalc);
bExport = false;
}
- else if ( _sName.equalsAscii("table:table") )
+ else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table")) )
{
m_xDelegatee->startElement(lcl_createAttribute(XML_NP_RPT,XML_DETAIL),NULL);
lcl_exportPrettyPrinting(m_xDelegatee);
}
- else if ( _sName.equalsAscii("table:table-header-rows") )
+ else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-header-rows")) )
{
m_bCountColumnHeader = true;
}
- else if ( m_bCountColumnHeader && _sName.equalsAscii("table:table-cell") )
+ else if ( m_bCountColumnHeader && _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-cell")) )
{
++m_nColumnCount;
}
- else if ( _sName.equalsAscii("table:table-rows") )
+ else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-rows")) )
{
m_xDelegatee->startElement(_sName,xAttribs);
exportTableRows();
@@ -223,30 +223,30 @@ void SAL_CALL ExportDocumentHandler::startElement(const ::rtl::OUString & _sName
m_bTableRowsStarted = true;
m_bFirstRowExported = true;
}
- else if ( m_bTableRowsStarted && m_bFirstRowExported && (_sName.equalsAscii("table:table-row") || _sName.equalsAscii("table:table-cell")) )
+ else if ( m_bTableRowsStarted && m_bFirstRowExported && (_sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-row")) || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-cell"))) )
bExport = false;
- else if ( _sName.equalsAscii("chart:plot-area"))
+ else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("chart:plot-area")))
{
SvXMLAttributeList* pList = SvXMLAttributeList::getImplementation(xAttribs);
pList->RemoveAttribute(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("table:cell-range-address")));
}
- else if ( _sName.equalsAscii("chart:categories"))
+ else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("chart:categories")))
{
static ::rtl::OUString s_sCellAddress(lcl_createAttribute(XML_NP_TABLE,XML_CELL_RANGE_ADDRESS));
lcl_correctCellAddress(s_sCellAddress,xAttribs);
}
- else if ( _sName.equalsAscii("chart:series"))
+ else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("chart:series")))
{
static ::rtl::OUString s_sCellAddress(lcl_createAttribute(XML_NP_CHART,XML_VALUES_CELL_RANGE_ADDRESS));
lcl_correctCellAddress(s_sCellAddress,xAttribs);
}
- else if ( m_bTableRowsStarted && !m_bFirstRowExported && _sName.equalsAscii("table:table-cell") )
+ else if ( m_bTableRowsStarted && !m_bFirstRowExported && _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-cell")) )
{
SvXMLAttributeList* pList = SvXMLAttributeList::getImplementation(xAttribs);
static ::rtl::OUString s_sValue(lcl_createAttribute(XML_NP_OFFICE,XML_VALUE));
pList->RemoveAttribute(s_sValue);
}
- else if ( m_bTableRowsStarted && _sName.equalsAscii("text:p") )
+ else if ( m_bTableRowsStarted && _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("text:p")) )
{
bExport = false;
}
@@ -258,27 +258,27 @@ void SAL_CALL ExportDocumentHandler::endElement(const ::rtl::OUString & _sName)
{
bool bExport = true;
::rtl::OUString sNewName = _sName;
- if ( _sName.equalsAscii("office:chart") )
+ if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("office:chart")) )
{
sNewName = lcl_createAttribute(XML_NP_OFFICE,XML_REPORT);
}
- else if ( _sName.equalsAscii("table:table") )
+ else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table")) )
{
m_xDelegatee->endElement(_sName);
lcl_exportPrettyPrinting(m_xDelegatee);
sNewName = lcl_createAttribute(XML_NP_RPT,XML_DETAIL);
}
- else if ( _sName.equalsAscii("table:table-header-rows") )
+ else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-header-rows")) )
{
m_bCountColumnHeader = false;
}
- else if ( _sName.equalsAscii("table:table-rows") )
+ else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-rows")) )
m_bTableRowsStarted = false;
- else if ( m_bTableRowsStarted && m_bFirstRowExported && (_sName.equalsAscii("table:table-row") || _sName.equalsAscii("table:table-cell")) )
+ else if ( m_bTableRowsStarted && m_bFirstRowExported && (_sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-row")) || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-cell"))) )
bExport = false;
- else if ( m_bTableRowsStarted && _sName.equalsAscii("table:table-row") )
+ else if ( m_bTableRowsStarted && _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-row")) )
m_bFirstRowExported = true;
- else if ( m_bTableRowsStarted && _sName.equalsAscii("text:p") )
+ else if ( m_bTableRowsStarted && _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("text:p")) )
{
bExport = !m_bFirstRowExported;
}
@@ -414,7 +414,7 @@ void ExportDocumentHandler::exportTableRows()
bRemoveString = false;
pCellAtt->RemoveAttribute(sValueType);
pCellAtt->AddAttribute(sValueType,s_sFloat);
- } // if ( i == 0 )
+ }
m_xDelegatee->startElement(sP,NULL);
m_xDelegatee->endElement(sP);
m_xDelegatee->endElement(sCell);
@@ -446,10 +446,12 @@ void ExportDocumentHandler::exportTableRows()
m_xDelegatee->endElement(sFtext);
m_xDelegatee->endElement(sP);
m_xDelegatee->endElement(sCell);
- } // for(sal_Int32 i = 0; i < nCount ; ++i)
+ }
m_xDelegatee->endElement(sRow);
}
// -----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx
index 89ccb262e..1e4627098 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,3 +104,5 @@ private:
} // namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_EXPORTDOCUMENTHANDLER_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlFixedContent.cxx b/reportdesign/source/filter/xml/xmlFixedContent.cxx
index 38cca4ef2..39facd141 100644
--- a/reportdesign/source/filter/xml/xmlFixedContent.cxx
+++ b/reportdesign/source/filter/xml/xmlFixedContent.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,7 +52,7 @@ class OXMLCharContent : public XMLCharContext
{
OXMLFixedContent* m_pFixedContent;
OXMLCharContent(const OXMLCharContent&);
- void operator =(const OXMLCharContent&);
+ OXMLCharContent operator =(const OXMLCharContent&);
public:
OXMLCharContent(
SvXMLImport& rImport,
@@ -105,7 +106,7 @@ void OXMLCharContent::InsertControlCharacter(sal_Int16 _nControl)
m_pFixedContent->Characters(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")));
break;
default:
- OSL_ENSURE(0,"Not supported control character");
+ OSL_FAIL("Not supported control character");
break;
}
}
@@ -239,3 +240,5 @@ void OXMLFixedContent::Characters( const ::rtl::OUString& rChars )
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlFixedContent.hxx b/reportdesign/source/filter/xml/xmlFixedContent.hxx
index 552d7916d..28aadeda8 100644
--- a/reportdesign/source/filter/xml/xmlFixedContent.hxx
+++ b/reportdesign/source/filter/xml/xmlFixedContent.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,8 +48,9 @@ namespace rptxml
virtual SvXMLImportContext* _CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+ private:
OXMLFixedContent(const OXMLFixedContent&);
- void operator =(const OXMLFixedContent&);
+ OXMLFixedContent& operator =(const OXMLFixedContent&);
public:
OXMLFixedContent( ORptFilter& rImport, sal_uInt16 nPrfx,
@@ -69,3 +71,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLFIXEDCONTENT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlFormatCondition.cxx b/reportdesign/source/filter/xml/xmlFormatCondition.cxx
index 0d9bc7950..4366e6bde 100644
--- a/reportdesign/source/filter/xml/xmlFormatCondition.cxx
+++ b/reportdesign/source/filter/xml/xmlFormatCondition.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,12 +37,8 @@
#include <com/sun/star/report/XReportControlFormat.hpp>
#include <comphelper/genericpropertyset.hxx>
#include <com/sun/star/awt/FontDescriptor.hpp>
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HXX_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef RPT_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
#include "xmlStyleImport.hxx"
#include <tools/debug.hxx>
@@ -98,7 +95,7 @@ OXMLFormatCondition::OXMLFormatCondition( ORptFilter& rImport,
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched while filling the report definition props");
+ OSL_FAIL("Exception catched while filling the report definition props");
}
}
// -----------------------------------------------------------------------------
@@ -116,3 +113,5 @@ void OXMLFormatCondition::EndElement()
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlFormatCondition.hxx b/reportdesign/source/filter/xml/xmlFormatCondition.hxx
index d5c8dde8e..bf0d1cda8 100644
--- a/reportdesign/source/filter/xml/xmlFormatCondition.hxx
+++ b/reportdesign/source/filter/xml/xmlFormatCondition.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLFORMATTEDFIELD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlFormattedField.cxx b/reportdesign/source/filter/xml/xmlFormattedField.cxx
index a4ee72256..20ad74b6f 100644
--- a/reportdesign/source/filter/xml/xmlFormattedField.cxx
+++ b/reportdesign/source/filter/xml/xmlFormattedField.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -91,7 +92,7 @@ OXMLFormattedField::OXMLFormattedField( ORptFilter& rImport,
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched while filling the report definition props");
+ OSL_FAIL("Exception catched while filling the report definition props");
}
}
// -----------------------------------------------------------------------------
@@ -103,3 +104,5 @@ OXMLFormattedField::~OXMLFormattedField()
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlFormattedField.hxx b/reportdesign/source/filter/xml/xmlFormattedField.hxx
index c01aac8ef..6437cf007 100644
--- a/reportdesign/source/filter/xml/xmlFormattedField.hxx
+++ b/reportdesign/source/filter/xml/xmlFormattedField.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLFORMATTEDFIELD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlFunction.cxx b/reportdesign/source/filter/xml/xmlFunction.cxx
index e2fa5c3f7..6a5aca8da 100644
--- a/reportdesign/source/filter/xml/xmlFunction.cxx
+++ b/reportdesign/source/filter/xml/xmlFunction.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -100,7 +101,7 @@ OXMLFunction::OXMLFunction( ORptFilter& _rImport
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Exception catched while putting Function props!");
+ OSL_FAIL("Exception catched while putting Function props!");
}
}
}
@@ -131,7 +132,7 @@ void OXMLFunction::EndElement()
m_xFunction.clear();
}catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception catched!");
+ OSL_FAIL("Exception catched!");
}
}
}
@@ -139,3 +140,5 @@ void OXMLFunction::EndElement()
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlFunction.hxx b/reportdesign/source/filter/xml/xmlFunction.hxx
index 73897b8af..a3e9c6e4b 100644
--- a/reportdesign/source/filter/xml/xmlFunction.hxx
+++ b/reportdesign/source/filter/xml/xmlFunction.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,7 +47,7 @@ namespace rptxml
ORptFilter& GetOwnImport();
OXMLFunction(const OXMLFunction&);
- void operator =(const OXMLFunction&);
+ OXMLFunction operator =(const OXMLFunction&);
public:
OXMLFunction( ORptFilter& rImport
@@ -65,3 +66,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLFunction_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx b/reportdesign/source/filter/xml/xmlGroup.cxx
index b1550dd7e..5835dc60c 100644
--- a/reportdesign/source/filter/xml/xmlGroup.cxx
+++ b/reportdesign/source/filter/xml/xmlGroup.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -192,7 +193,7 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Exception catched while putting group props!");
+ OSL_FAIL("Exception catched while putting group props!");
}
}
}
@@ -270,10 +271,12 @@ void OXMLGroup::EndElement()
m_xGroups->insertByIndex(0,uno::makeAny(m_xGroup));
}catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception catched!");
+ OSL_FAIL("Exception catched!");
}
}
// -----------------------------------------------------------------------------
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlGroup.hxx b/reportdesign/source/filter/xml/xmlGroup.hxx
index c29247831..d7719f5f8 100644
--- a/reportdesign/source/filter/xml/xmlGroup.hxx
+++ b/reportdesign/source/filter/xml/xmlGroup.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,7 +44,7 @@ namespace rptxml
ORptFilter& GetOwnImport();
OXMLGroup(const OXMLGroup&);
- void operator =(const OXMLGroup&);
+ OXMLGroup operator =(const OXMLGroup&);
public:
OXMLGroup( ORptFilter& rImport
@@ -64,3 +65,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLGROUP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx
index 36f76784c..09d0754a4 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90,7 +91,7 @@ const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32
{
case XML_RPT_ALGINMENT:
{
- static SvXMLEnumMapEntry __READONLY_DATA pXML_VerticalAlign_Enum[] =
+ static SvXMLEnumMapEntry const pXML_VerticalAlign_Enum[] =
{
{ XML_TOP, style::VerticalAlignment_TOP },
{ XML_MIDDLE, style::VerticalAlignment_MIDDLE },
@@ -178,7 +179,6 @@ const XMLPropertyMapEntry* OXMLHelper::GetTableStyleProps()
{
MAP_CONST_T( PROPERTY_BACKCOLOR, FO, BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
MAP_CONST_T( PROPERTY_BACKTRANSPARENT,FO, BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT | MID_FLAG_MERGE_ATTRIBUTE, 0 ),
- // MAP_CONST_T( PROPERTY_KEEPTOGETHER, STYLE, MAY_BREAK_BETWEEN_ROWS, XML_TYPE_BOOL , 0 ),
MAP_END()
};
return aXMLTableStylesProperties;
@@ -198,10 +198,7 @@ const XMLPropertyMapEntry* OXMLHelper::GetColumnStyleProps()
{
static const XMLPropertyMapEntry aXMLColumnStylesProperties[] =
{
- //MAP( "IsManualPageBreak", XML_NAMESPACE_FO, XML_BREAK_BEFORE, XML_TYPE_PROP_TABLE_COLUMN|XML_SC_TYPE_BREAKBEFORE, 0),
- //MAP( "IsVisible", XML_NAMESPACE_TABLE, XML_DISPLAY, XML_TYPE_PROP_TABLE_COLUMN|XML_SC_TYPE_EQUAL|MID_FLAG_SPECIAL_ITEM, CTF_SC_ISVISIBLE ),
MAP_CONST_S( "Width", STYLE, COLUMN_WIDTH, XML_TYPE_PROP_TABLE_COLUMN|XML_TYPE_MEASURE, 0 ),
- // MAP( "OptimalWidth", XML_NAMESPACE_STYLE, XML_USE_OPTIMAL_COLUMN_WIDTH, XML_TYPE_PROP_TABLE_COLUMN|XML_TYPE_BOOL, 0),
MAP_END()
};
return aXMLColumnStylesProperties;
@@ -211,7 +208,6 @@ const SvXMLEnumMapEntry* OXMLHelper::GetReportPrintOptions()
{
static SvXMLEnumMapEntry s_aXML_EnumMap[] =
{
- // { XML_ALL_PAGES, report::ReportPrintOption::ALL_PAGES }, // default
{ XML_NOT_WITH_REPORT_HEADER, report::ReportPrintOption::NOT_WITH_REPORT_HEADER },
{ XML_NOT_WITH_REPORT_FOOTER, report::ReportPrintOption::NOT_WITH_REPORT_FOOTER },
{ XML_NOT_WITH_REPORT_HEADER_NOR_FOOTER, report::ReportPrintOption::NOT_WITH_REPORT_HEADER_FOOTER },
@@ -224,7 +220,6 @@ const SvXMLEnumMapEntry* OXMLHelper::GetForceNewPageOptions()
{
static SvXMLEnumMapEntry s_aXML_EnumMap[] =
{
- // { XML_NONE, report::ForceNewPage::NONE }, // default
{ XML_BEFORE_SECTION, report::ForceNewPage::BEFORE_SECTION },
{ XML_AFTER_SECTION, report::ForceNewPage::AFTER_SECTION },
{ XML_BEFORE_AFTER_SECTION, report::ForceNewPage::BEFORE_AFTER_SECTION },
@@ -237,7 +232,6 @@ const SvXMLEnumMapEntry* OXMLHelper::GetKeepTogetherOptions()
{
static SvXMLEnumMapEntry s_aXML_EnumMap[] =
{
- // { XML_NO, report::KeepTogether::NO }, // default
{ XML_WHOLE_GROUP, report::KeepTogether::WHOLE_GROUP },
{ XML_WITH_FIRST_DETAIL, report::KeepTogether::WITH_FIRST_DETAIL },
{ XML_TOKEN_INVALID, 0 }
@@ -251,7 +245,6 @@ const SvXMLEnumMapEntry* OXMLHelper::GetCommandTypeOptions()
{
{ XML_TABLE, CommandType::TABLE },
{ XML_QUERY, CommandType::QUERY },
- // { XML_COMMAND, CommandType::COMMAND }, // default
{ XML_TOKEN_INVALID, 0 }
};
return s_aXML_EnumMap;
@@ -299,13 +292,6 @@ void OXMLHelper::copyStyleElements(const bool _bOld,const ::rtl::OUString& _sSty
{PROPERTY_FONTKERNING, static_cast<sal_uInt16>(PROPERTY_FONTKERNING.length), PROPERTY_ID_FONTKERNING, &::getCppuType(&aFont.Kerning) ,PropertyAttribute::BOUND,0},
{PROPERTY_CHARWORDMODE, static_cast<sal_uInt16>(PROPERTY_CHARWORDMODE.length), PROPERTY_ID_FONTWORDLINEMODE, &::getCppuType(&aFont.WordLineMode) ,PropertyAttribute::BOUND,0},
{PROPERTY_FONTTYPE, static_cast<sal_uInt16>(PROPERTY_FONTTYPE.length), PROPERTY_ID_FONTTYPE, &::getCppuType(&aFont.Type) ,PropertyAttribute::BOUND,0},
- //{PROPERTY_BACKGROUNDCOLOR, static_cast<sal_uInt16>(PROPERTY_BACKGROUNDCOLOR.length), PROPERTY_ID_BACKGROUNDCOLOR, &::getCppuType(&nBackgroundColor) ,PropertyAttribute::BOUND,0},,
- //{PROPERTY_PARAADJUST, static_cast<sal_uInt16>(PROPERTY_PARAADJUST.length), PROPERTY_ID_ALIGN, &::getCppuType(&nAlign) ,PropertyAttribute::BOUND,0},,
- //{PROPERTY_CONTROLBORDER, static_cast<sal_uInt16>(PROPERTY_CONTROLBORDER.length), PROPERTY_ID_BORDER, &::getCppuType(&aFont.Type) ,PropertyAttribute::BOUND,0},,
- //{PROPERTY_CONTROLBORDERCOLOR, static_cast<sal_uInt16>(PROPERTY_CONTROLBORDERCOLOR.length), PROPERTY_ID_BORDERCOLOR, &::getCppuType(&aFont.Type) ,PropertyAttribute::BOUND,0},,
- //{PROPERTY_CHARCOLOR, static_cast<sal_uInt16>(PROPERTY_TEXTCOLOR.length), PROPERTY_ID_TEXTCOLOR, &::getCppuType(&aFont.Type) ,PropertyAttribute::BOUND,0},,
- //{PROPERTY_FORMATKEY, static_cast<sal_uInt16>(PROPERTY_FORMATKEY.length), PROPERTY_ID_FORMATKEY, &::getCppuType(&aFont.Type) ,PropertyAttribute::BOUND,0},,
- //{PROPERTY_CHARUNDERLINECOLOR, static_cast<sal_uInt16>(PROPERTY_CHARUNDERLINECOLOR.length), PROPERTY_ID_TEXTLINECOLOR, &::getCppuType(&aFont.Type) ,PropertyAttribute::BOUND,0},,
{ NULL, 0, 0, NULL, 0, 0 }
};
try
@@ -344,7 +330,7 @@ void OXMLHelper::copyStyleElements(const bool _bOld,const ::rtl::OUString& _sSty
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"OXMLHelper::copyStyleElements -> exception catched");
+ OSL_FAIL("OXMLHelper::copyStyleElements -> exception catched");
}
}
}
@@ -364,7 +350,7 @@ uno::Reference<beans::XPropertySet> OXMLHelper::createBorderPropertySet()
// -----------------------------------------------------------------------------
SvXMLTokenMap* OXMLHelper::GetReportElemTokenMap()
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_REPORT, XML_REPORT_HEADER, XML_TOK_REPORT_HEADER },
{ XML_NAMESPACE_REPORT, XML_PAGE_HEADER , XML_TOK_PAGE_HEADER },
@@ -391,7 +377,7 @@ SvXMLTokenMap* OXMLHelper::GetReportElemTokenMap()
// -----------------------------------------------------------------------------
SvXMLTokenMap* OXMLHelper::GetSubDocumentElemTokenMap()
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_REPORT, XML_MASTER_DETAIL_FIELD, XML_TOK_MASTER_DETAIL_FIELD},
{ XML_NAMESPACE_REPORT, XML_MASTER, XML_TOK_MASTER},
@@ -405,7 +391,6 @@ const SvXMLEnumMapEntry* OXMLHelper::GetImageScaleOptions()
{
static SvXMLEnumMapEntry s_aXML_EnumMap[] =
{
- // { XML_NONE, awt::ImageScaleMode::None }, // default
{ XML_ISOTROPIC, awt::ImageScaleMode::Isotropic },
{ XML_ANISOTROPIC, awt::ImageScaleMode::Anisotropic },
{ XML_TOKEN_INVALID, 0 }
@@ -416,3 +401,5 @@ const SvXMLEnumMapEntry* OXMLHelper::GetImageScaleOptions()
// -----------------------------------------------------------------------------
} // rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlHelper.hxx b/reportdesign/source/filter/xml/xmlHelper.hxx
index 27600c411..4995161a5 100644
--- a/reportdesign/source/filter/xml/xmlHelper.hxx
+++ b/reportdesign/source/filter/xml/xmlHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -91,3 +92,4 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLHELPER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlImage.cxx b/reportdesign/source/filter/xml/xmlImage.cxx
index f0b5db6fb..d9b060599 100644
--- a/reportdesign/source/filter/xml/xmlImage.cxx
+++ b/reportdesign/source/filter/xml/xmlImage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113,7 +114,7 @@ OXMLImage::OXMLImage( ORptFilter& rImport,
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched while filling the image props");
+ OSL_FAIL("Exception catched while filling the image props");
}
}
// -----------------------------------------------------------------------------
@@ -128,3 +129,5 @@ OXMLImage::~OXMLImage()
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlImage.hxx b/reportdesign/source/filter/xml/xmlImage.hxx
index ee93c84d9..77eee02d4 100644
--- a/reportdesign/source/filter/xml/xmlImage.hxx
+++ b/reportdesign/source/filter/xml/xmlImage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#define RPT_XMLIMAGE_HXX
#include "xmlReportElementBase.hxx"
-#ifndef _COM_SUN_STAR_REPORT_XImageControl_HPP_
#include <com/sun/star/report/XImageControl.hpp>
-#endif
namespace rptxml
{
@@ -53,3 +52,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLIMAGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index 474360953..ce0bce184 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -148,7 +149,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName
{
uno::Reference< xml::sax::XAttributeList > xNewAttribs = _xAttrList;
bool bExport = true;
- if ( _sName.equalsAscii("office:report") )
+ if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("office:report")) )
{
const sal_Int16 nLength = (_xAttrList.is()) ? _xAttrList->getLength() : 0;
static const ::rtl::OUString s_sTRUE = ::xmloff::token::GetXMLToken(XML_TRUE);
@@ -191,13 +192,12 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName
}
catch(uno::Exception&)
{
- // OSL_ENSURE(0,"Exception catched while filling the report definition props");
}
m_xDelegatee->startElement(lcl_createAttribute(XML_NP_OFFICE,XML_CHART),NULL);
bExport = false;
m_bImportedChart = true;
}
- else if ( _sName.equalsAscii("rpt:master-detail-field") )
+ else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:master-detail-field")) )
{
const sal_Int16 nLength = (_xAttrList.is()) ? _xAttrList->getLength() : 0;
static const ::rtl::OUString s_sTRUE = ::xmloff::token::GetXMLToken(XML_TRUE);
@@ -233,17 +233,17 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception catched while filling the report definition props");
+ OSL_FAIL("Exception catched while filling the report definition props");
}
bExport = false;
}
- else if ( _sName.equalsAscii("rpt:detail")
- || _sName.equalsAscii("rpt:formatted-text")
- || _sName.equalsAscii("rpt:master-detail-fields")
- || _sName.equalsAscii("rpt:report-component")
- || _sName.equalsAscii("rpt:report-element"))
+ else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:detail"))
+ || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:formatted-text"))
+ || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:master-detail-fields"))
+ || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:report-component"))
+ || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:report-element")))
bExport = false;
- else if ( _sName.equalsAscii("chart:plot-area"))
+ else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("chart:plot-area")))
{
sal_Bool bHasCategories = sal_True;
const sal_Int16 nLength = (_xAttrList.is()) ? _xAttrList->getLength() : 0;
@@ -257,24 +257,23 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName
sLocalName = sAttrName;
else
sLocalName = sAttrName.copy( nColonPos + 1L );
- if ( sLocalName.equalsAscii("data-source-has-labels") )
+ if ( sLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("data-source-has-labels")) )
{
const rtl::OUString sValue = _xAttrList->getValueByIndex( i );
- bHasCategories = sValue.equalsAscii("both");
+ bHasCategories = sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("both"));
break;
}
- } // for(sal_Int16 i = 0; i < nLength; ++i)
+ }
beans::PropertyValue* pArgIter = m_aArguments.getArray();
beans::PropertyValue* pArgEnd = pArgIter + m_aArguments.getLength();
for(;pArgIter != pArgEnd;++pArgIter)
{
- if ( pArgIter->Name.equalsAscii("HasCategories") )
+ if ( pArgIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HasCategories")) )
{
pArgIter->Value <<= bHasCategories;
break;
}
- } // for(;pArgIter != pArgEnd;++pArgIter)
-
+ }
SvXMLAttributeList* pList = new SvXMLAttributeList();
xNewAttribs = pList;
@@ -291,11 +290,11 @@ void SAL_CALL ImportDocumentHandler::endElement(const ::rtl::OUString & _sName)
{
bool bExport = true;
::rtl::OUString sNewName = _sName;
- if ( _sName.equalsAscii("office:report") )
+ if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("office:report")) )
{
sNewName = lcl_createAttribute(XML_NP_OFFICE,XML_CHART);
}
- else if ( _sName.equalsAscii("rpt:master-detail-fields") )
+ else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:master-detail-fields")) )
{
if ( !m_aMasterFields.empty() )
m_xDatabaseDataProvider->setMasterFields(uno::Sequence< ::rtl::OUString>(&*m_aMasterFields.begin(),m_aMasterFields.size()));
@@ -303,11 +302,11 @@ void SAL_CALL ImportDocumentHandler::endElement(const ::rtl::OUString & _sName)
m_xDatabaseDataProvider->setDetailFields(uno::Sequence< ::rtl::OUString>(&*m_aDetailFields.begin(),m_aDetailFields.size()));
bExport = false;
}
- else if ( _sName.equalsAscii("rpt:detail")
- || _sName.equalsAscii("rpt:formatted-text")
- || _sName.equalsAscii("rpt:master-detail-field")
- || _sName.equalsAscii("rpt:report-component")
- || _sName.equalsAscii("rpt:report-element"))
+ else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:detail"))
+ || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:formatted-text"))
+ || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:master-detail-field"))
+ || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:report-component"))
+ || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:report-element")))
bExport = false;
if ( bExport )
@@ -357,7 +356,7 @@ void SAL_CALL ImportDocumentHandler::initialize( const uno::Sequence< uno::Any >
uno::Reference< chart2::data::XDataReceiver > xReceiver(m_xModel,uno::UNO_QUERY_THROW);
xReceiver->attachDataProvider(m_xDatabaseDataProvider.get());
- } // if ( !m_xDatabaseDataProvider.is() )
+ }
m_aArguments = m_xDatabaseDataProvider->detectArguments(NULL);
@@ -395,3 +394,4 @@ uno::Sequence< uno::Type > SAL_CALL ImportDocumentHandler::getTypes( ) throw (u
} // namespace rptxml
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
index 3066e537a..d2e531629 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,3 +104,5 @@ private:
} // namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_IMPORTDOCUMENTHANDLER_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlMasterFields.cxx b/reportdesign/source/filter/xml/xmlMasterFields.cxx
index 5c8876898..95ed8919b 100644
--- a/reportdesign/source/filter/xml/xmlMasterFields.cxx
+++ b/reportdesign/source/filter/xml/xmlMasterFields.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,3 +120,5 @@ SvXMLImportContext* OXMLMasterFields::CreateChildContext(
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlMasterFields.hxx b/reportdesign/source/filter/xml/xmlMasterFields.hxx
index 6d91c0fe5..b3d784e91 100644
--- a/reportdesign/source/filter/xml/xmlMasterFields.hxx
+++ b/reportdesign/source/filter/xml/xmlMasterFields.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLMasterFields_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlPropertyHandler.cxx b/reportdesign/source/filter/xml/xmlPropertyHandler.cxx
index 1cedb959b..a08d10eda 100644
--- a/reportdesign/source/filter/xml/xmlPropertyHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlPropertyHandler.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,4 @@ OXMLRptPropHdlFactory::~OXMLRptPropHdlFactory()
}// rptxml
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlPropertyHandler.hxx b/reportdesign/source/filter/xml/xmlPropertyHandler.hxx
index 168b592d9..1c36503a7 100644
--- a/reportdesign/source/filter/xml/xmlPropertyHandler.hxx
+++ b/reportdesign/source/filter/xml/xmlPropertyHandler.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,3 +48,4 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif //RPT_XMLPROPHANDLER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlReport.cxx b/reportdesign/source/filter/xml/xmlReport.cxx
index b2939642b..baa4e8a53 100644
--- a/reportdesign/source/filter/xml/xmlReport.cxx
+++ b/reportdesign/source/filter/xml/xmlReport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -110,7 +111,7 @@ OXMLReport::OXMLReport( ORptFilter& rImport,
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched while filling the report definition props");
+ OSL_FAIL("Exception catched while filling the report definition props");
}
}
// -----------------------------------------------------------------------------
@@ -234,3 +235,5 @@ void OXMLReport::addMasterDetailPair(const ::std::pair< ::rtl::OUString,::rtl::O
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlReport.hxx b/reportdesign/source/filter/xml/xmlReport.hxx
index 82004a6d1..a1300897f 100644
--- a/reportdesign/source/filter/xml/xmlReport.hxx
+++ b/reportdesign/source/filter/xml/xmlReport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,3 +69,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLREPORT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlReportElement.cxx b/reportdesign/source/filter/xml/xmlReportElement.cxx
index 875e44cf6..27833ec4f 100644
--- a/reportdesign/source/filter/xml/xmlReportElement.cxx
+++ b/reportdesign/source/filter/xml/xmlReportElement.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,7 +85,7 @@ OXMLReportElement::OXMLReportElement( ORptFilter& rImport,
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched while filling the report definition props");
+ OSL_FAIL("Exception catched while filling the report definition props");
}
}
// -----------------------------------------------------------------------------
@@ -141,3 +142,5 @@ ORptFilter& OXMLReportElement::GetOwnImport()
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlReportElement.hxx b/reportdesign/source/filter/xml/xmlReportElement.hxx
index 1bd7a63ee..00bdbe2d7 100644
--- a/reportdesign/source/filter/xml/xmlReportElement.hxx
+++ b/reportdesign/source/filter/xml/xmlReportElement.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,3 +57,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLREPORTELEMENT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlReportElementBase.cxx b/reportdesign/source/filter/xml/xmlReportElementBase.cxx
index 66bcf1433..540181509 100644
--- a/reportdesign/source/filter/xml/xmlReportElementBase.cxx
+++ b/reportdesign/source/filter/xml/xmlReportElementBase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -107,9 +108,11 @@ void OXMLReportElementBase::EndElement()
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception caught while inserting a new control!");
+ OSL_FAIL("Exception caught while inserting a new control!");
}
}
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlReportElementBase.hxx b/reportdesign/source/filter/xml/xmlReportElementBase.hxx
index 12dfc4417..546bdd0af 100644
--- a/reportdesign/source/filter/xml/xmlReportElementBase.hxx
+++ b/reportdesign/source/filter/xml/xmlReportElementBase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLREPORTELEMENTBASE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlRow.cxx b/reportdesign/source/filter/xml/xmlRow.cxx
index 033ab53a0..8bf08f9d9 100644
--- a/reportdesign/source/filter/xml/xmlRow.cxx
+++ b/reportdesign/source/filter/xml/xmlRow.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,9 +27,7 @@
************************************************************************/
#include "precompiled_rptxml.hxx"
-#ifndef RPT_XMLCOLUMN_HXX
#include "xmlColumn.hxx"
-#endif
#include <xmloff/xmluconv.hxx>
#include "xmlfilter.hxx"
#include <xmloff/xmltoken.hxx>
@@ -39,12 +38,8 @@
#include "xmlStyleImport.hxx"
#include <comphelper/namecontainer.hxx>
#include <comphelper/genericpropertyset.hxx>
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HXX_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef RPT_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
namespace rptxml
{
@@ -182,3 +177,5 @@ ORptFilter& OXMLRow::GetOwnImport()
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlRow.hxx b/reportdesign/source/filter/xml/xmlRow.hxx
index f71a9c11e..bbbe189ec 100644
--- a/reportdesign/source/filter/xml/xmlRow.hxx
+++ b/reportdesign/source/filter/xml/xmlRow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,3 +62,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLCOLUMN_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlSection.cxx b/reportdesign/source/filter/xml/xmlSection.cxx
index a2fb9c054..0dbcb8c88 100644
--- a/reportdesign/source/filter/xml/xmlSection.cxx
+++ b/reportdesign/source/filter/xml/xmlSection.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,19 +34,13 @@
#include <xmloff/xmluconv.hxx>
#include "xmlHelper.hxx"
#include "xmlEnums.hxx"
-#ifndef RPT_XMLCOLUMN_HXX
#include "xmlColumn.hxx"
-#endif
-#ifndef RPT_XMLCondPrtExpr_HXX
#include "xmlCondPrtExpr.hxx"
-#endif
#include "xmlStyleImport.hxx"
#include <connectivity/dbtools.hxx>
#include <tools/debug.hxx>
#include <com/sun/star/report/ReportPrintOption.hpp>
-#ifndef REPORTDESIGN_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
#include "xmlTable.hxx"
@@ -107,13 +102,13 @@ OXMLSection::OXMLSection( ORptFilter& rImport,
break;
default:
- OSL_ENSURE(0,"OXMLSection: Unknown attribute!");
+ OSL_FAIL("OXMLSection: Unknown attribute!");
}
}
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched while filling the section props");
+ OSL_FAIL("Exception catched while filling the section props");
}
}
// -----------------------------------------------------------------------------
@@ -156,3 +151,5 @@ ORptFilter& OXMLSection::GetOwnImport()
// -----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlSection.hxx b/reportdesign/source/filter/xml/xmlSection.hxx
index 03a8ee728..6172e74b0 100644
--- a/reportdesign/source/filter/xml/xmlSection.hxx
+++ b/reportdesign/source/filter/xml/xmlSection.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,3 +63,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLSECTION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 9fb23ab34..aea216686 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,7 +44,7 @@
#include <tools/debug.hxx>
#include "xmlfilter.hxx"
#include "xmlHelper.hxx"
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#define XML_LINE_LEFT 0
#define XML_LINE_RIGHT 1
@@ -71,7 +72,7 @@ public:
{
}
/** this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_IMPORT flag set */
- virtual sal_Bool handleSpecialItem(
+ virtual bool handleSpecialItem(
XMLPropertyState& /*rProperty*/,
::std::vector< XMLPropertyState >& /*rProperties*/,
const ::rtl::OUString& /*rValue*/,
@@ -128,7 +129,7 @@ void OControlStyleContext::FillPropertySet(const Reference< XPropertySet > & rPr
pStyle = PTR_CAST(SvXMLNumFormatContext,pMyStyles->
FindStyleChildContext(XML_STYLE_FAMILY_DATA_STYLE, m_sDataStyleName, sal_True));
else {
- DBG_ERROR("not possible to get style");
+ OSL_FAIL("not possible to get style");
}
}
if ( pStyle )
@@ -150,7 +151,7 @@ void OControlStyleContext::SetDefaults()
void OControlStyleContext::AddProperty(const sal_Int16 nContextID, const uno::Any& rValue)
{
sal_Int32 nIndex(static_cast<OReportStylesContext *>(pStyles)->GetIndex(nContextID));
- DBG_ASSERT(nIndex != -1, "Property not found in Map");
+ OSL_ENSURE(nIndex != -1, "Property not found in Map");
XMLPropertyState aPropState(nIndex, rValue);
GetProperties().push_back(aPropState); // has to be insertes in a sort order later
}
@@ -256,7 +257,6 @@ UniReference < SvXMLImportPropertyMapper >
{
UniReference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory();
m_xTableImpPropMapper = new SvXMLImportPropertyMapper( new XMLPropertySetMapper(OXMLHelper::GetTableStyleProps(), xFac), m_rImport );
- //m_xTableImpPropMapper = new SvXMLImportPropertyMapper( rImport.GetTableStylesPropertySetMapper(), m_rImport );
}
xMapper = m_xTableImpPropMapper;
}
@@ -311,7 +311,7 @@ SvXMLStyleContext *OReportStylesContext::CreateStyleStyleChildContext(
xAttrList, *this, nFamily );
break;
default:
- OSL_ENSURE(0,"OReportStylesContext::CreateStyleStyleChildContext: Unknown style family. PLease check.");
+ OSL_FAIL("OReportStylesContext::CreateStyleStyleChildContext: Unknown style family. PLease check.");
break;
}
}
@@ -368,7 +368,7 @@ Reference < XNameContainer >
xStyles = ((SvXMLImport *)&GetImport())->GetTextImport()->GetFrameStyles();
break;
default:
- OSL_ENSURE(0,"OReportStylesContext::CreateStyleStyleChildContext: Unknown style family. PLease check.");
+ OSL_FAIL("OReportStylesContext::CreateStyleStyleChildContext: Unknown style family. PLease check.");
break;
}
if( !xStyles.is() && sName.getLength() && GetOwnImport().GetModel().is() )
@@ -457,3 +457,5 @@ sal_uInt16 OReportStylesContext::GetFamily( const ::rtl::OUString& rFamily ) con
// -----------------------------------------------------------------------------
} // rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.hxx b/reportdesign/source/filter/xml/xmlStyleImport.hxx
index 5f39bd768..8fec6ff9a 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.hxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,12 +35,8 @@
#include <xmloff/maptype.hxx>
#include <xmloff/prstylei.hxx>
#include <xmloff/xmlimppr.hxx>
-#ifndef _XMLTEXTMASTERPAGECONTEXT_HXX
#include <xmloff/XMLTextMasterPageContext.hxx>
-#endif
-#ifndef _XMLTEXTMASTERSTYLESCONTEXT_HXX
#include <xmloff/XMLTextMasterStylesContext.hxx>
-#endif
#include <xmloff/contextid.hxx>
#include <xmloff/controlpropertyhdl.hxx>
#include <vector>
@@ -164,3 +161,5 @@ namespace rptxml
} // rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLSTYLEIMPORT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlSubDocument.cxx b/reportdesign/source/filter/xml/xmlSubDocument.cxx
index 8019f9451..8f89ed2c9 100644
--- a/reportdesign/source/filter/xml/xmlSubDocument.cxx
+++ b/reportdesign/source/filter/xml/xmlSubDocument.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,9 +120,6 @@ void OXMLSubDocument::EndElement()
m_xComponent.set(m_pContainer->getSection()->getByIndex(m_nCurrentCount),uno::UNO_QUERY);
if ( m_xComponent.is() )
{
- // #i94115# this is no longer need.
- // m_pContainer->addCell(m_xComponent.get());
-
if ( !m_aMasterFields.empty() )
m_xComponent->setMasterFields(Sequence< ::rtl::OUString>(&*m_aMasterFields.begin(),m_aMasterFields.size()));
if ( !m_aDetailFields.empty() )
@@ -142,11 +140,11 @@ void OXMLSubDocument::EndElement()
uno::Reference< report::XFormatCondition > xNewCond = xComponentModel->createFormatCondition();
::comphelper::copyProperties(xCond.get(),xNewCond.get());
xComponentModel->insertByIndex(xComponentModel->getCount(),uno::makeAny(xNewCond));
- } // for (sal_Int32 i = 0; i < nCount ; ++i)
+ }
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Can not access format condition!");
+ OSL_FAIL("Can not access format condition!");
}
}
@@ -162,3 +160,5 @@ void OXMLSubDocument::addMasterDetailPair(const ::std::pair< ::rtl::OUString,::r
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlSubDocument.hxx b/reportdesign/source/filter/xml/xmlSubDocument.hxx
index 257f4d0ed..50bb1b91c 100644
--- a/reportdesign/source/filter/xml/xmlSubDocument.hxx
+++ b/reportdesign/source/filter/xml/xmlSubDocument.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,3 +70,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLSubDocument_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlTable.cxx b/reportdesign/source/filter/xml/xmlTable.cxx
index 344c7f50a..27d01d59f 100644
--- a/reportdesign/source/filter/xml/xmlTable.cxx
+++ b/reportdesign/source/filter/xml/xmlTable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,18 +35,14 @@
#include "RptDef.hxx"
#include "xmlHelper.hxx"
#include "xmlEnums.hxx"
-#ifndef RPT_XMLCOLUMN_HXX
#include "xmlColumn.hxx"
-#endif
#include <com/sun/star/report/ForceNewPage.hpp>
#include "xmlCondPrtExpr.hxx"
#include "xmlStyleImport.hxx"
#include "xmlstrings.hrc"
#include <connectivity/dbtools.hxx>
#include <tools/debug.hxx>
-#ifndef REPORTDESIGN_SHARED_XMLSTRINGS_HRC
#include "xmlstrings.hrc"
-#endif
#include <com/sun/star/report/XShape.hpp>
#include <com/sun/star/report/XFixedLine.hpp>
@@ -125,7 +122,7 @@ OXMLTable::OXMLTable( ORptFilter& rImport
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched while filling the section props");
+ OSL_FAIL("Exception catched while filling the section props");
}
}
// -----------------------------------------------------------------------------
@@ -195,7 +192,7 @@ void OXMLTable::EndElement()
pAutoStyle->FillPropertySet(m_xSection.get());
}
}
- } // if ( m_sStyleName.getLength() )
+ }
// set height
::std::vector<sal_Int32>::iterator aIter = m_aHeight.begin();
::std::vector<sal_Int32>::iterator aEnd = m_aHeight.end();
@@ -272,7 +269,7 @@ void OXMLTable::EndElement()
}
catch(beans::PropertyVetoException)
{
- OSL_ENSURE(0,"Could not set the correct position or size!");
+ OSL_FAIL("Could not set the correct position or size!");
}
}
}
@@ -281,11 +278,11 @@ void OXMLTable::EndElement()
}
nPosY += m_aHeight[i];
}
- } // if ( m_xComponent.is() )
+ }
}
catch(Exception&)
{
- OSL_ENSURE(0,"OXMLTable::EndElement -> exception catched");
+ OSL_FAIL("OXMLTable::EndElement -> exception catched");
}
}
// -----------------------------------------------------------------------------
@@ -321,3 +318,5 @@ void OXMLTable::incrementRowIndex()
//----------------------------------------------------------------------------
} // namespace rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlTable.hxx b/reportdesign/source/filter/xml/xmlTable.hxx
index 4d7dce7c3..29105d9b3 100644
--- a/reportdesign/source/filter/xml/xmlTable.hxx
+++ b/reportdesign/source/filter/xml/xmlTable.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,3 +98,5 @@ namespace rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLTABLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index 4128b714d..0b130263b 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,7 +59,7 @@
#include <xmloff/xmlmetai.hxx>
#include <com/sun/star/util/XModifiable.hpp>
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <svtools/sfxecode.hxx>
#include "xmlEnums.hxx"
#include "xmlStyleImport.hxx"
@@ -84,8 +85,8 @@ using namespace ::com::sun::star::io;
using namespace ::com::sun::star::report;
using namespace ::com::sun::star::xml::sax;
using namespace xmloff;
- sal_Char __READONLY_DATA sXML_np__rpt[] = "_report";
- sal_Char __READONLY_DATA sXML_np___rpt[] = "__report";
+ sal_Char const sXML_np__rpt[] = "_report";
+ sal_Char const sXML_np___rpt[] = "__report";
using namespace ::com::sun::star::util;
@@ -137,9 +138,9 @@ sal_Int32 ReadThroughComponent(
const uno::Reference< XDocumentHandler >& _xFilter,
sal_Bool /*bEncrypted*/ )
{
- DBG_ASSERT(xInputStream.is(), "input stream missing");
- DBG_ASSERT(xModelComponent.is(), "document missing");
- DBG_ASSERT(rFactory.is(), "factory missing");
+ OSL_ENSURE(xInputStream.is(), "input stream missing");
+ OSL_ENSURE(xModelComponent.is(), "document missing");
+ OSL_ENSURE(rFactory.is(), "factory missing");
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "rptxml", "oj", "ReadThroughComponent" );
@@ -150,15 +151,15 @@ sal_Int32 ReadThroughComponent(
// get parser
uno::Reference< XParser > xParser(
rFactory->createInstance(
- ::rtl::OUString::createFromAscii("com.sun.star.xml.sax.Parser") ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser"))),
UNO_QUERY );
- DBG_ASSERT( xParser.is(), "Can't create parser" );
+ OSL_ENSURE( xParser.is(), "Can't create parser" );
if( !xParser.is() )
return 1;
RTL_LOGFILE_CONTEXT_TRACE( aLog, "parser created" );
// get filter
- DBG_ASSERT( _xFilter.is(), "Can't instantiate filter component." );
+ OSL_ENSURE( _xFilter.is(), "Can't instantiate filter component." );
if( !_xFilter.is() )
return 1;
@@ -195,7 +196,7 @@ r
aError += ',';
aError += ByteString::CreateFromInt32( r.ColumnNumber );
- DBG_ERROR( aError.GetBuffer() );
+ OSL_FAIL( aError.GetBuffer() );
#endif
return 1;
}
@@ -232,8 +233,8 @@ sal_Int32 ReadThroughComponent(
const ::rtl::OUString& _sFilterName
,const uno::Reference<beans::XPropertySet>& _xProp)
{
- DBG_ASSERT( xStorage.is(), "Need storage!");
- DBG_ASSERT(NULL != pStreamName, "Please, please, give me a name!");
+ OSL_ENSURE( xStorage.is(), "Need storage!");
+ OSL_ENSURE(NULL != pStreamName, "Please, please, give me a name!");
if ( xStorage.is() )
{
@@ -481,11 +482,11 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
const PropertyValue* pEnd = pIter + rDescriptor.getLength();
for(;pIter != pEnd;++pIter)
{
- if( pIter->Name.equalsAscii( "FileName" ) )
+ if( pIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FileName" ) ) )
pIter->Value >>= sFileName;
- else if( pIter->Name.equalsAscii( "Storage" ) )
+ else if( pIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Storage" ) ) )
pIter->Value >>= xStorage;
- else if( pIter->Name.equalsAscii( "ComponentData" ) )
+ else if( pIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ComponentData" ) ) )
{
Sequence< PropertyValue > aComponent;
pIter->Value >>= aComponent;
@@ -493,7 +494,7 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
const PropertyValue* pComponentEnd = pComponentIter + aComponent.getLength();
for(;pComponentIter != pComponentEnd;++pComponentIter)
{
- if( pComponentIter->Name.equalsAscii( "ActiveConnection" ) )
+ if( pComponentIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ActiveConnection" ) ) )
{
uno::Reference<sdbc::XConnection> xCon(pComponentIter->Value,uno::UNO_QUERY);
xNumberFormatsSupplier = ::dbtools::getNumberFormats(xCon);
@@ -515,13 +516,12 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
try
{
xStorage = pMedium->GetStorage();
- // nError = pMedium->GetError();
}
catch(const Exception&)
{
}
- } // if( pMedium )
- } // if ( bRet = (sFileName.getLength() != 0) )
+ }
+ }
sal_Bool bRet = xStorage.is();
if ( bRet )
{
@@ -741,20 +741,16 @@ const SvXMLTokenMap& ORptFilter::GetDocElemTokenMap() const
{
if ( !m_pDocElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_OFFICE, XML_SETTINGS, XML_TOK_DOC_SETTINGS },
- //{ XML_NAMESPACE_OOO, XML_SETTINGS, XML_TOK_DOC_SETTINGS },
{ XML_NAMESPACE_OFFICE, XML_STYLES, XML_TOK_DOC_STYLES },
- //{ XML_NAMESPACE_OOO, XML_STYLES, XML_TOK_DOC_STYLES },
{ XML_NAMESPACE_OFFICE, XML_AUTOMATIC_STYLES, XML_TOK_DOC_AUTOSTYLES },
- //{ XML_NAMESPACE_OOO, XML_AUTOMATIC_STYLES, XML_TOK_DOC_AUTOSTYLES },
{ XML_NAMESPACE_OFFICE, XML_REPORT, XML_TOK_DOC_REPORT },
{ XML_NAMESPACE_OOO, XML_REPORT, XML_TOK_DOC_REPORT },
{ XML_NAMESPACE_OFFICE, XML_FONT_FACE_DECLS, XML_TOK_DOC_FONTDECLS },
{ XML_NAMESPACE_OFFICE, XML_MASTER_STYLES, XML_TOK_DOC_MASTERSTYLES },
{ XML_NAMESPACE_OFFICE, XML_DOCUMENT_META, XML_TOK_DOC_META },
- //{ XML_NAMESPACE_OOO, XML_FONT_FACE_DECLS, XML_TOK_DOC_FONTDECLS },
XML_TOKEN_MAP_END
};
m_pDocElemTokenMap.reset(new SvXMLTokenMap( aElemTokenMap ));
@@ -780,7 +776,7 @@ const SvXMLTokenMap& ORptFilter::GetFunctionElemTokenMap() const
{
if ( !m_pFunctionElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_REPORT, XML_NAME, XML_TOK_FUNCTION_NAME },
{ XML_NAMESPACE_REPORT, XML_FORMULA, XML_TOK_FUNCTION_FORMULA},
@@ -798,11 +794,11 @@ const SvXMLTokenMap& ORptFilter::GetFormatElemTokenMap() const
{
if ( !m_pFormatElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
- { XML_NAMESPACE_REPORT, XML_ENABLED , XML_TOK_ENABLED },
- { XML_NAMESPACE_REPORT, XML_FORMULA , XML_TOK_FORMULA },
- { XML_NAMESPACE_REPORT, XML_STYLE_NAME , XML_TOK_FORMAT_STYLE_NAME },
+ { XML_NAMESPACE_REPORT, XML_ENABLED , XML_TOK_ENABLED },
+ { XML_NAMESPACE_REPORT, XML_FORMULA , XML_TOK_FORMULA },
+ { XML_NAMESPACE_REPORT, XML_STYLE_NAME , XML_TOK_FORMAT_STYLE_NAME },
XML_TOKEN_MAP_END
};
m_pFormatElemTokenMap.reset(new SvXMLTokenMap( aElemTokenMap ));
@@ -814,7 +810,7 @@ const SvXMLTokenMap& ORptFilter::GetGroupElemTokenMap() const
{
if ( !m_pGroupElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_REPORT, XML_START_NEW_COLUMN , XML_TOK_START_NEW_COLUMN },
{ XML_NAMESPACE_REPORT, XML_RESET_PAGE_NUMBER , XML_TOK_RESET_PAGE_NUMBER },
@@ -828,7 +824,6 @@ const SvXMLTokenMap& ORptFilter::GetGroupElemTokenMap() const
{ XML_NAMESPACE_REPORT, XML_SORT_ASCENDING , XML_TOK_SORT_ASCENDING },
{ XML_NAMESPACE_REPORT, XML_KEEP_TOGETHER , XML_TOK_GROUP_KEEP_TOGETHER },
{ XML_NAMESPACE_REPORT, XML_FUNCTION , XML_TOK_GROUP_FUNCTION },
- //{ XML_NAMESPACE_REPORT, XML_ , XML_TOK_ },
XML_TOKEN_MAP_END
};
m_pGroupElemTokenMap.reset(new SvXMLTokenMap( aElemTokenMap ));
@@ -840,7 +835,7 @@ const SvXMLTokenMap& ORptFilter::GetReportElementElemTokenMap() const
{
if ( !m_pElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_REPORT, XML_PRINT_REPEATED_VALUES ,XML_TOK_PRINT_REPEATED_VALUES },
{ XML_NAMESPACE_REPORT, XML_PRINT_ONLY_WHEN_GROUP_CHANGE,XML_TOK_PRINT_ONLY_WHEN_GROUP_CHANGE },
@@ -858,7 +853,7 @@ const SvXMLTokenMap& ORptFilter::GetControlElemTokenMap() const
{
if ( !m_pControlElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_FORM, XML_LABEL ,XML_TOK_LABEL },
{ XML_NAMESPACE_FORM, XML_PROPERTIES ,XML_TOK_PROPERTIES },
@@ -880,7 +875,7 @@ const SvXMLTokenMap& ORptFilter::GetControlPropertyElemTokenMap() const
{
if ( !m_pControlElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_FORM, XML_PROPERTY_NAME ,XML_TOK_PROPERTY_NAME },
{ XML_NAMESPACE_OOO, XML_VALUE_TYPE ,XML_TOK_VALUE_TYPE },
@@ -902,7 +897,7 @@ const SvXMLTokenMap& ORptFilter::GetComponentElemTokenMap() const
{
if ( !m_pComponentElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_DRAW, XML_NAME , XML_TOK_NAME },
{ XML_NAMESPACE_DRAW, XML_TEXT_STYLE_NAME , XML_TOK_TEXT_STYLE_NAME },
@@ -918,7 +913,7 @@ const SvXMLTokenMap& ORptFilter::GetColumnTokenMap() const
{
if ( !m_pColumnTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_TABLE, XML_NAME , XML_TOK_NAME },
{ XML_NAMESPACE_TABLE, XML_STYLE_NAME , XML_TOK_COLUMN_STYLE_NAME },
@@ -942,7 +937,7 @@ const SvXMLTokenMap& ORptFilter::GetSectionElemTokenMap() const
{
if ( !m_pSectionElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_TABLE, XML_TABLE , XML_TOK_TABLE },
{ XML_NAMESPACE_TABLE, XML_NAME , XML_TOK_SECTION_NAME },
@@ -965,7 +960,7 @@ const SvXMLTokenMap& ORptFilter::GetCellElemTokenMap() const
{
if ( !m_pCellElemTokenMap.get() )
{
- static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
+ static SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_TEXT, XML_P , XML_TOK_P },
{ XML_NAMESPACE_REPORT, XML_FIXED_CONTENT , XML_TOK_FIXED_CONTENT },
@@ -994,10 +989,8 @@ SvXMLImportContext* ORptFilter::CreateStylesContext(const ::rtl::OUString& rLoca
{
pContext = new OReportStylesContext(*this, XML_NAMESPACE_OFFICE, rLocalName, xAttrList, bIsAutoStyle);
if (bIsAutoStyle)
- //xAutoStyles = pContext;
SetAutoStyles((SvXMLStylesContext*)pContext);
else
- //xStyles = pContext;
SetStyles((SvXMLStylesContext*)pContext);
}
return pContext;
@@ -1041,20 +1034,6 @@ void ORptFilter::FinishStyles()
// -----------------------------------------------------------------------------
::rtl::OUString ORptFilter::convertFormula(const ::rtl::OUString& _sFormula)
{
- //sal_Int32 nLen = _sFormula.getLength();
- //if ( nLen )
- //{
- // const static ::rtl::OUString s_sField(RTL_CONSTASCII_USTRINGPARAM("field:["));
- // sal_Int32 nPos = _sFormula.indexOf(s_sField);
- // if ( nPos == -1 )
- // nPos = 4; // "rpt:"
- // else
- // {
- // nPos = s_sField.getLength();
- // --nLen; // eat "]"
- // }
- // return _sFormula.copy(nPos,nLen-nPos);
- //}
return _sFormula;
}
// -----------------------------------------------------------------------------
@@ -1075,12 +1054,12 @@ void SAL_CALL ORptFilter::startDocument( void )
void ORptFilter::endDocument( void )
throw( xml::sax::SAXException, uno::RuntimeException )
{
- DBG_ASSERT( GetModel().is(), "model missing; maybe startDocument wasn't called?" );
+ OSL_ENSURE( GetModel().is(), "model missing; maybe startDocument wasn't called?" );
if( !GetModel().is() )
return;
// this method will modify the document directly -> lock SolarMutex
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// Clear the shape import to sort the shapes (and not in the
// destructor that might be called after the import has finished
// for Java filters.
@@ -1108,8 +1087,8 @@ SvXMLImportContext* ORptFilter::CreateMetaContext(const ::rtl::OUString& rLocalN
if ( (getImportFlags() & IMPORT_META) )
{
uno::Reference<xml::sax::XDocumentHandler> xDocBuilder(
- getServiceFactory()->createInstance(::rtl::OUString::createFromAscii(
- "com.sun.star.xml.dom.SAXDocumentBuilder")),
+ getServiceFactory()->createInstance(::rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.dom.SAXDocumentBuilder"))),
uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(GetModel(), uno::UNO_QUERY_THROW);
pContext = new SvXMLMetaDocumentContext(*this,XML_NAMESPACE_OFFICE, rLocalName,xDPS->getDocumentProperties(), xDocBuilder);
@@ -1128,10 +1107,12 @@ sal_Bool ORptFilter::isOldFormat() const
{
xProp->getPropertyValue(s_sOld) >>= bOldFormat;
}
- } // if ( xProp.is() )
+ }
return bOldFormat;
}
// -----------------------------------------------------------------------------
}// rptxml
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlfilter.hxx b/reportdesign/source/filter/xml/xmlfilter.hxx
index 60bc6c23e..e179a0baf 100644
--- a/reportdesign/source/filter/xml/xmlfilter.hxx
+++ b/reportdesign/source/filter/xml/xmlfilter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -245,3 +246,5 @@ public:
} // rptxml
// -----------------------------------------------------------------------------
#endif // RPT_XMLFILTER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/filter/xml/xmlservices.cxx b/reportdesign/source/filter/xml/xmlservices.cxx
index a3040063d..5dd3804d5 100644
--- a/reportdesign/source/filter/xml/xmlservices.cxx
+++ b/reportdesign/source/filter/xml/xmlservices.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -92,3 +93,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron
{
*envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/inc/GroupProperties.hxx b/reportdesign/source/inc/GroupProperties.hxx
index 3ceec177a..e07244dba 100644
--- a/reportdesign/source/inc/GroupProperties.hxx
+++ b/reportdesign/source/inc/GroupProperties.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,5 @@ namespace rptshared
};
}
#endif //RPT_SHARED_GROUPS_PROPERTIES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/inc/constasciistring.hxx b/reportdesign/source/inc/constasciistring.hxx
index f4d6246ac..e76472a68 100644
--- a/reportdesign/source/inc/constasciistring.hxx
+++ b/reportdesign/source/inc/constasciistring.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef _RPTSHARED_CONSTASCIISTRING_HXX_
#define _RPTSHARED_CONSTASCIISTRING_HXX_
@@ -59,3 +60,5 @@ inline ConstAsciiString::operator const ::rtl::OUString& () const
#endif // _RPTSHARED_CONSTASCIISTRING_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/shared/corestrings.cxx b/reportdesign/source/shared/corestrings.cxx
index 5e99a6f17..fac2fb13c 100644
--- a/reportdesign/source/shared/corestrings.cxx
+++ b/reportdesign/source/shared/corestrings.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,3 +34,4 @@ namespace reportdesign
#include "stringconstants.cxx"
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/shared/stringconstants.cxx b/reportdesign/source/shared/stringconstants.cxx
index d05dede75..0c15d46d9 100644
--- a/reportdesign/source/shared/stringconstants.cxx
+++ b/reportdesign/source/shared/stringconstants.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -274,3 +275,5 @@ IMPLEMENT_CONSTASCII_USTRING(PROPERTY_UNVISITEDCHARSTYLENAME, "UnvisitedCharStyl
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_ORDER, "Order");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_APPLYFILTER, "ApplyFilter");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_MAXROWS, "MaxRows");
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/shared/uistrings.cxx b/reportdesign/source/shared/uistrings.cxx
index c0261d948..f8d4eb988 100644
--- a/reportdesign/source/shared/uistrings.cxx
+++ b/reportdesign/source/shared/uistrings.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,3 +69,5 @@ namespace rptui
IMPLEMENT_CONSTASCII_USTRING(DBTEXTBOXBOUNDCONTENT , "TextBoxBoundContent");
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/shared/xmlstrings.cxx b/reportdesign/source/shared/xmlstrings.cxx
index 75a415303..c33c7f746 100644
--- a/reportdesign/source/shared/xmlstrings.cxx
+++ b/reportdesign/source/shared/xmlstrings.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,4 @@ IMPLEMENT_CONSTASCII_USTRING(PROPERTY_BORDERTOP , "BorderTop");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_BORDERBOTTOM , "BorderBottom");
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index 426ee5c9e..ad98ff4ff 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,8 +76,6 @@ class OAddFieldWindowListBox : public SvTreeListBox
OAddFieldWindowListBox(const OAddFieldWindowListBox&);
void operator =(const OAddFieldWindowListBox&);
-protected:
-// virtual void Command( const CommandEvent& rEvt );
public:
OAddFieldWindowListBox( OAddFieldWindow* _pParent );
@@ -206,7 +205,6 @@ OAddFieldWindow::OAddFieldWindow(Window* pParent
m_aHelpText.SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor() );
SetSizePixel(Size(STD_WIN_SIZE_X,STD_WIN_SIZE_Y));
- //Show();
if ( m_xRowSet.is() )
{
@@ -447,7 +445,7 @@ void OAddFieldWindow::fillDescriptor(SvLBoxEntry* _pSelected,::svx::ODataAccessD
uno::Reference<frame::XModel> xModel(xDocument->getDatabaseDocument(),uno::UNO_QUERY);
if ( xModel.is() )
_rDescriptor[ daDatabaseLocation ] <<= xModel->getURL();
- } // if ( xDocument.is() )
+ }
}
_rDescriptor[ ::svx::daCommand ] <<= GetCommand();
@@ -456,7 +454,6 @@ void OAddFieldWindow::fillDescriptor(SvLBoxEntry* _pSelected,::svx::ODataAccessD
_rDescriptor[ ::svx::daConnection ] <<= getConnection();
ColumnInfo* pInfo = static_cast<ColumnInfo*>(_pSelected->GetUserData());
- // ::rtl::OUString sColumnName = m_pListBox->GetEntryText( _pSelected );
_rDescriptor[ ::svx::daColumnName ] <<= pInfo->sColumnName;
if ( m_xColumns->hasByName( pInfo->sColumnName ) )
_rDescriptor[ ::svx::daColumnObject ] <<= m_xColumns->getByName(pInfo->sColumnName);
@@ -511,16 +508,12 @@ IMPL_LINK( OAddFieldWindow, OnDoubleClickHdl, void* ,/*_pAddFieldDlg*/)
return 0L;
}
//------------------------------------------------------------------------------
-ImageList OAddFieldWindow::getImageList(sal_Int16 _eBitmapSet,sal_Bool _bHiContast) const
+ImageList OAddFieldWindow::getImageList(sal_Int16 _eBitmapSet) const
{
sal_Int16 nN = IMG_ADDFIELD_DLG_SC;
- sal_Int16 nH = IMG_ADDFIELD_DLG_SCH;
if ( _eBitmapSet == SFX_SYMBOLS_SIZE_LARGE )
- {
nN = IMG_ADDFIELD_DLG_LC;
- nH = IMG_ADDFIELD_DLG_LCH;
- }
- return ImageList(ModuleRes( _bHiContast ? nH : nN ));
+ return ImageList(ModuleRes(nN));
}
//------------------------------------------------------------------
void OAddFieldWindow::resizeControls(const Size& _rDiff)
@@ -556,7 +549,7 @@ IMPL_LINK( OAddFieldWindow, OnSortAction, ToolBox*, /*NOTINTERESTEDIN*/ )
eSortMode = SortAscending;
else if ( m_aActions.IsItemChecked(SID_FM_SORTDOWN) )
eSortMode = SortDescending;
- } // if ( SID_FM_REMOVE_FILTER_SORT != nCurItem )
+ }
m_pListBox->GetModel()->SetSortMode(eSortMode);
if ( SID_FM_REMOVE_FILTER_SORT == nCurItem )
@@ -572,3 +565,4 @@ IMPL_LINK( OAddFieldWindow, OnSortAction, ToolBox*, /*NOTINTERESTEDIN*/ )
} // namespace rptui
// =============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index 929ae6e1e..cbb4895f8 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -368,7 +369,7 @@ namespace rptui
aPos += LogicToPixel( Point( 0 , UNRELATED_CONTROLS ), MAP_APPFONT );
Window* pWindows[] = { &m_aPB_OK, &m_aPB_CANCEL, &m_aPB_Help };
- for ( size_t i= 0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i )
+ for ( size_t i= 0; i < SAL_N_ELEMENTS(pWindows); ++i )
{
pWindows[i]->SetPosSizePixel( 0, aPos.Y(), 0, 0, WINDOW_POSSIZE_Y );
}
@@ -393,7 +394,7 @@ namespace rptui
}
catch(Exception&)
{
- OSL_ENSURE(0,"Can not access format condition!");
+ OSL_FAIL("Can not access format condition!");
}
impl_conditionCountChanged();
@@ -623,3 +624,5 @@ namespace rptui
// .............................................................................
} // rptui
// .............................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/dlg/CondFormat.hrc b/reportdesign/source/ui/dlg/CondFormat.hrc
index 3c3b2ad8d..1f3eac2b0 100644
--- a/reportdesign/source/ui/dlg/CondFormat.hrc
+++ b/reportdesign/source/ui/dlg/CondFormat.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -67,8 +67,6 @@
#define BTN_MOVE_DOWN 21
#define BTN_ADD_CONDITION 22
#define BTN_REMOVE_CONDITION 23
-#define IMG_MOVE_UP_HC 24
-#define IMG_MOVE_DOWN_HC 25
#define ROW_0_POS ( RELATED_CONTROLS )
#define ROW_0_HEIGTH ( FIXEDTEXT_HEIGHT )
diff --git a/reportdesign/source/ui/dlg/CondFormat.src b/reportdesign/source/ui/dlg/CondFormat.src
index 58af87f8c..5e3c9929b 100644
--- a/reportdesign/source/ui/dlg/CondFormat.src
+++ b/reportdesign/source/ui/dlg/CondFormat.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -190,16 +190,6 @@ Control WIN_CONDITION
Size = MAP_APPFONT( IMAGE_BUTTON_WIDTH, IMAGE_BUTTON_HEIGHT );
Text = "-";
};
-
- Image IMG_MOVE_UP_HC
- {
- ImageBitmap = Bitmap { File = "arrow_move_up_hc" ; };
- };
-
- Image IMG_MOVE_DOWN_HC
- {
- ImageBitmap = Bitmap { File = "arrow_move_down_hc" ; };
- };
};
ModalDialog RID_CONDFORMAT
@@ -286,57 +276,29 @@ ImageList IMG_CONDFORMAT_DLG_SC
MASKCOLOR;
FileList =
{
- < "res/commandimagelist/sc_bold.png" ; SID_ATTR_CHAR_WEIGHT ; > ;
- < "res/commandimagelist/sc_italic.png" ; SID_ATTR_CHAR_POSTURE ; > ;
- < "res/commandimagelist/sc_underline.png" ; SID_ATTR_CHAR_UNDERLINE ; > ;
- < "res/commandimagelist/sc_backgroundcolor.png" ; SID_BACKGROUND_COLOR ; > ;
- < "res/commandimagelist/sc_fontcolor.png" ; SID_ATTR_CHAR_COLOR2 ; > ;
- < "res/commandimagelist/sc_fontdialog.png" ; SID_CHAR_DLG ; > ;
+ < "cmd/sc_bold.png" ; SID_ATTR_CHAR_WEIGHT ; > ;
+ < "cmd/sc_italic.png" ; SID_ATTR_CHAR_POSTURE ; > ;
+ < "cmd/sc_underline.png" ; SID_ATTR_CHAR_UNDERLINE ; > ;
+ < "cmd/sc_backgroundcolor.png" ; SID_BACKGROUND_COLOR ; > ;
+ < "cmd/sc_fontcolor.png" ; SID_ATTR_CHAR_COLOR2 ; > ;
+ < "cmd/sc_fontdialog.png" ; SID_CHAR_DLG ; > ;
};
};
-ImageList IMG_CONDFORMAT_DLG_SCH
-{
- MASKCOLOR;
- FileList =
- {
- < "res/commandimagelist/sch_bold.png" ; SID_ATTR_CHAR_WEIGHT ; > ;
- < "res/commandimagelist/sch_italic.png" ; SID_ATTR_CHAR_POSTURE ; > ;
- < "res/commandimagelist/sch_underline.png" ; SID_ATTR_CHAR_UNDERLINE ; > ;
- < "res/commandimagelist/sch_backgroundcolor.png" ; SID_BACKGROUND_COLOR ; > ;
- < "res/commandimagelist/sch_fontcolor.png" ; SID_ATTR_CHAR_COLOR2 ; > ;
- < "res/commandimagelist/sch_fontdialog.png" ; SID_CHAR_DLG ; > ;
- };
-};
ImageList IMG_CONDFORMAT_DLG_LC
{
MASKCOLOR;
FileList =
{
- < "res/commandimagelist/lc_bold.png" ; SID_ATTR_CHAR_WEIGHT ; > ;
- < "res/commandimagelist/lc_italic.png" ; SID_ATTR_CHAR_POSTURE ; > ;
- < "res/commandimagelist/lc_underline.png" ; SID_ATTR_CHAR_UNDERLINE ; > ;
- < "res/commandimagelist/lc_backgroundcolor.png" ; SID_BACKGROUND_COLOR ; > ;
- < "res/commandimagelist/lc_fontcolor.png" ; SID_ATTR_CHAR_COLOR2 ; > ;
- < "res/commandimagelist/lc_fontdialog.png" ; SID_CHAR_DLG ; > ;
- };
-};
-ImageList IMG_CONDFORMAT_DLG_LCH
-{
- MASKCOLOR;
- FileList =
- {
- < "res/commandimagelist/lch_bold.png" ; SID_ATTR_CHAR_WEIGHT ; > ;
- < "res/commandimagelist/lch_italic.png" ; SID_ATTR_CHAR_POSTURE ; > ;
- < "res/commandimagelist/lch_underline.png" ; SID_ATTR_CHAR_UNDERLINE ; > ;
- < "res/commandimagelist/lch_backgroundcolor.png" ; SID_BACKGROUND_COLOR ; > ;
- < "res/commandimagelist/lch_fontcolor.png" ; SID_ATTR_CHAR_COLOR2 ; > ;
- < "res/commandimagelist/lch_fontdialog.png" ; SID_CHAR_DLG ; > ;
+ < "cmd/lc_bold.png" ; SID_ATTR_CHAR_WEIGHT ; > ;
+ < "cmd/lc_italic.png" ; SID_ATTR_CHAR_POSTURE ; > ;
+ < "cmd/lc_underline.png" ; SID_ATTR_CHAR_UNDERLINE ; > ;
+ < "cmd/lc_backgroundcolor.png" ; SID_BACKGROUND_COLOR ; > ;
+ < "cmd/lc_fontcolor.png" ; SID_ATTR_CHAR_COLOR2 ; > ;
+ < "cmd/lc_fontdialog.png" ; SID_CHAR_DLG ; > ;
};
};
-
-
ImageList 31000
{
MASKCOLOR;
@@ -388,20 +350,9 @@ ImageList IMG_ADDFIELD_DLG_SC
MASKCOLOR;
FileList =
{
- < "res/commandimagelist/sc_sortup.png" ; SID_FM_SORTUP ; > ;
- < "res/commandimagelist/sc_sortdown.png" ; SID_FM_SORTDOWN ; > ;
- < "res/commandimagelist/sc_removefiltersort.png" ; SID_FM_REMOVE_FILTER_SORT ; > ;
- };
-};
-
-ImageList IMG_ADDFIELD_DLG_SCH
-{
- MASKCOLOR;
- FileList =
- {
- < "res/commandimagelist/sch_sortup.png" ; SID_FM_SORTUP ; > ;
- < "res/commandimagelist/sch_sortdown.png" ; SID_FM_SORTDOWN ; > ;
- < "res/commandimagelist/sch_removefiltersort.png" ; SID_FM_REMOVE_FILTER_SORT ; > ;
+ < "cmd/sc_sortup.png" ; SID_FM_SORTUP ; > ;
+ < "cmd/sc_sortdown.png" ; SID_FM_SORTDOWN ; > ;
+ < "cmd/sc_removefiltersort.png" ; SID_FM_REMOVE_FILTER_SORT ; > ;
};
};
@@ -410,20 +361,9 @@ ImageList IMG_ADDFIELD_DLG_LC
MASKCOLOR;
FileList =
{
- < "res/commandimagelist/lc_sortup.png" ; SID_FM_SORTUP ; > ;
- < "res/commandimagelist/lc_sortdown.png" ; SID_FM_SORTDOWN ; > ;
- < "res/commandimagelist/lc_removefiltersort.png" ; SID_FM_REMOVE_FILTER_SORT ; > ;
- };
-};
-
-ImageList IMG_ADDFIELD_DLG_LCH
-{
- MASKCOLOR;
- FileList =
- {
- < "res/commandimagelist/lch_sortup.png" ; SID_FM_SORTUP ; > ;
- < "res/commandimagelist/lch_sortdown.png" ; SID_FM_SORTDOWN ; > ;
- < "res/commandimagelist/lch_removefiltersort.png" ; SID_FM_REMOVE_FILTER_SORT ; > ;
+ < "cmd/lc_sortup.png" ; SID_FM_SORTUP ; > ;
+ < "cmd/lc_sortdown.png" ; SID_FM_SORTDOWN ; > ;
+ < "cmd/lc_removefiltersort.png" ; SID_FM_REMOVE_FILTER_SORT ; > ;
};
};
@@ -434,7 +374,7 @@ FixedLine ADDFIELD_FL_HELP_SEPARATOR
Size = MAP_APPFONT ( RELATED_CONTROLS , RELATED_CONTROLS ) ;
Text [ en-US ] = "Help";
};
-
+
FixedText ADDFIELD_HELP_FIELD
{
SVLook = TRUE ;
diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx
index 6807420d6..2825cba14 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -105,7 +106,7 @@ IMPL_LINK( ConditionField, OnFormula, Button*, /*_pClickedButton*/ )
{
ReportFormula aFormula( sFormula );
sFormula = aFormula.getCompleteFormula();
- } // if ( nLen )
+ }
uno::Reference< awt::XWindow> xInspectorWindow = VCLUnoHelper::GetInterface(this);
uno::Reference< beans::XPropertySet> xProp(m_pParent->getController().getRowSet(),uno::UNO_QUERY);
if ( rptui::openDialogFormula_nothrow( sFormula, m_pParent->getController().getContext(),xInspectorWindow,xProp ) )
@@ -211,7 +212,7 @@ void OColorPopup::SetSlotId(sal_uInt16 _nSlotId)
{
m_aColorSet.SetStyle( m_aColorSet.GetStyle() | WB_NONEFIELD );
m_aColorSet.SetText( String(ModuleRes( STR_TRANSPARENT )) );
- } // if ( SID_ATTR_CHAR_COLOR_BACKGROUND == theSlotId || SID_BACKGROUND_COLOR == theSlotId )
+ }
}
// -----------------------------------------------------------------------------
IMPL_LINK( OColorPopup, SelectHdl, void *, EMPTYARG )
@@ -219,7 +220,7 @@ IMPL_LINK( OColorPopup, SelectHdl, void *, EMPTYARG )
sal_uInt16 nItemId = m_aColorSet.GetSelectItemId();
Color aColor( nItemId == 0 ? Color( COL_TRANSPARENT ) : m_aColorSet.GetItemColor( nItemId ) );
- /* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() calls.
+ /* #i33380# Moved the following line above the Dispatch() calls.
This instance may be deleted in the meantime (i.e. when a dialog is opened
while in Dispatch()), accessing members will crash in this case. */
m_aColorSet.SetNoSelection();
@@ -258,9 +259,6 @@ Condition::Condition( Window* _pParent, IConditionalFormatAction& _rAction, ::rp
,m_nLastKnownWindowWidth( -1 )
,m_bInDestruction( false )
{
- m_aMoveUp.SetModeImage( ModuleRes( IMG_MOVE_UP_HC ), BMP_COLOR_HIGHCONTRAST );
- m_aMoveDown.SetModeImage( ModuleRes( IMG_MOVE_DOWN_HC ), BMP_COLOR_HIGHCONTRAST );
-
FreeResource();
m_aActions.SetStyle(m_aActions.GetStyle()|WB_LINESPACING);
m_aCondLHS.GrabFocus();
@@ -345,7 +343,7 @@ IMPL_LINK( Condition, DropdownClick, ToolBox*, /*pToolBar*/ )
break;
default:
break;
- } // switch(nId)
+ }
if ( nTextId )
m_pColorFloat->SetText(String(ModuleRes(nTextId)));
m_pColorFloat->SetSlotId(nId);
@@ -388,16 +386,12 @@ void Condition::ApplyCommand( sal_uInt16 _nCommandId, const ::Color& _rColor)
m_rAction.applyCommand( m_nCondIndex, _nCommandId, _rColor );
}
//------------------------------------------------------------------------------
-ImageList Condition::getImageList(sal_Int16 _eBitmapSet,sal_Bool _bHiContast) const
+ImageList Condition::getImageList(sal_Int16 _eBitmapSet) const
{
sal_Int16 nN = IMG_CONDFORMAT_DLG_SC;
- sal_Int16 nH = IMG_CONDFORMAT_DLG_SCH;
if ( _eBitmapSet == SFX_SYMBOLS_SIZE_LARGE )
- {
nN = IMG_CONDFORMAT_DLG_LC;
- nH = IMG_CONDFORMAT_DLG_LCH;
- }
- return ImageList(ModuleRes( _bHiContast ? nH : nN ));
+ return ImageList(ModuleRes(nN));
}
//------------------------------------------------------------------
void Condition::resizeControls(const Size& _rDiff)
@@ -405,7 +399,6 @@ void Condition::resizeControls(const Size& _rDiff)
// we use large images so we must change them
if ( _rDiff.Width() || _rDiff.Height() )
{
- Point aPos = LogicToPixel( Point( 2*RELATED_CONTROLS , 0), MAP_APPFONT );
Invalidate();
}
}
@@ -433,7 +426,6 @@ void Condition::StateChanged( StateChangedType nType )
{
// The physical toolbar changed its outlook and shows another logical toolbar!
// We have to set the correct high contrast mode on the new tbx manager.
- // pMgr->SetHiContrast( IsHiContrastMode() );
checkImageList();
}
}
@@ -738,3 +730,4 @@ bool Condition::isEmpty() const
} // rptui
// =============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/dlg/Condition.hxx b/reportdesign/source/ui/dlg/Condition.hxx
index 79117fdcc..f35e8ade3 100644
--- a/reportdesign/source/ui/dlg/Condition.hxx
+++ b/reportdesign/source/ui/dlg/Condition.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -112,10 +113,8 @@ namespace rptui
/** will be called when the id of the image list is needed.
@param _eBitmapSet
<svtools/imgdef.hxx>
- @param _bHiContast
- <TRUE/> when in high contrast mode.
*/
- virtual ImageList getImageList(sal_Int16 _eBitmapSet,sal_Bool _bHiContast) const;
+ virtual ImageList getImageList(sal_Int16 _eBitmapSet) const;
/** will be called when the controls need to be resized.
*/
@@ -196,3 +195,4 @@ namespace rptui
// =============================================================================
#endif // RPTUI_CONDITION_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/dlg/DateTime.cxx b/reportdesign/source/ui/dlg/DateTime.cxx
index 3c001145e..0712a413f 100644
--- a/reportdesign/source/ui/dlg/DateTime.cxx
+++ b/reportdesign/source/ui/dlg/DateTime.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,39 +27,21 @@
************************************************************************/
#include "precompiled_rptui.hxx"
#include "DateTime.hxx"
-#ifndef RPTUI_DATETIME_HRC
#include "DateTime.hrc"
-#endif
#include <com/sun/star/beans/XPropertySet.hpp>
#include <tools/debug.hxx>
-#ifndef _RPTUI_DLGRESID_HRC
#include "RptResId.hrc"
-#endif
-#ifndef _RPTUI_SLOTID_HRC_
#include "rptui_slotid.hrc"
-#endif
-#ifndef _RPTUI_MODULE_HELPER_DBU_HXX_
#include "ModuleHelper.hxx"
-#endif
-#ifndef RTPUI_REPORTDESIGN_HELPID_HRC
#include "helpids.hrc"
-#endif
#include <vcl/msgbox.hxx>
-#ifndef _GLOBLMN_HRC
#include <svx/globlmn.hrc>
-#endif
-#ifndef _SBASLTID_HRC
#include <svx/svxids.hrc>
-#endif
#include <connectivity/dbconversion.hxx>
#include <unotools/syslocale.hxx>
-#ifndef RPTUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
#include "RptDef.hxx"
-#ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC
#include "uistrings.hrc"
-#endif
#include "ReportController.hxx"
#include <com/sun/star/report/XFormattedField.hpp>
#include <com/sun/star/util/Time.hpp>
@@ -123,7 +106,7 @@ ODateTimeDialog::ODateTimeDialog( Window* _pParent
m_aTimeControlling.enableOnCheckMark( m_aTime, m_aFTTimeFormat, m_aTimeListBox);
CheckBox* pCheckBoxes[] = { &m_aDate,&m_aTime};
- for ( size_t i = 0 ; i < sizeof(pCheckBoxes)/sizeof(pCheckBoxes[0]); ++i)
+ for ( size_t i = 0 ; i < SAL_N_ELEMENTS(pCheckBoxes); ++i)
pCheckBoxes[i]->SetClickHdl(LINK(this,ODateTimeDialog,CBClickHdl));
FreeResource();
@@ -258,12 +241,10 @@ sal_Int32 ODateTimeDialog::getFormatKey(sal_Bool _bDate) const
sal_Int32 nFormatKey;
if ( _bDate )
{
- // nFormat = m_aDateF1.IsChecked() ? i18n::NumberFormatIndex::DATE_SYSTEM_LONG : (m_aDateF2.IsChecked() ? i18n::NumberFormatIndex::DATE_SYS_DMMMYYYY : i18n::NumberFormatIndex::DATE_SYSTEM_SHORT);
nFormatKey = static_cast<sal_Int32>(reinterpret_cast<sal_IntPtr>(m_aDateListBox.GetEntryData( m_aDateListBox.GetSelectEntryPos() )));
}
else
{
- // nFormat = m_aTimeF1.IsChecked() ? i18n::NumberFormatIndex::TIME_HHMMSS : (m_aTimeF2.IsChecked() ? i18n::NumberFormatIndex::TIME_HHMMSSAMPM : i18n::NumberFormatIndex::TIME_HHMM);
nFormatKey = static_cast<sal_Int32>(reinterpret_cast<sal_IntPtr>(m_aTimeListBox.GetEntryData( m_aTimeListBox.GetSelectEntryPos() )));
}
return nFormatKey;
@@ -271,3 +252,5 @@ sal_Int32 ODateTimeDialog::getFormatKey(sal_Bool _bDate) const
// =============================================================================
} // rptui
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/dlg/DateTime.src b/reportdesign/source/ui/dlg/DateTime.src
index 76eb493a6..227aad173 100644
--- a/reportdesign/source/ui/dlg/DateTime.src
+++ b/reportdesign/source/ui/dlg/DateTime.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,7 +44,7 @@ ModalDialog RID_DATETIME_DLG
HelpId = HID_RPT_DATETIME_DLG;
Moveable = TRUE ;
Closeable = TRUE ;
-
+
CheckBox CB_DATE
{
HelpID = "reportdesign:CheckBox:RID_DATETIME_DLG:CB_DATE";
@@ -53,7 +53,7 @@ ModalDialog RID_DATETIME_DLG
Check = TRUE;
Text [ en-US ] = "Include Date";
};
-
+
FixedText FT_DATE_FORMAT
{
Pos = MAP_APPFONT ( RELATED_CONTROLS + 2*UNRELATED_CONTROLS, RELATED_CONTROLS + UNRELATED_CONTROLS + CHECKBOX_HEIGHT );
@@ -76,8 +76,8 @@ ModalDialog RID_DATETIME_DLG
{
Pos = MAP_APPFONT ( RELATED_CONTROLS , RELATED_CONTROLS + 2*UNRELATED_CONTROLS + CHECKBOX_HEIGHT + LISTBOX_HEIGHT) ;
Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , 1 ) ;
- // Text [ en-US ] = "Time";
};
+
CheckBox CB_TIME
{
HelpID = "reportdesign:CheckBox:RID_DATETIME_DLG:CB_TIME";
@@ -86,7 +86,7 @@ ModalDialog RID_DATETIME_DLG
Check = TRUE;
Text [ en-US ] = "Include Time";
};
-
+
FixedText FT_TIME_FORMAT
{
Pos = MAP_APPFONT ( RELATED_CONTROLS + 2*UNRELATED_CONTROLS, RELATED_CONTROLS + 4*UNRELATED_CONTROLS + 2*CHECKBOX_HEIGHT + LISTBOX_HEIGHT);
@@ -104,11 +104,13 @@ ModalDialog RID_DATETIME_DLG
TabStop = TRUE;
Sort = FALSE;
};
+
FixedLine FL_SEPARATOR1
{
Pos = MAP_APPFONT ( RELATED_CONTROLS , RELATED_CONTROLS + 5*UNRELATED_CONTROLS + 2*CHECKBOX_HEIGHT + 2*LISTBOX_HEIGHT) ;
Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , 1 ) ;
};
+
OKButton PB_OK
{
Pos = MAP_APPFONT ( UNRELATED_CONTROLS, RELATED_CONTROLS + 6*UNRELATED_CONTROLS + 2*CHECKBOX_HEIGHT + 2*LISTBOX_HEIGHT +1) ;
@@ -116,12 +118,14 @@ ModalDialog RID_DATETIME_DLG
TabStop = TRUE ;
DefButton = TRUE ;
};
+
CancelButton PB_CANCEL
{
Pos = MAP_APPFONT ( RELATED_CONTROLS + UNRELATED_CONTROLS + BUTTON_WIDTH , RELATED_CONTROLS + 6*UNRELATED_CONTROLS + 2*CHECKBOX_HEIGHT + 2*LISTBOX_HEIGHT +1) ;
Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
TabStop = TRUE ;
};
+
HelpButton PB_HELP
{
TabStop = TRUE ;
diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx
index fd36f17ee..783026223 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -217,7 +218,7 @@ void FormulaDialog::ToggleCollapsed( RefEdit* _pEdit, RefButton* _pButton)
}
m_pAddField->Update();
- } // if ( !m_pAddField )
+ }
RefInputStartAfter( aPair.second, aPair.first );
m_pAddField->Show();
@@ -239,7 +240,7 @@ IMPL_LINK( FormulaDialog, OnClickHdl, OAddFieldWindow* ,_pAddFieldDlg)
sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("[")) + sName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]"));
m_pEdit->SetText(sName);
}
- } // if ( m_pEdit && aArgs.getLength() )
+ }
m_pEdit = NULL;
_pAddFieldDlg->Hide();
RefInputDoneAfter( sal_True );
@@ -271,3 +272,5 @@ table::CellAddress FormulaDialog::getReferencePosition() const
// =============================================================================
} // rptui
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/dlg/GroupExchange.cxx b/reportdesign/source/ui/dlg/GroupExchange.cxx
index f0420a17d..1a829cdb6 100644
--- a/reportdesign/source/ui/dlg/GroupExchange.cxx
+++ b/reportdesign/source/ui/dlg/GroupExchange.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,5 @@ namespace rptui
}
// -----------------------------------------------------------------------------
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/dlg/GroupExchange.hxx b/reportdesign/source/ui/dlg/GroupExchange.hxx
index 75b7bea15..5b0863822 100644
--- a/reportdesign/source/ui/dlg/GroupExchange.hxx
+++ b/reportdesign/source/ui/dlg/GroupExchange.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,4 @@ namespace rptui
}
#endif // RPTUI_GROUP_EXCHANGE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index ec26adac4..3d942b309 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -34,6 +35,7 @@
#include <com/sun/star/report/GroupOn.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
+#include <sal/macros.h>
#include <tools/debug.hxx>
#include "RptResId.hrc"
#include "rptui_slotid.hrc"
@@ -106,7 +108,6 @@ class OFieldExpressionControl : public TContainerListenerBase
OGroupsSortingDialog* m_pParent;
bool m_bIgnoreEvent;
-
void fillListBox(const uno::Reference< beans::XPropertySet>& _xDest,long nRow,sal_uInt16 nColumnId);
sal_Bool SaveModified(bool _bAppend);
@@ -135,7 +136,6 @@ public:
inline ::svt::ComboBoxControl* getExpressionControl() const { return m_pComboCell; }
-
/** returns the sequence with the selected groups
*/
uno::Sequence<uno::Any> fillSelectedGroups();
@@ -148,7 +148,6 @@ public:
using OFieldExpressionControl_Base::GetRowCount;
protected:
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 );
@@ -244,12 +243,12 @@ uno::Sequence<uno::Any> OFieldExpressionControl::fillSelectedGroups()
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Can not access group!");
+ OSL_FAIL("Can not access group!");
}
}
if ( !vClipboardList.empty() )
aList = uno::Sequence< uno::Any >(&vClipboardList[0], vClipboardList.size());
- } // if ( nCount > 1 )
+ }
return aList;
}
//------------------------------------------------------------------------------
@@ -265,7 +264,7 @@ void OFieldExpressionControl::StartDrag( sal_Int8 /*_nAction*/ , const Point& /*
OGroupExchange* pData = new OGroupExchange(aClipboardList);
uno::Reference< ::com::sun::star::datatransfer::XTransferable> xRef = pData;
pData->StartDrag(this, DND_ACTION_MOVE );
- } // if(!vClipboardList.empty())
+ }
}
}
//------------------------------------------------------------------------------
@@ -292,7 +291,7 @@ sal_Int8 OFieldExpressionControl::ExecuteDrop( const BrowserExecuteDropEvent& rE
DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL);
sal_Int8 nAction = DND_ACTION_NONE;
if ( IsDropFormatSupported( OGroupExchange::getReportGroupId() ) )
- {
+ {
sal_Int32 nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), sal_False);
SetNoSelection();
@@ -326,7 +325,7 @@ void OFieldExpressionControl::moveGroups(const uno::Sequence<uno::Any>& _aGroups
{
uno::Reference< report::XGroup> xGroup(*pIter,uno::UNO_QUERY);
if ( xGroup.is() )
- {
+ {
uno::Sequence< beans::PropertyValue > aArgs(1);
aArgs[0].Name = PROPERTY_GROUP;
aArgs[0].Value <<= xGroup;
@@ -342,11 +341,11 @@ void OFieldExpressionControl::moveGroups(const uno::Sequence<uno::Any>& _aGroups
m_pParent->m_pController->executeChecked(SID_GROUP_APPEND,aArgs);
++nRow;
}
- } // for(;pIter != pEnd;++pIter)
+ }
}
m_bIgnoreEvent = false;
Invalidate();
- } // if ( _aGroups.getLength() )
+ }
}
// -----------------------------------------------------------------------------
void OFieldExpressionControl::fillColumns(const uno::Reference< container::XNameAccess>& _xColumns)
@@ -384,7 +383,7 @@ void OFieldExpressionControl::lateInit()
m_pComboCell->SetHelpId(HID_RPT_FIELDEXPRESSION);
Control* pControls[] = {m_pComboCell};
- for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i)
+ for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i)
{
pControls[i]->SetGetFocusHdl(LINK(m_pParent, OGroupsSortingDialog, OnControlFocusGot));
pControls[i]->SetLoseFocusHdl(LINK(m_pParent, OGroupsSortingDialog, OnControlFocusLost));
@@ -485,7 +484,7 @@ sal_Bool OFieldExpressionControl::SaveModified(bool _bAppendRow)
else
xGroup = m_pParent->getGroup(m_aGroupPositions[nRow]);
if ( xGroup.is() )
- {
+ {
sal_uInt16 nPos = m_pComboCell->GetSelectEntryPos();
::rtl::OUString sExpression;
if ( COMBOBOX_ENTRY_NOTFOUND == nPos )
@@ -497,7 +496,7 @@ sal_Bool OFieldExpressionControl::SaveModified(bool _bAppendRow)
xGroup->setExpression( sExpression );
::rptui::adjustSectionName(xGroup,nPos);
-
+
if ( bAppend )
m_pParent->m_pController->getUndoManager().LeaveListAction();
}
@@ -515,7 +514,7 @@ sal_Bool OFieldExpressionControl::SaveModified(bool _bAppendRow)
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"OFieldExpressionControl::SaveModified: Exception caught!");
+ OSL_FAIL("OFieldExpressionControl::SaveModified: Exception caught!");
}
}
@@ -532,7 +531,7 @@ String OFieldExpressionControl::GetCellText( long nRow, sal_uInt16 /*nColId*/ )
{
uno::Reference< report::XGroup> xGroup = m_pParent->getGroup(m_aGroupPositions[nRow]);
::rtl::OUString sExpression = xGroup->getExpression();
-
+
for(::std::vector<ColumnInfo>::const_iterator aIter = m_aColumnInfo.begin(); aIter != m_aColumnInfo.end();++aIter)
{
if ( aIter->sColumnName == sExpression )
@@ -546,9 +545,9 @@ String OFieldExpressionControl::GetCellText( long nRow, sal_uInt16 /*nColId*/ )
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught while getting expression value from the group");
+ OSL_FAIL("Exception caught while getting expression value from the group");
}
- } // if ( nRow != BROWSER_ENDOFSELECTION && nRow < m_pParent->getGroups()->getCount() )
+ }
return sText;
}
@@ -600,7 +599,7 @@ void OFieldExpressionControl::PaintCell( OutputDevice& rDev, const Rectangle& rR
DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL);
String aText =const_cast< OFieldExpressionControl*>(this)->GetCellText( m_nCurrentPos, nColumnId );
- Point aPos( rRect.TopLeft() );
+ Point aPos( rRect.TopLeft() );
Size aTextSize( GetDataWindow().GetTextHeight(),GetDataWindow().GetTextWidth( aText ));
if( aPos.X() < rRect.Right() || aPos.X() + aTextSize.Width() > rRect.Right() ||
@@ -627,7 +626,7 @@ EditBrowseBox::RowStatus OFieldExpressionControl::GetRowStatus(long nRow) const
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception cathced while try to get a group!");
+ OSL_FAIL("Exception cathced while try to get a group!");
}
}
return EditBrowseBox::CLEAN;
@@ -644,7 +643,7 @@ void SAL_CALL OFieldExpressionControl::elementInserted(const container::Containe
{
if ( m_bIgnoreEvent )
return;
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
sal_Int32 nGroupPos = 0;
if ( evt.Accessor >>= nGroupPos )
@@ -669,18 +668,11 @@ void SAL_CALL OFieldExpressionControl::elementInserted(const container::Containe
aFind = m_aGroupPositions.insert(aFind,nGroupPos);
else
*aFind = nGroupPos;
-
+
::std::vector<sal_Int32>::iterator aEnd = m_aGroupPositions.end();
for(++aFind;aFind != aEnd;++aFind)
if ( *aFind != NO_GROUP )
++*aFind;
-
- //::std::vector<sal_Int32>::reverse_iterator aRIter = m_aGroupPositions.rbegin();
- //::std::vector<sal_Int32>::reverse_iterator aREnd = m_aGroupPositions.rend();
- //for (; aRIter != aREnd && *aRIter != NO_GROUP; ++aRIter)
- // continue;
- //if ( aRIter != aREnd )
- // m_aGroupPositions.erase(m_aGroupPositions.begin() + (m_aGroupPositions.size() - 1 - (aRIter - m_aGroupPositions.rbegin())));
}
}
Invalidate();
@@ -693,7 +685,7 @@ void SAL_CALL OFieldExpressionControl::elementReplaced(const container::Containe
//------------------------------------------------------------------------------
void SAL_CALL OFieldExpressionControl::elementRemoved(const container::ContainerEvent& evt) throw(uno::RuntimeException)
{
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
if ( m_bIgnoreEvent )
@@ -710,7 +702,6 @@ void SAL_CALL OFieldExpressionControl::elementRemoved(const container::Container
for(++aFind;aFind != aEnd;++aFind)
if ( *aFind != NO_GROUP )
--*aFind;
- //PaintCell(*this,GetFieldRect(FIELD_EXPRESSION),FIELD_EXPRESSION);
Invalidate();
}
}
@@ -752,7 +743,6 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt)
if ( nColId == HANDLE_ID )
{
- //long nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());
PopupMenu aContextMenu(ModuleRes(RID_GROUPSROWPOPUPMENU));
sal_Bool bEnable = sal_False;
long nIndex = FirstSelectedRow();
@@ -762,10 +752,6 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt)
bEnable = sal_True;
nIndex = NextSelectedRow();
}
- //aContextMenu.EnableItem( SID_CUT, IsDeleteAllowed() && bEnable);
- //aContextMenu.EnableItem( SID_COPY, bEnable);
- //TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(GetParent()));
- //aContextMenu.EnableItem( SID_PASTE, aTransferData.HasFormat(SOT_FORMATSTR_ID_RPT_GRPED) );
aContextMenu.EnableItem( SID_DELETE, IsDeleteAllowed() && bEnable );
switch (aContextMenu.Execute(this, rEvt.GetMousePosPixel()))
{
@@ -787,7 +773,7 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt)
default:
break;
}
- } // if ( nColId == HANDLE_ID )
+ }
// run through
}
default:
@@ -799,7 +785,7 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt)
void OFieldExpressionControl::DeleteRows()
{
DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL);
-
+
sal_Bool bIsEditing = IsEditing();
if (bIsEditing)
{
@@ -841,7 +827,7 @@ void OFieldExpressionControl::DeleteRows()
--*aFind;
}
nIndex = NextSelectedRow();
- } // while( nIndex >= 0 )
+ }
if ( !bFirstTime )
m_pParent->m_pController->getUndoManager().LeaveListAction();
@@ -925,7 +911,7 @@ void OFieldExpressionControl::InsertRows( long nRow )
datatransfer::DataFlavor aFlavor;
SotExchange::GetFormatDataFlavor(OGroupExchange::getReportGroupId(), aFlavor);
uno::Sequence< uno::Any > aGroups;
-
+
if( (aTransferData.GetAny(aFlavor) >>= aGroups) && aGroups.getLength() )
{
m_bIgnoreEvent = false;
@@ -983,11 +969,6 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent
,OPropertyChangeListener(m_aMutex)
,m_aFL2(this, ModuleRes(FL_SEPARATOR2) )
,m_aMove(this, ModuleRes(FT_MOVELABEL) )
-/*
- ,m_aPB_Up(this, ModuleRes(PB_UP) )
- ,m_aPB_Down(this, ModuleRes(PB_DOWN) )
- ,m_aPB_Delete(this, ModuleRes(PB_DELETE) )
-*/
,m_aToolBox(this, ModuleRes(TB_TOOLBOX) )
,m_aFL3(this, ModuleRes(FL_SEPARATOR3) )
@@ -1011,35 +992,34 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent
,m_xGroups(m_pController->getReportDefinition()->getGroups())
,m_bReadOnly(_bReadOnly)
{
- DBG_CTOR( rpt_OGroupsSortingDialog,NULL);
-
+ DBG_CTOR( rpt_OGroupsSortingDialog,NULL);
Control* pControlsLst[] = { &m_aHeaderLst, &m_aFooterLst, &m_aGroupOnLst, &m_aKeepTogetherLst, &m_aOrderLst, &m_aGroupIntervalEd};
- for (size_t i = 0; i < sizeof(pControlsLst)/sizeof(pControlsLst[0]); ++i)
+ for (size_t i = 0; i < SAL_N_ELEMENTS(pControlsLst); ++i)
{
pControlsLst[i]->SetGetFocusHdl(LINK(this, OGroupsSortingDialog, OnControlFocusGot));
pControlsLst[i]->SetLoseFocusHdl(LINK(this, OGroupsSortingDialog, OnControlFocusLost));
pControlsLst[i]->Show(sal_True);
- } // for (int i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i)
+ }
- for (size_t i = 0; i < (sizeof(pControlsLst)/sizeof(pControlsLst[0]))-1; ++i)
+ for (size_t i = 0; i < (SAL_N_ELEMENTS(pControlsLst))-1; ++i)
static_cast<ListBox*>(pControlsLst[i])->SetSelectHdl(LINK(this,OGroupsSortingDialog,LBChangeHdl));
Control* pControls[] = { &m_aHeader, &m_aFooter, &m_aGroupOn, &m_aGroupInterval, &m_aKeepTogether, &m_aOrder
, &m_aMove,&m_aFL2};
sal_Int32 nMaxTextWidth = 0;
MnemonicGenerator aMnemonicGenerator;
- for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i)
+ for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i)
aMnemonicGenerator.RegisterMnemonic( pControls[i]->GetText() );
- for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i)
+ for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i)
{
pControls[i]->Show(sal_True);
String sText = pControls[i]->GetText();
if ( aMnemonicGenerator.CreateMnemonic(sText) )
pControls[i]->SetText(sText);
sal_Int32 nTextWidth = GetTextWidth(sText);
- nMaxTextWidth = ::std::max<sal_Int32>(nTextWidth,nMaxTextWidth);
+ nMaxTextWidth = ::std::max<sal_Int32>(nTextWidth,nMaxTextWidth);
}
Size aSize(UNRELATED_CONTROLS, PAGE_HEIGHT);
@@ -1047,7 +1027,6 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent
Size aOutSize(nMaxTextWidth + m_aHeader.GetSizePixel().Width() + 3*aSpace.Width(),aSpace.Height());
SetMinOutputSizePixel(aOutSize);
SetOutputSizePixel(aOutSize);
-// Resize();
m_pReportListener = new OPropertyChangeMultiplexer(this,m_pController->getReportDefinition().get());
m_pReportListener->addProperty(PROPERTY_COMMAND);
@@ -1057,20 +1036,11 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent
fillColumns();
m_pFieldExpression->Show();
- //m_aHelpWindow.SetReadOnly();
m_aHelpWindow.SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor() );
- //BTN m_aPB_Up.SetClickHdl(LINK(this,OGroupsSortingDialog,ClickHdl));
- //BTN m_aPB_Down.SetClickHdl(LINK(this,OGroupsSortingDialog,ClickHdl));
- //BTN m_aPB_Delete.SetClickHdl(LINK(this,OGroupsSortingDialog,ClickHdl));
m_pFieldExpression->SetZOrder(&m_aFL2, WINDOW_ZORDER_BEHIND);
m_aMove.SetZOrder(m_pFieldExpression, WINDOW_ZORDER_BEHIND);
- //BTN m_aPB_Up.SetZOrder(&m_aMove, WINDOW_ZORDER_BEHIND);
- //BTN m_aPB_Down.SetZOrder(&m_aPB_Up, WINDOW_ZORDER_BEHIND);
- // set Hi contrast bitmaps
- //BTN m_aPB_Up.SetModeImage( ModuleRes(IMG_UP_H),BMP_COLOR_HIGHCONTRAST);
- //BTN m_aPB_Down.SetModeImage( ModuleRes(IMG_DOWN_H),BMP_COLOR_HIGHCONTRAST);
m_aToolBox.SetStyle(m_aToolBox.GetStyle()|WB_LINESPACING);
m_aToolBox.SetSelectHdl(LINK(this, OGroupsSortingDialog, OnFormatAction));
m_aToolBox.SetImageListProvider(this);
@@ -1085,7 +1055,7 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent
//------------------------------------------------------------------------
OGroupsSortingDialog::~OGroupsSortingDialog()
{
- DBG_DTOR( rpt_OGroupsSortingDialog,NULL);
+ DBG_DTOR( rpt_OGroupsSortingDialog,NULL);
delete m_pFieldExpression;
m_xColumns.clear();
m_pReportListener->dispose();
@@ -1135,11 +1105,11 @@ void OGroupsSortingDialog::DisplayData( sal_Int32 _nRow )
if ( !bEmpty && nGroupPos != NO_GROUP )
{
uno::Reference< report::XGroup> xGroup = getGroup(nGroupPos);
-
+
m_pCurrentGroupListener = new OPropertyChangeMultiplexer(this,xGroup.get());
m_pCurrentGroupListener->addProperty(PROPERTY_HEADERON);
m_pCurrentGroupListener->addProperty(PROPERTY_FOOTERON);
-
+
displayGroup(xGroup);
}
}
@@ -1150,7 +1120,7 @@ void OGroupsSortingDialog::SaveData( sal_Int32 _nRow)
sal_Int32 nGroupPos = m_pFieldExpression->getGroupPosition(_nRow);
if ( nGroupPos == NO_GROUP )
return;
-
+
uno::Reference< report::XGroup> xGroup = getGroup(nGroupPos);
if ( m_aHeaderLst.GetSavedValue() != m_aHeaderLst.GetSelectEntryPos() )
xGroup->setHeaderOn( m_aHeaderLst.GetSelectEntryPos() == 0 );
@@ -1172,7 +1142,7 @@ void OGroupsSortingDialog::SaveData( sal_Int32 _nRow)
xGroup->setSortAscending( m_aOrderLst.GetSelectEntryPos() == 0 );
ListBox* pControls[] = { &m_aHeaderLst,&m_aFooterLst,&m_aGroupOnLst,&m_aKeepTogetherLst,&m_aOrderLst};
- for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i)
+ for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i)
pControls[i]->SaveValue();
}
@@ -1193,9 +1163,9 @@ sal_Int32 OGroupsSortingDialog::getColumnDataType(const ::rtl::OUString& _sColum
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Eception caught while getting the type of a column");
+ OSL_FAIL("Eception caught while getting the type of a column");
}
-
+
return nDataType;
}
//------------------------------------------------------------------------------
@@ -1204,7 +1174,7 @@ IMPL_LINK(OGroupsSortingDialog, OnControlFocusGot, Control*, pControl )
if ( m_pFieldExpression && m_pFieldExpression->getExpressionControl() )
{
Control* pControls[] = { m_pFieldExpression->getExpressionControl(),&m_aHeaderLst,&m_aFooterLst,&m_aGroupOnLst,&m_aGroupIntervalEd,&m_aKeepTogetherLst,&m_aOrderLst};
- for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i)
+ for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i)
{
if ( pControl == pControls[i] )
{
@@ -1233,7 +1203,6 @@ IMPL_LINK(OGroupsSortingDialog, OnControlFocusLost, Control*, pControl )
}
// -----------------------------------------------------------------------------
IMPL_LINK( OGroupsSortingDialog, OnFormatAction, ToolBox*, /*NOTINTERESTEDIN*/ )
-// IMPL_LINK( OGroupsSortingDialog, ClickHdl, ImageButton*, _pButton )
{
DBG_CHKTHIS( rpt_OGroupsSortingDialog,NULL);
@@ -1249,22 +1218,17 @@ IMPL_LINK( OGroupsSortingDialog, OnFormatAction, ToolBox*, /*NOTINTERESTEDIN*/ )
aClipboardList.realloc(1);
aClipboardList[0] = m_xGroups->getByIndex(nGroupPos);
}
- //BTN if ( _pButton == &m_aPB_Up )
if ( nCommand == SID_RPT_GROUPSORT_MOVE_UP )
{
--nIndex;
}
- //BTN if ( _pButton == &m_aPB_Down )
if ( nCommand == SID_RPT_GROUPSORT_MOVE_DOWN )
{
++nIndex;
}
- //BTN if ( _pButton == &m_aPB_Delete )
if ( nCommand == SID_RPT_GROUPSORT_DELETE )
{
- // m_pFieldExpression->DeleteCurrentRow();
Application::PostUserEvent( LINK(m_pFieldExpression, OFieldExpressionControl, DelayedDelete) );
- // UpdateData( );
}
else
{
@@ -1274,7 +1238,6 @@ IMPL_LINK( OGroupsSortingDialog, OnFormatAction, ToolBox*, /*NOTINTERESTEDIN*/ )
m_pFieldExpression->moveGroups(aClipboardList,nIndex,sal_False);
m_pFieldExpression->DeactivateCell();
m_pFieldExpression->GoToRow(nIndex);
- //long nCurRow = m_pFieldExpression->GetCurRow();
m_pFieldExpression->ActivateCell(nIndex, m_pFieldExpression->GetCurColumnId());
DisplayData(nIndex);
}
@@ -1303,7 +1266,7 @@ IMPL_LINK( OGroupsSortingDialog, LBChangeHdl, ListBox*, pListBox )
uno::Sequence< beans::PropertyValue > aArgs(2);
aArgs[1].Name = PROPERTY_GROUP;
aArgs[1].Value <<= xGroup;
-
+
if ( &m_aHeaderLst == pListBox )
aArgs[0].Name = PROPERTY_HEADERON;
else
@@ -1349,7 +1312,7 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x
{
m_aGroupOnLst.RemoveEntry(1);
}
-
+
switch(nDataType)
{
case sdbc::DataType::LONGVARCHAR:
@@ -1363,7 +1326,7 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x
case sdbc::DataType::TIMESTAMP:
{
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 < sizeof(nIds)/sizeof(nIds[0]); ++i)
+ 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));
@@ -1374,7 +1337,7 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x
m_aGroupOnLst.InsertEntry(String(ModuleRes(STR_RPT_INTERVAL)));
m_aGroupOnLst.SetEntryData(1,reinterpret_cast<void*>(report::GroupOn::INTERVAL));
break;
- } // switch(nDataType)
+ }
sal_uInt16 nPos = 0;
switch(_xGroup->getGroupOn())
{
@@ -1419,12 +1382,12 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x
m_aOrderLst.SelectEntryPos(_xGroup->getSortAscending() ? 0 : 1);
ListBox* pControls[] = { &m_aHeaderLst,&m_aFooterLst,&m_aGroupOnLst,&m_aKeepTogetherLst,&m_aOrderLst};
- for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i)
+ for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i)
pControls[i]->SaveValue();
ListBox* pControlsLst2[] = { &m_aHeaderLst, &m_aFooterLst, &m_aGroupOnLst, &m_aKeepTogetherLst,&m_aOrderLst};
sal_Bool bReadOnly = !m_pController->isEditable();
- for (size_t i = 0; i < sizeof(pControlsLst2)/sizeof(pControlsLst2[0]); ++i)
+ for (size_t i = 0; i < SAL_N_ELEMENTS(pControlsLst2); ++i)
pControlsLst2[i]->SetReadOnly(bReadOnly);
m_aGroupIntervalEd.SetReadOnly(bReadOnly);
}
@@ -1439,34 +1402,24 @@ void OGroupsSortingDialog::Resize()
Control* pControlsLst[] = { &m_aHeaderLst, &m_aFooterLst, &m_aGroupOnLst, &m_aGroupIntervalEd,&m_aKeepTogetherLst,&m_aOrderLst};
Control* pControls[] = { &m_aHeader, &m_aFooter, &m_aGroupOn, &m_aGroupInterval, &m_aKeepTogether, &m_aOrder};
sal_Int32 nMaxTextWidth = 0;
- for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i)
+ for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i)
{
nMaxTextWidth = ::std::max<sal_Int32>(static_cast<sal_Int32>(GetTextWidth(pControls[i]->GetText())),nMaxTextWidth);
- } // for (int i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i)
+ }
- // aTotalOutputSize.Width() - m_aHeaderLst.GetSizePixel().Width() - 3*aSpace.Width()
- for (size_t i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i)
+ for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i)
{
pControls[i]->SetSizePixel(Size(nMaxTextWidth,pControls[i]->GetSizePixel().Height()));
Point aPos = pControls[i]->GetPosPixel();
aPos.X() += nMaxTextWidth + aSpace.Width();
aPos.Y() = pControlsLst[i]->GetPosPixel().Y();
-
+
pControlsLst[i]->SetPosSizePixel(aPos,Size(aTotalOutputSize.Width() - aPos.X() - aSpace.Width(),pControlsLst[i]->GetSizePixel().Height()));
- } // for (int i = 0; i < sizeof(pControls)/sizeof(pControls[0]); ++i)
+ }
m_aFL.SetSizePixel(Size(aTotalOutputSize.Width() - aSpace.Width(),m_aFL.GetSizePixel().Height()));
m_aFL2.SetSizePixel(Size(aTotalOutputSize.Width() - aSpace.Width(),m_aFL2.GetSizePixel().Height()));
m_aFL3.SetSizePixel(Size(aTotalOutputSize.Width() - aSpace.Width(),m_aFL3.GetSizePixel().Height()));
-
-//BTN sal_Int32 nPos = aTotalOutputSize.Width() - aSpace.Width() - m_aPB_Up.GetSizePixel().Width();
-//BTN m_aPB_Delete.SetPosPixel(Point(nPos,m_aPB_Delete.GetPosPixel().Y()));
-//BTN
-//BTN nPos -= (m_aPB_Up.GetSizePixel().Width() + LogicToPixel( Size( UNRELATED_CONTROLS, 0 ), MAP_APPFONT ).Width());
-//BTN m_aPB_Down.SetPosPixel(Point(nPos,m_aPB_Down.GetPosPixel().Y()));
-//BTN
-//BTN nPos -= (m_aPB_Up.GetSizePixel().Width() + LogicToPixel( Size( RELATED_CONTROLS, 0 ), MAP_APPFONT ).Width());
-//BTN m_aPB_Up.SetPosPixel(Point(nPos,m_aPB_Up.GetPosPixel().Y()));
sal_Int32 nPos = aTotalOutputSize.Width() - aSpace.Width() - m_aToolBox.GetSizePixel().Width();
m_aToolBox.SetPosPixel(Point(nPos,m_aToolBox.GetPosPixel().Y()));
@@ -1480,7 +1433,7 @@ void OGroupsSortingDialog::checkButtons(sal_Int32 _nRow)
sal_Int32 nRowCount = m_pFieldExpression->GetRowCount();
sal_Bool bEnabled = nGroupCount > 1;
- if (bEnabled && _nRow > 0 /* && _nRow < nGroupCount */ )
+ if (bEnabled && _nRow > 0 )
{
m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_UP, sal_True);
}
@@ -1488,7 +1441,7 @@ void OGroupsSortingDialog::checkButtons(sal_Int32 _nRow)
{
m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_UP, sal_False);
}
- if (bEnabled && _nRow < (nRowCount - 1) /* && _nRow < (nGroupCount - 1) */ )
+ if (bEnabled && _nRow < (nRowCount - 1) )
{
m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_DOWN, sal_True);
}
@@ -1496,34 +1449,25 @@ void OGroupsSortingDialog::checkButtons(sal_Int32 _nRow)
{
m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_DOWN, sal_False);
}
- //BTN m_aPB_Up.Enable(bEnable && _nRow > 0 );
- //BTN m_aPB_Down.Enable(bEnable && _nRow < (m_pFieldExpression->GetRowCount()-1) );
- // m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_DOWN, bEnable && _nRow < (-1) );
-
+
sal_Int32 nGroupPos = m_pFieldExpression->getGroupPosition(_nRow);
if ( nGroupPos != NO_GROUP )
{
sal_Bool bEnableDelete = nGroupCount > 0;
- //BTN m_aPB_Delete.Enable(bEnableDelete );
m_aToolBox.EnableItem(SID_RPT_GROUPSORT_DELETE, bEnableDelete);
}
else
{
- //BTN m_aPB_Delete.Enable( sal_False );
m_aToolBox.EnableItem(SID_RPT_GROUPSORT_DELETE, sal_False);
}
}
-ImageList OGroupsSortingDialog::getImageList(sal_Int16 _eBitmapSet,sal_Bool _bHiContast) const
+ImageList OGroupsSortingDialog::getImageList(sal_Int16 _eBitmapSet) const
{
sal_Int16 nN = IMG_CONDFORMAT_DLG_SC;
- sal_Int16 nH = IMG_CONDFORMAT_DLG_SCH;
if ( _eBitmapSet == SFX_SYMBOLS_SIZE_LARGE )
- {
nN = IMG_CONDFORMAT_DLG_LC;
- nH = IMG_CONDFORMAT_DLG_LCH;
- }
- return ImageList(ModuleRes( _bHiContast ? nH : nN ));
+ return ImageList(ModuleRes( nN ));
}
//------------------------------------------------------------------
@@ -1532,31 +1476,19 @@ void OGroupsSortingDialog::resizeControls(const Size& _rDiff)
// we use large images so we must change them
if ( _rDiff.Width() || _rDiff.Height() )
{
- Point aPos = LogicToPixel( Point( 2*RELATED_CONTROLS , 0), MAP_APPFONT );
Invalidate();
}
}
//------------------------------------------------------------------
-// load the images
-ImageList OGroupsSortingDialog::getImageList(vcl::ImageListType _eType) SAL_THROW (( com::sun::star::lang::IllegalArgumentException ))
+// load the images
+ImageList OGroupsSortingDialog::getImageList(vcl::ImageListType) SAL_THROW (( com::sun::star::lang::IllegalArgumentException ))
{
- if (_eType == vcl::HIGHCONTRAST_NO)
- {
- return ImageList(ModuleRes(IMGLST_GROUPSORT_DLG_SC));
- }
- else if (_eType == vcl::HIGHCONTRAST_YES)
- {
- return ImageList(ModuleRes(IMGLST_GROUPSORT_DLG_SCH));
- }
- else
- {
- throw com::sun::star::lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("High contrast parameter is wrong.")), NULL, 0);
- }
+ return ImageList(ModuleRes(IMGLST_GROUPSORT_DLG_SC));
}
-
-
// =============================================================================
} // rptui
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.hrc b/reportdesign/source/ui/dlg/GroupsSorting.hrc
index d717562cf..2307e33da 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.hrc
+++ b/reportdesign/source/ui/dlg/GroupsSorting.hrc
@@ -50,18 +50,8 @@
#define PB_DOWN (21)
#define FL_SEPARATOR2 (22)
#define FL_SEPARATOR3 (23)
-//BTN #define IMG_UP_H (24)
-//BTN #define IMG_DOWN_H (25)
-//BTN #define PB_DELETE (26)
#define TB_TOOLBOX (27)
-// #define IMG_GROUPSORT_MOVE_DOWN (28)
-// #define IMG_GROUPSORT_MOVE_UP (29)
-// #define IMG_GROUPSORT_DELETE (30)
-// #define IMG_GROUPSORT_MOVE_DOWN_H (31)
-// #define IMG_GROUPSORT_MOVE_UP_H (32)
-// #define IMG_GROUPSORT_DELETE_H (33)
-
#define CHECKBOX_HEIGHT 8
#define FIXEDTEXT_HEIGHT 8
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.src b/reportdesign/source/ui/dlg/GroupsSorting.src
index fb4944c7a..d8f80f45a 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.src
+++ b/reportdesign/source/ui/dlg/GroupsSorting.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -45,14 +45,14 @@ FloatingWindow RID_GROUPS_SORTING
Moveable = TRUE ;
Closeable = TRUE ;
Sizeable = TRUE;
-
+
FixedLine FL_SEPARATOR2
{
Pos = MAP_APPFONT ( RELATED_CONTROLS , RELATED_CONTROLS ) ;
Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Groups";
};
-
+
Control WND_CONTROL
{
Pos = MAP_APPFONT( UNRELATED_CONTROLS, 2*UNRELATED_CONTROLS );
@@ -61,91 +61,41 @@ FloatingWindow RID_GROUPS_SORTING
Border = TRUE;
TabStop = TRUE;
};
-
+
FixedText FT_MOVELABEL
{
Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 3*UNRELATED_CONTROLS + BROWSER_HEIGHT ) ;
Size = MAP_APPFONT ( FIXEDTEXT_WIDTH , FIXEDTEXT_HEIGHT ) ;
-// Text [ en-US ] = "Move group" ;
Text [ en-US ] = "Group actions" ;
};
-
-// /*
-// | PAGE_WIDTH |
-// | /-----\ {-------\ /---------\ |
-// | unreleated FT_MOVELABEL |PB_UP| unreleated |PB_DOWN| unreleated |PD_DELETE| unreleated |
-// | \_____/ \_______/ \_________/ |
-//
-// Don't set any position here, it will be done in OGroupsSortingDialog::Resize()
-//
-// Find possible IMAGEBUTTON_* in rscicpx.cxx
-// Symbol is vclrsc.hxx
-// */
-// ImageButton PB_UP
-// {
-// Pos = MAP_APPFONT ( PAGE_WIDTH - 3*UNRELATED_CONTROLS - 3*14 - 2*RELATED_CONTROLS, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT -1 ) ;
-// Size = MAP_APPFONT ( 14 , 14 ) ;
-// TabStop = TRUE;
-// // Symbol = IMAGEBUTTON_ARROW_UP ; // arrow up
-// Symbol = IMAGEBUTTON_SPIN_UP ; // triangle up
-// // Symbol = IMAGEBUTTON_FLOAT;
-// };
-//
-// ImageButton PB_DOWN
-// {
-// Pos = MAP_APPFONT ( PAGE_WIDTH - 2*UNRELATED_CONTROLS - 2*14 - 2*RELATED_CONTROLS, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT - 1 ) ;
-// Size = MAP_APPFONT ( 14 , 14 ) ;
-// TabStop = TRUE;
-// // Symbol = IMAGEBUTTON_ARROW_DOWN ; // arrow down
-// // Symbol = IMAGEBUTTON_FIRST ;
-// Symbol = IMAGEBUTTON_SPIN_DOWN;
-//
-// };
-//
-// ImageButton PB_DELETE
-// {
-// Pos = MAP_APPFONT ( PAGE_WIDTH - UNRELATED_CONTROLS - 14, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT - 1 ) ;
-// Size = MAP_APPFONT ( 14 , 14 ) ;
-// TabStop = TRUE;
-// Symbol = IMAGEBUTTON_CLOSE ;
-// };
-
ToolBox TB_TOOLBOX
{
Pos = MAP_APPFONT ( PAGE_WIDTH - 4*14 - UNRELATED_CONTROLS, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT - 1 ) ;
ButtonType = BUTTON_SYMBOL;
-// Align = BOXALIGN_TOP;
-// HelpId = HID_RPT_CONDFORMAT_TB;
Customize = FALSE;
ItemList =
{
ToolBoxItem
{
Identifier = SID_RPT_GROUPSORT_MOVE_UP ;
- // Command = ".uno:ReportGroupMoveUp" ; // default_images/res/commandimages/sc_reportgroupmoveup.png
- HelpID = HID_RPT_GROUPSORT_MOVE_UP ;
+ HelpID = HID_RPT_GROUPSORT_MOVE_UP ;
Text [ en-US ] = "Move up" ;
Checkable = TRUE;
-// Disable = TRUE;
};
ToolBoxItem
{
Identifier = SID_RPT_GROUPSORT_MOVE_DOWN ;
- // Command = ".uno:ReportGroupMoveDown" ;
HelpID = HID_RPT_GROUPSORT_MOVE_DOWN ;
Text [ en-US ] = "Move down" ;
Checkable = TRUE;
-// Disable = TRUE;
};
ToolBoxItem
{
Identifier = SID_RPT_GROUPSORT_DELETE ;
- // Command = ".uno:ReportGroupDelete" ;
HelpID = HID_RPT_GROUPSORT_DELETE ;
Text [ en-US ] = "~Delete" ;
Checkable = TRUE;
-// Disable = TRUE;
};
};
};
@@ -156,7 +106,7 @@ FloatingWindow RID_GROUPS_SORTING
Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Properties";
};
-
+
FixedText FT_ORDER
{
Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 4*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + FIXEDTEXT_HEIGHT ) ;
@@ -164,6 +114,7 @@ FloatingWindow RID_GROUPS_SORTING
Hide = TRUE;
Text [ en-US ] = "Sorting" ;
};
+
ListBox LST_ORDER
{
HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_ORDER";
@@ -179,16 +130,18 @@ FloatingWindow RID_GROUPS_SORTING
< "Ascending" ; 0 ; > ;
< "Descending" ; 1 ; > ;
};
-
+
};
+
FixedText FT_HEADER
{
Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 5*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 2*FIXEDTEXT_HEIGHT) ;
Size = MAP_APPFONT ( FIXEDTEXT_WIDTH , FIXEDTEXT_HEIGHT ) ;
Hide = TRUE;
Text [ en-US ] = "Group Header" ;
-
+
};
+
ListBox LST_HEADERLST
{
HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_HEADERLST";
@@ -205,14 +158,16 @@ FloatingWindow RID_GROUPS_SORTING
< "Not present" ; Default ; > ;
};
};
+
FixedText FT_FOOTER
{
Pos = MAP_APPFONT ( UNRELATED_CONTROLS, 6*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 3*FIXEDTEXT_HEIGHT) ;
Size = MAP_APPFONT ( FIXEDTEXT_WIDTH , FIXEDTEXT_HEIGHT ) ;
Hide = TRUE;
Text [ en-US ] = "Group Footer" ;
-
+
};
+
ListBox LST_FOOTERLST
{
HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_FOOTERLST";
@@ -229,14 +184,16 @@ FloatingWindow RID_GROUPS_SORTING
< "Not present" ; Default ; > ;
};
};
+
FixedText FT_GROUPON
{
Pos = MAP_APPFONT ( UNRELATED_CONTROLS, 7*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 4*FIXEDTEXT_HEIGHT) ;
Size = MAP_APPFONT ( FIXEDTEXT_WIDTH , FIXEDTEXT_HEIGHT ) ;
Hide = TRUE;
Text [ en-US ] = "Group On" ;
-
+
};
+
ListBox LST_GROUPONLST
{
HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_GROUPONLST";
@@ -252,6 +209,7 @@ FloatingWindow RID_GROUPS_SORTING
< "Each Value" ; Default ; > ;
};
};
+
FixedText FT_GROUPINTERVAL
{
Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 8*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 5*FIXEDTEXT_HEIGHT) ;
@@ -259,6 +217,7 @@ FloatingWindow RID_GROUPS_SORTING
Hide = TRUE;
Text [ en-US ] = "Group Interval" ;
};
+
NumericField ED_GROUPINTERVALLST
{
HelpID = "reportdesign:NumericField:RID_GROUPS_SORTING:ED_GROUPINTERVALLST";
@@ -268,7 +227,7 @@ FloatingWindow RID_GROUPS_SORTING
Size = MAP_APPFONT( LISTBOX_WIDTH, EDIT_HEIGHT );
TabStop = TRUE;
};
-
+
FixedText FT_KEEPTOGETHER
{
Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 9*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 6*FIXEDTEXT_HEIGHT) ;
@@ -293,30 +252,20 @@ FloatingWindow RID_GROUPS_SORTING
< "With First Detail" ; 2 ; > ;
};
};
-
+
FixedLine FL_SEPARATOR1
{
Pos = MAP_APPFONT ( RELATED_CONTROLS , 10*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 7*FIXEDTEXT_HEIGHT) ;
Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Help";
};
-
+
FixedText HELP_FIELD
{
Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 12*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 7*FIXEDTEXT_HEIGHT) ;
Size = MAP_APPFONT( PAGE_WIDTH - 2*UNRELATED_CONTROLS, 4*FIXEDTEXT_HEIGHT);
WordBreak = TRUE;
};
-
-//BTN Image IMG_UP_H
-//BTN {
-//BTN ImageBitmap = Bitmap { File = "arrow_move_up_hc" ; };
-//BTN };
-//BTN Image IMG_DOWN_H
-//BTN {
-//BTN ImageBitmap = Bitmap { File = "arrow_move_down_hc" ; };
-//BTN };
-
};
@@ -324,42 +273,52 @@ String STR_RPT_EXPRESSION
{
Text [ en-US ] = "Field/Expression" ;
};
+
String STR_RPT_SORTING
{
Text [ en-US ] = "Sort Order" ;
};
+
String STR_RPT_PREFIXCHARS
{
Text [ en-US ] = "Prefix Characters" ;
};
+
String STR_RPT_YEAR
{
Text [ en-US ] = "Year" ;
};
+
String STR_RPT_QUARTER
{
Text [ en-US ] = "Quarter" ;
};
+
String STR_RPT_MONTH
{
Text [ en-US ] = "Month" ;
};
+
String STR_RPT_WEEK
{
Text [ en-US ] = "Week" ;
};
+
String STR_RPT_DAY
{
Text [ en-US ] = "Day" ;
};
+
String STR_RPT_HOUR
{
Text [ en-US ] = "Hour" ;
};
+
String STR_RPT_MINUTE
{
Text [ en-US ] = "Minute" ;
};
+
String STR_RPT_INTERVAL
{
Text [ en-US ] = "Interval" ;
@@ -379,42 +338,31 @@ String STR_RPT_HELP_FOOTER
{
Text [ en-US ] = "Display a footer for this group?" ;
};
+
String STR_RPT_HELP_GROUPON
{
Text [ en-US ] = "Select the value or range of values that starts a new group." ;
};
+
String STR_RPT_HELP_INTERVAL
{
Text [ en-US ] = "Interval or number of characters to group on." ;
};
+
String STR_RPT_HELP_KEEP
{
Text [ en-US ] = "Keep group together on one page?" ;
};
+
String STR_RPT_HELP_SORT
{
Text [ en-US ] = "Select ascending or descending sort order. Ascending means from A to Z or 0 to 9" ;
};
-
Menu RID_GROUPSROWPOPUPMENU
{
ItemList =
{
-/*
- MenuItem
- {
- ITEM_EDIT_CUT
- };
- MenuItem
- {
- ITEM_EDIT_COPY
- };
- MenuItem
- {
- ITEM_EDIT_PASTE
- };
-*/
MenuItem
{
ITEM_EDIT_DELETE
@@ -442,61 +390,3 @@ ImageList IMGLST_GROUPSORT_DLG_SC
prefix = "sc";
DEF_IL_GROUPSORT ;
};
-
-ImageList IMGLST_GROUPSORT_DLG_SCH
-{
- DEF_MASKCOLOR;
- prefix = "sch";
- DEF_IL_GROUPSORT ;
-};
-
-
-// Image IMG_GROUPSORT_MOVEUP
-// {
-// ImageBitmap = Bitmap
-// {
-// File = "reportgroupmoveup"; // reportdesign/res/...
-// };
-// DEF_MASKCOLOR;
-// };
-// Image IMG_GROUPSORT_MOVEDOWN
-// {
-// ImageBitmap = Bitmap
-// {
-// File = "reportgroupmovedown";
-// };
-// DEF_MASKCOLOR;
-// };
-// Image IMG_GROUPSORT_DELETE
-// {
-// ImageBitmap = Bitmap
-// {
-// File = "reportgroupdelete";
-// };
-// DEF_MASKCOLOR;
-// };
-//
-// Image IMG_GROUPSORT_MOVEUP_H
-// {
-// ImageBitmap = Bitmap
-// {
-// File = "reportgroupmoveup_h"; // reportdesign/res/...
-// };
-// DEF_MASKCOLOR;
-// };
-// Image IMG_GROUPSORT_MOVEDOWN_H
-// {
-// ImageBitmap = Bitmap
-// {
-// File = "reportgroupmovedown_h";
-// };
-// DEF_MASKCOLOR;
-// };
-// Image IMG_GROUPSORT_DELETE_H
-// {
-// ImageBitmap = Bitmap
-// {
-// File = "reportgroupdelete_h";
-// };
-// DEF_MASKCOLOR;
-// };
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 76c427ba5..fe3c4356b 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -153,7 +154,6 @@ class NavigatorTree : public ::cppu::BaseMutex
AutoTimer m_aDropActionTimer;
Timer m_aSynchronizeTimer;
ImageList m_aNavigatorImages;
- ImageList m_aNavigatorImagesHC;
Point m_aTimerTriggered; // die Position, an der der DropTimer angeschaltet wurde
DROP_ACTION m_aDropActionType;
OReportController& m_rController;
@@ -204,7 +204,7 @@ public:
virtual void traverseReportFooter(const uno::Reference< report::XSection>& _xSection);
virtual void traversePageHeader(const uno::Reference< report::XSection>& _xSection);
virtual void traversePageFooter(const uno::Reference< report::XSection>& _xSection);
-
+
virtual void traverseGroups(const uno::Reference< report::XGroups>& _xGroups);
virtual void traverseGroup(const uno::Reference< report::XGroup>& _xGroup);
virtual void traverseGroupFunctions(const uno::Reference< report::XFunctions>& _xFunctions);
@@ -231,7 +231,7 @@ NavigatorTree::NavigatorTree( Window* pParent,OReportController& _rController )
,m_pDragedEntry(NULL)
,m_nTimerCounter( DROP_ACTION_TIMER_INITIAL_TICKS )
{
- DBG_CTOR(rpt_NavigatorTree,NULL);
+ DBG_CTOR(rpt_NavigatorTree,NULL);
m_pReportListener = new OPropertyChangeMultiplexer(this,m_rController.getReportDefinition().get());
m_pReportListener->addProperty(PROPERTY_PAGEHEADERON);
m_pReportListener->addProperty(PROPERTY_PAGEFOOTERON);
@@ -243,17 +243,10 @@ NavigatorTree::NavigatorTree( Window* pParent,OReportController& _rController )
SetHelpId( HID_REPORT_NAVIGATOR_TREE );
m_aNavigatorImages = ImageList( ModuleRes( RID_SVXIMGLIST_RPTEXPL ) );
- m_aNavigatorImagesHC = ImageList( ModuleRes( RID_SVXIMGLIST_RPTEXPL_HC ) );
SetNodeBitmaps(
m_aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE ),
- m_aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE ),
- BMP_COLOR_NORMAL
- );
- SetNodeBitmaps(
- m_aNavigatorImagesHC.GetImage( RID_SVXIMG_COLLAPSEDNODE ),
- m_aNavigatorImagesHC.GetImage( RID_SVXIMG_EXPANDEDNODE ),
- BMP_COLOR_HIGHCONTRAST
+ m_aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE )
);
SetDragDropMode(0xFFFF);
@@ -276,7 +269,7 @@ NavigatorTree::~NavigatorTree()
}
m_pReportListener->dispose();
m_pSelectionListener->dispose();
- DBG_DTOR(rpt_NavigatorTree,NULL);
+ DBG_DTOR(rpt_NavigatorTree,NULL);
}
//------------------------------------------------------------------------------
void NavigatorTree::Command( const CommandEvent& rEvt )
@@ -316,14 +309,14 @@ void NavigatorTree::Command( const CommandEvent& rEvt )
sal_Bool bDeleteAllowed = m_rController.isEditable() && (xGroup.is() ||
uno::Reference< report::XFunction>(pData->getContent(),uno::UNO_QUERY).is());
PopupMenu aContextMenu( ModuleRes( RID_MENU_NAVIGATOR ) );
-
+
sal_uInt16 nCount = aContextMenu.GetItemCount();
for (sal_uInt16 i = 0; i < nCount; ++i)
{
if ( MENUITEM_SEPARATOR != aContextMenu.GetItemType(i))
{
sal_uInt16 nId = aContextMenu.GetItemId(i);
-
+
aContextMenu.CheckItem(nId,m_rController.isCommandChecked(nId));
sal_Bool bEnabled = m_rController.isCommandEnabled(nId);
if ( nId == SID_RPT_NEW_FUNCTION )
@@ -334,7 +327,7 @@ void NavigatorTree::Command( const CommandEvent& rEvt )
else
aContextMenu.EnableItem(nId,bEnabled);
}
- } // for (sal_uInt16 i = 0; i < nCount; ++i)
+ }
sal_uInt16 nId = aContextMenu.Execute(this, aWhere);
if ( nId )
{
@@ -371,7 +364,7 @@ sal_Int8 NavigatorTree::AcceptDrop( const AcceptDropEvent& _rEvt )
{
if (m_aDropActionTimer.IsActive())
m_aDropActionTimer.Stop();
- }
+ }
else
{
bool bNeedTrigger = false;
@@ -380,14 +373,14 @@ sal_Int8 NavigatorTree::AcceptDrop( const AcceptDropEvent& _rEvt )
{
m_aDropActionType = DA_SCROLLUP;
bNeedTrigger = true;
- }
+ }
else if ((aDropPos.Y() < GetSizePixel().Height()) && (aDropPos.Y() >= GetSizePixel().Height() - GetEntryHeight()))
{
m_aDropActionType = DA_SCROLLDOWN;
bNeedTrigger = true;
- }
+ }
else
- {
+ {
SvLBoxEntry* pDropppedOn = GetEntry(aDropPos);
if (pDropppedOn && (GetChildCount(pDropppedOn) > 0) && !IsExpanded(pDropppedOn))
{
@@ -408,7 +401,7 @@ sal_Int8 NavigatorTree::AcceptDrop( const AcceptDropEvent& _rEvt )
m_aDropActionTimer.SetTimeout(DROP_ACTION_TIMER_TICK_BASE);
m_aDropActionTimer.Start();
}
- }
+ }
else if (!bNeedTrigger)
m_aDropActionTimer.Stop();
}
@@ -418,7 +411,6 @@ sal_Int8 NavigatorTree::AcceptDrop( const AcceptDropEvent& _rEvt )
// -------------------------------------------------------------------------
sal_Int8 NavigatorTree::ExecuteDrop( const ExecuteDropEvent& /*_rEvt*/ )
{
- // _rEvt.mnAction;
return DND_ACTION_NONE;
}
// -------------------------------------------------------------------------
@@ -479,8 +471,8 @@ IMPL_LINK(NavigatorTree, OnEntrySelDesel, NavigatorTree*, /*pThis*/)
aSelection <<= static_cast<UserData*>(pEntry->GetUserData())->getContent();
m_rController.select(aSelection);
m_pSelectionListener->unlock();
- }
-
+ }
+
return 0L;
}
// -----------------------------------------------------------------------------
@@ -527,12 +519,6 @@ SvLBoxEntry* NavigatorTree::insertEntry(const ::rtl::OUString& _sName,SvLBoxEntr
{
const Image aImage( m_aNavigatorImages.GetImage( _nImageId ) );
pEntry = InsertEntry(_sName,aImage,aImage,_pParent,sal_False,_nPosition,_pData);
- if ( pEntry )
- {
- const Image aImageHC( m_aNavigatorImagesHC.GetImage( _nImageId ) );
- SetExpandedEntryBmp( pEntry, aImageHC, BMP_COLOR_HIGHCONTRAST );
- SetCollapsedEntryBmp( pEntry, aImageHC, BMP_COLOR_HIGHCONTRAST );
- }
}
else
pEntry = InsertEntry(_sName,_pParent,sal_False,_nPosition,_pData);
@@ -698,7 +684,7 @@ void NavigatorTree::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
}
}
// -----------------------------------------------------------------------------
-void NavigatorTree::_elementInserted( const container::ContainerEvent& _rEvent )
+void NavigatorTree::_elementInserted( const container::ContainerEvent& _rEvent )
{
SvLBoxEntry* pEntry = find(_rEvent.Source);
uno::Reference<beans::XPropertySet> xProp(_rEvent.Element,uno::UNO_QUERY_THROW);
@@ -779,13 +765,13 @@ void NavigatorTree::removeEntry(SvLBoxEntry* _pEntry,bool _bRemove)
}
DBG_NAME(rpt_NavigatorTree_UserData)
// -----------------------------------------------------------------------------
-NavigatorTree::UserData::UserData(NavigatorTree* _pTree,const uno::Reference<uno::XInterface>& _xContent)
+NavigatorTree::UserData::UserData(NavigatorTree* _pTree,const uno::Reference<uno::XInterface>& _xContent)
: OPropertyChangeListener(m_aMutex)
, OContainerListener(m_aMutex)
, m_xContent(_xContent)
, m_pTree(_pTree)
{
- DBG_CTOR(rpt_NavigatorTree_UserData,NULL);
+ DBG_CTOR(rpt_NavigatorTree_UserData,NULL);
uno::Reference<beans::XPropertySet> xProp(m_xContent,uno::UNO_QUERY);
if ( xProp.is() )
{
@@ -816,7 +802,7 @@ NavigatorTree::UserData::UserData(NavigatorTree* _pTree,const uno::Reference<uno
// -----------------------------------------------------------------------------
NavigatorTree::UserData::~UserData()
{
- DBG_DTOR(rpt_NavigatorTree_UserData,NULL);
+ DBG_DTOR(rpt_NavigatorTree_UserData,NULL);
if ( m_pContainerListener.is() )
m_pContainerListener->dispose();
if ( m_pListener.is() )
@@ -843,7 +829,7 @@ void NavigatorTree::UserData::_propertyChanged(const beans::PropertyChangeEvent&
pMemFunSection = ::std::mem_fun(&OGroupHelper::getFooter);
nPos = m_pTree->GetChildCount(pEntry) - 1;
}
-
+
OGroupHelper aGroupHelper(xGroup);
if ( pIsOn(&aGroupHelper) )
{
@@ -851,8 +837,6 @@ void NavigatorTree::UserData::_propertyChanged(const beans::PropertyChangeEvent&
++nPos;
m_pTree->traverseSection(pMemFunSection(&aGroupHelper),pEntry,bFooterOn ? SID_GROUPFOOTER : SID_GROUPHEADER,nPos);
}
- //else
- // m_pTree->removeEntry(m_pTree->GetEntry(pEntry,nPos));
}
else if ( PROPERTY_EXPRESSION == _rEvent.PropertyName)
{
@@ -905,7 +889,7 @@ public:
::std::auto_ptr<NavigatorTree> m_pNavigatorTree;
};
-ONavigatorImpl::ONavigatorImpl(OReportController& _rController,ONavigator* _pParent)
+ONavigatorImpl::ONavigatorImpl(OReportController& _rController,ONavigator* _pParent)
:m_xReport(_rController.getReportDefinition())
,m_rController(_rController)
,m_pNavigatorTree(new NavigatorTree(_pParent,_rController))
@@ -936,23 +920,19 @@ ONavigator::ONavigator( Window* _pParent
m_pImpl.reset(new ONavigatorImpl(_rController,this));
- //Size aSpace = LogicToPixel( Size( 7, 120), MAP_APPFONT );
- //Size aOutSize(nMaxTextWidth + m_aHeader.GetSizePixel().Width() + 3*aSpace.Width(),aSpace.Height());
- //SetMinOutputSizePixel(aOutSize);
- //SetOutputSizePixel(aOutSize);
FreeResource();
m_pImpl->m_pNavigatorTree->Show();
m_pImpl->m_pNavigatorTree->GrabFocus();
SetSizePixel(Size(STD_WIN_SIZE_X,STD_WIN_SIZE_Y));
Show();
-
+
}
// -----------------------------------------------------------------------------
//------------------------------------------------------------------------
ONavigator::~ONavigator()
{
- DBG_DTOR( rpt_ONavigator,NULL);
+ DBG_DTOR( rpt_ONavigator,NULL);
}
//------------------------------------------------------------------------------
void ONavigator::Resize()
@@ -984,3 +964,4 @@ void ONavigator::GetFocus()
} // rptui
// =============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/dlg/Navigator.src b/reportdesign/source/ui/dlg/Navigator.src
index 398fa24af..1c1af073b 100644
--- a/reportdesign/source/ui/dlg/Navigator.src
+++ b/reportdesign/source/ui/dlg/Navigator.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,7 +49,7 @@ FloatingWindow RID_NAVIGATOR
Moveable = TRUE ;
Closeable = TRUE ;
Sizeable = TRUE;
-
+
Control 1
{
Pos = MAP_APPFONT( 0, 0 );
@@ -88,13 +88,6 @@ ImageList RID_SVXIMGLIST_RPTEXPL
NAVIGATOR_IMAGEIDS;
};
-ImageList RID_SVXIMGLIST_RPTEXPL_HC
-{
- Prefix = "sxh";
- MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; };
- NAVIGATOR_IMAGEIDS;
-};
-
String RID_STR_FUNCTIONS
{
Text [ en-US ] = "Functions" ;
@@ -176,7 +169,7 @@ Menu RID_MENU_NAVIGATOR
{
ITEM_EDIT_PASTE
};
-*/
+*/
};
};
diff --git a/reportdesign/source/ui/dlg/PageNumber.cxx b/reportdesign/source/ui/dlg/PageNumber.cxx
index f664ccc77..389bd992b 100644
--- a/reportdesign/source/ui/dlg/PageNumber.cxx
+++ b/reportdesign/source/ui/dlg/PageNumber.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,37 +27,19 @@
************************************************************************/
#include "precompiled_rptui.hxx"
#include "PageNumber.hxx"
-#ifndef RPTUI_PAGENUMBER_HRC
#include "PageNumber.hrc"
-#endif
#include <com/sun/star/beans/XPropertySet.hpp>
#include <tools/debug.hxx>
-#ifndef _RPTUI_DLGRESID_HRC
#include "RptResId.hrc"
-#endif
-#ifndef _RPTUI_SLOTID_HRC_
#include "rptui_slotid.hrc"
-#endif
-#ifndef _RPTUI_MODULE_HELPER_DBU_HXX_
#include "ModuleHelper.hxx"
-#endif
#include "RptDef.hxx"
-#ifndef RTPUI_REPORTDESIGN_HELPID_HRC
#include "helpids.hrc"
-#endif
#include <vcl/msgbox.hxx>
-#ifndef _GLOBLMN_HRC
#include <svx/globlmn.hrc>
-#endif
-#ifndef _SBASLTID_HRC
#include <svx/svxids.hrc>
-#endif
-#ifndef RPTUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC
#include "uistrings.hrc"
-#endif
#include "ReportController.hxx"
#include <com/sun/star/report/XFixedText.hpp>
#include <algorithm>
@@ -160,3 +143,5 @@ short OPageNumberDialog::Execute()
// =============================================================================
} // rptui
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/dlg/PageNumber.src b/reportdesign/source/ui/dlg/PageNumber.src
index 58d8c4a04..991174162 100644
--- a/reportdesign/source/ui/dlg/PageNumber.src
+++ b/reportdesign/source/ui/dlg/PageNumber.src
@@ -120,8 +120,6 @@ ModalDialog RID_PAGENUMBERS
< "Left" ; Default ; > ;
< "Center" ; Default ; > ;
< "Right" ; Default ; > ;
- //< "Inside" ; Default ; > ;
- //< "Outside" ; Default ; > ;
};
};
CheckBox CB_SHOWNUMBERONFIRSTPAGE
diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx b/reportdesign/source/ui/dlg/dlgpage.cxx
index 403677778..70fc2848a 100644
--- a/reportdesign/source/ui/dlg/dlgpage.cxx
+++ b/reportdesign/source/ui/dlg/dlgpage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,7 @@
#include "dlgpage.hxx"
#include "ModuleHelper.hxx"
#include "RptResId.hrc"
-#include <svl/intitem.hxx> //add CHINA001
+#include <svl/intitem.hxx>
#include <svl/cjkoptions.hxx>
#include <svl/aeitem.hxx>
@@ -52,15 +53,13 @@ SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ),
rOutAttrs ( *pAttr )
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
switch( _nPageId )
{
case RID_PAGEDIALOG_BACKGROUND:
AddTabPage( RID_SVXPAGE_BACKGROUND,String(ModuleRes(1)));
break;
case RID_PAGEDIALOG_PAGE:
- //AddTabPage( RID_SVXPAGE_PAGE,String(ModuleRes(1)));
- // AddTabPage( RID_SVXPAGE_BACKGROUND,String(ModuleRes(1)));
AddTabPage(RID_SVXPAGE_PAGE, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), 0 );
AddTabPage(RID_SVXPAGE_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
break;
@@ -75,11 +74,9 @@ SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ),
break;
case RID_PAGEDIALOG_LINE:
AddTabPage( RID_SVXPAGE_LINE,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE ), 0 );
- //AddTabPage( RID_SVXPAGE_LINE_DEF,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE_DEF ), 0 );
- //AddTabPage( RID_SVXPAGE_LINEEND_DEF,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINEEND_DEF ), 0 );
break;
default:
- OSL_ENSURE(0,"Unknown page id");
+ OSL_FAIL("Unknown page id");
}
SvtCJKOptions aCJKOptions;
@@ -91,3 +88,5 @@ SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ),
// =============================================================================
} // namespace rptui
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/dlg/dlgpage.src b/reportdesign/source/ui/dlg/dlgpage.src
index 78873f1b1..92407c021 100644
--- a/reportdesign/source/ui/dlg/dlgpage.src
+++ b/reportdesign/source/ui/dlg/dlgpage.src
@@ -79,7 +79,6 @@ TabDialog RID_PAGEDIALOG_PAGE
{
Pos = MAP_APPFONT ( 169 , 151 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Zurück : Zur³ck */
Text [ en-US ] = "Return" ;
TabStop = TRUE ;
};
@@ -129,7 +128,6 @@ TabDialog RID_PAGEDIALOG_BACKGROUND
{
Pos = MAP_APPFONT ( 169 , 151 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Zurück : Zur³ck */
Text [ en-US ] = "Return" ;
TabStop = TRUE ;
Text [ x-comment ] = " ";
@@ -218,7 +216,6 @@ TabDialog RID_PAGEDIALOG_CHAR
{
Pos = MAP_APPFONT ( 169 , 151 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Zurück : Zur³ck */
Text [ en-US ] = "Return" ;
TabStop = TRUE ;
Text [ x-comment ] = " ";
@@ -290,7 +287,6 @@ TabDialog RID_PAGEDIALOG_LINE
{
Pos = MAP_APPFONT ( 169 , 151 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Zurück : Zur³ck */
Text [ en-US ] = "Return" ;
TabStop = TRUE ;
Text [ x-comment ] = " ";
diff --git a/reportdesign/source/ui/inc/AddField.hxx b/reportdesign/source/ui/inc/AddField.hxx
index 5585f4fbb..598e62728 100644
--- a/reportdesign/source/ui/inc/AddField.hxx
+++ b/reportdesign/source/ui/inc/AddField.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,10 +110,8 @@ public:
/** will be called when the id of the image list is needed.
@param _eBitmapSet
<svtools/imgdef.hxx>
- @param _bHiContast
- <TRUE/> when in high contrast mode.
*/
- virtual ImageList getImageList(sal_Int16 _eBitmapSet,sal_Bool _bHiContast) const;
+ virtual ImageList getImageList(sal_Int16 _eBitmapSet) const;
/** will be called when the controls need to be resized.
*/
@@ -141,3 +140,4 @@ private:
//==============================================================================
#endif // RPTUI_ADDFIELDWINDOW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/ColorChanger.hxx b/reportdesign/source/ui/inc/ColorChanger.hxx
index 260aa1704..e794de95f 100644
--- a/reportdesign/source/ui/inc/ColorChanger.hxx
+++ b/reportdesign/source/ui/inc/ColorChanger.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,3 +69,4 @@ namespace rptui
}
#endif //RPTUI_COLORCHANGER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/ColorListener.hxx b/reportdesign/source/ui/inc/ColorListener.hxx
index 4619bace1..13677f7e5 100644
--- a/reportdesign/source/ui/inc/ColorListener.hxx
+++ b/reportdesign/source/ui/inc/ColorListener.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,4 @@ namespace rptui
}
#endif // RPTUI_COLORLISTENER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/ColumnInfo.hxx b/reportdesign/source/ui/inc/ColumnInfo.hxx
index 5943fdba8..3a3cfa9a1 100644
--- a/reportdesign/source/ui/inc/ColumnInfo.hxx
+++ b/reportdesign/source/ui/inc/ColumnInfo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: AddField.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -55,3 +53,5 @@ namespace rptui
} // namespace rptui
// =============================================================================
#endif // RPTUI_COLUMNINFO_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/CondFormat.hxx b/reportdesign/source/ui/inc/CondFormat.hxx
index 74543888c..037c3ac0d 100644
--- a/reportdesign/source/ui/inc/CondFormat.hxx
+++ b/reportdesign/source/ui/inc/CondFormat.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -184,3 +185,5 @@ namespace rptui
// .............................................................................
#endif // RPTUI_CONDFORMAT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/DataProviderHandler.hxx b/reportdesign/source/ui/inc/DataProviderHandler.hxx
index 4e62b6110..80f0a5f4a 100644
--- a/reportdesign/source/ui/inc/DataProviderHandler.hxx
+++ b/reportdesign/source/ui/inc/DataProviderHandler.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -127,3 +128,5 @@ namespace rptui
//........................................................................
#endif // RPT_DATAPROVIDERHANDLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/DateTime.hxx b/reportdesign/source/ui/inc/DateTime.hxx
index 33e72b427..9b774e6a2 100644
--- a/reportdesign/source/ui/inc/DateTime.hxx
+++ b/reportdesign/source/ui/inc/DateTime.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,17 +28,11 @@
#ifndef RPTUI_DATETIME_HXX
#define RPTUI_DATETIME_HXX
-#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
#include <vcl/lstbox.hxx>
#include <vcl/field.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <com/sun/star/report/XReportDefinition.hpp>
#include <com/sun/star/util/XNumberFormats.hpp>
#include <com/sun/star/lang/Locale.hpp>
@@ -54,7 +49,6 @@ class OReportController;
\************************************************************************/
class ODateTimeDialog : public ModalDialog
{
- // FixedLine m_aFLDate;
CheckBox m_aDate;
FixedText m_aFTDateFormat;
ListBox m_aDateListBox;
@@ -107,3 +101,5 @@ public:
} // namespace rptui
// =============================================================================
#endif // RPTUI_DATETIME_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/DefaultInspection.hxx b/reportdesign/source/ui/inc/DefaultInspection.hxx
index 5bb31a9db..2149777e4 100644
--- a/reportdesign/source/ui/inc/DefaultInspection.hxx
+++ b/reportdesign/source/ui/inc/DefaultInspection.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,3 +110,4 @@ namespace rptui
#endif // RPT_DEFAULTINSPECTION_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx
index ac8377e11..27579d9ed 100644
--- a/reportdesign/source/ui/inc/DesignView.hxx
+++ b/reportdesign/source/ui/inc/DesignView.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -157,12 +158,6 @@ namespace rptui
*/
void alignMarkedObjects(sal_Int32 _nControlModification, bool _bAlignAtSection, bool bBoundRects = false);
-#if 0
- /** checks if alignment is possible in the current section
- */
- sal_Bool isAlignPossible() const;
-#endif
-
/** All objects will be marked.
*/
void SelectAll(const sal_uInt16 _nObjectType);
@@ -296,3 +291,4 @@ namespace rptui
//==================================================================
#endif // RPTUI_DESIGNVIEW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/EndMarker.hxx b/reportdesign/source/ui/inc/EndMarker.hxx
index f27bfd284..7c3d3205a 100644
--- a/reportdesign/source/ui/inc/EndMarker.hxx
+++ b/reportdesign/source/ui/inc/EndMarker.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,4 @@ namespace rptui
}
#endif // RPTUI_ENDMARKER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/FixedTextColor.hxx b/reportdesign/source/ui/inc/FixedTextColor.hxx
index 29de91966..b4802d864 100644
--- a/reportdesign/source/ui/inc/FixedTextColor.hxx
+++ b/reportdesign/source/ui/inc/FixedTextColor.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,8 +39,6 @@
/** === end UNO includes === **/
#include <IReportControllerObserver.hxx>
-
-//#include <boost/noncopyable.hpp>
#include <vector>
namespace rptui
@@ -55,8 +54,6 @@ namespace rptui
void setPropertyTextColor(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclWindowPeer >& _xVclWindowPeer, sal_Int32 _nFormatKey);
- // sal_Int32 getTextColor();
-
public:
FixedTextColor(const OReportController & _aObserver);
virtual ~FixedTextColor();
@@ -71,3 +68,5 @@ namespace rptui
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx b/reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx
index 5fbfcc6ab..fac75dd65 100644
--- a/reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx
+++ b/reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,6 @@
#include <com/sun/star/report/XReportComponent.hpp>
/** === end UNO includes === **/
-//#include <boost/noncopyable.hpp>
#include <vector>
#include <IReportControllerObserver.hxx>
@@ -68,3 +68,5 @@ namespace rptui
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/Formula.hxx b/reportdesign/source/ui/inc/Formula.hxx
index 1e5953a2a..c5950f8be 100644
--- a/reportdesign/source/ui/inc/Formula.hxx
+++ b/reportdesign/source/ui/inc/Formula.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -110,3 +111,4 @@ protected:
#endif // RPTUI_FORMULA_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/FunctionHelper.hxx b/reportdesign/source/ui/inc/FunctionHelper.hxx
index 792e2885b..08b80e024 100644
--- a/reportdesign/source/ui/inc/FunctionHelper.hxx
+++ b/reportdesign/source/ui/inc/FunctionHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -110,3 +111,5 @@ public:
// =============================================================================
#endif //RPTUI_FUNCTIONHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/GeometryHandler.hxx b/reportdesign/source/ui/inc/GeometryHandler.hxx
index ac3b8779a..ece943f76 100644
--- a/reportdesign/source/ui/inc/GeometryHandler.hxx
+++ b/reportdesign/source/ui/inc/GeometryHandler.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -319,3 +320,5 @@ namespace rptui
//........................................................................
#endif // RPT_GeometryHandler_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/GroupsSorting.hxx b/reportdesign/source/ui/inc/GroupsSorting.hxx
index 5da272ae2..83ed6a42e 100644
--- a/reportdesign/source/ui/inc/GroupsSorting.hxx
+++ b/reportdesign/source/ui/inc/GroupsSorting.hxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -28,9 +29,7 @@
#define RPTUI_GROUPS_SORTING_HXX
#include <vcl/floatwin.hxx>
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
#include <vcl/lstbox.hxx>
#include <vcl/edit.hxx>
#include <vcl/field.hxx>
@@ -65,19 +64,16 @@ class OReportController;
|*
\************************************************************************/
-class OGroupsSortingDialog : public FloatingWindow
- , public ::cppu::BaseMutex
- , public ::comphelper::OPropertyChangeListener
- ,public dbaui::OToolBoxHelper
- ,public vcl::IImageListProvider
+class OGroupsSortingDialog : public FloatingWindow
+ , public ::cppu::BaseMutex
+ , public ::comphelper::OPropertyChangeListener
+ , public dbaui::OToolBoxHelper
+ , public vcl::IImageListProvider
{
friend class OFieldExpressionControl;
FixedLine m_aFL2;
FixedText m_aMove;
-//BTN ImageButton m_aPB_Up;
-//BTN ImageButton m_aPB_Down;
-//BTN ImageButton m_aPB_Delete;
ToolBox m_aToolBox;
FixedLine m_aFL3;
@@ -92,7 +88,7 @@ class OGroupsSortingDialog : public FloatingWindow
FixedText m_aGroupInterval;
NumericField m_aGroupIntervalEd;
FixedText m_aKeepTogether;
- ListBox m_aKeepTogetherLst;
+ ListBox m_aKeepTogetherLst;
FixedLine m_aFL;
FixedText m_aHelpWindow;
@@ -107,7 +103,6 @@ private:
DECL_LINK( OnControlFocusLost, Control* );
DECL_LINK( OnControlFocusGot, Control* );
DECL_LINK( LBChangeHdl, ListBox* );
-//BTN DECL_LINK( ClickHdl, ImageButton* );
DECL_LINK( OnFormatAction, ToolBox* );
/** returns the groups
@@ -115,8 +110,8 @@ private:
*/
::com::sun::star::uno::Reference< ::com::sun::star::report::XGroups>& getGroups() { return m_xGroups; }
- ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup> getGroup(sal_Int32 _nPos)
- {
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup> getGroup(sal_Int32 _nPos)
+ {
OSL_ENSURE(_nPos >= 0 && _nPos < m_xGroups->getCount(),"Invalid count!");
return ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup>(m_xGroups->getByIndex(_nPos),::com::sun::star::uno::UNO_QUERY);
}
@@ -154,7 +149,7 @@ private:
*/
void checkButtons(sal_Int32 _nRow);
- /** clears the m_xColumns member and reset the fields
+ /** clears the m_xColumns member and reset the fields
*
*/
void fillColumns();
@@ -189,10 +184,8 @@ public:
/** will be called when the image list is needed.
@param _eSymbolsSize
<svtools/imgdef.hxx>
- @param _bHiContast
- <TRUE/> when in high contrast mode.
*/
- virtual ImageList getImageList(sal_Int16 _eSymbolsSize,sal_Bool _bHiContast) const;
+ virtual ImageList getImageList(sal_Int16 _eSymbolsSize) const;
// ImageListProvider interface
virtual ImageList getImageList(vcl::ImageListType) SAL_THROW ((com::sun::star::lang::IllegalArgumentException ));
@@ -202,3 +195,5 @@ public:
} // namespace rptui
// =============================================================================
#endif // RPTUI_GROUPS_SORTING_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/IReportControllerObserver.hxx b/reportdesign/source/ui/inc/IReportControllerObserver.hxx
index a22f44844..26b1d7d9c 100644
--- a/reportdesign/source/ui/inc/IReportControllerObserver.hxx
+++ b/reportdesign/source/ui/inc/IReportControllerObserver.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,4 @@ namespace rptui
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/InsertFunctions.hxx b/reportdesign/source/ui/inc/InsertFunctions.hxx
index 4b99c6c34..ff55d6215 100644
--- a/reportdesign/source/ui/inc/InsertFunctions.hxx
+++ b/reportdesign/source/ui/inc/InsertFunctions.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef RPT_INSERTFUNCTIONS_HXX_INCLUDED
#define RPT_INSERTFUNCTIONS_HXX_INCLUDED
-#ifndef _EVENT_HXX //autogen
#include <vcl/event.hxx>
-#endif
#include <vcl/timer.hxx>
class SdrView;
@@ -44,3 +43,4 @@ namespace rptui
// ---------
#endif // RPT_INSERTFUNCTIONS_HXX_INCLUDED
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/MarkedSection.hxx b/reportdesign/source/ui/inc/MarkedSection.hxx
index 5d518d5ab..126693d2d 100644
--- a/reportdesign/source/ui/inc/MarkedSection.hxx
+++ b/reportdesign/source/ui/inc/MarkedSection.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,3 +59,5 @@ namespace rptui
} // rptui
#endif /* RPTUI_MARKEDSECTION_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/Navigator.hxx b/reportdesign/source/ui/inc/Navigator.hxx
index ce4aedd19..8ddcb0c65 100644
--- a/reportdesign/source/ui/inc/Navigator.hxx
+++ b/reportdesign/source/ui/inc/Navigator.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,5 @@ namespace rptui
} // namespace rptui
// =============================================================================
#endif // INCLUDED_RPTUI_NAVIGATOR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/PageNumber.hxx b/reportdesign/source/ui/inc/PageNumber.hxx
index 01c81e0bc..65d4f4f3c 100644
--- a/reportdesign/source/ui/inc/PageNumber.hxx
+++ b/reportdesign/source/ui/inc/PageNumber.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,17 +28,11 @@
#ifndef RPTUI_PAGENUMBER_HXX
#define RPTUI_PAGENUMBER_HXX
-#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
#include <vcl/lstbox.hxx>
#include <vcl/field.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <com/sun/star/report/XReportDefinition.hpp>
@@ -86,3 +81,5 @@ public:
} // namespace rptui
// =============================================================================
#endif // RPTUI_PAGENUMBER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/ReportComponentHandler.hxx b/reportdesign/source/ui/inc/ReportComponentHandler.hxx
index 4fa64687a..415903019 100644
--- a/reportdesign/source/ui/inc/ReportComponentHandler.hxx
+++ b/reportdesign/source/ui/inc/ReportComponentHandler.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113,3 +114,5 @@ namespace rptui
//........................................................................
#endif // RPT_REPORTCOMPONENTHANDLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index f8e39d462..9ac5d0e9d 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -484,3 +485,4 @@ namespace rptui
}
#endif // RPTUI_REPORTCONTROLLER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/ReportControllerObserver.hxx b/reportdesign/source/ui/inc/ReportControllerObserver.hxx
index 8531feab9..ebbf5b289 100644
--- a/reportdesign/source/ui/inc/ReportControllerObserver.hxx
+++ b/reportdesign/source/ui/inc/ReportControllerObserver.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,6 @@
#include <dllapi.h>
#include <vector>
-// #include <svl/lstner.hxx>
#include <vcl/svapp.hxx>
#include <tools/link.hxx>
@@ -49,12 +49,11 @@ namespace rptui
class OXReportControllerObserverImpl;
//========================================================================
- class /* REPORTDESIGN_DLLPUBLIC */ OXReportControllerObserver
+ class OXReportControllerObserver
: public ::cppu::WeakImplHelper3< ::com::sun::star::beans::XPropertyChangeListener
, ::com::sun::star::container::XContainerListener
, ::com::sun::star::util::XModifyListener
>
- /*,public SfxListener*/
{
const ::std::auto_ptr<OXReportControllerObserverImpl> m_pImpl;
@@ -69,7 +68,6 @@ namespace rptui
public:
OXReportControllerObserver(const OReportController& _rController);
-// protected:
// XPropertyChangeListener
virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException);
@@ -91,9 +89,6 @@ namespace rptui
void AddSection( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection);
void RemoveSection( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection );
- // SfxListener
- // virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
-
/**
Create an object ob OUndoEnvLock locks the undo possibility
As long as in the OUndoEnvLock scope, no undo is possible for manipulated object.
@@ -117,7 +112,6 @@ namespace rptui
void switchListening( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& _rxContainer, bool _bStartListening ) SAL_THROW(());
void switchListening( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxObject, bool _bStartListening ) SAL_THROW(());
- // void ModeChanged(); // will be called from 'Notify'
DECL_LINK(SettingsChanged, VclWindowEvent* );
private:
@@ -130,3 +124,4 @@ namespace rptui
#endif /* INCLUDED_REPORTCONTROLLEROBSERVER_HXX */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/ReportDefines.hxx b/reportdesign/source/ui/inc/ReportDefines.hxx
index b91aed205..6fc274f1e 100644
--- a/reportdesign/source/ui/inc/ReportDefines.hxx
+++ b/reportdesign/source/ui/inc/ReportDefines.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,3 +38,5 @@ namespace rptui
}
#endif //RPTUI_REPORT_DEFINES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/ReportRuler.hxx b/reportdesign/source/ui/inc/ReportRuler.hxx
index fc40a4217..930d6df43 100644
--- a/reportdesign/source/ui/inc/ReportRuler.hxx
+++ b/reportdesign/source/ui/inc/ReportRuler.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,3 +62,5 @@ namespace rptui
} // rptui
//==============================================================================
#endif // RPTUI_RULER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/ReportSection.hxx b/reportdesign/source/ui/inc/ReportSection.hxx
index 1cbc54555..be5ebc5ea 100644
--- a/reportdesign/source/ui/inc/ReportSection.hxx
+++ b/reportdesign/source/ui/inc/ReportSection.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -175,3 +176,4 @@ namespace rptui
//==================================================================
#endif // REPORT_REPORTSECTION_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/ReportWindow.hxx b/reportdesign/source/ui/inc/ReportWindow.hxx
index 5a978c52d..8207e2dd7 100644
--- a/reportdesign/source/ui/inc/ReportWindow.hxx
+++ b/reportdesign/source/ui/inc/ReportWindow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -243,3 +244,4 @@ namespace rptui
//==================================================================
#endif // RPTUI_REPORT_WINDOW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/RptUndo.hxx b/reportdesign/source/ui/inc/RptUndo.hxx
index 7b8230e88..cd0a1ca22 100644
--- a/reportdesign/source/ui/inc/RptUndo.hxx
+++ b/reportdesign/source/ui/inc/RptUndo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -151,3 +152,5 @@ namespace rptui
};
}
#endif // RPTUI_UNDO_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx b/reportdesign/source/ui/inc/ScrollHelper.hxx
index a1937a071..8fb110ac3 100644
--- a/reportdesign/source/ui/inc/ScrollHelper.hxx
+++ b/reportdesign/source/ui/inc/ScrollHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -227,3 +228,5 @@ namespace rptui
};
}
#endif // RPTUI_SCROLLHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/SectionView.hxx b/reportdesign/source/ui/inc/SectionView.hxx
index d91a2c831..6014aceb9 100644
--- a/reportdesign/source/ui/inc/SectionView.hxx
+++ b/reportdesign/source/ui/inc/SectionView.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,3 +76,5 @@ public:
};
}
#endif //_REPORT_SECTIONVIEW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/SectionWindow.hxx b/reportdesign/source/ui/inc/SectionWindow.hxx
index 803ed5386..0bc99e097 100644
--- a/reportdesign/source/ui/inc/SectionWindow.hxx
+++ b/reportdesign/source/ui/inc/SectionWindow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -138,3 +139,4 @@ namespace rptui
//==============================================================================
#endif // RPTUI_SECTIONWINDOW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/StartMarker.hxx b/reportdesign/source/ui/inc/StartMarker.hxx
index 1291bc7d0..0e67b247c 100644
--- a/reportdesign/source/ui/inc/StartMarker.hxx
+++ b/reportdesign/source/ui/inc/StartMarker.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,8 +46,6 @@ namespace rptui
OSectionWindow* m_pParent;
static Image* s_pDefCollapsed;
static Image* s_pDefExpanded;
- static Image* s_pDefCollapsedHC;
- static Image* s_pDefExpandedHC;
static oslInterlockedCount s_nImageRefCount; /// When 0 all static images will be destroyed
sal_Bool m_bShowRuler;
@@ -86,3 +85,4 @@ namespace rptui
}
#endif // RPTUI_STARTMARKER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/UITools.hxx b/reportdesign/source/ui/inc/UITools.hxx
index 5ff57f1ff..4caf7b097 100644
--- a/reportdesign/source/ui/inc/UITools.hxx
+++ b/reportdesign/source/ui/inc/UITools.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,7 +69,7 @@ namespace rptui
::com::sun::star::uno::Reference< T > xObject(_xCollection->getByIndex(i),::com::sun::star::uno::UNO_QUERY);
if ( xObject == _xSearch )
break;
- } // for (;i<nCount ; ++i)
+ }
return i;
}
@@ -187,3 +188,4 @@ namespace rptui
}
#endif //RPTUI_UITOOLS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx
index 3007c447a..23770d8c9 100644
--- a/reportdesign/source/ui/inc/ViewsWindow.hxx
+++ b/reportdesign/source/ui/inc/ViewsWindow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -251,7 +252,6 @@ namespace rptui
/** returns the report section window for the given xsection
@param _xSection the section
*/
- // ::boost::shared_ptr<OSectionWindow> getReportSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
::boost::shared_ptr<OSectionWindow> getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const;
/** checks if the keycode is known by the child windows
@@ -327,7 +327,6 @@ namespace rptui
OSectionView* getSectionRelativeToPosition(const OSectionView* _pSection,Point& _rPnt);
void MovAction(const Point& rPnt,const OSectionView* _pSection,bool _bMove /*= true */, bool _bControlKeySet);
- // void MovAction2(const Point& rPnt,const OSectionView* _pSection);
sal_uInt32 getMarkedObjectCount() const;
@@ -359,3 +358,4 @@ namespace rptui
//==============================================================================
#endif // RPTUI_VIEWSWINDOW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/dlgedclip.hxx b/reportdesign/source/ui/inc/dlgedclip.hxx
index 94a00c7b3..1f80d5cab 100644
--- a/reportdesign/source/ui/inc/dlgedclip.hxx
+++ b/reportdesign/source/ui/inc/dlgedclip.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,5 @@ private:
};
}
#endif // _REPORT_RPTUICLIP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/dlgedfac.hxx b/reportdesign/source/ui/inc/dlgedfac.hxx
index b66206eab..d4690e3f0 100644
--- a/reportdesign/source/ui/inc/dlgedfac.hxx
+++ b/reportdesign/source/ui/inc/dlgedfac.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,3 +49,4 @@ public:
}
#endif // _REPORT_RPTUIFAC_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/dlgedfunc.hxx b/reportdesign/source/ui/inc/dlgedfunc.hxx
index 62489e9bf..b2812d0cb 100644
--- a/reportdesign/source/ui/inc/dlgedfunc.hxx
+++ b/reportdesign/source/ui/inc/dlgedfunc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -158,3 +159,5 @@ public:
}
#endif //_REPORT_RPTUIFUNC_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/dlgpage.hxx b/reportdesign/source/ui/inc/dlgpage.hxx
index e707bf56f..4a6bbe461 100644
--- a/reportdesign/source/ui/inc/dlgpage.hxx
+++ b/reportdesign/source/ui/inc/dlgpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,5 @@ public:
} // namespace rptui
// =============================================================================
#endif // RPTUI_DLGPAGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/metadata.hxx b/reportdesign/source/ui/inc/metadata.hxx
index 63b3b6177..1b41edae7 100644
--- a/reportdesign/source/ui/inc/metadata.hxx
+++ b/reportdesign/source/ui/inc/metadata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,6 +30,8 @@
#include "ModuleHelper.hxx"
+#include <sal/macros.h>
+
/** === begin UNO includes === **/
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/inspection/XPropertyHandler.hpp>
@@ -160,3 +163,4 @@ namespace rptui
#endif // RPTUI_METADATA_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/propbrw.hxx b/reportdesign/source/ui/inc/propbrw.hxx
index 9a710e495..c7efc6d02 100644
--- a/reportdesign/source/ui/inc/propbrw.hxx
+++ b/reportdesign/source/ui/inc/propbrw.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -116,3 +117,5 @@ private:
} // rptui
//==============================================================================
#endif // _REPORT_PROPBRW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/statusbarcontroller.hxx b/reportdesign/source/ui/inc/statusbarcontroller.hxx
index 86af18021..615dde813 100644
--- a/reportdesign/source/ui/inc/statusbarcontroller.hxx
+++ b/reportdesign/source/ui/inc/statusbarcontroller.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90,3 +91,4 @@ namespace rptui
}
#endif // DBAUI_STATUSBARCONTROLLER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/toolboxcontroller.hxx b/reportdesign/source/ui/inc/toolboxcontroller.hxx
index a0c458f92..d55cb94de 100644
--- a/reportdesign/source/ui/inc/toolboxcontroller.hxx
+++ b/reportdesign/source/ui/inc/toolboxcontroller.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,4 @@ namespace rptui
//..........................................................................
#endif //RPTUI_TOOLBOXCONTROLLER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index dd4eb771e..133ad5217 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,7 +55,7 @@
#include <tools/fldunit.hxx>
#include "metadata.hxx"
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include "helpids.hrc"
#include "uistrings.hrc"
#include "RptResId.hrc"
@@ -168,13 +169,6 @@ void SAL_CALL DataProviderHandler::inspect(const uno::Reference< uno::XInterface
m_xMasterDetails = new OPropertyMediator( m_xDataProvider.get(), m_xReportComponent.get(), aPropertyMediation,sal_True );
}
-
- //const ::rtl::OUString sRowSet(RTL_CONSTASCII_USTRINGPARAM("RowSet"));
- //if ( xNameCont->hasByName(sRowSet) )
- //{
- // uno::Reference<beans::XPropertySet> xProp(m_xFormComponentHandler,uno::UNO_QUERY);
- // xProp->setPropertyValue(sRowSet,xNameCont->getByName(sRowSet));
- //}
}
catch(uno::Exception)
{
@@ -270,7 +264,7 @@ void DataProviderHandler::impl_updateChartTitle_throw(const uno::Any& _aValue)
aArgs[0] = xFormatted;
xTitle->setText(aArgs);
}
- } // if ( xTitled.is() )
+ }
}
beans::PropertyState SAL_CALL DataProviderHandler::getPropertyState(const ::rtl::OUString & PropertyName) throw (uno::RuntimeException, beans::UnknownPropertyException)
@@ -329,7 +323,7 @@ uno::Any SAL_CALL DataProviderHandler::convertToPropertyValue(const ::rtl::OUStr
}
catch( const uno::Exception& )
{
- OSL_ENSURE( sal_False, "DataProviderHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" );
+ OSL_FAIL( "DataProviderHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" );
}
break;
case PROPERTY_ID_MASTERFIELDS:
@@ -363,7 +357,7 @@ uno::Any SAL_CALL DataProviderHandler::convertToControlValue(const ::rtl::OUStri
}
catch( const uno::Exception& )
{
- OSL_ENSURE( sal_False, "GeometryHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" );
+ OSL_FAIL( "GeometryHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" );
}
break;
default:
@@ -395,10 +389,9 @@ uno::Sequence< beans::Property > SAL_CALL DataProviderHandler::getSupportedPrope
,PROPERTY_MASTERFIELDS
,PROPERTY_DETAILFIELDS
,PROPERTY_PREVIEW_COUNT
- //,PROPERTY_TITLE
};
- for (size_t nPos = 0; nPos < sizeof(s_pProperties)/sizeof(s_pProperties[0]) ;++nPos )
+ for (size_t nPos = 0; nPos < SAL_N_ELEMENTS(s_pProperties) ;++nPos )
{
aValue.Name = s_pProperties[nPos];
aNewProps.push_back(aValue);
@@ -479,9 +472,9 @@ void SAL_CALL DataProviderHandler::actuatingPropertyChanged(const ::rtl::OUStrin
xReceiver->setArguments( aArgs.getPropertyValues() );
if ( !bModified )
xReport->setModified(sal_False);
- } // if ( NewValue != OldValue )
+ }
m_xFormComponentHandler->actuatingPropertyChanged(ActuatingPropertyName, NewValue, OldValue, InspectorUI, FirstTimeInit);
- } // if ( ActuatingPropertyName == PROPERTY_COMMAND )
+ }
else if ( ActuatingPropertyName == PROPERTY_TITLE )
{
if ( NewValue != OldValue )
@@ -563,3 +556,4 @@ bool DataProviderHandler::impl_dialogChartType_nothrow( ::osl::ClearableMutexGua
} // namespace rptui
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx
index 9c728d3a0..b475edabf 100644
--- a/reportdesign/source/ui/inspection/DefaultInspection.cxx
+++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,13 +30,9 @@
#include <comphelper/sequence.hxx>
#include <com/sun/star/ucb/AlreadyInitializedException.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#ifndef _REPORT_DLGRESID_HRC
#include <RptResId.hrc>
-#endif
#include "ModuleHelper.hxx"
-#ifndef RTPUI_REPORTDESIGN_HELPID_HRC
#include "helpids.hrc"
-#endif
#include <cppuhelper/implbase1.hxx>
#include <osl/diagnose.h>
#include <rtl/ustrbuf.hxx>
@@ -146,7 +143,7 @@ namespace rptui
};
- const size_t nFactories = sizeof( aFactories ) / sizeof( aFactories[ 0 ] );
+ const size_t nFactories = SAL_N_ELEMENTS( aFactories );
Sequence< Any > aReturn( nFactories );
Any* pReturn = aReturn.getArray();
for ( size_t i = 0; i < nFactories; ++i )
@@ -244,7 +241,7 @@ namespace rptui
{ "Data", RID_STR_PROPPAGE_DATA, HID_RPT_PROPDLG_TAB_DATA },
};
- const size_t nCategories = sizeof( aCategories ) / sizeof( aCategories[0] );
+ const size_t nCategories = SAL_N_ELEMENTS( aCategories );
Sequence< PropertyCategoryDescriptor > aReturn( nCategories );
PropertyCategoryDescriptor* pReturn = aReturn.getArray();
for ( size_t i=0; i<nCategories; ++i, ++pReturn )
@@ -282,3 +279,4 @@ namespace rptui
} // namespace rptui
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index c2b3871ab..6cd62ca71 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115,6 +116,8 @@
#include "helpids.hrc"
#include <toolkit/helper/convert.hxx>
+#include <o3tl/compat_functional.hxx>
+
#define DATA_OR_FORMULA 0
#define FUNCTION 1
#define COUNTER 2
@@ -126,18 +129,17 @@ namespace rptui
{
//........................................................................
using namespace ::com::sun::star;
-//using namespace formula;
// comparing two property instances
struct PropertyCompare : public ::std::binary_function< beans::Property, ::rtl::OUString , bool >
{
bool operator() (const beans::Property& x, const ::rtl::OUString& y) const
{
- return x.Name.equals(y);// ? true : false;
+ return x.Name.equals(y);
}
bool operator() (const ::rtl::OUString& x,const beans::Property& y) const
{
- return x.equals(y.Name);// ? true : false;
+ return x.equals(y.Name);
}
};
@@ -806,9 +808,9 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const
{
// add function names
::std::for_each( m_aFunctionNames.begin(), m_aFunctionNames.end(),
- ::std::compose1(
+ ::o3tl::compose1(
::boost::bind( &inspection::XStringListControl::appendListEntry, xListControl,_1 ),
- ::std::select1st<TFunctions::value_type>()));
+ ::o3tl::select1st<TFunctions::value_type>()));
}
else
{
@@ -1024,7 +1026,7 @@ uno::Any SAL_CALL GeometryHandler::convertToPropertyValue(const ::rtl::OUString
}
catch( const uno::Exception& )
{
- OSL_ENSURE( sal_False, "GeometryHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" );
+ OSL_FAIL( "GeometryHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" );
}
}
}
@@ -1169,7 +1171,7 @@ uno::Any SAL_CALL GeometryHandler::convertToControlValue(const ::rtl::OUString &
}
catch( const uno::Exception& )
{
- OSL_ENSURE( sal_False, "GeometryHandler::convertToControlValue: caught an exception while converting via TypeConverter!" );
+ OSL_FAIL( "GeometryHandler::convertToControlValue: caught an exception while converting via TypeConverter!" );
}
}
break;
@@ -1312,7 +1314,7 @@ uno::Sequence< beans::Property > SAL_CALL GeometryHandler::getSupportedPropertie
};
const uno::Reference < beans::XPropertySetInfo > xInfo = m_xReportComponent->getPropertySetInfo();
const uno::Sequence< beans::Property> aSeq = xInfo->getProperties();
- for (size_t i = 0; i < sizeof(pIncludeProperties)/sizeof(pIncludeProperties[0]) ;++i )
+ for (size_t i = 0; i < SAL_N_ELEMENTS(pIncludeProperties) ;++i )
{
const beans::Property* pIter = aSeq.getConstArray();
const beans::Property* pEnd = pIter + aSeq.getLength();
@@ -1332,7 +1334,7 @@ uno::Sequence< beans::Property > SAL_CALL GeometryHandler::getSupportedPropertie
}
aNewProps.push_back(*pFind);
}
- } // for (size_t i = 0; i < sizeof(pIncludeProperties)/sizeof(pIncludeProperties[0]) ;++i )
+ }
// special property for shapes
// if ( uno::Reference< report::XShape>(m_xReportComponent,uno::UNO_QUERY).is() )
@@ -1453,7 +1455,6 @@ inspection::InteractiveSelectionResult SAL_CALL GeometryHandler::onInteractivePr
eResult = inspection::InteractiveSelectionResult_ObtainedValue;
beans::PropertyChangeEvent aScopeEvent;
aScopeEvent.PropertyName = PROPERTY_FILLCOLOR;
- // aScopeEvent.OldValue <<= _nOldDataFieldType;
aScopeEvent.NewValue <<= xShape->getPropertyValue(PROPERTY_FILLCOLOR);
m_aPropertyListeners.notify( aScopeEvent, &beans::XPropertyChangeListener::propertyChange );
}
@@ -1522,7 +1523,7 @@ void SAL_CALL GeometryHandler::actuatingPropertyChanged(const ::rtl::OUString &
{
_rxInspectorUI->rebuildPropertyUI(PROPERTY_DATAFIELD);
_rxInspectorUI->rebuildPropertyUI(PROPERTY_FORMULALIST);
- } // if ( bEnable )
+ }
m_xFormComponentHandler->actuatingPropertyChanged(ActuatingPropertyName, NewValue, OldValue, _rxInspectorUI, _bFirstTimeInit);
}
break;
@@ -1612,7 +1613,7 @@ bool GeometryHandler::impl_dialogFilter_nothrow( ::rtl::OUString& _out_rSelected
catch (sdbc::SQLException& e) { aErrorInfo = e; }
catch( const uno::Exception& )
{
- OSL_ENSURE( sal_False, "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" );
+ OSL_FAIL( "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" );
}
if ( aErrorInfo.isValid() )
@@ -1654,7 +1655,7 @@ void GeometryHandler::impl_fillFormulaList_nothrow(::std::vector< ::rtl::OUStrin
if ( m_nDataFieldType == FUNCTION )
::std::transform(m_aDefaultFunctions.begin(),m_aDefaultFunctions.end(),::std::back_inserter(_out_rList),::boost::bind( &DefaultFunction::getName, _1 ));
else if ( m_nDataFieldType == USER_DEF_FUNCTION )
- ::std::transform(m_aFunctionNames.begin(),m_aFunctionNames.end(),::std::back_inserter(_out_rList),::std::select1st<TFunctions::value_type>());
+ ::std::transform(m_aFunctionNames.begin(),m_aFunctionNames.end(),::std::back_inserter(_out_rList),::o3tl::select1st<TFunctions::value_type>());
}
// -----------------------------------------------------------------------------
::rtl::OUString GeometryHandler::impl_ConvertUIToMimeType_nothrow(const ::rtl::OUString& _sUIName) const
@@ -1672,7 +1673,7 @@ void GeometryHandler::impl_fillFormulaList_nothrow(::std::vector< ::rtl::OUStrin
const uno::Sequence< ::rtl::OUString > aMimeTypes( xReportDefinition->getAvailableMimeTypes() );
sRet = aMimeTypes[nPos];
}
- } // if ( aFind != aList.end() )
+ }
return sRet;
}
// -----------------------------------------------------------------------------
@@ -1709,7 +1710,7 @@ void GeometryHandler::impl_fillMimeTypes_nothrow(::std::vector< ::rtl::OUString
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
}
// -----------------------------------------------------------------------------
@@ -1741,7 +1742,7 @@ void GeometryHandler::impl_fillScopeList_nothrow(::std::vector< ::rtl::OUString
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
}
// -----------------------------------------------------------------------------
@@ -1859,7 +1860,7 @@ sal_Bool GeometryHandler::isDefaultFunction( const ::rtl::OUString& _sQuotedFunc
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
return bDefaultFunction;
}
@@ -1899,7 +1900,7 @@ sal_Bool GeometryHandler::impl_isDefaultFunction_nothrow( const uno::Reference<
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
return bDefaultFunction;
}
@@ -1919,13 +1920,6 @@ void GeometryHandler::loadDefaultFunctions()
DefaultFunction aDefault;
aDefault.m_bDeepTraversing = sal_False;
- //aDefault.m_sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Counter"));
- //aDefault.m_sFormula = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:[%FunctionName] + 1"));
- //aDefault.m_sSearchString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:\\[[:alpha:]+[:alnum:]*\\][:space:]*\\+[:space:]*1"));
- //aDefault.m_sInitialFormula.IsPresent = sal_True;
- //aDefault.m_sInitialFormula.Value = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:1"));
- //m_aDefaultFunctions.push_back(aDefault);
-
aDefault.m_bPreEvaluated = sal_True;
aDefault.m_sName = String(ModuleRes(RID_STR_F_ACCUMULATION));
@@ -1997,7 +1991,7 @@ void GeometryHandler::createDefaultFunction(::osl::ResettableMutexGuard& _aGuard
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
}
// -----------------------------------------------------------------------------
@@ -2087,7 +2081,7 @@ void GeometryHandler::impl_initFieldList_nothrow( uno::Sequence< ::rtl::OUString
}
catch (uno::Exception&)
{
- DBG_ERROR( "GeometryHandler::impl_initFieldList_nothrow: caught an exception!" );
+ OSL_FAIL( "GeometryHandler::impl_initFieldList_nothrow: caught an exception!" );
}
}
// -----------------------------------------------------------------------------
@@ -2248,3 +2242,4 @@ void SAL_CALL GeometryHandler::propertyChange(const beans::PropertyChangeEvent&
} // namespace rptui
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
index 7bfb726a9..500513ec0 100644
--- a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
+++ b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#include "ReportComponentHandler.hxx"
#include <com/sun/star/lang/XInitialization.hpp>
#include <comphelper/sequence.hxx>
-#ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC
#include "uistrings.hrc"
-#endif
#include <comphelper/types.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <unotools/syslocale.hxx>
@@ -48,7 +47,6 @@ namespace rptui
{
//........................................................................
using namespace ::com::sun::star;
-// using namespace comphelper;
ReportComponentHandler::ReportComponentHandler(uno::Reference< uno::XComponentContext > const & context)
:ReportComponentHandler_Base(m_aMutex)
@@ -230,3 +228,4 @@ void SAL_CALL ReportComponentHandler::actuatingPropertyChanged(const ::rtl::OUSt
} // namespace rptui
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inspection/metadata.cxx b/reportdesign/source/ui/inspection/metadata.cxx
index 90a5b17d2..f199a3ae2 100644
--- a/reportdesign/source/ui/inspection/metadata.cxx
+++ b/reportdesign/source/ui/inspection/metadata.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,15 +31,9 @@
#include "com/sun/star/inspection/XPropertyHandler.hpp"
#include <tools/debug.hxx>
#include <comphelper/extract.hxx>
-#ifndef RTPUI_REPORTDESIGN_HELPID_HRC
#include "helpids.hrc"
-#endif
-#ifndef _RPTUI_DLGRESID_HRC
#include "RptResId.hrc"
-#endif
-#ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC
#include "uistrings.hrc"
-#endif
#include <functional>
#include <algorithm>
@@ -178,9 +173,8 @@ namespace rptui
};
s_pPropertyInfos = aPropertyInfos;
- s_nCount = sizeof(aPropertyInfos) / sizeof(OPropertyInfoImpl);
-
- ::std::sort( aPropertyInfos, aPropertyInfos + s_nCount, PropertyInfoLessByName() );
+ s_nCount = SAL_N_ELEMENTS(aPropertyInfos);
+ ::std::sort( aPropertyInfos, aPropertyInfos + SAL_N_ELEMENTS(aPropertyInfos), PropertyInfoLessByName() );
return s_pPropertyInfos;
}
@@ -325,9 +319,9 @@ namespace rptui
for (; pPropsIter != pPropsEnd; ++pPropsIter)
{
size_t nPos = 0;
- for (; nPos < sizeof(pExcludeProperties)/sizeof(pExcludeProperties[0]) && pExcludeProperties[nPos] != pPropsIter->Name;++nPos )
+ for (; nPos < SAL_N_ELEMENTS(pExcludeProperties) && pExcludeProperties[nPos] != pPropsIter->Name;++nPos )
;
- if ( nPos == sizeof(pExcludeProperties)/sizeof(pExcludeProperties[0]) )
+ if ( nPos == SAL_N_ELEMENTS(pExcludeProperties) )
_rExcludeProperties.push_back(*pPropsIter);
}
}
@@ -337,3 +331,4 @@ namespace rptui
} // namespace pcr
//............................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/misc/ColorListener.cxx b/reportdesign/source/ui/misc/ColorListener.cxx
index eb19d0fbe..4707a00de 100644
--- a/reportdesign/source/ui/misc/ColorListener.cxx
+++ b/reportdesign/source/ui/misc/ColorListener.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#include "precompiled_rptui.hxx"
#include "ColorListener.hxx"
#include <svl/smplhint.hxx>
-#ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC
#include "uistrings.hrc"
-#endif
#define BORDERCOLORCHANGE 191
//=====================================================================
@@ -84,8 +83,8 @@ void OColorListener::setCollapsed(sal_Bool _bCollapsed)
{
if ( m_bCollapsed != _bCollapsed )
{
- m_bCollapsed = _bCollapsed;
- if ( m_aCollapsedLink.IsSet() )
+ m_bCollapsed = _bCollapsed;
+ if ( m_aCollapsedLink.IsSet() )
m_aCollapsedLink.Call(this);
}
}
@@ -101,3 +100,5 @@ void OColorListener::setMarked(sal_Bool _bMark)
// =======================================================================
}
// =======================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/misc/FunctionHelper.cxx b/reportdesign/source/ui/misc/FunctionHelper.cxx
index 274b61e7f..8a8acdfc6 100644
--- a/reportdesign/source/ui/misc/FunctionHelper.cxx
+++ b/reportdesign/source/ui/misc/FunctionHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,7 +58,7 @@ sal_Unicode FunctionManager::getSingleToken(const formula::IFunctionManager::ETo
return sal_Unicode('{');
case eArrayClose:
return sal_Unicode('}');
- } // switch(_eToken)
+ }
return 0;
}
// -----------------------------------------------------------------------------
@@ -92,11 +93,6 @@ const formula::IFunctionDescription* FunctionManager::getFunctionByName(const ::
// -----------------------------------------------------------------------------
void FunctionManager::fillLastRecentlyUsedFunctions(::std::vector< const formula::IFunctionDescription*>& /*_rLastRUFunctions*/) const
{
- //const sal_uInt32 nCount = getCount();
- //for(sal_uInt32 i = 0 ; i < nCount ; ++i)
- //{
- // const formula::IFunctionCategory* pCategory = getCategory(
- //}
}
// -----------------------------------------------------------------------------
::boost::shared_ptr< FunctionDescription > FunctionManager::get(const uno::Reference< report::meta::XFunctionDescription>& _xFunctionDescription) const
@@ -117,9 +113,9 @@ void FunctionManager::fillLastRecentlyUsedFunctions(::std::vector< const formula
m_aCategoryIndex.push_back( aCategoryFind );
}
aFunctionFind = m_aFunctions.insert(TFunctionsMap::value_type(sFunctionName,::boost::shared_ptr<FunctionDescription>(new FunctionDescription(aCategoryFind->second.get(),_xFunctionDescription)))).first;
- } // if ( aFind == m_aFunctions.end() )
+ }
pDesc = aFunctionFind->second;
- } // if ( _xFunctionDescription.is() )
+ }
return pDesc;
}
// -----------------------------------------------------------------------------
@@ -198,7 +194,7 @@ xub_StrLen FunctionDescription::getSuppressedArgumentCount() const
}
catch(const uno::Exception&)
{
- DBG_ERROR("Exception caught!");
+ OSL_FAIL("Exception caught!");
}
return sFormula;
}
@@ -255,3 +251,5 @@ bool FunctionDescription::isParameterOptional(sal_uInt32 _nPos) const
// =============================================================================
} // rptui
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx
index 4d25d2d87..462e4e64f 100644
--- a/reportdesign/source/ui/misc/RptUndo.cxx
+++ b/reportdesign/source/ui/misc/RptUndo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,7 +71,7 @@ namespace
_xSection->remove(xShape);
--nCount;
}
- } // if ( _xSection.is() )
+ }
}
//----------------------------------------------------------------------------
void lcl_insertElements(const uno::Reference< report::XSection >& _xSection,const ::std::vector< uno::Reference< drawing::XShape> >& _aControls)
@@ -91,7 +92,7 @@ namespace
}
catch(const uno::Exception&)
{
- OSL_ENSURE(0,"lcl_insertElements:Exception caught!");
+ OSL_FAIL("lcl_insertElements:Exception caught!");
}
}
}
@@ -111,7 +112,7 @@ namespace
}
catch(const uno::Exception&)
{
- OSL_ENSURE(0,"lcl_setValues:Exception caught!");
+ OSL_FAIL("lcl_setValues:Exception caught!");
}
}
}
@@ -156,7 +157,7 @@ OSectionUndo::~OSectionUndo()
}
catch(uno::Exception)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
}
}
@@ -202,7 +203,7 @@ void OSectionUndo::Undo()
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OSectionUndo::Undo: caught an exception!" );
+ OSL_FAIL( "OSectionUndo::Undo: caught an exception!" );
}
}
//----------------------------------------------------------------------------
@@ -223,7 +224,7 @@ void OSectionUndo::Redo()
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OSectionUndo::Redo: caught an exception!" );
+ OSL_FAIL( "OSectionUndo::Redo: caught an exception!" );
}
}
//----------------------------------------------------------------------------
@@ -359,7 +360,7 @@ void OGroupUndo::implReInsert( )
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception catched while undoing remove group");
+ OSL_FAIL("Exception catched while undoing remove group");
}
}
//----------------------------------------------------------------------------
@@ -371,7 +372,7 @@ void OGroupUndo::implReRemove( )
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception catched while redoing remove group");
+ OSL_FAIL("Exception catched while redoing remove group");
}
}
//----------------------------------------------------------------------------
@@ -409,3 +410,4 @@ void OGroupUndo::Redo()
//============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 392ba3e7c..64ba56ee0 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,6 +38,7 @@
#include <tools/diagnose_ex.h>
#include <tools/string.hxx>
+#include <sal/macros.h>
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
@@ -69,6 +71,7 @@
#include <editeng/flstitem.hxx>
#include <editeng/akrnitem.hxx>
#include <editeng/colritem.hxx>
+#include <editeng/justifyitem.hxx>
#include <svx/drawitem.hxx>
#include <editeng/twolinesitem.hxx>
#include <editeng/charreliefitem.hxx>
@@ -172,14 +175,14 @@ void adjustSectionName(const uno::Reference< report::XGroup >& _xGroup,sal_Int32
::rtl::OUString sName = String(ModuleRes(RID_STR_GROUPHEADER));
sName += ::rtl::OUString::valueOf(_nPos);
_xGroup->getHeader()->setName(sName);
- } // if ( _xGroup->getHeaderOn() )
+ }
if ( _xGroup->getFooterOn() && !_xGroup->getFooter()->getName().getLength() )
{
::rtl::OUString sName = String(ModuleRes(RID_STR_GROUPFOOTER));
sName += ::rtl::OUString::valueOf(_nPos);
_xGroup->getFooter()->setName(sName);
- } // if ( _xGroup->getHeaderOn() )
+ }
}
// -----------------------------------------------------------------------------
::rtl::Reference< comphelper::OPropertyChangeMultiplexer> addStyleListener(const uno::Reference< report::XReportDefinition >& _xReportDefinition,::comphelper::OPropertyChangeListener* _pListener)
@@ -258,7 +261,7 @@ namespace
case COMPLEX:
aLocale = _rxReportControlFormat->getCharLocaleComplex();
break;
- } // switch(_nWhich)
+ }
_rItemSet.Put(SvxLanguageItem(MsLangId::convertLocaleToLanguageWithFallback(aLocale),_nLanguage));
@@ -285,7 +288,7 @@ namespace
pClone->PutValue(_xShape->getPropertyValue(aIt->sName), aIt->nMemberId);
_rItemSet.Put(*pClone, aIt->nWID);
}
- } // if ( xInfo->hasPropertyByName(sPropertyName) )
+ }
++aIt;
}
}
@@ -316,11 +319,11 @@ namespace
catch(uno::Exception&)
{ // shapes have a bug so we ignore this one.
}
- } // if ( pItem )
+ }
}
}
++aIt;
- } // while ( pPropertyMap->pName )
+ }
}
// -------------------------------------------------------------------------
void lcl_CharPropertiesToItems( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,
@@ -350,7 +353,6 @@ namespace
_rItemSet.Put(aUnderLineItem);
_rItemSet.Put(SvxKerningItem(_rxReportControlFormat->getCharKerning(),ITEMID_KERNING));
_rItemSet.Put(SvxEmphasisMarkItem(static_cast<FontEmphasisMark>(_rxReportControlFormat->getCharEmphasis()),ITEMID_EMPHASISMARK));
- //_rItemSet.Put(SvxTwoLinesItem());
_rItemSet.Put(SvxCharReliefItem(static_cast<FontRelief>(_rxReportControlFormat->getCharRelief()),ITEMID_CHARRELIEF));
_rItemSet.Put(SvxColorItem(::Color(_rxReportControlFormat->getCharColor()),ITEMID_COLOR));
_rItemSet.Put(SvxCharRotateItem(_rxReportControlFormat->getCharRotation(),sal_False,ITEMID_CHARROTATE));
@@ -359,11 +361,9 @@ namespace
SvxHorJustifyItem aHorJustifyItem(ITEMID_HORJUSTIFY);
aHorJustifyItem.PutValue(xSet->getPropertyValue(PROPERTY_PARAADJUST),MID_HORJUST_ADJUST);
_rItemSet.Put(aHorJustifyItem);
- //_rItemSet.Put(SfxInt32Item(ITEMID_DEGREES,_rxReportControlFormat->getCharRotation()));
SvxVerJustifyItem aVerJustifyItem(ITEMID_VERJUSTIFY);
aVerJustifyItem.PutValue(xSet->getPropertyValue(PROPERTY_VERTICALALIGN),MID_HORJUST_ADJUST);
_rItemSet.Put(aVerJustifyItem);
- //_rItemSet.Put(SfxInt32Item(ITEMID_IDENT,_rxReportControlFormat->getCharRotation()));
uno::Reference< report::XShape> xShape(_rxReportControlFormat,uno::UNO_QUERY);
if ( !xShape.is() )
@@ -395,7 +395,7 @@ namespace
aNewFont.SetFamily(pFontItem->GetFamily());
aNewFont.SetPitch(pFontItem->GetPitch());
aNewFont.SetCharSet(pFontItem->GetCharSet());
- } // if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_FONT,sal_True,&pItem) && pItem->ISA(SvxFontItem))
+ }
if ( SFX_ITEM_SET == _rItemSet.GetItemState( _nFontHeight,sal_True,&pItem) && pItem->ISA(SvxFontHeightItem))
{
const SvxFontHeightItem* pFontItem = static_cast<const SvxFontHeightItem*>(pItem);
@@ -541,7 +541,7 @@ namespace
{
const SvxCaseMapItem* pFontItem = static_cast<const SvxCaseMapItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CHARCASEMAP, uno::makeAny( pFontItem->GetValue() ) );
- } // if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_CASEMAP,sal_True,&pItem) && pItem->ISA(SvxCaseMapItem))
+ }
struct Items {
sal_uInt16 nWhich;
::rtl::OUString sPropertyName;
@@ -550,7 +550,7 @@ namespace
,{ITEMID_LANGUAGE_ASIAN,PROPERTY_CHARLOCALEASIAN}
,{ITEMID_LANGUAGE_COMPLEX,PROPERTY_CHARLOCALECOMPLEX}
};
- for(size_t k = 0; k < sizeof(pItems)/sizeof(pItems[0]);++k)
+ for(size_t k = 0; k < SAL_N_ELEMENTS(pItems);++k)
{
if ( SFX_ITEM_SET == _rItemSet.GetItemState( pItems[k].nWhich,sal_True,&pItem) && pItem->ISA(SvxLanguageItem))
{
@@ -558,7 +558,7 @@ namespace
lang::Locale aCharLocale;
MsLangId::convertLanguageToLocale( pFontItem->GetLanguage(), aCharLocale );
lcl_pushBack( _out_rProperties, pItems[k].sPropertyName, uno::makeAny( aCharLocale ) );
- } // if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_LANGUAGE,sal_True,&pItem) && pItem->ISA(SvxLanguageItem))
+ }
}
if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_ESCAPEMENT,sal_True,&pItem) && pItem->ISA(SvxEscapementItem))
{
@@ -638,7 +638,6 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
{ SID_ATTR_CHAR_SCALEWIDTH, SFX_ITEM_POOLABLE },
{ SID_ATTR_CHAR_RELIEF, SFX_ITEM_POOLABLE },
{ SID_ATTR_CHAR_HIDDEN, SFX_ITEM_POOLABLE },
- //{ SID_ATTR_BRUSH_CHAR, SFX_ITEM_POOLABLE },
{ SID_ATTR_BRUSH, SFX_ITEM_POOLABLE },
{ SID_ATTR_ALIGN_HOR_JUSTIFY, SFX_ITEM_POOLABLE },
{ SID_ATTR_ALIGN_VER_JUSTIFY, SFX_ITEM_POOLABLE },
@@ -705,7 +704,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
};
- OSL_ASSERT((sizeof(pDefaults)/sizeof(pDefaults[0])) == (sizeof(aItemInfos)/sizeof(aItemInfos[0])));
+ OSL_ASSERT((SAL_N_ELEMENTS(pDefaults)) == (SAL_N_ELEMENTS(aItemInfos)));
static sal_uInt16 pRanges[] =
{
@@ -742,7 +741,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
}
SfxItemPool::Free(pPool);
- for (sal_uInt16 i=0; i<sizeof(pDefaults)/sizeof(pDefaults[0]); ++i)
+ for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(pDefaults); ++i)
delete pDefaults[i];
return bSuccess;
@@ -758,12 +757,6 @@ bool openAreaDialog( const uno::Reference<report::XShape >& _xShape,const uno::R
Window* pParent = VCLUnoHelper::GetWindow( _rxParentWindow );
- //static sal_uInt16 pRanges[] =
- //{
- // XATTR_START,XATTR_END,
- // 0
- //};
-
bool bSuccess = false;
try
{
@@ -778,7 +771,7 @@ bool openAreaDialog( const uno::Reference<report::XShape >& _xShape,const uno::R
// #i74099# by default, the dialog deletes the current color table if a different one is loaded
// (see SwDrawShell::ExecDrawDlg)
const SvxColorTableItem* pColorItem = static_cast<const SvxColorTableItem*>( pDescriptor->GetItem(SID_COLOR_TABLE) );
- if (pColorItem && pColorItem->GetColorTable() == XColorTable::GetStdColorTable())
+ if (pColorItem && pColorItem->GetColorTable() == &XColorTable::GetStdColorTable())
pDialog->DontDeleteColorTable();
bSuccess = ( RET_OK == pDialog->Execute() );
if ( bSuccess )
@@ -810,14 +803,14 @@ void applyCharacterSettings( const uno::Reference< report::XReportControlFormat
aAwtFont.Name = ::rtl::OUString(); // hack to
_rxReportControlFormat->setFontDescriptor( aAwtFont );
_rxReportControlFormat->setCharFontName( sTemp );
- } // if ( aSettings.get( "Font" ) >>= aAwtFont )
+ }
if ( aSettings.get( "FontAsian" ) >>= aAwtFont )
{
::rtl::OUString sTemp = aAwtFont.Name;
aAwtFont.Name = ::rtl::OUString(); // hack to
_rxReportControlFormat->setFontDescriptorAsian( aAwtFont );
_rxReportControlFormat->setCharFontNameAsian( sTemp );
- } // if ( aSettings.get( "Font" ) >>= aAwtFont )
+ }
if ( aSettings.get( "FontComplex" ) >>= aAwtFont )
{
::rtl::OUString sTemp = aAwtFont.Name;
@@ -894,7 +887,7 @@ SdrObject* isOver(const Rectangle& _rRect, SdrPage& _rPage, SdrView& _rView, boo
return pOverlappedObj;
}
// -----------------------------------------------------------------------------
-bool checkArrayForOccurance(SdrObject* _pObjToCheck, SdrUnoObj* _pIgnore[], int _nListLength)
+bool checkArrayForOccurrence(SdrObject* _pObjToCheck, SdrUnoObj* _pIgnore[], int _nListLength)
{
for(int i=0;i<_nListLength;i++)
{
@@ -915,7 +908,7 @@ SdrObject* isOver(const Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _
while( !pOverlappedObj && (pObjIter = aIter.Next()) != NULL )
{
- if (checkArrayForOccurance(pObjIter, _pIgnoreList, _nIgnoreListLength))
+ if (checkArrayForOccurrence(pObjIter, _pIgnoreList, _nIgnoreListLength))
{
continue;
}
@@ -996,9 +989,6 @@ void correctOverlapping(SdrObject* _pControl,OReportSection& _aReportSection,boo
{
OSectionView& rSectionView = _aReportSection.getSectionView();
uno::Reference< report::XReportComponent> xComponent(_pControl->getUnoShape(),uno::UNO_QUERY);
- // Rectangle aRet(VCLPoint(xComponent->getPosition()),VCLSize(xComponent->getSize()));
- // aRet.setHeight(aRet.getHeight() + 1);
- // aRet.setWidth(aRet.getWidth() + 1);
Rectangle aRect = getRectangleFromControl(_pControl);
bool bOverlapping = true;
@@ -1034,7 +1024,6 @@ bool openDialogFormula_nothrow( ::rtl::OUString& _in_out_rFormula
OSL_PRECOND( _xInspectorWindow.is(), "openDialogFormula_nothrow: invalid parameters!" );
if ( !_xInspectorWindow.is() )
return false;
- // _out_rFormula = ::rtl::OUString();
bool bSuccess = false;
::dbtools::SQLExceptionInfo aErrorInfo;
uno::Reference< awt::XWindow > xInspectorWindow;
@@ -1068,7 +1057,7 @@ bool openDialogFormula_nothrow( ::rtl::OUString& _in_out_rFormula
catch (sdbc::SQLException& e) { aErrorInfo = e; }
catch( const uno::Exception& )
{
- OSL_ENSURE( sal_False, "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" );
+ OSL_FAIL( "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" );
}
if ( aErrorInfo.isValid() )
@@ -1079,3 +1068,5 @@ bool openDialogFormula_nothrow( ::rtl::OUString& _in_out_rFormula
// -----------------------------------------------------------------------------
} // namespace rptui
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/misc/rptuiservices.cxx b/reportdesign/source/ui/misc/rptuiservices.cxx
index 4359807ae..a19707a61 100644
--- a/reportdesign/source/ui/misc/rptuiservices.cxx
+++ b/reportdesign/source/ui/misc/rptuiservices.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,3 +81,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron
{
*envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/misc/statusbarcontroller.cxx b/reportdesign/source/ui/misc/statusbarcontroller.cxx
index d570665b7..ed4fbad17 100644
--- a/reportdesign/source/ui/misc/statusbarcontroller.cxx
+++ b/reportdesign/source/ui/misc/statusbarcontroller.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,7 +38,7 @@
#include <vcl/svapp.hxx>
#include <vcl/status.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <toolkit/helper/vclunohelper.hxx>
namespace rptui
@@ -93,7 +94,7 @@ OStatusbarController::OStatusbarController(const Reference< XMultiServiceFactory
void SAL_CALL OStatusbarController::initialize( const Sequence< Any >& _rArguments ) throw (Exception, RuntimeException)
{
StatusbarController::initialize(_rArguments);
- vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarMutexGuard;
::osl::MutexGuard aGuard(m_aMutex);
StatusBar* pStatusBar = static_cast<StatusBar*>(VCLUnoHelper::GetWindow(m_xParentWindow));
@@ -109,11 +110,11 @@ void SAL_CALL OStatusbarController::initialize( const Sequence< Any >& _rArgumen
break;
}
}
- if ( m_aCommandURL.equalsAscii(".uno:ZoomSlider") )
+ if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:ZoomSlider")) )
{
m_pController = TStatusbarHelper::createFromQuery(new SvxZoomSliderControl(m_nSlotId = SID_ATTR_ZOOMSLIDER,m_nId,*pStatusBar));
- } // if ( m_aCommandURL.equalsAscii(".uno:ZoomSlider") )
- else if ( m_aCommandURL.equalsAscii(".uno:Zoom") )
+ }
+ else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:Zoom")) )
{
m_pController = TStatusbarHelper::createFromQuery(new SvxZoomStatusBarControl(m_nSlotId = SID_ATTR_ZOOM,m_nId,*pStatusBar));
}
@@ -131,12 +132,12 @@ void SAL_CALL OStatusbarController::initialize( const Sequence< Any >& _rArgumen
// XStatusListener
void SAL_CALL OStatusbarController::statusChanged( const FeatureStateEvent& _aEvent)throw ( RuntimeException )
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
if ( m_pController.is() )
{
- if ( m_aCommandURL.equalsAscii(".uno:ZoomSlider") )
+ if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:ZoomSlider")) )
{
Sequence< PropertyValue > aSeq;
if ( (_aEvent.State >>= aSeq) && aSeq.getLength() == 2 )
@@ -145,8 +146,8 @@ void SAL_CALL OStatusbarController::statusChanged( const FeatureStateEvent& _aEv
aZoomSlider.PutValue(_aEvent.State);
static_cast<SvxZoomSliderControl*>(m_pController.get())->StateChanged(m_nSlotId,SFX_ITEM_AVAILABLE,&aZoomSlider);
}
- } // if ( m_aCommandURL.equalsAscii(".uno:ZoomSlider") )
- else if ( m_aCommandURL.equalsAscii(".uno:Zoom") )
+ }
+ else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:Zoom")) )
{
Sequence< PropertyValue > aSeq;
if ( (_aEvent.State >>= aSeq) && aSeq.getLength() == 3 )
@@ -228,3 +229,5 @@ void SAL_CALL OStatusbarController::dispose() throw (::com::sun::star::uno::Runt
// =============================================================================
} // rptui
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx
index 8b99c8bbf..8c2784858 100644
--- a/reportdesign/source/ui/misc/toolboxcontroller.cxx
+++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,7 +43,7 @@
#include <svtools/miscopt.hxx>
#include <unotools/moduleoptions.hxx>
#include <svtools/menuoptions.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <svx/svxids.hrc>
#define ITEMID_COLOR 1
#define ITEMID_BRUSH 2
@@ -142,7 +143,7 @@ void SAL_CALL OToolboxController::release() throw ()
void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments ) throw (Exception, RuntimeException)
{
ToolboxController::initialize(_rArguments);
- vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarMutexGuard;
::osl::MutexGuard aGuard(m_aMutex);
ToolBox* pToolBox = static_cast<ToolBox*>(VCLUnoHelper::GetWindow(getParent()));
@@ -158,42 +159,42 @@ void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments
break;
}
}
- if ( m_aCommandURL.equalsAscii(".uno:BasicShapes") )
+ if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:BasicShapes")) )
{
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:BasicShapes")),sal_True));
m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_BASIC,m_nToolBoxId,*pToolBox));
}
- else if ( m_aCommandURL.equalsAscii(".uno:SymbolShapes") )
+ else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:SymbolShapes")) )
{
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SymbolShapes")),sal_True));
m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_SYMBOL,m_nToolBoxId,*pToolBox));
}
- else if ( m_aCommandURL.equalsAscii(".uno:ArrowShapes") )
+ else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:ArrowShapes")) )
{
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:ArrowShapes")),sal_True));
m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_ARROW,m_nToolBoxId,*pToolBox));
}
- else if ( m_aCommandURL.equalsAscii(".uno:FlowChartShapes") )
+ else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:FlowChartShapes")) )
{
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FlowChartShapes")),sal_True));
m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_FLOWCHART,m_nToolBoxId,*pToolBox));
}
- else if ( m_aCommandURL.equalsAscii(".uno:CalloutShapes") )
+ else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:CalloutShapes")) )
{
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:CalloutShapes")),sal_True));
m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_CALLOUT,m_nToolBoxId,*pToolBox));
}
- else if ( m_aCommandURL.equalsAscii(".uno:StarShapes") )
+ else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:StarShapes")) )
{
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:StarShapes")),sal_True));
m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_STAR,m_nToolBoxId,*pToolBox));
}
- else if ( m_aCommandURL.equalsAscii(".uno:CharFontName") )
+ else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:CharFontName")) )
{
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:CharFontName")),sal_True));
m_pToolbarController = TToolbarHelper::createFromQuery(new SvxFontNameToolBoxControl/*SvxStyleToolBoxControl*/(m_nSlotId = SID_ATTR_CHAR_FONT,m_nToolBoxId,*pToolBox));
}
- else if ( m_aCommandURL.equalsAscii(".uno:FontColor") || m_aCommandURL.equalsAscii(".uno:Color") )
+ else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:FontColor")) || m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:Color")) )
{
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FontColor")),sal_True));
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Color")),sal_True));
@@ -288,7 +289,7 @@ void SAL_CALL OToolboxController::statusChanged( const FeatureStateEvent& Event
Reference< awt::XWindow > SAL_CALL OToolboxController::createPopupWindow() throw (RuntimeException)
{
// execute the menu
- vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarMutexGuard;
::osl::MutexGuard aGuard(m_aMutex);
Reference< awt::XWindow > xRet;
@@ -305,7 +306,7 @@ Reference< awt::XWindow > SAL_CALL OToolboxController::createPopupWindow() throw
// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL OToolboxController::getSubToolbarName() throw (uno::RuntimeException)
{
- vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarMutexGuard;
::osl::MutexGuard aGuard(m_aMutex);
uno::Reference< frame::XSubToolbarController> xSub(m_pToolbarController.getRef(),uno::UNO_QUERY);
if ( xSub.is() )
@@ -315,7 +316,7 @@ Reference< awt::XWindow > SAL_CALL OToolboxController::createPopupWindow() throw
// -----------------------------------------------------------------------------
void SAL_CALL OToolboxController::functionSelected( const ::rtl::OUString& rCommand ) throw (uno::RuntimeException)
{
- vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarMutexGuard;
::osl::MutexGuard aGuard(m_aMutex);
uno::Reference< frame::XSubToolbarController> xSub(m_pToolbarController.getRef(),uno::UNO_QUERY);
@@ -327,7 +328,7 @@ void SAL_CALL OToolboxController::functionSelected( const ::rtl::OUString& rComm
// -----------------------------------------------------------------------------
void SAL_CALL OToolboxController::updateImage( ) throw (uno::RuntimeException)
{
- vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarMutexGuard;
::osl::MutexGuard aGuard(m_aMutex);
uno::Reference< frame::XSubToolbarController> xSub(m_pToolbarController.getRef(),uno::UNO_QUERY);
@@ -358,3 +359,4 @@ throw (uno::RuntimeException)
//..........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 94bb5bf7e..821fe836f 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -170,14 +171,11 @@ ODesignView::ODesignView( Window* pParent,
// now create the task pane on the right side :-)
m_pTaskPane = new OTaskWindow(this);
- //m_pTaskPane->Show();
m_aSplitWin.InsertItem( COLSET_ID,100,SPLITWINDOW_APPEND, 0, SWIB_PERCENTSIZE | SWIB_COLSET );
- m_aSplitWin.InsertItem( REPORT_ID, &m_aScrollWindow, 100/*m_aScrollWindow.getMaxMarkerWidth(sal_False)*/, SPLITWINDOW_APPEND, COLSET_ID, SWIB_PERCENTSIZE /*SWIB_COLSET*/);
- //m_aSplitWin.InsertItem( TASKPANE_ID, m_pTaskPane, 50, SPLITWINDOW_APPEND, 0, SWIB_PERCENTSIZE );
+ m_aSplitWin.InsertItem( REPORT_ID, &m_aScrollWindow, 100, SPLITWINDOW_APPEND, COLSET_ID, SWIB_PERCENTSIZE);
// Splitter einrichten
- //m_aSplitter.SetSplitHdl(LINK(this, ODesignView,SplitHdl));
m_aSplitWin.SetSplitHdl(LINK(this, ODesignView,SplitHdl));
m_aSplitWin.ShowAutoHideButton();
m_aSplitWin.SetAlign(WINDOWALIGN_LEFT);
@@ -295,7 +293,7 @@ void ODesignView::resizeDocumentView(Rectangle& _rPlayground)
nSplitPos = static_cast<sal_Int32>(_rPlayground.Right() - nMinWidth);
getController().setSplitPos(nSplitPos);
}
- } // if ( 0 != _rPlaygroundSize.Width() )
+ }
Size aReportWindowSize(aPlaygroundSize);
if ( m_aSplitWin.IsItemValid(TASKPANE_ID) )
@@ -474,11 +472,7 @@ void ODesignView::GetFocus()
// -----------------------------------------------------------------------------
void ODesignView::ImplInitSettings()
{
-//#if OSL_DEBUG_LEVEL > 0
-// SetBackground( Wallpaper( COL_RED ));
-//#else
SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor() ));
-//#endif
SetFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
SetTextFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
}
@@ -531,12 +525,10 @@ void ODesignView::togglePropertyBrowser(sal_Bool _bToogleOn)
m_pTaskPane->Invalidate();
if ( bWillBeVisible )
- m_aSplitWin.InsertItem( TASKPANE_ID, m_pTaskPane,START_SIZE_TASKPANE, SPLITWINDOW_APPEND, COLSET_ID, SWIB_PERCENTSIZE/*|SWIB_COLSET */);
+ m_aSplitWin.InsertItem( TASKPANE_ID, m_pTaskPane,START_SIZE_TASKPANE, SPLITWINDOW_APPEND, COLSET_ID, SWIB_PERCENTSIZE);
else
m_aSplitWin.RemoveItem(TASKPANE_ID);
- // TRY
- // Invalidate(/*INVALIDATE_NOCHILDREN|INVALIDATE_NOERASE*/);
if ( bWillBeVisible )
m_aMarkTimer.Start();
}
@@ -620,12 +612,6 @@ uno::Reference< report::XSection > ODesignView::getCurrentSection() const
if ( m_pCurrentView )
xSection = m_pCurrentView->getReportSection()->getSection();
- // why do we need the code below?
- //else
- // {
- // OReportController& rReportController = getController();
- // xSection = rReportController.getReportDefinition()->getDetail();
- // }
return xSection;
}
// -----------------------------------------------------------------------------
@@ -679,14 +665,6 @@ void ODesignView::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAlig
{
m_aScrollWindow.alignMarkedObjects(_nControlModification, _bAlignAtSection,bBoundRects);
}
-#if 0
-// -----------------------------------------------------------------------------
-sal_Bool ODesignView::isAlignPossible() const
-{
- ::boost::shared_ptr<OSectionWindow> pMarkedSection = getMarkedSection();
- return pMarkedSection.get() && pMarkedSection->getReportSection().getSectionView().IsAlignPossible();
-}
-#endif
//------------------------------------------------------------------------------
sal_Bool ODesignView::handleKeyEvent(const KeyEvent& _rEvent)
{
@@ -787,3 +765,5 @@ sal_uInt16 ODesignView::getZoomFactor(SvxZoomType _eType) const
//============================================================================
} // rptui
//============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx
index a7032c141..e8733aa98 100644
--- a/reportdesign/source/ui/report/EndMarker.cxx
+++ b/reportdesign/source/ui/report/EndMarker.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,3 +106,5 @@ void OEndMarker::MouseButtonDown( const MouseEvent& rMEvt )
// =======================================================================
}
// =======================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/FixedTextColor.cxx b/reportdesign/source/ui/report/FixedTextColor.cxx
index 6538d938e..5f582530d 100644
--- a/reportdesign/source/ui/report/FixedTextColor.cxx
+++ b/reportdesign/source/ui/report/FixedTextColor.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,69 +69,6 @@ namespace rptui
}
//--------------------------------------------------------------------
- // sal_Int32 FixedTextColor::getTextColor()
- // {
- // const StyleSettings& aStyleSettings = Application::GetSettings().GetStyleSettings();
- // sal_Bool bHighContrast = aStyleSettings.GetHighContrastMode();
- //
- // Color aGetFaceColor = aStyleSettings.GetFaceColor();
- // Color aGetCheckedColor = aStyleSettings.GetCheckedColor();
- // Color aGetLightColor = aStyleSettings.GetLightColor();
- // Color aGetLightBorderColor = aStyleSettings.GetLightBorderColor();
- // Color aGetShadowColor = aStyleSettings.GetShadowColor();
- // Color aGetDarkShadowColor = aStyleSettings.GetDarkShadowColor();
- // Color aGetButtonTextColor = aStyleSettings.GetButtonTextColor();
- // Color aGetButtonRolloverTextColor = aStyleSettings.GetButtonRolloverTextColor();
- // Color aGetRadioCheckTextColor = aStyleSettings.GetRadioCheckTextColor();
- // Color aGetGroupTextColor = aStyleSettings.GetGroupTextColor();
- // Color aGetLabelTextColor = aStyleSettings.GetLabelTextColor();
- // Color aGetInfoTextColor = aStyleSettings.GetInfoTextColor();
- // Color aGetWindowColor = aStyleSettings.GetWindowColor();
- // Color aGetWindowTextColor = aStyleSettings.GetWindowTextColor();
- // Color aGetDialogColor = aStyleSettings.GetDialogColor();
- // Color aGetDialogTextColor = aStyleSettings.GetDialogTextColor();
- // Color aGetWorkspaceColor = aStyleSettings.GetWorkspaceColor();
- // Color aGetFieldColor = aStyleSettings.GetFieldColor();
- // Color aGetFieldTextColor = aStyleSettings.GetFieldTextColor();
- // Color aGetFieldRolloverTextColor = aStyleSettings.GetFieldRolloverTextColor();
- // Color aGetActiveColor = aStyleSettings.GetActiveColor();
- // Color aGetActiveColor2 = aStyleSettings.GetActiveColor2();
- // Color aGetActiveTextColor = aStyleSettings.GetActiveTextColor();
- // Color aGetActiveBorderColor = aStyleSettings.GetActiveBorderColor();
- // Color aGetDeactiveColor = aStyleSettings.GetDeactiveColor();
- // Color aGetDeactiveColor2 = aStyleSettings.GetDeactiveColor2();
- // Color aGetDeactiveTextColor = aStyleSettings.GetDeactiveTextColor();
- // Color aGetDeactiveBorderColor = aStyleSettings.GetDeactiveBorderColor();
- // Color aGetHighlightColor = aStyleSettings.GetHighlightColor();
- // Color aGetHighlightTextColor = aStyleSettings.GetHighlightTextColor();
- // Color aGetDisableColor = aStyleSettings.GetDisableColor();
- // Color aGetHelpColor = aStyleSettings.GetHelpColor();
- // Color aGetHelpTextColor = aStyleSettings.GetHelpTextColor();
- // Color aGetMenuColor = aStyleSettings.GetMenuColor();
- // Color aGetMenuBarColor = aStyleSettings.GetMenuBarColor();
- // Color aGetMenuBorderColor = aStyleSettings.GetMenuBorderColor();
- // Color aGetMenuTextColor = aStyleSettings.GetMenuTextColor();
- // Color aGetMenuHighlightColor = aStyleSettings.GetMenuHighlightColor();
- // Color aGetMenuHighlightTextColor = aStyleSettings.GetMenuHighlightTextColor();
- // Color aGetLinkColor = aStyleSettings.GetLinkColor();
- // Color aGetVisitedLinkColor = aStyleSettings.GetVisitedLinkColor();
- // Color aGetHighlightLinkColor = aStyleSettings.GetHighlightLinkColor();
- // Color aGetMonoColor = aStyleSettings.GetMonoColor();
- // Color aGetActiveTabColor = aStyleSettings.GetActiveTabColor();
- // Color aGetInactiveTabColor = aStyleSettings.GetInactiveTabColor();
- //
- // Color aWindowColor = aStyleSettings.GetWindowColor();
- // Color aLabelColor = aStyleSettings.GetLabelTextColor();
- //
- // // if (m_nTextColor == -1)
- // // {
- // // svtools::ExtendedColorConfig aConfig;
- // // m_nTextColor = aConfig.GetColorValue(CFG_REPORTDESIGNER, DBTEXTBOXBOUNDCONTENT).getColor();
- // // }
- // return aLabelColor.GetColor();
- // }
-
- //--------------------------------------------------------------------
FixedTextColor::~FixedTextColor()
{
DBG_DTOR(rpt_FixedTextColor,NULL);
@@ -139,7 +77,6 @@ namespace rptui
void FixedTextColor::notifyPropertyChange( const beans::PropertyChangeEvent& _rEvent )
{
- // (void)_rEvent;
uno::Reference< report::XFixedText > xFixedText( _rEvent.Source, uno::UNO_QUERY );
if ( ! xFixedText.is() )
{
@@ -150,11 +87,8 @@ namespace rptui
{
uno::Reference< lang::XComponent > xComponent( xFixedText, uno::UNO_QUERY_THROW );
handle(xComponent);
- // uno::Reference<awt::XVclWindowPeer> xVclWindowPeer = getVclWindowPeer(xComponent);
-
- // setPropertyTextColor(xVclWindowPeer, getTextColor());
}
- catch (uno::Exception e)
+ catch (uno::Exception const&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -175,7 +109,6 @@ namespace rptui
// -----------------------------------------------------------------------------
void FixedTextColor::handle( const uno::Reference< uno::XInterface >& _rxElement )
{
- // (void) _rxElement;
uno::Reference< report::XFixedText > xFixedText( _rxElement, uno::UNO_QUERY );
if ( ! xFixedText.is() )
{
@@ -281,3 +214,5 @@ namespace rptui
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
index 11b0677f1..a6fd097fd 100644
--- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
+++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -149,7 +150,7 @@ namespace rptui
// -----------------------------------------------------------------------------
void FormattedFieldBeautifier::notifyPropertyChange( const beans::PropertyChangeEvent& _rEvent )
{
- if ( !_rEvent.PropertyName.equalsAscii( "DataField" ) )
+ if ( !_rEvent.PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DataField" ) ) )
// not interested in
return;
@@ -186,7 +187,6 @@ namespace rptui
OUnoObject* pUnoObj = dynamic_cast<OUnoObject*>(pObject);
if ( pUnoObj ) // this doesn't need to be done for shapes
{
- // Rectangle aRect = pUnoObj->GetCurrentBoundRect();
::boost::shared_ptr<OSectionWindow> pSectionWindow = m_rReportController.getSectionWindow(xSection);
if (pSectionWindow != NULL)
{
@@ -201,3 +201,5 @@ namespace rptui
return xVclWindowPeer;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index c57c361b0..45ce964d3 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -144,7 +145,7 @@
#include <unotools/syslocale.hxx>
#include <unotools/viewoptions.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include "PropertyForward.hxx"
#include "SectionWindow.hxx"
@@ -197,11 +198,11 @@ namespace
{
bool operator() (const beans::PropertyValue& x, const ::rtl::OUString& y) const
{
- return x.Name.equals(y);// ? true : false;
+ return x.Name.equals(y);
}
bool operator() (const ::rtl::OUString& x,const beans::PropertyValue& y) const
{
- return x.equals(y.Name);// ? true : false;
+ return x.equals(y.Name);
}
};
@@ -224,16 +225,16 @@ namespace
aFontDescriptor.Underline = awt::FontUnderline::SINGLE - aFontDescriptor.Underline;
break;
default:
- OSL_ENSURE(0,"Illegal value in default!");
+ OSL_FAIL("Illegal value in default!");
break;
}
_xReportControlFormat->setFontDescriptor(aFontDescriptor);
}
- catch(beans::UnknownPropertyException&)
+ catch(const beans::UnknownPropertyException&)
{
}
- } // if ( xReportControlFormat.is() )
+ }
}
}
@@ -345,7 +346,7 @@ void OReportController::disposing()
m_pClipbordNotifier->AddRemoveListener( getView(), sal_False );
m_pClipbordNotifier->release();
m_pClipbordNotifier = NULL;
- } // if ( getView() && m_pClipbordNotifier )
+ }
if ( m_pGroupsFloater )
{
SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( RID_GROUPS_SORTING ) );
@@ -362,9 +363,9 @@ void OReportController::disposing()
::comphelper::disposeComponent( m_xRowSetMediator );
::comphelper::disposeComponent( m_xFormatter );
}
- catch(uno::Exception&)
+ catch(const uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught while disposing row sets.");
+ OSL_FAIL("Exception caught while disposing row sets.");
}
m_xRowSet.clear();
m_xRowSetMediator.clear();
@@ -384,7 +385,7 @@ void OReportController::disposing()
m_pReportControllerObserver->Clear();
m_pReportControllerObserver->release();
}
- catch ( const uno::Exception& )
+ catch(const uno::Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -405,7 +406,7 @@ void OReportController::disposing()
m_xFrameLoader.clear();
m_xReportEngine.clear();
}
- catch(uno::Exception&)
+ catch(const uno::Exception&)
{
}
if ( getDesignView() )
@@ -483,7 +484,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
case SID_OBJECT_SMALLESTHEIGHT:
case SID_OBJECT_GREATESTWIDTH:
case SID_OBJECT_GREATESTHEIGHT:
- aReturn.bEnabled = isEditable() && getDesignView()->HasSelection();// && getDesignView()->isAlignPossible();
+ aReturn.bEnabled = isEditable() && getDesignView()->HasSelection();
if ( aReturn.bEnabled )
aReturn.bEnabled = m_nSelectionCount > 1;
break;
@@ -545,7 +546,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
case SID_SECTION_ALIGN_UP:
case SID_SECTION_ALIGN_MIDDLE:
case SID_SECTION_ALIGN_DOWN:
- aReturn.bEnabled = isEditable() && getDesignView()->HasSelection();// && getDesignView()->isAlignPossible();
+ aReturn.bEnabled = isEditable() && getDesignView()->HasSelection();
break;
case SID_CUT:
aReturn.bEnabled = isEditable() && getDesignView()->HasSelection() && !getDesignView()->isHandleEvent(_nId);
@@ -826,7 +827,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
const uno::Reference< report::XReportControlModel> xControlModel(getDesignView()->getCurrentControlModel(),uno::UNO_QUERY);
aReturn.bEnabled = !xControlModel.is();
}
- catch(beans::UnknownPropertyException&)
+ catch(const beans::UnknownPropertyException&)
{
}
else
@@ -860,7 +861,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
break;
default:
;
- } // switch(_nCommand)
+ }
}
break;
case SID_ATTR_CHAR_COLOR:
@@ -905,7 +906,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
aReturn.bChecked = _nId == SID_ATTR_PARA_ADJUST_CENTER;
break;
}
- } // if ( aReturn.aValue >>= nParaAdjust )
+ }
aReturn.aValue.clear();
}
break;
@@ -915,7 +916,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
break;
case SID_CHAR_DLG:
case SID_SETCONTROLDEFAULTS:
- aReturn.bEnabled = m_xReportDefinition.is() && isEditable();// && getDesignView()->getCurrentControlModel().is();
+ aReturn.bEnabled = m_xReportDefinition.is() && isEditable();
if ( aReturn.bEnabled )
{
::std::vector< uno::Reference< uno::XInterface > > aSelection;
@@ -952,7 +953,6 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
SvxZoomItem aZoom(m_eZoomType,m_nZoomValue);
aZoom.SetValueSet(SVX_ZOOM_ENABLE_50|SVX_ZOOM_ENABLE_75|SVX_ZOOM_ENABLE_100|SVX_ZOOM_ENABLE_200);
aZoom.QueryValue(aReturn.aValue);
- //aReturn.sTitle = ::rtl::OUString::valueOf((sal_Int32)m_nZoomValue);
}
break;
case SID_ATTR_ZOOMSLIDER:
@@ -964,7 +964,6 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
aZoomSlider.AddSnappingPoint(100);
aZoomSlider.AddSnappingPoint(200);
aZoomSlider.QueryValue(aReturn.aValue);
- //aReturn.sTitle = ::rtl::OUString::valueOf((sal_Int32)m_nZoomValue);
}
break;
default:
@@ -1000,7 +999,7 @@ namespace
// -----------------------------------------------------------------------------
void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& aArgs)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
sal_Bool bForceBroadcast = sal_False;
@@ -1158,7 +1157,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
select(uno::makeAny(m_xReportDefinition));
break;
case SID_EXECUTE_REPORT:
- /*m_nExecuteReportEvent = */getView()->PostUserEvent(LINK(this, OReportController,OnExecuteReport));
+ getView()->PostUserEvent(LINK(this, OReportController,OnExecuteReport));
break;
case SID_RPT_NEW_FUNCTION:
createNewFunction(aArgs[0].Value);
@@ -1390,7 +1389,6 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
case SID_DRAWTBX_CS_STAR:
sType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("star5"));
break;
- case SID_DRAWTBX_CS_BASIC:
default:
sType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("diamond"));
}
@@ -1495,7 +1493,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
if ( aArgs[0].Value >>= aFont )
{
impl_setPropertyAtControls_throw(RID_STR_UNDO_CHANGEFONT,PROPERTY_CHARFONTNAME,uno::makeAny(aFont.Name),aArgs);
- } // if ( aArgs[0].Value >>= aFont )
+ }
}
break;
case SID_ATTR_CHAR_FONTHEIGHT:
@@ -1526,7 +1524,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
case SID_ATTR_PARA_ADJUST_BLOCK:
eParagraphAdjust = style::ParagraphAdjust_BLOCK;
break;
- } // switch(_nId)
+ }
impl_setPropertyAtControls_throw(RID_STR_UNDO_ALIGNMENT,PROPERTY_PARAADJUST,uno::makeAny(eParagraphAdjust),aArgs);
InvalidateFeature(SID_ATTR_PARA_ADJUST_LEFT);
@@ -1593,7 +1591,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
}
else
createDateTime(aArgs);
- } // if ( m_xReportDefinition.is() )
+ }
break;
case SID_INSERT_FLD_PGNUMBER:
if ( m_xReportDefinition.is() )
@@ -1605,7 +1603,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
}
else
createPageNumber(aArgs);
- } // if ( m_xReportDefinition.is() )
+ }
break;
case SID_EXPORTDOC:
case SID_EXPORTDOCASPDF:
@@ -1631,7 +1629,6 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
}
}
setEditable(!isEditable());
- //getJoinView()->setReadOnly(!isEditable());
InvalidateAll();
return;
case SID_GROUP:
@@ -1641,17 +1638,17 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
{
openZoomDialog();
}
- else if ( aArgs.getLength() == 1 && aArgs[0].Name.equalsAscii("Zoom") )
+ else if ( aArgs.getLength() == 1 && aArgs[0].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Zoom")) )
{
SvxZoomItem aZoomItem;
aZoomItem.PutValue(aArgs[0].Value);
m_nZoomValue = aZoomItem.GetValue();
m_eZoomType = aZoomItem.GetType();
impl_zoom_nothrow();
- } // if ( aArgs.getLength() == 1 && aArgs[0].Name.equalsAscii("Zoom") )
+ }
break;
case SID_ATTR_ZOOMSLIDER:
- if ( aArgs.getLength() == 1 && aArgs[0].Name.equalsAscii("ZoomSlider") )
+ if ( aArgs.getLength() == 1 && aArgs[0].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ZoomSlider")) )
{
SvxZoomSliderItem aZoomSlider;
aZoomSlider.PutValue(aArgs[0].Value);
@@ -1686,7 +1683,6 @@ void OReportController::impl_initialize( )
{
if ( m_xReportDefinition.is() )
{
- //m_sName = m_xReportDefinition->getName();
getView()->initialize(); // show the windows and fill with our informations
m_aReportModel = reportdesign::OReportDefinition::getSdrModel(m_xReportDefinition);
@@ -1698,7 +1694,7 @@ void OReportController::impl_initialize( )
UndoSuppressor aSuppressUndo( getUndoManager() );
::comphelper::NamedValueCollection aArgs(getModel()->getArgs());
- setMode(aArgs.getOrDefault("Mode", rtl::OUString::createFromAscii("normal")));
+ setMode(aArgs.getOrDefault("Mode", ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("normal"))));
listen(true);
setEditable( !m_aReportModel->IsReadOnly() );
@@ -1720,11 +1716,11 @@ void OReportController::impl_initialize( )
m_xReportDefinition->setCommand(aNames[0]);
m_xReportDefinition->setCommandType(sdb::CommandType::TABLE);
}
- } // if ( !sHierarchicalDocumentName.getLength() && getConnection().is() )
+ }
m_aVisualAreaSize = m_xReportDefinition->getVisualAreaSize(0);
- } // if ( m_xReportDefinition.is() )
+ }
// check if chart is supported by the engine
checkChartEnabled();
@@ -1762,7 +1758,7 @@ void OReportController::impl_initialize( )
getDesignView()->setCurrentPage(m_sLastActivePage);
uno::Sequence< beans::PropertyValue> aArgs;
executeUnChecked(SID_SELECT_REPORT,aArgs);
- } // if ( m_bShowProperties && m_nPageNum == -1 )
+ }
setModified(sal_False); // and we are not modified yet
@@ -1778,7 +1774,6 @@ void OReportController::impl_initialize( )
// -----------------------------------------------------------------------------
IMPL_LINK( OReportController, OnOpenHelpAgent, void* ,/*_pMemfun*/)
{
- //m_nExecuteReportEvent = 0;
doOpenHelpAgent();
return 0L;
}
@@ -1800,10 +1795,8 @@ void OReportController::doOpenHelpAgent()
{
if (getFrame().is())
{
- rtl::OUString suURL = rtl::OUString::createFromAscii("vnd.sun.star.help://shared/text/shared/explorer/database/rep_main.xhp?UseDB=no&DbPAR=swriter");
+ rtl::OUString suURL(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.help://shared/text/shared/explorer/database/rep_main.xhp?UseDB=no&DbPAR=swriter"));
openHelpAgent(suURL);
- // openHelpAgent(68245 /* HID_REPORT_DESIGN... UNKNOWN */ );
- // HID_APP_REPORT_TREE
}
else
{
@@ -1826,7 +1819,6 @@ sal_Bool OReportController::Construct(Window* pParent)
m_pClipbordNotifier->AddRemoveListener( getView(), sal_True );
OReportController_BASE::Construct(pParent);
- //getView()->Show();
return sal_True;
}
// -----------------------------------------------------------------------------
@@ -1835,7 +1827,7 @@ sal_Bool SAL_CALL OReportController::suspend(sal_Bool /*_bSuspend*/) throw( Runt
if ( getBroadcastHelper().bInDispose || getBroadcastHelper().bDisposed )
return sal_True;
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
if ( getView() && getView()->IsInModalMode() )
@@ -1854,7 +1846,6 @@ void OReportController::describeSupportedFeatures()
implDescribeSupportedFeature( ".uno:Redo", SID_REDO, CommandGroup::EDIT );
implDescribeSupportedFeature( ".uno:Undo", SID_UNDO, CommandGroup::EDIT );
- //implDescribeSupportedFeature( ".uno:PasteSpecial", SID_PASTE, CommandGroup::EDIT );
implDescribeSupportedFeature( ".uno:SelectAll", SID_SELECTALL, CommandGroup::EDIT );
implDescribeSupportedFeature( ".uno:SelectAllInSection", SID_SELECTALL_IN_SECTION, CommandGroup::EDIT );
implDescribeSupportedFeature( ".uno:Delete", SID_DELETE, CommandGroup::EDIT );
@@ -1868,13 +1859,11 @@ void OReportController::describeSupportedFeatures()
implDescribeSupportedFeature( ".uno:AddField", SID_FM_ADD_FIELD, CommandGroup::VIEW );
implDescribeSupportedFeature( ".uno:ReportNavigator", SID_RPT_SHOWREPORTEXPLORER, CommandGroup::VIEW );
implDescribeSupportedFeature( ".uno:ControlProperties", SID_SHOW_PROPERTYBROWSER, CommandGroup::VIEW );
- //implDescribeSupportedFeature( ".uno:SwitchControlDesignMode", SID_FM_DESIGN_MODE, CommandGroup::VIEW );
implDescribeSupportedFeature( ".uno:DbSortingAndGrouping", SID_SORTINGANDGROUPING, CommandGroup::VIEW );
implDescribeSupportedFeature( ".uno:PageHeaderFooter", SID_PAGEHEADERFOOTER, CommandGroup::VIEW );
implDescribeSupportedFeature( ".uno:ReportHeaderFooter", SID_REPORTHEADERFOOTER, CommandGroup::VIEW );
implDescribeSupportedFeature( ".uno:ZoomSlider", SID_ATTR_ZOOMSLIDER, CommandGroup::VIEW );
implDescribeSupportedFeature( ".uno:Zoom", SID_ATTR_ZOOM, CommandGroup::VIEW );
- //implDescribeSupportedFeature( ".uno:SwitchControlDesignMode", SID_FM_DESIGN_MODE, CommandGroup::VIEW );
implDescribeSupportedFeature( ".uno:ConditionalFormatting", SID_CONDITIONALFORMATTING, CommandGroup::FORMAT );
implDescribeSupportedFeature( ".uno:PageDialog", SID_PAGEDIALOG, CommandGroup::FORMAT );
@@ -2118,7 +2107,7 @@ void OReportController::impl_onModifyChanged()
m_xReportDefinition->setModified( impl_isModified() );
DBSubComponentController::impl_onModifyChanged();
}
- catch(uno::Exception)
+ catch(const uno::Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -2138,12 +2127,12 @@ void OReportController::onLoadedMenu(const Reference< frame::XLayoutManager >& _
,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/resizebar"))
,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/sectionshrinkbar"))
};
- for (size_t i = 0; i< sizeof(s_sMenu)/sizeof(s_sMenu[0]); ++i)
+ for (size_t i = 0; i< SAL_N_ELEMENTS(s_sMenu); ++i)
{
_xLayoutManager->createElement( s_sMenu[i] );
_xLayoutManager->requestElement( s_sMenu[i] );
}
- } // if ( _xLayoutManager.is() )
+ }
}
// -----------------------------------------------------------------------------
void OReportController::notifyGroupSections(const ContainerEvent& _rEvent,bool _bShow)
@@ -2151,7 +2140,7 @@ void OReportController::notifyGroupSections(const ContainerEvent& _rEvent,bool _
uno::Reference< report::XGroup> xGroup(_rEvent.Element,uno::UNO_QUERY);
if ( xGroup.is() )
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
sal_Int32 nGroupPos = 0;
_rEvent.Accessor >>= nGroupPos;
@@ -2207,14 +2196,14 @@ void SAL_CALL OReportController::elementRemoved( const ContainerEvent& _rEvent )
// -----------------------------------------------------------------------------
void SAL_CALL OReportController::elementReplaced( const ContainerEvent& /*_rEvent*/ ) throw(RuntimeException)
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
- OSL_ENSURE(0,"Not yet implemented!");
+ OSL_FAIL("Not yet implemented!");
}
// -----------------------------------------------------------------------------
void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEvent& evt ) throw (RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
try
{
@@ -2289,7 +2278,7 @@ void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEven
/// TODO: check what we need to notify here TitleHelper
/*else if ( evt.PropertyName.equals( PROPERTY_CAPTION ) )
updateTitle();*/
- } // if ( evt.Source == m_xReportDefinition )
+ }
else
{
uno::Reference< report::XGroup> xGroup(evt.Source,uno::UNO_QUERY);
@@ -2335,7 +2324,6 @@ sal_uInt16 lcl_getNonVisbleGroupsBefore( const uno::Reference< report::XGroups>&
// -----------------------------------------------------------------------------
void OReportController::groupChange( const uno::Reference< report::XGroup>& _xGroup,const ::rtl::OUString& _sPropName,sal_Int32 _nGroupPos,bool _bShow)
{
- //adjustSectionName(_xGroup,_nGroupPos);
::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);
@@ -2486,7 +2474,6 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
const SfxPoolItem* pItem = NULL;
if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_SIZE,sal_True,&pItem))
{
- const Size aPaperSize = static_cast<const SvxSizeItem*>(pItem)->GetSize();
uno::Any aValue;
static_cast<const SvxSizeItem*>(pItem)->QueryValue(aValue,MID_SIZE_SIZE);
xProp->setPropertyValue(PROPERTY_PAPERSIZE,aValue);
@@ -2526,13 +2513,13 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
}
}
}
- catch(Exception&)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
SfxItemPool::Free(pPool);
- for (sal_uInt16 i=0; i<sizeof(pDefaults)/sizeof(pDefaults[0]); ++i)
+ for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(pDefaults); ++i)
delete pDefaults[i];
}
@@ -2634,7 +2621,6 @@ void OReportController::shrinkSectionBottom(uno::Reference<report::XSection> _xS
return;
}
const sal_Int32 nSectionHeight = _xSection->getHeight();
- // sal_Int32 nMinPositionY = nSectionHeight;
sal_Int32 nMaxPositionY = 0;
uno::Reference< report::XReportComponent> xReportComponent;
@@ -2645,7 +2631,6 @@ void OReportController::shrinkSectionBottom(uno::Reference<report::XSection> _xS
const sal_Int32 nReportComponentPositionY = xReportComponent->getPositionY();
const sal_Int32 nReportComponentHeight = xReportComponent->getHeight();
const sal_Int32 nReportComponentPositionYAndHeight = nReportComponentPositionY + nReportComponentHeight;
- // nMinPositionY = std::min(nReportComponentPositionY, nMinPositionY);
nMaxPositionY = std::max(nReportComponentPositionYAndHeight, nMaxPositionY);
}
// now we know the minimal Y-Position and maximal Y-Position
@@ -2669,7 +2654,6 @@ void OReportController::shrinkSectionTop(uno::Reference<report::XSection> _xSect
const sal_Int32 nSectionHeight = _xSection->getHeight();
sal_Int32 nMinPositionY = nSectionHeight;
- // sal_Int32 nMaxPositionY = 0;
uno::Reference< report::XReportComponent> xReportComponent;
// for every component get it's Y-position and compare it to the current Y-position
@@ -2677,10 +2661,7 @@ void OReportController::shrinkSectionTop(uno::Reference<report::XSection> _xSect
{
xReportComponent.set(_xSection->getByIndex(i), uno::UNO_QUERY);
const sal_Int32 nReportComponentPositionY = xReportComponent->getPositionY();
- // const sal_Int32 nReportComponentHeight = xReportComponent->getHeight();
- // const sal_Int32 nReportComponentPositionYAndHeight = nReportComponentPositionY + nReportComponentHeight;
nMinPositionY = std::min(nReportComponentPositionY, nMinPositionY);
- // nMaxPositionY = std::max(nReportComponentPositionYAndHeight, nMaxPositionY);
}
// now we know the minimal Y-Position and maximal Y-Position
if (nMinPositionY == 0)
@@ -2742,7 +2723,7 @@ uno::Any SAL_CALL OReportController::getViewData(void) throw( uno::RuntimeExcept
};
::comphelper::NamedValueCollection aCommandProperties;
- for ( size_t i=0; i < sizeof( nCommandIDs ) / sizeof( nCommandIDs[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS(nCommandIDs); ++i )
{
const FeatureState aFeatureState = GetState( nCommandIDs[i] );
@@ -2785,8 +2766,8 @@ uno::Any SAL_CALL OReportController::getViewData(void) throw( uno::RuntimeExcept
if ( pSectionWindow.get() )
{
aViewData.put( "MarkedSection", (sal_Int32)pSectionWindow->getReportSection().getPage()->GetPageNum() );
- } // if ( pSectionWindow.get() )
- } // if ( getDesignView() )
+ }
+ }
aViewData.put( "ZoomFactor", m_nZoomValue );
return uno::makeAny( aViewData.getPropertyValues() );
@@ -2850,7 +2831,7 @@ void SAL_CALL OReportController::restoreViewData(const uno::Any& i_data) throw(
}
}
}
- catch ( const IllegalArgumentException& e )
+ catch(const IllegalArgumentException&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -2942,7 +2923,7 @@ uno::Reference<frame::XModel> OReportController::executeReport()
Reference<XFrame> xFrame = getXFrame();
xModel = m_xReportEngine->createDocumentAlive(xFrame);
}
- catch( const sdbc::SQLException& /*e*/ )
+ catch(const sdbc::SQLException&)
{ // SQLExceptions and derived exceptions must not be translated
aInfo = ::cppu::getCaughtException();
}
@@ -2980,7 +2961,7 @@ uno::Reference<frame::XModel> OReportController::executeReport()
{
const String suSQLContext = String( ModuleRes( RID_STR_COULD_NOT_CREATE_REPORT ) );
aInfo.prepend(suSQLContext);
- } // if (aInfo.isValid())
+ }
m_bInGeneratePreview = false;
}
@@ -3023,7 +3004,7 @@ uno::Reference< sdbc::XRowSet > OReportController::getRowSet()
m_xRowSetMediator = new OPropertyMediator( m_xReportDefinition.get(), xRowSetProp, aPropertyMediation );
m_xRowSet = xRowSet;
}
- catch( const uno::Exception& )
+ catch(const uno::Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -3058,7 +3039,7 @@ void OReportController::insertGraphic()
createControl(aArgs,xSection,::rtl::OUString(),OBJ_DLG_IMAGECONTROL);
}
}
- catch(Exception&)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -3144,7 +3125,6 @@ void OReportController::createNewFunction(const uno::Any& _aValue)
// -----------------------------------------------------------------------------
IMPL_LINK( OReportController, OnExecuteReport, void* ,/*_pMemfun*/)
{
- //m_nExecuteReportEvent = 0;
executeReport();
return 0L;
}
@@ -3177,7 +3157,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
sCustomShapeType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("diamond"));
pSectionWindow->getReportSection().createDefault(sCustomShapeType,pNewControl);
pNewControl->SetLogicRect(Rectangle(3000,500,6000,3500)); // switch height and width
- } // if ( _nObjectId == OBJ_CUSTOMSHAPE )
+ }
else if ( _nObjectId == OBJ_OLE2 || OBJ_DLG_SUBREPORT == _nObjectId )
{
pNewControl = SdrObjFactory::MakeNewObject( ReportInventor, _nObjectId, pSectionWindow->getReportSection().getPage(),m_aReportModel.get() );
@@ -3217,11 +3197,11 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
,PROPERTY_FORMATSSUPPLIER
,PROPERTY_BACKGROUNDCOLOR
};
- for(size_t i = 0; i < sizeof(sProps)/sizeof(sProps[0]);++i)
+ for(size_t i = 0; i < SAL_N_ELEMENTS(sProps);++i)
{
if ( xInfo->hasPropertyByName(sProps[i]) && xShapeInfo->hasPropertyByName(sProps[i]) )
xUnoProp->setPropertyValue(sProps[i],xShapeProp->getPropertyValue(sProps[i]));
- } // for(size_t i = 0; i < sizeof(sProps)/sizeof(sProps[0]);++i)
+ }
if ( xInfo->hasPropertyByName(PROPERTY_BORDER) && xShapeInfo->hasPropertyByName(PROPERTY_CONTROLBORDER) )
xUnoProp->setPropertyValue(PROPERTY_BORDER,xShapeProp->getPropertyValue(PROPERTY_CONTROLBORDER));
@@ -3303,7 +3283,7 @@ void OReportController::createPageNumber(const Sequence< PropertyValue >& _aArgs
{
uno::Sequence< beans::PropertyValue > aArgs;
executeChecked(SID_PAGEHEADERFOOTER,aArgs);
- } // if ( !m_xHoldAlive->getPageHeaderOn() )
+ }
SequenceAsHashMap aMap(_aArgs);
sal_Bool bStateOfPage = aMap.getUnpackedValueOrDefault(PROPERTY_STATE,sal_False);
@@ -3372,7 +3352,6 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
// LLA: new feature, add the Label in dependency of the given DND_ACTION one section up, normal or one section down
sal_Int8 nDNDAction = aMap.getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DNDAction")), sal_Int8(0));
pSectionWindow[1] = pSectionWindow[0];
- // ::boost::shared_ptr<OReportSection> pReportSectionPost;
sal_Bool bLabelAboveTextField = nDNDAction == DND_ACTION_COPY;
if ( bLabelAboveTextField || nDNDAction == DND_ACTION_LINK )
{
@@ -3406,7 +3385,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
{
xReportDefinition->setCommand(sCommand);
xReportDefinition->setCommandType(nCommandType);
- } // if ( !xReportDefinition->getCommand().getLength() )
+ }
xColumns = dbtools::getFieldsByCommandDescriptor(xConnection,nCommandType,sCommand,xHoldAlive);
if ( xColumns.is() && xColumns->hasByName(sColumnName) )
@@ -3430,7 +3409,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
// definition is bound to - which is not supported for the parameters case, since we
// can retrieve parameters from the RowSet only.
}
- catch( const Exception& )
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -3482,7 +3461,6 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
SdrUnoObj* pControl[2];
pControl[0] = NULL;
pControl[1] = NULL;
- //getDesignView()->GetModel()->GetUndoEnv().Lock();
const sal_Int32 nRightMargin = getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_RIGHTMARGIN);
const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(m_xReportDefinition,PROPERTY_PAPERSIZE).Width - nRightMargin;
OSectionView* pSectionViews[2];
@@ -3494,7 +3472,6 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
,xField,xNumberFormats,nOBJID,::rtl::OUString(),ReportInventor,OBJ_DLG_FIXEDTEXT,
pSectionWindow[1]->getReportSection().getPage(),pSectionWindow[0]->getReportSection().getPage(),m_aReportModel.get(),
pControl[0],pControl[1]);
- //getDesignView()->GetModel()->GetUndoEnv().UnLock();
if ( pControl[0] && pControl[1] )
{
SdrPageView* pPgViews[2];
@@ -3505,7 +3482,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
::rtl::OUString sDefaultName;
size_t i = 0;
OUnoObject* pObjs[2];
- for(i = 0; i < sizeof(pControl)/sizeof(pControl[0]);++i)
+ for(i = 0; i < SAL_N_ELEMENTS(pControl);++i)
{
pObjs[i] = dynamic_cast<OUnoObject*>(pControl[i]);
uno::Reference<beans::XPropertySet> xUnoProp(pObjs[i]->GetUnoControlModel(),uno::UNO_QUERY_THROW);
@@ -3520,7 +3497,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
,PROPERTY_BORDER
,PROPERTY_BACKGROUNDCOLOR
};
- for(size_t k = 0; k < sizeof(sProps)/sizeof(sProps[0]);++k)
+ for(size_t k = 0; k < SAL_N_ELEMENTS(sProps);++k)
{
if ( xInfo->hasPropertyByName(sProps[k]) && xShapeInfo->hasPropertyByName(sProps[k]) )
xUnoProp->setPropertyValue(sProps[k],xShapeProp->getPropertyValue(sProps[k]));
@@ -3534,15 +3511,12 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
ReportFormula aFormula( ReportFormula::Field, sName );
xUnoProp->setPropertyValue( PROPERTY_DATAFIELD, uno::makeAny( aFormula.getCompleteFormula() ) );
- } // if ( xInfo->hasPropertyByName(PROPERTY_DATAFIELD) )
+ }
if ( xInfo->hasPropertyByName(PROPERTY_BORDER) && xShapeInfo->hasPropertyByName(PROPERTY_CONTROLBORDER) )
xUnoProp->setPropertyValue(PROPERTY_BORDER,xShapeProp->getPropertyValue(PROPERTY_CONTROLBORDER));
pObjs[i]->CreateMediator(sal_True);
- // need SectionView from the above or follow Section
- // (getMarkedSection) returns the current Section
- //pSectionViews[i]->InsertObjectAtView(pControl[i],*pPgViews[i],SDRINSERT_ADDMARK);
const sal_Int32 nShapeWidth = xShapeProp->getWidth();
const bool bChangedPos = (aPos.X + nShapeWidth) > nPaperWidth;
@@ -3560,8 +3534,6 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
if (pSectionViews[0] != pSectionViews[1] &&
nOBJID == OBJ_DLG_FORMATTEDFIELD) // we want this nice feature only at FORMATTEDFIELD
{
- // we have two different Views, so set the position x new.
- // pSectionViews[1].position.x = pSectionViews[0].position.x
uno::Reference< report::XReportComponent> xShapePropLabel(pObjs[0]->getUnoShape(),uno::UNO_QUERY_THROW);
uno::Reference< report::XReportComponent> xShapePropTextField(pObjs[1]->getUnoShape(),uno::UNO_QUERY_THROW);
if ( sLabel.getLength() )
@@ -3587,7 +3559,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
uno::Reference< report::XFixedText> xShapeProp(pObj->getUnoShape(),uno::UNO_QUERY_THROW);
xShapeProp->setName(xShapeProp->getName() + sDefaultName );
- for(i = 0; i < sizeof(pControl)/sizeof(pControl[0]);++i) // insert controls
+ for(i = 0; i < SAL_N_ELEMENTS(pControl);++i) // insert controls
{
correctOverlapping(pControl[i],pSectionWindow[1-i]->getReportSection());
}
@@ -3631,22 +3603,17 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
xTextfield->setPositionY(aTextfield.Top());
}
}
- // this should never happen.
- // else
- // {
- // DBG_ERROR("unhandled case.");
- // }
}
}
}
else
{
- for(size_t i = 0; i < sizeof(pControl)/sizeof(pControl[0]);++i)
+ for(size_t i = 0; i < SAL_N_ELEMENTS(pControl);++i)
delete pControl[i];
}
}
}
- catch( const Exception& )
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -3702,7 +3669,7 @@ void OReportController::listen(const bool _bAdd)
void (SAL_CALL XPropertySet::*pPropertyListenerAction)( const ::rtl::OUString&, const uno::Reference< XPropertyChangeListener >& ) =
_bAdd ? &XPropertySet::addPropertyChangeListener : &XPropertySet::removePropertyChangeListener;
- for (size_t i = 0; i < sizeof(aProps)/sizeof(aProps[0]); ++i)
+ for (size_t i = 0; i < SAL_N_ELEMENTS(aProps); ++i)
(m_xReportDefinition.get()->*pPropertyListenerAction)( aProps[i], static_cast< XPropertyChangeListener* >( this ) );
OXUndoEnvironment& rUndoEnv = m_aReportModel->GetUndoEnv();
@@ -3711,7 +3678,7 @@ void OReportController::listen(const bool _bAdd)
const beans::Property* pIter = aSeq.getConstArray();
const beans::Property* pEnd = pIter + aSeq.getLength();
const ::rtl::OUString* pPropsBegin = &aProps[0];
- const ::rtl::OUString* pPropsEnd = pPropsBegin + (sizeof(aProps)/sizeof(aProps[0])) - 3;
+ const ::rtl::OUString* pPropsEnd = pPropsBegin + (SAL_N_ELEMENTS(aProps)) - 3;
for(;pIter != pEnd;++pIter)
{
if ( ::std::find(pPropsBegin,pPropsEnd,pIter->Name) == pPropsEnd )
@@ -3727,11 +3694,6 @@ void OReportController::listen(const bool _bAdd)
// Add Listeners to ReportControllerObserver
OXReportControllerObserver& rObserver = *m_pReportControllerObserver;
- // void (OXReportControllerObserver::*pObserverFunction)( const uno::Reference< uno::XInterface >& ) =
- // _bAdd ? &OXReportControllerObserver::AddElement : &OXReportControllerObserver::RemoveElement;
-
- // (rObserver.*pObserverFunction)( m_xReportDefinition->getStyleFamilies() );
- // (rObserver.*pObserverFunction)( m_xReportDefinition->getFunctions() );
if ( m_xReportDefinition->getPageHeaderOn() && _bAdd )
{
@@ -3762,7 +3724,7 @@ void OReportController::listen(const bool _bAdd)
getDesignView()->addSection(xGroup->getHeader(),DBGROUPHEADER);
rObserver.AddSection(xGroup->getHeader());
}
- } // for (sal_Int32 i=0;i<nCount ; ++i)
+ }
if ( _bAdd )
{
@@ -3880,7 +3842,7 @@ void OReportController::switchPageSection(const sal_Int16 _nId)
,bSwitchOn ? Inserted : Removed
,0
));
- } // if ( SID_PAGEHEADERFOOTER == _nId )
+ }
switch( _nId )
{
case SID_PAGEHEADER_WITHOUT_UNDO:
@@ -3937,7 +3899,7 @@ void OReportController::modifyGroup(const bool _bAppend, const Sequence< Propert
xGroups->removeByIndex( nPos );
}
}
- catch( const Exception& )
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -4059,7 +4021,7 @@ void OReportController::checkChartEnabled()
::rtl::OUString SAL_CALL OReportController::getTitle()
throw (uno::RuntimeException)
{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
uno::Reference< frame::XTitle> xTitle(m_xReportDefinition,uno::UNO_QUERY_THROW);
@@ -4110,7 +4072,7 @@ void SAL_CALL OReportController::setMode( const ::rtl::OUString& aMode ) throw (
{
static ::rtl::OUString s_sModes[] = { ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("remote")),
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("normal")) };
- return uno::Sequence< ::rtl::OUString> (&s_sModes[0],sizeof(s_sModes)/sizeof(s_sModes[0]));
+ return uno::Sequence< ::rtl::OUString> (&s_sModes[0],SAL_N_ELEMENTS(s_sModes));
}
::sal_Bool SAL_CALL OReportController::supportsMode( const ::rtl::OUString& aMode ) throw (::com::sun::star::uno::RuntimeException)
{
@@ -4127,7 +4089,7 @@ void SAL_CALL OReportController::setMode( const ::rtl::OUString& aMode ) throw (
// -----------------------------------------------------------------------------
bool OReportController::isUiVisible() const
{
- return !m_sMode.equalsAscii("remote");
+ return !m_sMode.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("remote"));
}
// -----------------------------------------------------------------------------
void OReportController::impl_fillState_nothrow(const ::rtl::OUString& _sProperty,dbaui::FeatureState& _rState) const
@@ -4155,15 +4117,15 @@ void OReportController::impl_fillState_nothrow(const ::rtl::OUString& _sProperty
else if ( !comphelper::compare(aTemp,aTemp2) )
break;
}
- catch(beans::UnknownPropertyException&)
+ catch(const beans::UnknownPropertyException&)
{
_rState.bEnabled = sal_False;
}
- } // for(; aIter != aSelection.end();++aIter)
+ }
if ( aIter == aSelection.end() )
_rState.aValue = aTemp;
}
- } // if ( _rState.bEnabled )
+ }
}
// -----------------------------------------------------------------------------
void OReportController::impl_zoom_nothrow()
@@ -4171,8 +4133,6 @@ void OReportController::impl_zoom_nothrow()
Fraction aZoom(m_nZoomValue,100);
setZoomFactor( aZoom,*getDesignView() );
getDesignView()->zoom(aZoom);
- // TRY
- /*getDesignView()->Invalidate(INVALIDATE_NOCHILDREN);*/
InvalidateFeature(SID_ATTR_ZOOM,Reference< XStatusListener >(),sal_True);
InvalidateFeature(SID_ATTR_ZOOMSLIDER,Reference< XStatusListener >(),sal_True);
}
@@ -4199,9 +4159,9 @@ sal_Bool OReportController::isFormatCommandEnabled(sal_uInt16 _nCommand,const un
break;
default:
;
- } // switch(_nCommand)
+ }
}
- catch(uno::Exception&)
+ catch(const uno::Exception&)
{
}
}
@@ -4291,17 +4251,17 @@ void OReportController::openZoomDialog()
m_nZoomValue = getDesignView()->getZoomFactor( m_eZoomType );
impl_zoom_nothrow();
- } // if ( !bCancel )
+ }
}
- catch(uno::Exception&)
+ catch(const uno::Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
SfxItemPool::Free(pPool);
- for (sal_uInt16 i=0; i<sizeof(pDefaults)/sizeof(pDefaults[0]); ++i)
+ for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(pDefaults); ++i)
delete pDefaults[i];
- } // if(pFact)
+ }
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
@@ -4309,15 +4269,12 @@ void OReportController::openZoomDialog()
void SAL_CALL OReportController::setVisualAreaSize( ::sal_Int64 _nAspect, const awt::Size& _aSize ) throw (lang::IllegalArgumentException, embed::WrongStateException, uno::Exception, uno::RuntimeException)
{
::osl::MutexGuard aGuard( getMutex() );
- //if( nAspect == embed::Aspects::MSOLE_CONTENT )
- {
bool bChanged =
(m_aVisualAreaSize.Width != _aSize.Width ||
m_aVisualAreaSize.Height != _aSize.Height);
m_aVisualAreaSize = _aSize;
if( bChanged )
setModified( sal_True );
- }
m_nAspect = _nAspect;
}
// -----------------------------------------------------------------------------
@@ -4329,7 +4286,7 @@ awt::Size SAL_CALL OReportController::getVisualAreaSize( ::sal_Int64 /*nAspect*/
// -----------------------------------------------------------------------------
embed::VisualRepresentation SAL_CALL OReportController::getPreferredVisualRepresentation( ::sal_Int64 _nAspect ) throw (lang::IllegalArgumentException, embed::WrongStateException, uno::Exception, uno::RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
embed::VisualRepresentation aResult;
if ( !m_bInGeneratePreview )
@@ -4350,17 +4307,15 @@ embed::VisualRepresentation SAL_CALL OReportController::getPreferredVisualRepres
{
xTransfer->setVisualAreaSize(m_nAspect,m_aVisualAreaSize);
aResult = xTransfer->getPreferredVisualRepresentation( _nAspect );
- } // if ( xTransfer.is() )
+ }
}
- catch( uno::Exception & ex )
+ catch(const uno::Exception&)
{
- (void)ex;
}
m_xReportEngine->setMaxRows(nOldMaxRows);
}
- catch( uno::Exception & ex )
+ catch(const uno::Exception&)
{
- (void)ex;
}
m_bInGeneratePreview = false;
}
@@ -4423,3 +4378,4 @@ void OReportController::addUndoAction( SfxUndoAction* i_pAction )
InvalidateFeature( SID_UNDO );
InvalidateFeature( SID_REDO );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx
index 0b8aeb4fd..393c15b14 100644
--- a/reportdesign/source/ui/report/ReportControllerObserver.cxx
+++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
#include <ReportControllerObserver.hxx>
#include <ReportController.hxx>
#include <svl/smplhint.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <com/sun/star/report/XFormattedField.hpp>
#include <com/sun/star/awt/FontSlant.hpp>
@@ -49,8 +50,6 @@ namespace rptui
using namespace ::com::sun::star;
- // const OReportController *& m_pReportController;
-
DECLARE_STL_USTRINGACCESS_MAP(bool, AllProperties);
DECLARE_STL_STDKEY_MAP(uno::Reference< beans::XPropertySet >, AllProperties, PropertySetInfoCache);
@@ -110,31 +109,6 @@ public:
if ( _pEvt )
{
sal_Int32 nEvent = _pEvt->GetId();
- /*
- // just for debug
- if (nEvent == VCLEVENT_WINDOW_CHILDCREATED ||
- nEvent == VCLEVENT_WINDOW_PAINT ||
- nEvent == VCLEVENT_WINDOW_MOVE ||
- nEvent == VCLEVENT_WINDOW_RESIZE ||
- nEvent == VCLEVENT_WINDOW_SHOW ||
- nEvent == VCLEVENT_WINDOW_MOUSEMOVE ||
- nEvent == VCLEVENT_WINDOW_FRAMETITLECHANGED ||
- nEvent == VCLEVENT_WINDOW_HIDE ||
- nEvent == VCLEVENT_EDIT_MODIFY ||
- nEvent == VCLEVENT_SCROLLBAR_ENDSCROLL ||
- nEvent == VCLEVENT_EDIT_SELECTIONCHANGED ||
- nEvent == VCLEVENT_TABPAGE_INSERTED ||
- nEvent == VCLEVENT_TABPAGE_REMOVED ||
- nEvent == VCLEVENT_TOOLBOX_FORMATCHANGED ||
- nEvent == VCLEVENT_TOOLBOX_ITEMADDED ||
- nEvent == VCLEVENT_TOOLBOX_ALLITEMCHANGED ||
- nEvent == VCLEVENT_MENUBARADDED ||
- nEvent == 1
- )
- {
- return 0L;
- }
- */
if (nEvent == VCLEVENT_APPLICATION_DATACHANGED )
{
@@ -145,13 +119,11 @@ public:
{
OEnvLock aLock(*this);
- // sal_uInt32 nCount = m_pImpl->m_aSections.size();
-
// send all Section Objects a 'tingle'
// maybe they need a change in format, color, etc
::std::vector< uno::Reference< container::XChild > >::const_iterator aIter = m_pImpl->m_aSections.begin();
::std::vector< uno::Reference< container::XChild > >::const_iterator aEnd = m_pImpl->m_aSections.end();
- for (;aIter != aEnd; aIter++)
+ for (;aIter != aEnd; ++aIter)
{
const uno::Reference<container::XChild> xChild (*aIter);
if (xChild.is())
@@ -199,7 +171,6 @@ public:
void OXReportControllerObserver::Clear()
{
OEnvLock aLock(*this);
- // sal_uInt32 nDebugValue = m_pImpl->m_aSections.size();
m_pImpl->m_aSections.clear();
}
@@ -315,7 +286,6 @@ void OXReportControllerObserver::switchListening( const uno::Reference< containe
// be notified of any changes in the container elements
uno::Reference< container::XContainer > xSimpleContainer( _rxContainer, uno::UNO_QUERY );
- // OSL_ENSURE( xSimpleContainer.is(), "OXReportControllerObserver::switchListening: how are we expected to be notified of changes in the container?" );
if ( xSimpleContainer.is() )
{
if ( _bStartListening )
@@ -367,17 +337,13 @@ void OXReportControllerObserver::switchListening( const uno::Reference< uno::XIn
//------------------------------------------------------------------------------
void SAL_CALL OXReportControllerObserver::modified( const lang::EventObject& /*aEvent*/ ) throw (uno::RuntimeException)
{
- // implSetModified();
}
//------------------------------------------------------------------------------
void OXReportControllerObserver::AddElement(const uno::Reference< uno::XInterface >& _rxElement )
{
- // if ( !IsLocked() )
- // {
m_aFormattedFieldBeautifier.notifyElementInserted(_rxElement);
m_aFixedTextColor.notifyElementInserted(_rxElement);
- // }
// if it's a container, start listening at all elements
uno::Reference< container::XIndexAccess > xContainer( _rxElement, uno::UNO_QUERY );
@@ -417,7 +383,7 @@ void OXReportControllerObserver::RemoveElement(const uno::Reference< uno::XInter
//------------------------------------------------------------------------------
void SAL_CALL OXReportControllerObserver::elementInserted(const container::ContainerEvent& evt) throw(uno::RuntimeException)
{
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
// neues Object zum lauschen
@@ -431,7 +397,7 @@ void SAL_CALL OXReportControllerObserver::elementInserted(const container::Conta
//------------------------------------------------------------------------------
void SAL_CALL OXReportControllerObserver::elementReplaced(const container::ContainerEvent& evt) throw(uno::RuntimeException)
{
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
uno::Reference< uno::XInterface > xIface(evt.ReplacedElement,uno::UNO_QUERY);
@@ -445,7 +411,7 @@ void SAL_CALL OXReportControllerObserver::elementReplaced(const container::Conta
//------------------------------------------------------------------------------
void SAL_CALL OXReportControllerObserver::elementRemoved(const container::ContainerEvent& evt) throw(uno::RuntimeException)
{
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
uno::Reference< uno::XInterface > xIface( evt.Element, uno::UNO_QUERY );
@@ -460,3 +426,4 @@ void SAL_CALL OXReportControllerObserver::elementRemoved(const container::Contai
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/ReportRuler.cxx b/reportdesign/source/ui/report/ReportRuler.cxx
index 9c3acf83f..ce38a4fd9 100644
--- a/reportdesign/source/ui/report/ReportRuler.cxx
+++ b/reportdesign/source/ui/report/ReportRuler.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,3 +62,5 @@ void OReportRuler::SetGridVisible(sal_Bool _bVisible)
//==============================================================================
} // rptui
//==============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index b7ee8ea8d..4abc3c68d 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -1,7 +1,8 @@
+/* -*- 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
@@ -84,7 +85,7 @@ sal_Int32 lcl_getOverlappedControlColor(/*const uno::Reference <lang::XMultiServ
}
//------------------------------------------------------------------------------
DBG_NAME( rpt_OReportSection )
-OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< report::XSection >& _xSection)
+OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< report::XSection >& _xSection)
: Window(_pParent,WB_DIALOGCONTROL)
, ::comphelper::OPropertyChangeListener(m_aMutex)
, DropTargetHelper(this)
@@ -107,39 +108,37 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re
SetParentClipMode( PARENTCLIPMODE_CLIP );
EnableChildTransparentMode( sal_False );
SetPaintTransparent( sal_False );
-
+
try
{
fill();
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception catched!");
+ OSL_FAIL("Exception catched!");
}
m_pFunc.reset(new DlgEdFuncSelect( this ));
- m_pFunc->setOverlappedControlColor(lcl_getOverlappedControlColor( /* m_pParent->getViewsWindow()->getView()->getReportView()->getController().getORB() */ ) );
+ m_pFunc->setOverlappedControlColor(lcl_getOverlappedControlColor() );
}
//------------------------------------------------------------------------------
OReportSection::~OReportSection()
{
DBG_DTOR( rpt_OReportSection,NULL);
m_pPage = NULL;
- //m_pModel->GetUndoEnv().RemoveSection(m_xSection.get());
if ( m_pMulti.is() )
m_pMulti->dispose();
-
+
if ( m_pReportListener.is() )
m_pReportListener->dispose();
m_pFunc = ::std::auto_ptr<DlgEdFunc>();
-
+
{
::std::auto_ptr<OSectionView> aTemp( m_pView);
if ( m_pView )
m_pView->EndListening( *m_pModel );
m_pView = NULL;
}
- /*m_pModel->DeletePage(m_pPage->GetPageNum());*/
}
//------------------------------------------------------------------------------
void OReportSection::Paint( const Rectangle& rRect )
@@ -220,7 +219,7 @@ void OReportSection::fill()
const Fraction aY(aGridSizeFine.B());
m_pView->SetSnapGridWidth(aX, aY);
- m_pView->SetGridSnap( pDesignView->isGridSnap() );
+ m_pView->SetGridSnap( pDesignView->isGridSnap() );
m_pView->SetGridFront( sal_False );
m_pView->SetDragStripes( sal_True );
m_pView->SetPageVisible();
@@ -241,12 +240,9 @@ void OReportSection::fill()
m_pView->SetDesignMode( sal_True );
m_pView->StartListening( *m_pModel );
- /*Resize();*/
m_pPage->SetSize( Size( getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width,5*m_xSection->getHeight()) );
const Size aPageSize = m_pPage->GetSize();
m_pView->SetWorkArea( Rectangle( Point( nLeftMargin, 0), Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) );
-
- //SetBackground( Wallpaper( COL_BLUE ));
}
// -----------------------------------------------------------------------------
void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyCopiedObjects,bool _bForce)
@@ -278,7 +274,7 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC
SvxShape* pShape = SvxShape::getImplementation( *pCopiesIter );
SdrObject* pObject = pShape ? pShape->GetSdrObject() : NULL;
if ( pObject )
- {
+ {
SdrObject* pNeuObj = pObject->Clone();
pNeuObj->SetPage( m_pPage );
@@ -297,7 +293,6 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC
{
aRet.Move(0,aRet.getHeight()+1);
pNeuObj->SetLogicRect(aRet);
- //(*pCopiesIter)->setPositionY(aRet.Top());
}
}
m_pView->AddUndo( m_pView->GetModel()->GetSdrUndoFactory().CreateUndoNewObject( *pNeuObj ) );
@@ -309,7 +304,7 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught while pasting a new object!");
+ OSL_FAIL("Exception caught while pasting a new object!");
}
if ( !_bForce )
break;
@@ -342,23 +337,20 @@ void OReportSection::SetMode( DlgEdMode eNewMode )
m_pFunc->setOverlappedControlColor(lcl_getOverlappedControlColor( ) );
m_pModel->SetReadOnly(eNewMode == RPTUI_READONLY);
m_eMode = eNewMode;
- }
+ }
}
// -----------------------------------------------------------------------------
void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedObjects)
-{
+{
Copy(_rAllreadyCopiedObjects,false);
}
//----------------------------------------------------------------------------
void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedObjects,bool _bEraseAnddNoClone)
-{
+{
OSL_ENSURE(m_xSection.is(),"Why is the section here NULL!");
if( !m_pView->AreObjectsMarked() || !m_xSection.is() )
return;
- // stop all drawing actions
- //m_pView->BrkAction();
-
// insert control models of marked objects into clipboard dialog model
const SdrMarkList& rMarkedList = m_pView->GetMarkedObjectList();
const sal_uLong nMark = rMarkedList.GetMarkCount();
@@ -367,7 +359,7 @@ void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedOb
aCopies.reserve(nMark);
SdrUndoFactory& rUndo = m_pView->GetModel()->GetSdrUndoFactory();
-
+
for( sal_uLong i = nMark; i > 0; )
{
--i;
@@ -388,10 +380,10 @@ void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedOb
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Can't copy report elements!");
+ OSL_FAIL("Can't copy report elements!");
}
}
- } // for( sal_uLong i = 0; i < nMark; i++ )
+ }
if ( !aCopies.empty() )
{
@@ -440,16 +432,20 @@ void OReportSection::SelectAll(const sal_uInt16 _nObjectType)
{
m_pView->UnmarkAll();
SdrObjListIter aIter(*m_pPage,IM_DEEPNOGROUPS);
- SdrObject* pObjIter = NULL;
+ SdrObject* pObjIter = NULL;
while( (pObjIter = aIter.Next()) != NULL )
{
if ( pObjIter->GetObjIdentifier() == _nObjectType )
m_pView->MarkObj( pObjIter, m_pView->GetSdrPageView() );
}
- }
+ }
}
}
-void lcl_insertMenuItemImages(PopupMenu& rContextMenu,OReportController& rController,const uno::Reference< report::XReportDefinition>& _xReportDefinition,uno::Reference<frame::XFrame>& _rFrame,sal_Bool _bHiContrast)
+void lcl_insertMenuItemImages(
+ PopupMenu& rContextMenu,
+ OReportController& rController,
+ const uno::Reference< report::XReportDefinition>& _xReportDefinition,uno::Reference<frame::XFrame>& _rFrame
+)
{
const sal_uInt16 nCount = rContextMenu.GetItemCount();
for (sal_uInt16 i = 0; i < nCount; ++i)
@@ -460,12 +456,12 @@ void lcl_insertMenuItemImages(PopupMenu& rContextMenu,OReportController& rContro
PopupMenu* pPopupMenu = rContextMenu.GetPopupMenu( nId );
if ( pPopupMenu )
{
- lcl_insertMenuItemImages(*pPopupMenu,rController,_xReportDefinition,_rFrame,_bHiContrast);
+ lcl_insertMenuItemImages(*pPopupMenu,rController,_xReportDefinition,_rFrame);
}
else
{
const ::rtl::OUString sCommand = rContextMenu.GetItemCommand(nId);
- rContextMenu.SetItemImage(nId,framework::GetImageFromURL(_rFrame,sCommand,sal_False,_bHiContrast));
+ 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));
@@ -480,7 +476,7 @@ void lcl_insertMenuItemImages(PopupMenu& rContextMenu,OReportController& rContro
rContextMenu.CheckItem(nId,rController.isCommandChecked(nId));
rContextMenu.EnableItem(nId,rController.isCommandEnabled(nId));
}
- } // for (sal_uInt16 i = 0; i < nCount; ++i)
+ }
}
//----------------------------------------------------------------------------
void OReportSection::Command( const CommandEvent& _rCEvt )
@@ -490,14 +486,12 @@ void OReportSection::Command( const CommandEvent& _rCEvt )
{
case COMMAND_CONTEXTMENU:
{
- const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- sal_Bool bHiContrast = rSettings.GetHighContrastMode();
OReportController& rController = m_pParent->getViewsWindow()->getView()->getReportView()->getController();
uno::Reference<frame::XFrame> xFrame = rController.getFrame();
- PopupMenu aContextMenu( ModuleRes( RID_MENU_REPORT ) );
+ PopupMenu aContextMenu( ModuleRes( RID_MENU_REPORT ) );
uno::Reference< report::XReportDefinition> xReportDefinition = getSection()->getReportDefinition();
-
- lcl_insertMenuItemImages(aContextMenu,rController,xReportDefinition,xFrame,bHiContrast);
+
+ lcl_insertMenuItemImages(aContextMenu,rController,xReportDefinition,xFrame);
Point aPos = _rCEvt.GetMousePosPixel();
m_pView->EndAction();
@@ -536,7 +530,7 @@ void OReportSection::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
const sal_Int32 nLeftMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN);
const sal_Int32 nRightMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN);
const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width;
-
+
if ( _rEvent.PropertyName == PROPERTY_LEFTMARGIN )
{
m_pPage->SetLftBorder(nLeftMargin);
@@ -556,7 +550,7 @@ void OReportSection::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
impl_adjustObjectSizePosition(nPaperWidth,nLeftMargin,nRightMargin);
m_pParent->Invalidate(INVALIDATE_UPDATE | INVALIDATE_TRANSPARENT);
}
- }
+ }
}
void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_Int32 i_nLeftMargin,sal_Int32 i_nRightMargin)
{
@@ -597,7 +591,7 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I
}
if ( aPos.Y < 0 )
aPos.Y = 0;
- if ( bChanged )
+ if ( bChanged )
{
xReportComponent->setPosition(aPos);
correctOverlapping(pObject,*this,false);
@@ -611,11 +605,11 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I
}
pBase->StartListening();
}
- } // for (sal_Int32 i = 0; i < nCount; ++i)
+ }
}
catch(uno::Exception)
{
- OSL_ENSURE(0,"Exception caught: OReportSection::_propertyChanged(");
+ OSL_FAIL("Exception caught: OReportSection::_propertyChanged(");
}
}
//------------------------------------------------------------------------------
@@ -632,7 +626,7 @@ void OReportSection::deactivateOle()
// -----------------------------------------------------------------------------
void OReportSection::createDefault(const ::rtl::OUString& _sType)
{
- SdrObject* pObj = m_pView->GetCreateObj();//rMarkList.GetMark(0)->GetObj();
+ SdrObject* pObj = m_pView->GetCreateObj();
if ( !pObj )
return;
createDefault(_sType,pObj);
@@ -779,7 +773,7 @@ sal_Int8 OReportSection::AcceptDrop( const AcceptDropEvent& _rEvt )
if ( ::svx::OMultiColumnTransferable::canExtractDescriptor(rFlavors)
|| ::svx::OColumnTransferable::canExtractColumnDescriptor(rFlavors, CTF_FIELD_DESCRIPTOR | CTF_CONTROL_EXCHANGE | CTF_COLUMN_DESCRIPTOR) )
return _rEvt.mnAction;
-
+
const sal_Int8 nDropOption = ( OReportExchange::canExtract(rFlavors) ) ? DND_ACTION_COPYMOVE : DND_ACTION_NONE;
return nDropOption;
@@ -807,8 +801,7 @@ sal_Int8 OReportSection::ExecuteDrop( const ExecuteDropEvent& _rEvt )
nDropOption = DND_ACTION_COPYMOVE;
m_pParent->getViewsWindow()->BrkAction();
m_pParent->getViewsWindow()->unmarkAllObjects(m_pView);
- //m_pParent->getViewsWindow()->getView()->setMarked(m_pView,sal_True);
- } // if ( OReportExchange::canExtract(rFlavors) )
+ }
else if ( bMultipleFormat
|| ::svx::OColumnTransferable::canExtractColumnDescriptor(rFlavors, CTF_FIELD_DESCRIPTOR | CTF_CONTROL_EXCHANGE | CTF_COLUMN_DESCRIPTOR) )
{
@@ -827,13 +820,13 @@ sal_Int8 OReportSection::ExecuteDrop( const ExecuteDropEvent& _rEvt )
if ( !bMultipleFormat )
{
::svx::ODataAccessDescriptor aDescriptor = ::svx::OColumnTransferable::extractColumnDescriptor(aDropped);
-
+
aValues.realloc(1);
aValues[0].Value <<= aDescriptor.createPropertyValueSequence();
- } // if ( !bMultipleFormat )
- else
+ }
+ else
aValues = ::svx::OMultiColumnTransferable::extractDescriptor(aDropped);
-
+
beans::PropertyValue* pIter = aValues.getArray();
beans::PropertyValue* pEnd = pIter + aValues.getLength();
for(;pIter != pEnd; ++pIter)
@@ -846,7 +839,7 @@ sal_Int8 OReportSection::ExecuteDrop( const ExecuteDropEvent& _rEvt )
aCurrent.realloc(nLength + 3);
aCurrent[nLength].Name = PROPERTY_POSITION;
aCurrent[nLength++].Value <<= AWTPoint(aDropPos);
- // give also the DND Action (Shift|Ctrl) Key to really say what we want
+ // give also the DND Action (Shift|Ctrl) Key to really say what we want
aCurrent[nLength].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DNDAction"));
aCurrent[nLength++].Value <<= _rEvt.mnAction;
@@ -877,3 +870,5 @@ bool OReportSection::isUiActive() const
// =============================================================================
}
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx
index 721b45800..193c36da7 100644
--- a/reportdesign/source/ui/report/ReportWindow.cxx
+++ b/reportdesign/source/ui/report/ReportWindow.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -126,7 +127,6 @@ void OReportWindow::removeSection(sal_uInt16 _nPosition)
m_aViewsWindow.removeSection(_nPosition);
m_pParent->setTotalSize(GetTotalWidth(),GetTotalHeight());
m_aViewsWindow.Invalidate(INVALIDATE_TRANSPARENT);
- //Resize();
}
//----------------------------------------------------------------------------
void OReportWindow::addSection(const uno::Reference< report::XSection >& _xSection,const ::rtl::OUString& _sColorEntry,sal_uInt16 _nPosition)
@@ -167,7 +167,7 @@ sal_Int32 OReportWindow::GetTotalWidth() const
{
Fraction aStartWidth(long(REPORT_ENDMARKER_WIDTH + REPORT_STARTMARKER_WIDTH ));
const Fraction aZoom(m_pView->getController().getZoomValue(),100);
- aStartWidth *= aZoom; // m_aViewsWindow.GetMapMode().GetScaleX();;
+ aStartWidth *= aZoom;
const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(m_pView->getController().getReportDefinition(),PROPERTY_PAPERSIZE).Width;
Fraction aPaperWidth(nPaperWidth,1);
aPaperWidth *= aZoom;
@@ -252,7 +252,6 @@ void OReportWindow::ScrollChildren(const Point& _aThumbPos)
m_aHRuler.Scroll(-(aOrg.X() + _aThumbPos.X()),0);
}
- /*const Point aPos(PixelToLogic(_aThumbPos));*/
m_aViewsWindow.scrollChildren(_aThumbPos);
}
//----------------------------------------------------------------------------
@@ -390,7 +389,6 @@ void OReportWindow::zoom(const Fraction& _aZoom)
m_aHRuler.SetZoom(_aZoom);
m_aHRuler.Invalidate();
- //setZoomFactor(_aZoom,*this); // if this will be include the H - ruler has the wrong size
m_aViewsWindow.zoom(_aZoom);
notifySizeChanged();
@@ -450,9 +448,10 @@ void OReportWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
Resize();
m_aViewsWindow.Resize();
static sal_Int32 nIn = INVALIDATE_TRANSPARENT;
- Invalidate(nIn);
+ Invalidate(nIn);
}
//==================================================================
} //rptui
//==================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx
index 9b518fccc..4de4a242f 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -92,7 +93,6 @@ void OScrollWindowHelper::impl_initScrollBar( ScrollBar& _rScrollBar ) const
aStyle.SetDragFullOptions( aStyle.GetDragFullOptions() | DRAGFULL_OPTION_SCROLL ); // live scrolling
aSettings.SetStyleSettings( aStyle );
_rScrollBar.SetSettings( aSettings );
- //_rScrollBar.SetMapMode( MapMode( MAP_100TH_MM ) );
_rScrollBar.SetScrollHdl( LINK( this, OScrollWindowHelper, ScrollHdl ) );
_rScrollBar.SetLineSize( SCR_LINE_SIZE );
@@ -358,7 +358,6 @@ void OScrollWindowHelper::alignMarkedObjects(sal_Int32 _nControlModification,boo
void OScrollWindowHelper::ImplInitSettings()
{
SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor() ));
- // SetBackground( Wallpaper( COL_LIGHTRED ));
SetFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
SetTextFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
}
@@ -414,3 +413,5 @@ sal_uInt16 OScrollWindowHelper::getZoomFactor(SvxZoomType _eType) const
//==============================================================================
} // rptui
//==============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx
index 93bdceae3..e8a9de3ca 100644
--- a/reportdesign/source/ui/report/SectionView.cxx
+++ b/reportdesign/source/ui/report/SectionView.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,7 +77,6 @@ void OSectionView::MarkListHasChanged()
if ( m_pReportWindow && m_pSectionWindow && !m_pSectionWindow->getPage()->getSpecialMode() )
{
- //m_pReportWindow->unmarkAllObjects(this); // WHY
DlgEdHint aHint( RPTUI_HINT_SELECTIONCHANGED );
m_pReportWindow->getReportView()->Broadcast( aHint );
m_pReportWindow->getReportView()->UpdatePropertyBrowserDelayed(*this);
@@ -210,7 +210,7 @@ void OSectionView::SetMarkedToLayer( SdrLayerID _nLayerNo )
EndUndo();
- // #84073# check mark list now instead of later in a timer
+ // check mark list now instead of later in a timer
CheckMarked();
MarkListHasChanged();
}
@@ -230,7 +230,7 @@ bool OSectionView::OnlyShapesMarked() const
{
break;
}
- } // for (sal_uLong i=0; i<nCount; i++)
+ }
return i == nCount;
}
@@ -273,3 +273,5 @@ short OSectionView::GetLayerIdOfMarkedObjects() const
//============================================================================
} // rptui
//============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx
index f59080714..1516d9043 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -161,7 +162,7 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
m_aStartMarker.Invalidate(INVALIDATE_CHILDREN);
}
}
- } // if ( xSection.is() )
+ }
else if ( _rEvent.PropertyName.equals(PROPERTY_EXPRESSION) )
{
uno::Reference< report::XGroup > xGroup(_rEvent.Source,uno::UNO_QUERY);
@@ -181,7 +182,7 @@ bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReport
String sTitle = String(ModuleRes(_nResId));
m_aStartMarker.setTitle(sTitle);
m_aStartMarker.Invalidate(INVALIDATE_CHILDREN);
- } // if ( bRet )
+ }
return bRet;
}
// -----------------------------------------------------------------------------
@@ -202,7 +203,7 @@ bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>&
sTitle.SearchAndReplace('#',sExpression);
m_aStartMarker.setTitle(sTitle);
m_aStartMarker.Invalidate(INVALIDATE_CHILDREN);
- } // if ( _pIsSectionOn(&aGroupHelper) )
+ }
return bRet;
}
//------------------------------------------------------------------------------
@@ -322,8 +323,7 @@ void OSectionWindow::zoom(const Fraction& _aZoom)
setZoomFactor(_aZoom,m_aReportSection);
setZoomFactor(_aZoom,m_aSplitter);
setZoomFactor(_aZoom,m_aEndMarker);
- //Resize();
- Invalidate(/*INVALIDATE_UPDATE |*/ /* | INVALIDATE_TRANSPARENT *//*INVALIDATE_NOCHILDREN*/);
+ Invalidate();
}
//-----------------------------------------------------------------------------
IMPL_LINK( OSectionWindow, StartSplitHdl, Splitter*, )
@@ -347,22 +347,19 @@ IMPL_LINK( OSectionWindow, SplitHdl, Splitter*, _pSplitter )
}
sal_Int32 nSplitPos = _pSplitter->GetSplitPosPixel();
- const Point aPos = _pSplitter->GetPosPixel();
-
const uno::Reference< report::XSection> xSection = m_aReportSection.getSection();
nSplitPos = m_aSplitter.PixelToLogic(Size(0,nSplitPos)).Height();
- // nSplitPos = xSection->getHeight() + m_aSplitter.PixelToLogic(Size(0,nSplitPos - aPos.Y() )).Height();
const sal_Int32 nCount = xSection->getCount();
for (sal_Int32 i = 0; i < nCount; ++i)
{
uno::Reference<report::XReportComponent> xReportComponent(xSection->getByIndex(i),uno::UNO_QUERY);
- if ( xReportComponent.is() /*&& nSplitPos < (xReportComponent->getPositionY() + xReportComponent->getHeight())*/ )
+ if ( xReportComponent.is() )
{
nSplitPos = ::std::max(nSplitPos,xReportComponent->getPositionY() + xReportComponent->getHeight());
}
- } // for (sal_Int32 i = 0; i < nCount; ++i)
+ }
if ( nSplitPos < 0 )
nSplitPos = 0;
@@ -375,7 +372,7 @@ IMPL_LINK( OSectionWindow, SplitHdl, Splitter*, _pSplitter )
// -----------------------------------------------------------------------------
void lcl_scroll(Window& _rWindow,const Point& _aDelta)
{
- _rWindow.Scroll(-_aDelta.X(),-_aDelta.Y()/*,SCROLL_CHILDREN*//*|SCROLL_CLIP*/);
+ _rWindow.Scroll(-_aDelta.X(),-_aDelta.Y());
_rWindow.Invalidate(INVALIDATE_TRANSPARENT);
}
// -----------------------------------------------------------------------------
@@ -398,11 +395,9 @@ void OSectionWindow::scrollChildren(long _nX)
const Point aNew = aMapMode.GetOrigin();
const Point aDiff = aOld - aNew;
{
- //OWindowPositionCorrector aCorrector(&m_aReportSection,-aDelta.Width(),0);
lcl_scroll(m_aReportSection,aDiff);
}
- //lcl_setOrigin(m_aEndMarker,_nDeltaX, 0);
lcl_scroll(m_aEndMarker,m_aEndMarker.PixelToLogic(Point(_nX,0)));
lcl_setOrigin(m_aSplitter,_nX, 0);
@@ -412,3 +407,4 @@ void OSectionWindow::scrollChildren(long _nX)
} // rptui
//==============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index bdcb75e1c..51a08c520 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,8 +51,6 @@ namespace rptui
Image* OStartMarker::s_pDefCollapsed = NULL;
Image* OStartMarker::s_pDefExpanded = NULL;
-Image* OStartMarker::s_pDefCollapsedHC = NULL;
-Image* OStartMarker::s_pDefExpandedHC = NULL;
oslInterlockedCount OStartMarker::s_nImageRefCount = 0;
DBG_NAME( rpt_OStartMarker )
@@ -96,9 +95,7 @@ OStartMarker::~OStartMarker()
{
DELETEZ(s_pDefCollapsed);
DELETEZ(s_pDefExpanded);
- DELETEZ(s_pDefCollapsedHC);
- DELETEZ(s_pDefExpandedHC);
- } // if ( osl_decrementInterlockedCount(&s_nImageRefCount) == 0 )
+ }
}
// -----------------------------------------------------------------------------
sal_Int32 OStartMarker::getMinHeight() const
@@ -111,7 +108,6 @@ sal_Int32 OStartMarker::getMinHeight() const
void OStartMarker::Paint( const Rectangle& rRect )
{
(void)rRect;
- //SetUpdateMode(sal_False);
Size aSize = GetOutputSizePixel();
long nSize = aSize.Width();
const long nCornerWidth = long(CORNER_SPACE * (double)GetMapMode().GetScaleX());
@@ -123,10 +119,10 @@ void OStartMarker::Paint( const Rectangle& rRect )
else
{
const long nVRulerWidth = m_aVRuler.GetSizePixel().Width();
- nSize = aSize.Width() - nVRulerWidth/* - m_nCornerSize*/;
+ nSize = aSize.Width() - nVRulerWidth;
aSize.Width() += nCornerWidth;
SetClipRegion(Region(PixelToLogic(Rectangle(Point(),Size(nSize,aSize.Height())))));
- }
+ }
const Point aGcc3WorkaroundTemporary;
Rectangle aWholeRect(aGcc3WorkaroundTemporary,aSize);
@@ -195,11 +191,7 @@ void OStartMarker::MouseButtonUp( const MouseEvent& rMEvt )
// -----------------------------------------------------------------------------
void OStartMarker::changeImage()
{
- Image* pImage = NULL;
- if ( GetSettings().GetStyleSettings().GetHighContrastMode() )
- pImage = m_bCollapsed ? s_pDefCollapsedHC : s_pDefExpandedHC;
- else
- pImage = m_bCollapsed ? s_pDefCollapsed : s_pDefExpanded;
+ Image* pImage = m_bCollapsed ? s_pDefCollapsed : s_pDefExpanded;
m_aImage.SetImage(*pImage);
}
// -----------------------------------------------------------------------
@@ -208,20 +200,10 @@ void OStartMarker::initDefaultNodeImages()
if ( !s_pDefCollapsed )
{
s_pDefCollapsed = new Image( ModuleRes( RID_IMG_TREENODE_COLLAPSED ) );
- s_pDefCollapsedHC = new Image( ModuleRes( RID_IMG_TREENODE_COLLAPSED_HC ) );
s_pDefExpanded = new Image( ModuleRes( RID_IMG_TREENODE_EXPANDED ) );
- s_pDefExpandedHC = new Image( ModuleRes( RID_IMG_TREENODE_EXPANDED_HC ) );
}
- Image* pImage = NULL;
- if ( GetSettings().GetStyleSettings().GetHighContrastMode() )
- {
- pImage = m_bCollapsed ? s_pDefCollapsedHC : s_pDefExpandedHC;
- }
- else
- {
- pImage = m_bCollapsed ? s_pDefCollapsed : s_pDefExpanded;
- }
+ Image* pImage = m_bCollapsed ? s_pDefCollapsed : s_pDefExpanded;
m_aImage.SetImage(*pImage);
m_aImage.SetMouseTransparent(sal_True);
m_aImage.SetBackground();
@@ -231,7 +213,6 @@ void OStartMarker::initDefaultNodeImages()
// -----------------------------------------------------------------------
void OStartMarker::ImplInitSettings()
{
- // SetBackground( Wallpaper( COL_YELLOW ));
SetBackground( );
SetFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() );
setColor();
@@ -258,7 +239,7 @@ void OStartMarker::Resize()
Point aPos(aImageSize.Width() + (long)(aExtraWidth + aExtraWidth), aExtraWidth);
const long nHeight = ::std::max<sal_Int32>(nOutputHeight - 2*aPos.Y(),LogicToPixel(Size(0,m_aText.GetTextHeight())).Height());
m_aText.SetPosSizePixel(aPos,Size(aRulerPos.X() - aPos.X(),nHeight));
-
+
aPos.X() = aExtraWidth;
aPos.Y() += static_cast<sal_Int32>((LogicToPixel(Size(0,m_aText.GetTextHeight())).Height() - aImageSize.Height()) * 0.5) ;
m_aImage.SetPosSizePixel(aPos,aImageSize);
@@ -293,7 +274,6 @@ void OStartMarker::RequestHelp( const HelpEvent& rHEvt )
{
// Hilfe anzeigen
Rectangle aItemRect(rHEvt.GetMousePosPixel(),Size(GetSizePixel().Width(),getMinHeight()));
- //aItemRect = LogicToPixel( aItemRect );
Point aPt = OutputToScreenPixel( aItemRect.TopLeft() );
aItemRect.Left() = aPt.X();
aItemRect.Top() = aPt.Y();
@@ -326,3 +306,5 @@ void OStartMarker::zoom(const Fraction& _aZoom)
// =======================================================================
}
// =======================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 421817dcc..04169d1a7 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,6 +57,7 @@
#include <toolkit/helper/convert.hxx>
#include <algorithm>
#include <numeric>
+#include <o3tl/compat_functional.hxx>
namespace rptui
{
@@ -239,16 +241,16 @@ void OViewsWindow::resize(const OSectionWindow& _rSectionWindow)
{
aStartPoint = pSectionWindow->GetPosPixel();
bSet = true;
- } // if ( pSectionWindow.get() == &_rSectionWindow )
+ }
if ( bSet )
{
impl_resizeSectionWindow(*pSectionWindow.get(),aStartPoint,bSet);
static sal_Int32 nIn = INVALIDATE_UPDATE | INVALIDATE_TRANSPARENT;
- pSectionWindow->getStartMarker().Invalidate( nIn ); // INVALIDATE_NOERASE |INVALIDATE_NOCHILDREN| INVALIDATE_TRANSPARENT
+ pSectionWindow->getStartMarker().Invalidate( nIn ); // INVALIDATE_NOERASE |INVALIDATE_NOCHILDREN| INVALIDATE_TRANSPARENT
pSectionWindow->getEndMarker().Invalidate( nIn );
}
- } // for (;aIter != aEnd ; ++aIter,++nPos)
+ }
Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH));
aStartWidth *= GetMapMode().GetScaleX();
Size aOut = GetOutputSizePixel();
@@ -268,11 +270,11 @@ void OViewsWindow::Resize()
Point aStartPoint(0,-aOffset.Y());
TSectionsMap::iterator aIter = m_aSections.begin();
TSectionsMap::iterator aEnd = m_aSections.end();
- for (sal_uInt16 nPos=0;aIter != aEnd ; ++aIter,++nPos)
+ for (;aIter != aEnd ; ++aIter)
{
const ::boost::shared_ptr<OSectionWindow> pSectionWindow = (*aIter);
impl_resizeSectionWindow(*pSectionWindow.get(),aStartPoint,true);
- } // for (;aIter != aEnd ; ++aIter)
+ }
}
}
// -----------------------------------------------------------------------------
@@ -331,15 +333,15 @@ void OViewsWindow::removeSection(sal_uInt16 _nPosition)
m_aSections.erase(aPos);
Resize();
- } // if ( _nPosition < m_aSections.size() )
+ }
}
//------------------------------------------------------------------------------
void OViewsWindow::toggleGrid(sal_Bool _bVisible)
{
::std::for_each(m_aSections.begin(),m_aSections.end(),
- ::std::compose1(::boost::bind(&OReportSection::SetGridVisible,_1,_bVisible),TReportPairHelper()));
+ ::o3tl::compose1(::boost::bind(&OReportSection::SetGridVisible,_1,_bVisible),TReportPairHelper()));
::std::for_each(m_aSections.begin(),m_aSections.end(),
- ::std::compose1(::boost::bind(&OReportSection::Window::Invalidate,_1,INVALIDATE_NOERASE),TReportPairHelper()));
+ ::o3tl::compose1(::boost::bind(&OReportSection::Window::Invalidate,_1,INVALIDATE_NOERASE),TReportPairHelper()));
}
//------------------------------------------------------------------------------
sal_Int32 OViewsWindow::getTotalHeight() const
@@ -378,7 +380,7 @@ rtl::OUString OViewsWindow::GetInsertObjString() const
void OViewsWindow::SetMode( DlgEdMode eNewMode )
{
::std::for_each(m_aSections.begin(),m_aSections.end(),
- ::std::compose1(::boost::bind(&OReportSection::SetMode,_1,eNewMode),TReportPairHelper()));
+ ::o3tl::compose1(::boost::bind(&OReportSection::SetMode,_1,eNewMode),TReportPairHelper()));
}
//----------------------------------------------------------------------------
sal_Bool OViewsWindow::HasSelection() const
@@ -394,7 +396,7 @@ void OViewsWindow::Delete()
{
m_bInUnmark = sal_True;
::std::for_each(m_aSections.begin(),m_aSections.end(),
- ::std::compose1(::boost::mem_fn(&OReportSection::Delete),TReportPairHelper()));
+ ::o3tl::compose1(::boost::mem_fn(&OReportSection::Delete),TReportPairHelper()));
m_bInUnmark = sal_False;
}
//----------------------------------------------------------------------------
@@ -402,12 +404,8 @@ void OViewsWindow::Copy()
{
uno::Sequence< beans::NamedValue > aAllreadyCopiedObjects;
::std::for_each(m_aSections.begin(),m_aSections.end(),
- ::std::compose1(::boost::bind(&OReportSection::Copy,_1,::boost::ref(aAllreadyCopiedObjects)),TReportPairHelper()));
+ ::o3tl::compose1(::boost::bind(&OReportSection::Copy,_1,::boost::ref(aAllreadyCopiedObjects)),TReportPairHelper()));
- //TSectionsMap::iterator aIter = m_aSections.begin();
- //TSectionsMap::iterator aEnd = m_aSections.end();
- //for (; aIter != aEnd; ++aIter)
- // (*aIter)->getReportSection().Copy(aAllreadyCopiedObjects);
OReportExchange* pCopy = new OReportExchange(aAllreadyCopiedObjects);
uno::Reference< datatransfer::XTransferable> aEnsureDelete = pCopy;
pCopy->CopyToClipboard(this);
@@ -419,7 +417,7 @@ void OViewsWindow::Paste()
OReportExchange::TSectionElements aCopies = OReportExchange::extractCopies(aTransferData);
if ( aCopies.getLength() > 1 )
::std::for_each(m_aSections.begin(),m_aSections.end(),
- ::std::compose1(::boost::bind(&OReportSection::Paste,_1,aCopies,false),TReportPairHelper()));
+ ::o3tl::compose1(::boost::bind(&OReportSection::Paste,_1,aCopies,false),TReportPairHelper()));
else
{
::boost::shared_ptr<OSectionWindow> pMarkedSection = getMarkedSection();
@@ -498,9 +496,9 @@ void OViewsWindow::Paste()
}
break;
}
- } // ( (*aIter).second->isMarked() )
+ }
++nCurrentPosition;
- } // for (; aIter != aEnd ; ++aIter)
+ }
return pRet;
}
@@ -521,7 +519,7 @@ void OViewsWindow::SelectAll(const sal_uInt16 _nObjectType)
{
m_bInUnmark = sal_True;
::std::for_each(m_aSections.begin(),m_aSections.end(),
- ::std::compose1(::boost::bind(::boost::mem_fn(&OReportSection::SelectAll),_1,_nObjectType),TReportPairHelper()));
+ ::o3tl::compose1(::boost::bind(::boost::mem_fn(&OReportSection::SelectAll),_1,_nObjectType),TReportPairHelper()));
m_bInUnmark = sal_False;
}
//-----------------------------------------------------------------------------
@@ -539,29 +537,10 @@ void OViewsWindow::unmarkAllObjects(OSectionView* _pSectionView)
(*aIter)->getReportSection().deactivateOle();
(*aIter)->getReportSection().getSectionView().UnmarkAllObj();
}
- } // for (; aIter != aEnd ; ++aIter)
+ }
m_bInUnmark = sal_False;
}
}
-//-----------------------------------------------------------------------------
-/*
-::boost::shared_ptr<OSectionWindow> OViewsWindow::getReportSection(const uno::Reference< report::XSection >& _xSection)
-{
- OSL_ENSURE(_xSection.is(),"Section is NULL!");
- ::boost::shared_ptr<OSectionWindow> pRet;
- TSectionsMap::iterator aIter = m_aSections.begin();
- TSectionsMap::iterator aEnd = m_aSections.end();
- for (; aIter != aEnd ; ++aIter)
- {
- if ( (*aIter)->getReportSection().getSection() == _xSection )
- {
- pRet = (*aIter);
- break;
- } // if ( (*aIter)->getSection() == _xSection )
- } // for (; aIter != aEnd ; ++aIter)
- return pRet;
-}
-*/
// -----------------------------------------------------------------------
void OViewsWindow::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32)
{
@@ -583,9 +562,9 @@ void OViewsWindow::MouseButtonDown( const MouseEvent& rMEvt )
void OViewsWindow::showRuler(sal_Bool _bShow)
{
::std::for_each(m_aSections.begin(),m_aSections.end(),
- ::std::compose1(::boost::bind(&OStartMarker::showRuler,_1,_bShow),TStartMarkerHelper()));
+ ::o3tl::compose1(::boost::bind(&OStartMarker::showRuler,_1,_bShow),TStartMarkerHelper()));
::std::for_each(m_aSections.begin(),m_aSections.end(),
- ::std::compose1(::boost::bind(&OStartMarker::Window::Invalidate,_1,sal_uInt16(INVALIDATE_NOERASE)),TStartMarkerHelper()));
+ ::o3tl::compose1(::boost::bind(&OStartMarker::Window::Invalidate, _1, sal_uInt16(INVALIDATE_NOERASE)), TStartMarkerHelper()));
}
//----------------------------------------------------------------------------
void OViewsWindow::MouseButtonUp( const MouseEvent& rMEvt )
@@ -618,7 +597,6 @@ sal_Bool OViewsWindow::handleKeyEvent(const KeyEvent& _rEvent)
TSectionsMap::iterator aEnd = m_aSections.end();
for (;aIter != aEnd ; ++aIter)
{
- //if ( (*aIter).getReportSection().getSectionView().->AreObjectsMarked() )
if ( (*aIter)->getStartMarker().isMarked() )
{
bRet = (*aIter)->getReportSection().handleKeyEvent(_rEvent);
@@ -915,10 +893,8 @@ void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAli
{
if ( _nControlModification == ControlModification::WIDTH_SMALLEST || _nControlModification == ControlModification::WIDTH_GREATEST )
pObjBase->getReportComponent()->setSize(awt::Size(nXMov,aObjRect.getHeight()));
- //pObj->Resize(aObjRect.TopLeft(),Fraction(nXMov,aObjRect.getWidth()),Fraction(1,1));
else if ( _nControlModification == ControlModification::HEIGHT_GREATEST || _nControlModification == ControlModification::HEIGHT_SMALLEST )
pObjBase->getReportComponent()->setSize(awt::Size(aObjRect.getWidth(),nYMov));
- //pObj->Resize(aObjRect.TopLeft(),Fraction(1,1),Fraction(nYMov,aObjRect.getHeight()));
}
}
break;
@@ -1059,29 +1035,22 @@ void OViewsWindow::BegDragObj_createInvisibleObjectAtPosition(const Rectangle& _
if ( &rView != &_rSection )
{
-// SdrRectObj *pNewObj = new SdrRectObj(OBJ_RECT, _aRect);
-// SdrObject *pNewObj = new SdrUnoObj(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Temp Label")));
SdrObject *pNewObj = new SdrUnoObj(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.FixedText")));
if (pNewObj)
{
pNewObj->SetLogicRect(_aRect);
- // pNewObj->SetSize(_aRect.GetSize());
- // pNewObj->Move(Size(_aRect.Left(), _aRect.Top()));
pNewObj->Move(Size(0, aNewPos.Y()));
sal_Bool bChanged = rView.GetModel()->IsChanged();
rReportSection.getPage()->InsertObject(pNewObj);
rView.GetModel()->SetChanged(bChanged);
m_aBegDragTempList.push_back(pNewObj);
- Rectangle aRect = pNewObj->GetLogicRect();
- // pNewObj->SetText(String::CreateFromAscii("Drag helper"));
rView.MarkObj( pNewObj, rView.GetSdrPageView() );
}
}
const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
aNewPos.Y() -= nSectionHeight;
-// aNewPos.Y() -= PixelToLogic(aIter->second.second->GetSizePixel()).Height();
}
}
// -----------------------------------------------------------------------------
@@ -1116,7 +1085,7 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi
// Create drag lines over all viewable Views
// Therefore we need to identify the marked objects
// and create temporary objects on all other views at the same position
- // relative to its occurance.
+ // relative to its occurrence.
OSL_TRACE("BegDragObj createInvisible Objects\n" );
int nViewCount = 0;
@@ -1146,14 +1115,6 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi
OSL_TRACE("BegDragObj createInvisible X:%d Y:%d on View #%d\n", aRect.Left(), aRect.Top(), nViewCount );
BegDragObj_createInvisibleObjectAtPosition(aRect, rView);
-
- // calculate the clickpoint
-// const sal_Int32 nDeltaX = abs(aRect.Left() - aAbsolutePnt.X());
-// const sal_Int32 nDeltaY = abs(aRect.Top() - aAbsolutePnt.Y());
-// if (m_aDragDelta.X() > nDeltaX)
-// m_aDragDelta.X() = nDeltaX;
-// if (m_aDragDelta.Y() > nDeltaY)
-// m_aDragDelta.Y() = nDeltaY;
}
}
}
@@ -1164,9 +1125,6 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi
const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
aNewObjPos.Y() += nSectionHeight;
-
- // don't subtract the height of the lines between the views
- // aNewObjPos.Y() -= PixelToLogic(aIter->second.second->GetSizePixel()).Height();
}
const sal_Int32 nDeltaX = abs(aLeftTop.X() - aAbsolutePnt.X());
@@ -1175,38 +1133,13 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi
m_aDragDelta.Y() = nDeltaY;
Point aNewPos = aAbsolutePnt;
- // for (aIter = m_aSections.begin(); aIter != aEnd; ++aIter)
- // {
- // OReportSection& rReportSection = (*aIter)->getReportSection();
- // if ( &rReportSection.getSectionView() == _pSection )
- // break;
- // aNewPos.Y() += rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
- // }
const short nDrgLog = static_cast<short>(PixelToLogic(Size(3,0)).Width());
- // long nLastSectionHeight = 0;
- // bool bAdd = true;
nViewCount = 0;
for (aIter = m_aSections.begin(); aIter != aEnd; ++aIter)
{
OReportSection& rReportSection = (*aIter)->getReportSection();
- // if ( &rReportSection.getSectionView() == _pSection )
- // {
- // bAdd = false;
- // aNewPos = _aPnt;
- // }
- // else if ( bAdd )
- // {
- // const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
- // aNewPos.Y() += nSectionHeight;
- // }
- // else
- // {
- // aNewPos.Y() -= nLastSectionHeight;
- // }
-
- //?
SdrHdl* pHdl = _pHdl;
if ( pHdl )
{
@@ -1221,8 +1154,6 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi
const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
aNewPos.Y() -= nSectionHeight;
- // subtract the height between the views, because they are visible but not from interest here.
- // aNewPos.Y() -= PixelToLogic(aIter->second.second->GetSizePixel()).Height();
}
}
@@ -1259,10 +1190,7 @@ void OViewsWindow::BegMarkObj(const Point& _aPnt,const OSectionView* _pSection)
}
rReportSection.getSectionView().BegMarkObj ( aNewPos );
nLastSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
-
- // aNewPos.Y() -= PixelToLogic(aIter->second.second->GetSizePixel()).Height();
}
- //::std::for_each( m_aSections.begin(), m_aSections.end(), ApplySectionViewAction( _aPnt , eMarkAction) );
}
// -----------------------------------------------------------------------------
OSectionView* OViewsWindow::getSectionRelativeToPosition(const OSectionView* _pSection,Point& _rPnt)
@@ -1340,9 +1268,6 @@ void OViewsWindow::EndDragObj(sal_Bool _bControlKeyPressed, const OSectionView*
EndDragObj_removeInvisibleObjects();
// we need to manipulate the current clickpoint, we substract the old delta from BeginDrag
- // OSectionView* pInSection = getSectionRelativeToPosition(_pSection, aPnt);
- // aNewPos.X() -= m_aDragDelta.X();
- // aNewPos.Y() -= m_aDragDelta.Y();
aNewPos -= m_aDragDelta;
uno::Sequence< beans::NamedValue > aAllreadyCopiedObjects;
@@ -1358,7 +1283,7 @@ void OViewsWindow::EndDragObj(sal_Bool _bControlKeyPressed, const OSectionView*
}
else
pInSection->EndDragObj(sal_False);
- } // for (; aIter != aEnd; ++aIter)
+ }
if ( aAllreadyCopiedObjects.getLength() )
{
@@ -1454,11 +1379,9 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bo
aHdlPos = pHdl->GetPos();
}
- TSectionsMap::iterator aIter/* = m_aSections.begin() */;
+ TSectionsMap::iterator aIter;
TSectionsMap::iterator aEnd = m_aSections.end();
- //if ( _bMove )
- //{
for (aIter = m_aSections.begin(); aIter != aEnd; ++aIter)
{
OReportSection& rReportSection = (*aIter)->getReportSection();
@@ -1466,8 +1389,7 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bo
break;
const long nSectionHeight = (*aIter)->PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
aCurrentSectionPos.Y() += nSectionHeight;
- } // for (aIter = m_aSections.begin(); aIter != aEnd; ++aIter)
- //}
+ }
aRealMousePos += aCurrentSectionPos;
// If control key is pressed the work area is limited to the section with the current selection.
@@ -1482,7 +1404,6 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bo
{
Rectangle aClipRect = rView.GetWorkArea();
aClipRect.Top() = aCurrentSectionPos.Y() - aPosForWorkArea.Y();
- // if (aClipRect.Top() < 0) aClipRect.Top() = 0;
aClipRect.Bottom() = aClipRect.Top() + nSectionHeight;
rView.SetWorkArea( aClipRect );
}
@@ -1493,7 +1414,6 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bo
rView.SetWorkArea( aClipRect );
}
aPosForWorkArea.Y() += nSectionHeight;
- // aNewPos.Y() += PixelToLogic(aIter->second.second->GetSizePixel()).Height();
}
@@ -1510,62 +1430,6 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bo
const long nSectionHeight = (*aIter)->PixelToLogic((*aIter)->GetOutputSizePixel()).Height();
aRealMousePos.Y() -= nSectionHeight;
}
-#if 0
-#if OSL_DEBUG_LEVEL > 0
- // TEST TEST TEST TEST
- // Ich versuche gerade rauszubekommen, ob ich ein Object bewege oder nur resize.
- // TEST TEST TEST TEST
-
- for (aIter = m_aSections.begin(); aIter != aEnd; ++aIter)
- {
- OReportSection& rReportSection = (*aIter)->getReportSection();
- OSectionView& rView = rReportSection.getSectionView();
- if ( rView.AreObjectsMarked() )
- {
- rView.SortMarkedObjects();
- const sal_uInt32 nCount = rView.GetMarkedObjectCount();
- for (sal_uInt32 i=0; i < nCount; ++i)
- {
- const SdrMark* pM = rView.GetSdrMarkByIndex(i);
- SdrObject* pObj = pM->GetMarkedSdrObj();
- (void)pObj;
-
- int dummy = 0;
- (void)dummy;
- }
- }
-
- /*
- OReportSection& rReportSection = (*aIter)->getReportSection();
- OSectionView& rView = rReportSection.getSectionView();
- const SdrHdlList& rHdlList = rView.GetHdlList();
- SdrHdl* pHdl2 = rHdlList.GetFocusHdl();
-
- if ( pHdl2 != 0 )
- {
- SdrHdlKind eKind = pHdl->GetKind();
- int dummy = 0;
- switch(eKind)
- {
- case HDL_UPLFT: // Oben links
- case HDL_UPPER: // Oben
- case HDL_UPRGT: // Oben rechts
- case HDL_LEFT: // Links
- case HDL_RIGHT: // Rechts
- case HDL_LWLFT: // Unten links
- case HDL_LOWER: // Unten
- case HDL_LWRGT: // Unten rechts
- dummy = 1;
- break;
- default:
- dummy = 0;
- }
- }
- */
- }
- // TEST TEST TEST TEST
-#endif
-#endif
}
// -----------------------------------------------------------------------------
sal_Bool OViewsWindow::IsAction() const
@@ -1685,7 +1549,7 @@ void OViewsWindow::handleKey(const KeyCode& _rCode)
bCheck = dynamic_cast<OUnoObject*>(pMark->GetMarkedSdrObj()) != NULL|| dynamic_cast<OOle2Obj*>(pMark->GetMarkedSdrObj());
}
-
+
if ( bCheck )
{
SdrObject* pOverlapped = isOver(aMarkRect,*rReportSection.getPage(),rView);
@@ -1755,7 +1619,7 @@ void OViewsWindow::handleKey(const KeyCode& _rCode)
if ( rView.IsDragObj() )
{
- const FASTBOOL bWasNoSnap = rDragStat.IsNoSnap();
+ const bool bWasNoSnap = rDragStat.IsNoSnap();
const sal_Bool bWasSnapEnabled = rView.IsSnapEnabled();
// switch snapping off
@@ -1818,7 +1682,7 @@ void OViewsWindow::handleKey(const KeyCode& _rCode)
void OViewsWindow::stopScrollTimer()
{
::std::for_each(m_aSections.begin(),m_aSections.end(),
- ::std::compose1(::boost::mem_fn(&OReportSection::stopScrollTimer),TReportPairHelper()));
+ ::o3tl::compose1(::boost::mem_fn(&OReportSection::stopScrollTimer),TReportPairHelper()));
}
// -----------------------------------------------------------------------------
void OViewsWindow::fillCollapsedSections(::std::vector<sal_uInt16>& _rCollapsedPositions) const
@@ -1863,7 +1727,7 @@ void OViewsWindow::zoom(const Fraction& _aZoom)
for (;aIter != aEnd ; ++aIter)
{
(*aIter)->zoom(_aZoom);
- } // for (;aIter != aEnd ; ++aIter)
+ }
Resize();
@@ -1888,7 +1752,6 @@ void OViewsWindow::scrollChildren(const Point& _aThumbPos)
aMapMode.SetOrigin( Point(aOld.X() , - aPosY.Y()));
SetMapMode( aMapMode );
- //OWindowPositionCorrector aCorrector(this,0,-( aOld.Y() + aPosY.Y()));
Scroll(0, -( aOld.Y() + aPosY.Y()),SCROLL_CHILDREN);
}
@@ -1897,7 +1760,7 @@ void OViewsWindow::scrollChildren(const Point& _aThumbPos)
for (;aIter != aEnd ; ++aIter)
{
(*aIter)->scrollChildren(aPos.X());
- } // for (;aIter != aEnd ; ++aIter)
+ }
}
// -----------------------------------------------------------------------------
void OViewsWindow::fillControlModelSelection(::std::vector< uno::Reference< uno::XInterface > >& _rSelection) const
@@ -1912,3 +1775,5 @@ void OViewsWindow::fillControlModelSelection(::std::vector< uno::Reference< uno:
//==============================================================================
} // rptui
//==============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/dlgedclip.cxx b/reportdesign/source/ui/report/dlgedclip.cxx
index 2d56f502f..880a3eb13 100644
--- a/reportdesign/source/ui/report/dlgedclip.cxx
+++ b/reportdesign/source/ui/report/dlgedclip.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,3 +106,5 @@ OReportExchange::TSectionElements OReportExchange::extractCopies(const Transfera
//============================================================================
} // rptui
//============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/dlgedfac.cxx b/reportdesign/source/ui/report/dlgedfac.cxx
index fb09c95e8..7850b1d18 100644
--- a/reportdesign/source/ui/report/dlgedfac.cxx
+++ b/reportdesign/source/ui/report/dlgedfac.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,9 +27,7 @@
************************************************************************/
#include "precompiled_rptui.hxx"
#include "dlgedfac.hxx"
-#ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC
#include "uistrings.hrc"
-#endif
#include "RptObject.hxx"
#include <RptDef.hxx>
#include <com/sun/star/container/XNameContainer.hpp>
@@ -102,7 +101,7 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory )
pObjFactory->pNewObj = new OOle2Obj(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.ChartDocument")),OBJ_OLE2);
break;
default:
- OSL_ENSURE(0,"Unknown object id");
+ OSL_FAIL("Unknown object id");
break;
}
}
@@ -111,3 +110,5 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory )
}
//----------------------------------------------------------------------------
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx
index 824d5e26e..2671a96e2 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -99,7 +100,6 @@ void DlgEdFunc::ForceScroll( const Point& rPos )
aPos.Y() *= 0.5;
Rectangle aOutRect( aPos, aOut );
aOutRect = m_pParent->PixelToLogic( aOutRect );
- //Rectangle aWorkArea = m_pParent->getView()->GetWorkArea();
Point aGcc3WorkaroundTemporary;
Rectangle aWorkArea(aGcc3WorkaroundTemporary,pScrollWindow->getTotalSize());
aWorkArea.Right() -= (long)aStartWidth;
@@ -137,7 +137,6 @@ DlgEdFunc::DlgEdFunc( OReportSection* _pParent )
m_bUiActive(false),
m_bShowPropertyBrowser(false)
{
- // m_pParent = _pParent;
aScrollTimer.SetTimeoutHdl( LINK( this, DlgEdFunc, ScrollTimeout ) );
m_rView.SetActualWin( m_pParent);
aScrollTimer.SetTimeout( SELENG_AUTOREPEAT_INTERVAL );
@@ -155,14 +154,7 @@ sal_Int32 lcl_setColorOfObject(uno::Reference< uno::XInterface > _xObj, long _nC
try
{
uno::Reference<report::XReportComponent> xComponent(_xObj, uno::UNO_QUERY_THROW);
- // NOT NEED if UNO_QUERY_THROW:
- // if (xComponent.is())
- // {
uno::Reference< beans::XPropertySet > xProp(xComponent, uno::UNO_QUERY_THROW);
- // if (xProp.is())
- // {
- // ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlBackground"))
- // is PROPERTY_CONTROLBACKGROUND
uno::Any aAny = xProp->getPropertyValue(PROPERTY_CONTROLBACKGROUND);
if (aAny.hasValue())
{
@@ -171,12 +163,9 @@ sal_Int32 lcl_setColorOfObject(uno::Reference< uno::XInterface > _xObj, long _nC
uno::Any aBlackColorAny = uno::makeAny(_nColorTRGB);
xProp->setPropertyValue(PROPERTY_CONTROLBACKGROUND, aBlackColorAny);
}
- // aCopies.push_back(xComponent->createClone());
}
catch(uno::Exception&)
{
- // bit my shiny metal as!
- // OSL_ENSURE(0,"Can't copy report elements!");
}
return nBackColor;
}
@@ -217,7 +206,6 @@ sal_Bool DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt )
else
{
SdrHdl* pHdl = m_rView.PickHandle(m_aMDPos);
- //m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(m_pView);
// if selected object was hit, drag object
if ( pHdl!=NULL || m_rView.IsMarkedHit(m_aMDPos) )
@@ -272,8 +260,8 @@ void DlgEdFunc::checkTwoCklicks(const MouseEvent& rMEvt)
const SdrMark* pMark = rMarkList.GetMark(0);
SdrObject* pObj = pMark->GetMarkedSdrObj();
activateOle(pObj);
- } // if (rMarkList.GetMarkCount() == 1)
- } // if ( pView->AreObjectsMarked() )
+ }
+ }
}
}
// -----------------------------------------------------------------------------
@@ -322,7 +310,6 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent)
((SdrHdlList&)rHdlList).ResetFocusHdl();
else
m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(NULL);
- //m_rView.UnmarkAll();
deactivateOle(true);
bReturn = sal_False;
@@ -394,7 +381,7 @@ sal_Bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent)
{
bReturn = sal_True;
break;
- } // if ( !rCode.IsMod1() && !rCode.IsMod2() )
+ }
// run through
default:
{
@@ -448,8 +435,8 @@ void DlgEdFunc::activateOle(SdrObject* _pObj)
}
}
}
- } // if (nSdrObjKind == OBJ_OLE2)
- } // if ( _pObj )
+ }
+ }
}
// -----------------------------------------------------------------------------
void DlgEdFunc::deactivateOle(bool _bSelect)
@@ -468,7 +455,7 @@ void DlgEdFunc::deactivateOle(bool _bSelect)
xObj->changeState( embed::EmbedStates::RUNNING );
m_bUiActive = false;
if ( m_bShowPropertyBrowser )
- {
+ {
rController.executeChecked(SID_SHOW_PROPERTYBROWSER,uno::Sequence< beans::PropertyValue >());
}
@@ -477,9 +464,9 @@ void DlgEdFunc::deactivateOle(bool _bSelect)
SdrPageView* pPV = m_rView.GetSdrPageView();
m_rView.MarkObj(pObj, pPV);
}
- } // if ( xObj.is() && xObj->getCurrentState() == embed::EmbedStates::UI_ACTIVE )
+ }
}
- } // for(sal_uLong i = 0 ; i< nCount;++i)
+ }
}
// -----------------------------------------------------------------------------
void DlgEdFunc::colorizeOverlappedObject(SdrObject* _pOverlappedObj)
@@ -587,7 +574,6 @@ bool DlgEdFunc::isOnlyCustomShapeMarked()
for (sal_uInt32 i = 0; i < rMarkList.GetMarkCount();++i )
{
SdrMark* pMark = rMarkList.GetMark(i);
- // bCheck = dynamic_cast<OUnoObject*>(pMark->GetMarkedSdrObj()) != NULL;
SdrObject* pObj = pMark->GetMarkedSdrObj();
if (pObj->GetObjIdentifier() != OBJ_CUSTOMSHAPE)
{
@@ -612,7 +598,6 @@ bool DlgEdFunc::isRectangleHit(const MouseEvent& rMEvt)
if ( !bIsSetPoint )
{
// no drag rect, we have to check every single select rect
- //const Rectangle& rRect = m_rView.GetDragStat().GetActionRect();
const SdrDragStat& rDragStat = m_rView.GetDragStat();
if (rDragStat.GetDragMethod() != NULL)
{
@@ -701,15 +686,10 @@ sal_Bool DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
const SdrHitKind eHit = m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
-// eHit == SDRHIT_UNMARKEDOBJECT under the mouse cursor is a unmarked object
-
if (eHit == SDRHIT_UNMARKEDOBJECT &&
nId != OBJ_CUSTOMSHAPE)
{
// there is an object under the mouse cursor, but not a customshape
- // rtl::OUString suWasN = m_rView.getInsertObjString();
- // rtl::OUString suWasN2 = m_pParent->getSectionWindow()->getViewsWindow()->GetInsertObjString();
-
m_pParent->getSectionWindow()->getViewsWindow()->BrkAction();
return sal_False;
}
@@ -775,7 +755,6 @@ sal_Bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
for (sal_uInt32 i = 0; i < rMarkList.GetMarkCount();++i )
{
SdrMark* pMark = rMarkList.GetMark(i);
- // bCheck = dynamic_cast<OUnoObject*>(pMark->GetMarkedSdrObj()) != NULL;
OOle2Obj* pObj = dynamic_cast<OOle2Obj*>(pMark->GetMarkedSdrObj());
if ( pObj && !pObj->IsEmpty() )
{
@@ -796,7 +775,7 @@ sal_Bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
SdrViewEvent aVEvt;
m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
m_rView.MarkObj(aVEvt.pRootObj, pPV);
- } // ift() && !rMEvt.IsMod2() )
+ }
checkTwoCklicks(rMEvt);
m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->UpdatePropertyBrowserDelayed(m_rView);
return bReturn;
@@ -832,9 +811,6 @@ sal_Bool DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
m_pParent->getSectionWindow()->getViewsWindow()->MovAction(aPos,&m_rView, m_rView.GetDragMethod() == NULL, false);
}
- //if ( isOver(m_rView.GetCreateObj(),*m_pParent->getPage(),*m_pView) )
- // m_pParent->SetPointer( Pointer(POINTER_NOTALLOWED));
- //else
if ( !bIsSetPoint )
m_pParent->SetPointer( m_rView.GetPreferedPointer( aPos, m_pParent) );
@@ -885,7 +861,6 @@ sal_Bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
{
if( !rMEvt.IsShift() )
m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(NULL);
- //m_rView.UnmarkAll();
if ( rMEvt.GetClicks() == 1 )
{
@@ -953,15 +928,6 @@ sal_Bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
{
aPnt.Y() = 0;
}
- // grow section if it is under the current section
-// else
-// {
-// const Size& aSectionSize = m_rView->GetSizePixel();
-// if ( aPnt.Y() > aSectionSize.Height() )
-// {
-// aPnt.Y() = aSectionSize.Height();
-// }
-// }
}
// drag or resize an object
bool bControlKey = rMEvt.IsMod1();
@@ -979,147 +945,8 @@ sal_Bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
return sal_True;
}
-// -----------------------------------------------------------------------------
-//void DlgEdFuncSelect::SetInEditMode(SdrTextObj* _pTextObj,const MouseEvent& rMEvt, sal_Bool bQuickDrag)
-//{
-//
-// SdrPageView* pPV = m_rView.GetSdrPageView();
-// if( _pTextObj && _pTextObj->GetPage() == pPV->GetPage() )
-// {
-// m_rView.SetCurrentObj(OBJ_TEXT);
-// m_rView.SetEditMode(SDREDITMODE_EDIT);
-//
-// sal_Bool bEmptyOutliner = sal_False;
-//
-// if (!_pTextObj->GetOutlinerParaObject() && m_rView.GetTextEditOutliner())
-// {
-// ::SdrOutliner* pOutl = m_rView.GetTextEditOutliner();
-// sal_uLong nParaAnz = pOutl->GetParagraphCount();
-// Paragraph* p1stPara = pOutl->GetParagraph( 0 );
-//
-// if (nParaAnz==1 && p1stPara)
-// {
-// // Bei nur einem Pararaph
-// if (pOutl->GetText(p1stPara).Len() == 0)
-// {
-// bEmptyOutliner = sal_True;
-// }
-// }
-// }
-//
-// if (_pTextObj != m_rView.GetTextEditObject() || bEmptyOutliner)
-// {
-// sal_uInt32 nInv = _pTextObj->GetObjInventor();
-// sal_uInt16 nSdrObjKind = _pTextObj->GetObjIdentifier();
-//
-// if (nInv == SdrInventor && _pTextObj->HasTextEdit() &&
-// (nSdrObjKind == OBJ_TEXT ||
-// nSdrObjKind == OBJ_TITLETEXT ||
-// nSdrObjKind == OBJ_OUTLINETEXT ||
-// (_pTextObj->ISA(SdrTextObj) && !_pTextObj->IsEmptyPresObj())))
-// {
-// // Neuen Outliner machen (gehoert der SdrObjEditView)
-// SdrModel* pModel = _pTextObj->GetModel();
-// SdrOutliner* pOutl = SdrMakeOutliner( OUTLINERMODE_OUTLINEOBJECT, pModel );
-// pOutl->SetMinDepth(0);
-// pOutl->SetStyleSheetPool((SfxStyleSheetPool*) pModel->GetStyleSheetPool());
-// //pOutl->SetCalcFieldValueHdl(LINK(SD_MOD(), SdModule, CalcFieldValueHdl));
-// sal_uLong nCntrl = pOutl->GetControlWord();
-// nCntrl |= EE_CNTRL_ALLOWBIGOBJS;
-// nCntrl |= EE_CNTRL_URLSFXEXECUTE;
-// nCntrl |= EE_CNTRL_MARKFIELDS;
-// nCntrl |= EE_CNTRL_AUTOCORRECT;
-//
-// nCntrl &= ~EE_CNTRL_ULSPACESUMMATION;
-// //if ( pModel->IsSummationOfParagraphs() )
-// // nCntrl |= EE_CNTRL_ULSPACESUMMATION;
-//
-// //SetSpellOptions( nCntrl );
-//
-// pOutl->SetControlWord(nCntrl);
-//
-// uno::Reference< linguistic2::XSpellChecker1 > xSpellChecker( LinguMgr::GetSpellChecker() );
-// if ( xSpellChecker.is() )
-// pOutl->SetSpeller( xSpellChecker );
-//
-// uno::Reference< linguistic2::XHyphenator > xHyphenator( LinguMgr::GetHyphenator() );
-// if( xHyphenator.is() )
-// pOutl->SetHyphenator( xHyphenator );
-//
-// pOutl->SetDefaultLanguage( Application::GetSettings().GetLanguage() );
-//
-// // in einem Gliederungstext darf nicht auf die 0-te
-// // Ebene ausgerueckt werden
-// if (_pTextObj->GetObjInventor() == SdrInventor &&
-// _pTextObj->GetObjIdentifier() == OBJ_OUTLINETEXT)
-// {
-// pOutl->SetMinDepth(1);
-// }
-//
-// if (bEmptyOutliner)
-// {
-// m_rView.SdrEndTextEdit(sal_True);
-// }
-//
-// if( _pTextObj )
-// {
-// OutlinerParaObject* pOPO = _pTextObj->GetOutlinerParaObject();
-// if( ( pOPO && pOPO->IsVertical() ) /*||
-// nSlotId == SID_ATTR_CHAR_VERTICAL ||
-// nSlotId == SID_TEXT_FITTOSIZE_VERTICAL */)
-// pOutl->SetVertical( sal_True );
-//
-//
-// if (m_rView.SdrBeginTextEdit(_pTextObj, pPV, pParent, sal_True, pOutl) && _pTextObj->GetObjInventor() == SdrInventor)
-// {
-// //bFirstObjCreated = sal_True;
-// //DeleteDefaultText();
-//
-// OutlinerView* pOLV = m_rView.GetTextEditOutlinerView();
-//
-// nSdrObjKind = _pTextObj->GetObjIdentifier();
-//
-// SdrViewEvent aVEvt;
-// SdrHitKind eHit = m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
-//
-// if (eHit == SDRHIT_TEXTEDIT)
-// {
-// // Text getroffen
-// if (nSdrObjKind == OBJ_TEXT ||
-// nSdrObjKind == OBJ_TITLETEXT ||
-// nSdrObjKind == OBJ_OUTLINETEXT ||
-// //nSlotId == SID_TEXTEDIT ||
-// !bQuickDrag)
-// {
-// pOLV->MouseButtonDown(rMEvt);
-// pOLV->MouseMove(rMEvt);
-// pOLV->MouseButtonUp(rMEvt);
-// }
-//
-// if ( bQuickDrag && _pTextObj->GetOutlinerParaObject())
-// {
-// pOLV->MouseButtonDown(rMEvt);
-// }
-// }
-// else
-// {
-// // #98198# Move cursor to end of text
-// ESelection aNewSelection(EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND, EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND);
-// pOLV->SetSelection(aNewSelection);
-// }
-// }
-// else
-// {
-// //RestoreDefaultText();
-// }
-// }
-// }
-// }
-// }
-// else
-// _pTextObj = NULL;
-//}
-
//----------------------------------------------------------------------------
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index 980ed707f..8371b4811 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,28 +30,20 @@
#include "RptObject.hxx"
#include "ReportController.hxx"
#include <cppuhelper/component_context.hxx>
-#ifndef _REPORT_DLGRESID_HRC
#include <RptResId.hrc>
-#endif
-#ifndef _RPTUI_SLOTID_HRC_
#include "rptui_slotid.hrc"
-#endif
#include <tools/debug.hxx>
#include <com/sun/star/awt/XLayoutConstrains.hpp>
#include <com/sun/star/inspection/ObjectInspector.hpp>
#include <com/sun/star/inspection/DefaultHelpProvider.hpp>
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#include <vcl/stdtext.hxx>
#include <svx/svdview.hxx>
#include <svx/svdogrp.hxx>
#include <svx/svdpage.hxx>
#include <svx/svditer.hxx>
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/unohlp.hxx>
-#endif
#include <comphelper/property.hxx>
#include <comphelper/namecontainer.hxx>
#include <comphelper/composedprops.hxx>
@@ -64,9 +57,7 @@
#include <comphelper/processfactory.hxx>
#include "SectionView.hxx"
#include "ReportSection.hxx"
-#ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC
#include "uistrings.hrc"
-#endif
#include "DesignView.hxx"
#include "ViewsWindow.hxx"
#include "UITools.hxx"
@@ -130,12 +121,12 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >& _xORB,Window* pParent,
if (m_xMeAsFrame.is())
{
m_xMeAsFrame->initialize( VCLUnoHelper::GetInterface ( this ) );
- m_xMeAsFrame->setName(::rtl::OUString::createFromAscii("report property browser")); // change name!
+ m_xMeAsFrame->setName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("report property browser"))); // change name!
}
}
catch (Exception&)
{
- DBG_ERROR("PropBrw::PropBrw: could not create/initialize my frame!");
+ OSL_FAIL("PropBrw::PropBrw: could not create/initialize my frame!");
m_xMeAsFrame.clear();
}
@@ -150,9 +141,6 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >& _xORB,Window* pParent,
xFactoryProperties->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) ) ),
UNO_QUERY_THROW );
- /*uno::Reference< XComponent> xModel = new OContextHelper(m_xORB,uno::Reference< XComponent>(m_pDesignView->getController().getModel(),uno::UNO_QUERY) );
- uno::Reference< XComponent> xDialogParentWindow = new OContextHelper(m_xORB,uno::Reference< XComponent>(VCLUnoHelper::GetInterface ( this ),uno::UNO_QUERY) );
- uno::Reference< XComponent> xConnection = new OContextHelper(m_xORB,uno::Reference< XComponent>(m_pDesignView->getController().getConnection(),uno::UNO_QUERY) );*/
// a ComponentContext for the
::cppu::ContextEntry_Init aHandlerContextInfo[] =
{
@@ -161,7 +149,7 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >& _xORB,Window* pParent,
::cppu::ContextEntry_Init( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ActiveConnection" ) ), makeAny( m_pDesignView->getController().getConnection() ) ),
};
m_xInspectorContext.set(
- ::cppu::createComponentContext( aHandlerContextInfo, sizeof( aHandlerContextInfo ) / sizeof( aHandlerContextInfo[0] ),
+ ::cppu::createComponentContext( aHandlerContextInfo, SAL_N_ELEMENTS( aHandlerContextInfo ),
xOwnContext ) );
// create a property browser controller
bool bEnableHelpSection = lcl_shouldEnableHelpSection( m_xORB );
@@ -191,7 +179,7 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >& _xORB,Window* pParent,
}
catch (Exception&)
{
- DBG_ERROR("PropBrw::PropBrw: could not create/initialize the browser controller!");
+ OSL_FAIL("PropBrw::PropBrw: could not create/initialize the browser controller!");
try
{
::comphelper::disposeComponent(m_xBrowserController);
@@ -232,7 +220,7 @@ PropBrw::~PropBrw()
const ::rtl::OUString pProps[] = { ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContextDocument" ) )
, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogParentWindow" ) )
, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ActiveConnection" ) )};
- for (size_t i = 0; i < sizeof(pProps)/sizeof(pProps[0]); ++i)
+ for (size_t i = 0; i < SAL_N_ELEMENTS(pProps); ++i)
xName->removeByName(pProps[i]);
}
}
@@ -281,7 +269,7 @@ void PropBrw::implDetachController()
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "PropBrw::getCurrentPage: caught an exception while retrieving the current page!" );
+ OSL_FAIL( "PropBrw::getCurrentPage: caught an exception while retrieving the current page!" );
}
return sCurrentPage;
}
@@ -301,7 +289,7 @@ sal_Bool PropBrw::Close()
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "FmPropBrw::Close: caught an exception while asking the controller!" );
+ OSL_FAIL( "FmPropBrw::Close: caught an exception while asking the controller!" );
}
}
implDetachController();
@@ -358,10 +346,8 @@ void PropBrw::implSetNewObject( const uno::Sequence< Reference<uno::XInterface>
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "FmPropBrw::StateChanged: caught an exception while setting the initial page!" );
+ OSL_FAIL( "FmPropBrw::StateChanged: caught an exception while setting the initial page!" );
}
-
- //Resize();
}
SetText( GetHeadlineName(_aObjects) );
}
@@ -377,13 +363,13 @@ void PropBrw::implSetNewObject( const uno::Sequence< Reference<uno::XInterface>
}
else if ( _aObjects.getLength() == 1 ) // single selection
{
- sal_uInt16 nResId = 0;
aName = String(ModuleRes(RID_STR_BRWTITLE_PROPERTIES));
uno::Reference< container::XNameContainer > xNameCont(_aObjects[0],uno::UNO_QUERY);
Reference< lang::XServiceInfo > xServiceInfo( xNameCont->getByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReportComponent"))), UNO_QUERY );
if ( xServiceInfo.is() )
{
+ sal_uInt16 nResId = 0;
if ( xServiceInfo->supportsService( SERVICE_FIXEDTEXT ) )
{
nResId = RID_STR_PROPTITLE_FIXEDTEXT;
@@ -422,7 +408,7 @@ void PropBrw::implSetNewObject( const uno::Sequence< Reference<uno::XInterface>
}
else
{
- OSL_ENSURE(0,"Unknown service name!");
+ OSL_FAIL("Unknown service name!");
nResId = RID_STR_CLASS_FORMATTEDFIELD;
}
@@ -533,7 +519,7 @@ void PropBrw::Update( OSectionView* pNewView )
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "FmPropBrw::StateChanged: caught an exception while setting the initial page!" );
+ OSL_FAIL( "FmPropBrw::StateChanged: caught an exception while setting the initial page!" );
}
}
}
@@ -576,7 +562,7 @@ void PropBrw::Update( OSectionView* pNewView )
}
catch ( Exception& )
{
- DBG_ERROR( "PropBrw::Update: Exception occured!" );
+ OSL_FAIL( "PropBrw::Update: Exception occurred!" );
}
}
//----------------------------------------------------------------------------
@@ -591,14 +577,14 @@ void PropBrw::Update( const uno::Reference< uno::XInterface>& _xReportComponent)
{
EndListening( *(m_pView->GetModel()) );
m_pView = NULL;
- } // if ( m_pView )
+ }
uno::Reference< uno::XInterface> xTemp(CreateComponentPair(_xReportComponent,_xReportComponent));
implSetNewObject( uno::Sequence< uno::Reference< uno::XInterface> >(&xTemp,1) );
}
catch ( Exception& )
{
- DBG_ERROR( "PropBrw::Update: Exception occured!" );
+ OSL_FAIL( "PropBrw::Update: Exception occurred!" );
}
}
}
@@ -617,3 +603,5 @@ void PropBrw::LoseFocus()
}
//----------------------------------------------------------------------------
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/report.src b/reportdesign/source/ui/report/report.src
index fdfe9ac2b..c4c64b83d 100644
--- a/reportdesign/source/ui/report/report.src
+++ b/reportdesign/source/ui/report/report.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -112,25 +112,13 @@ String RID_STR_PROPTITLE_GROUP
Image RID_IMG_TREENODE_COLLAPSED
{
- ImageBitmap = Bitmap { File = "plus.bmp"; } ;
+ ImageBitmap = Bitmap { File = "plus.png"; } ;
MaskColor = Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; };
};
Image RID_IMG_TREENODE_EXPANDED
{
- ImageBitmap = Bitmap { File = "minus.bmp"; } ;
- MaskColor = Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; };
-};
-
-Image RID_IMG_TREENODE_COLLAPSED_HC
-{
- ImageBitmap = Bitmap { File = "plus_sch.bmp"; } ;
- MaskColor = Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; };
-};
-
-Image RID_IMG_TREENODE_EXPANDED_HC
-{
- ImageBitmap = Bitmap { File = "minus_sch.bmp"; } ;
+ ImageBitmap = Bitmap { File = "minus.png"; } ;
MaskColor = Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; };
};
@@ -347,12 +335,12 @@ Menu RID_MENU_REPORT
};
MenuItem
{
- Identifier = SID_ARRANGEMENU ;
- Command = ".uno:ArrangeMenu" ;
- Text [ en-US ] = "~Arrange" ;
+ Identifier = SID_ARRANGEMENU ;
+ Command = ".uno:ArrangeMenu" ;
+ Text [ en-US ] = "~Arrange" ;
SubMenu = Menu
{
- ItemList =
+ ItemList =
{
MenuItem
{
@@ -360,13 +348,13 @@ Menu RID_MENU_REPORT
};
MenuItem
{
- Identifier = SID_FRAME_UP ;
+ Identifier = SID_FRAME_UP ;
HelpId = ".uno:ObjectForwardOne";
Text [ en-US ] = "Bring ~Forward" ;
};
MenuItem
{
- Identifier = SID_FRAME_DOWN ;
+ Identifier = SID_FRAME_DOWN ;
HelpId = ".uno:ObjectBackOne";
Text [ en-US ] = "Send Back~ward" ;
};
@@ -394,7 +382,7 @@ Menu RID_MENU_REPORT
ITEM_FORMAT_OBJECT_ALIGN
SubMenu = Menu
{
- ItemList =
+ ItemList =
{
MenuItem
{
@@ -434,13 +422,13 @@ Menu RID_MENU_REPORT
MenuItem
{
- Identifier = SID_OBJECT_RESIZING ;
- Command = ".uno:ObjectResize" ;
+ Identifier = SID_OBJECT_RESIZING ;
+ Command = ".uno:ObjectResize" ;
Text [ en-US ] = "~Object Resizing" ;
- Text [ x-comment ] = " ";
+ Text [ x-comment ] = " ";
SubMenu = Menu
{
- ItemList =
+ ItemList =
{
MenuItem
{
@@ -484,13 +472,13 @@ Menu RID_MENU_REPORT
};
MenuItem
{
- Identifier = SID_SECTION_SHRINK_MENU ;
- Command = ".uno:SectionShrinkMenu" ;
+ Identifier = SID_SECTION_SHRINK_MENU ;
+ Command = ".uno:SectionShrinkMenu" ;
Text [ en-US ] = "Section" ;
- Text [ x-comment ] = " ";
+ Text [ x-comment ] = " ";
SubMenu = Menu
{
- ItemList =
+ ItemList =
{
MenuItem
{
diff --git a/reportdesign/uiconfig/dbreport/menubar/menubar.xml b/reportdesign/uiconfig/dbreport/menubar/menubar.xml
index 8fa04f47b..9993288d8 100644
--- a/reportdesign/uiconfig/dbreport/menubar/menubar.xml
+++ b/reportdesign/uiconfig/dbreport/menubar/menubar.xml
@@ -413,9 +413,9 @@
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:HelperDialog"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/reportdesign/util/dll.pmk b/reportdesign/util/dll.pmk
deleted file mode 100644
index c2ce7d89d..000000000
--- a/reportdesign/util/dll.pmk
+++ /dev/null
@@ -1,31 +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.
-#
-#*************************************************************************
-
-# define REPORTDESIGN_DLLIMPLEMENTATION (see @ dllapi.h)
-CDEFS += -DREPORTDESIGN_DLLIMPLEMENTATION
-
-VISIBILITY_HIDDEN=TRUE