summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/CppunitTest_dbaccess_CRMDatabase_test.mk51
-rw-r--r--dbaccess/CppunitTest_dbaccess_RowSetClones.mk6
-rw-r--r--dbaccess/CppunitTest_dbaccess_dialog_save.mk6
-rw-r--r--dbaccess/CppunitTest_dbaccess_embeddeddb_performancetest.mk27
-rw-r--r--dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk6
-rw-r--r--dbaccess/CppunitTest_dbaccess_macros_test.mk102
-rw-r--r--dbaccess/CppunitTest_dbaccess_nolib_save.mk6
-rw-r--r--dbaccess/JunitTest_dbaccess_complex.mk1
-rw-r--r--dbaccess/Library_dbahsql.mk5
-rw-r--r--dbaccess/Module_dbaccess.mk2
-rw-r--r--dbaccess/inc/core_resource.hxx6
-rw-r--r--dbaccess/inc/pch/precompiled_dbahsql.hxx1
-rw-r--r--dbaccess/inc/strings.hrc3
-rw-r--r--dbaccess/inc/strings.hxx2
-rw-r--r--dbaccess/qa/complex/dbaccess/DataSource.java68
-rw-r--r--dbaccess/qa/extras/dialog-save.cxx17
-rw-r--r--dbaccess/qa/extras/empty-stdlib-save.cxx21
-rw-r--r--dbaccess/qa/extras/hsql_schema_import.cxx6
-rw-r--r--dbaccess/qa/extras/macros-test.cxx42
-rw-r--r--dbaccess/qa/extras/nolib-save.cxx17
-rw-r--r--dbaccess/qa/extras/rowsetclones.cxx16
-rw-r--r--dbaccess/qa/extras/testdocuments/testdb.odbbin3700 -> 0 bytes
-rw-r--r--dbaccess/qa/python/fdo84315.py4
-rw-r--r--dbaccess/qa/unit/CRMDatabase_test.cxx134
-rw-r--r--dbaccess/qa/unit/dbtest_base.cxx148
-rw-r--r--dbaccess/qa/unit/embeddeddb_performancetest.cxx42
-rw-r--r--dbaccess/qa/unit/firebird.cxx32
-rw-r--r--dbaccess/qa/unit/hsql_binary_import.cxx26
-rw-r--r--dbaccess/qa/unit/tdf119625.cxx6
-rw-r--r--dbaccess/qa/unit/tdf126268.cxx9
-rw-r--r--dbaccess/qa/unoapi/dbaccess.props2
-rw-r--r--dbaccess/source/core/api/CacheSet.cxx4
-rw-r--r--dbaccess/source/core/api/FilteredContainer.cxx4
-rw-r--r--dbaccess/source/core/api/HelperCollections.cxx4
-rw-r--r--dbaccess/source/core/api/KeySet.cxx52
-rw-r--r--dbaccess/source/core/api/KeySet.hxx9
-rw-r--r--dbaccess/source/core/api/OptimisticSet.cxx5
-rw-r--r--dbaccess/source/core/api/RowSet.cxx72
-rw-r--r--dbaccess/source/core/api/RowSet.hxx5
-rw-r--r--dbaccess/source/core/api/RowSetBase.cxx8
-rw-r--r--dbaccess/source/core/api/RowSetCache.cxx8
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx14
-rw-r--r--dbaccess/source/core/api/TableDeco.cxx4
-rw-r--r--dbaccess/source/core/api/View.cxx2
-rw-r--r--dbaccess/source/core/api/callablestatement.cxx2
-rw-r--r--dbaccess/source/core/api/column.cxx6
-rw-r--r--dbaccess/source/core/api/datacolumn.cxx2
-rw-r--r--dbaccess/source/core/api/definitioncolumn.cxx10
-rw-r--r--dbaccess/source/core/api/preparedstatement.cxx7
-rw-r--r--dbaccess/source/core/api/query.cxx6
-rw-r--r--dbaccess/source/core/api/querycomposer.cxx2
-rw-r--r--dbaccess/source/core/api/querycontainer.cxx4
-rw-r--r--dbaccess/source/core/api/querydescriptor.cxx2
-rw-r--r--dbaccess/source/core/api/resultcolumn.cxx2
-rw-r--r--dbaccess/source/core/api/resultset.cxx6
-rw-r--r--dbaccess/source/core/api/statement.cxx25
-rw-r--r--dbaccess/source/core/api/table.cxx2
-rw-r--r--dbaccess/source/core/api/tablecontainer.cxx4
-rw-r--r--dbaccess/source/core/api/viewcontainer.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/ComponentDefinition.cxx8
-rw-r--r--dbaccess/source/core/dataaccess/ContentHelper.cxx18
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx52
-rw-r--r--dbaccess/source/core/dataaccess/SharedConnection.cxx11
-rw-r--r--dbaccess/source/core/dataaccess/SharedConnection.hxx38
-rw-r--r--dbaccess/source/core/dataaccess/bookmarkcontainer.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/commandcontainer.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/commanddefinition.cxx8
-rw-r--r--dbaccess/source/core/dataaccess/connection.cxx48
-rw-r--r--dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx8
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx16
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx183
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.hxx15
-rw-r--r--dbaccess/source/core/dataaccess/databaseregistrations.cxx1
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx22
-rw-r--r--dbaccess/source/core/dataaccess/definitioncontainer.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/documentcontainer.cxx16
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx82
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.hxx4
-rw-r--r--dbaccess/source/core/dataaccess/documenteventexecutor.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/documenteventnotifier.hxx32
-rw-r--r--dbaccess/source/core/dataaccess/documentevents.cxx81
-rw-r--r--dbaccess/source/core/dataaccess/intercept.cxx18
-rw-r--r--dbaccess/source/core/inc/ModelImpl.hxx4
-rw-r--r--dbaccess/source/core/inc/TableDeco.hxx2
-rw-r--r--dbaccess/source/core/inc/callablestatement.hxx2
-rw-r--r--dbaccess/source/core/inc/connection.hxx (renamed from dbaccess/source/core/dataaccess/connection.hxx)27
-rw-r--r--dbaccess/source/core/inc/definitioncontainer.hxx2
-rw-r--r--dbaccess/source/core/inc/preparedstatement.hxx2
-rw-r--r--dbaccess/source/core/inc/statement.hxx11
-rw-r--r--dbaccess/source/core/misc/DatabaseDataProvider.cxx28
-rw-r--r--dbaccess/source/core/misc/dsntypes.cxx72
-rw-r--r--dbaccess/source/core/misc/migrwarndlg.cxx5
-rw-r--r--dbaccess/source/core/misc/sdbcoretools.cxx2
-rw-r--r--dbaccess/source/core/recovery/dbdocrecovery.cxx6
-rw-r--r--dbaccess/source/core/recovery/settingsimport.cxx4
-rw-r--r--dbaccess/source/core/recovery/storagetextstream.cxx2
-rw-r--r--dbaccess/source/core/recovery/subcomponentrecovery.cxx36
-rw-r--r--dbaccess/source/core/resource/core_resource.cxx13
-rw-r--r--dbaccess/source/filter/hsqldb/fbcreateparser.cxx34
-rw-r--r--dbaccess/source/filter/hsqldb/parseschema.cxx2
-rw-r--r--dbaccess/source/filter/hsqldb/rowinputbinary.cxx66
-rw-r--r--dbaccess/source/filter/xml/dbloader2.cxx52
-rw-r--r--dbaccess/source/filter/xml/xmlDataSourceInfo.cxx6
-rw-r--r--dbaccess/source/filter/xml/xmlDataSourceSetting.cxx34
-rw-r--r--dbaccess/source/filter/xml/xmlDocuments.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx26
-rw-r--r--dbaccess/source/filter/xml/xmlQuery.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx22
-rw-r--r--dbaccess/source/inc/dsntypes.hxx2
-rw-r--r--dbaccess/source/sdbtools/connection/connectiontools.cxx6
-rw-r--r--dbaccess/source/sdbtools/connection/objectnames.cxx6
-rw-r--r--dbaccess/source/ui/app/AppController.cxx180
-rw-r--r--dbaccess/source/ui/app/AppControllerDnD.cxx2
-rw-r--r--dbaccess/source/ui/app/AppControllerGen.cxx12
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx40
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx44
-rw-r--r--dbaccess/source/ui/app/AppDetailView.hxx2
-rw-r--r--dbaccess/source/ui/app/AppSwapWindow.cxx7
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.cxx10
-rw-r--r--dbaccess/source/ui/app/AppView.cxx6
-rw-r--r--dbaccess/source/ui/app/DocumentInfoPreview.cxx2
-rw-r--r--dbaccess/source/ui/app/subcomponentmanager.cxx10
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx115
-rw-r--r--dbaccess/source/ui/browser/brwview.cxx11
-rw-r--r--dbaccess/source/ui/browser/dataview.cxx2
-rw-r--r--dbaccess/source/ui/browser/dbloader.cxx36
-rw-r--r--dbaccess/source/ui/browser/dsEntriesNoExp.cxx30
-rw-r--r--dbaccess/source/ui/browser/exsrcbrw.cxx4
-rw-r--r--dbaccess/source/ui/browser/formadapter.cxx6
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx26
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx42
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx80
-rw-r--r--dbaccess/source/ui/control/ColumnControlWindow.cxx2
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx70
-rw-r--r--dbaccess/source/ui/control/RelationControl.cxx6
-rw-r--r--dbaccess/source/ui/control/dbtreelistbox.cxx20
-rw-r--r--dbaccess/source/ui/control/opendoccontrols.cxx24
-rw-r--r--dbaccess/source/ui/control/sqledit.cxx26
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx4
-rw-r--r--dbaccess/source/ui/dlg/CollectionView.cxx20
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx18
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.cxx24
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.cxx4
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx122
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx50
-rw-r--r--dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx8
-rw-r--r--dbaccess/source/ui/dlg/RelationDlg.cxx20
-rw-r--r--dbaccess/source/ui/dlg/TablesSingleDlg.cxx2
-rw-r--r--dbaccess/source/ui/dlg/TextConnectionHelper.cxx42
-rw-r--r--dbaccess/source/ui/dlg/UserAdmin.cxx32
-rw-r--r--dbaccess/source/ui/dlg/UserAdminDlg.cxx6
-rw-r--r--dbaccess/source/ui/dlg/admincontrols.cxx28
-rw-r--r--dbaccess/source/ui/dlg/adminpages.hxx1
-rw-r--r--dbaccess/source/ui/dlg/adtabdlg.cxx18
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.cxx62
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.cxx28
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.cxx22
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx14
-rw-r--r--dbaccess/source/ui/dlg/detailpages.cxx82
-rw-r--r--dbaccess/source/ui/dlg/directsql.cxx52
-rw-r--r--dbaccess/source/ui/dlg/dlgattr.cxx8
-rw-r--r--dbaccess/source/ui/dlg/dlgsave.cxx36
-rw-r--r--dbaccess/source/ui/dlg/dlgsize.cxx10
-rw-r--r--dbaccess/source/ui/dlg/dsselect.cxx4
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx38
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.cxx38
-rw-r--r--dbaccess/source/ui/dlg/optionalboolitem.cxx2
-rw-r--r--dbaccess/source/ui/dlg/paramdialog.cxx12
-rw-r--r--dbaccess/source/ui/dlg/queryfilter.cxx32
-rw-r--r--dbaccess/source/ui/dlg/queryorder.cxx14
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx12
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx10
-rw-r--r--dbaccess/source/ui/dlg/textconnectionsettings.cxx6
-rw-r--r--dbaccess/source/ui/inc/CollectionView.hxx4
-rw-r--r--dbaccess/source/ui/inc/brwview.hxx5
-rw-r--r--dbaccess/source/ui/inc/directsql.hxx2
-rw-r--r--dbaccess/source/ui/inc/opendoccontrols.hxx7
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx26
-rw-r--r--dbaccess/source/ui/misc/RowSetDrop.cxx2
-rw-r--r--dbaccess/source/ui/misc/TableCopyHelper.cxx8
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx4
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx12
-rw-r--r--dbaccess/source/ui/misc/WCPage.cxx22
-rw-r--r--dbaccess/source/ui/misc/WColumnSelect.cxx14
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx16
-rw-r--r--dbaccess/source/ui/misc/WNameMatch.cxx22
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx22
-rw-r--r--dbaccess/source/ui/misc/asyncmodaldialog.cxx2
-rw-r--r--dbaccess/source/ui/misc/controllerframe.cxx2
-rw-r--r--dbaccess/source/ui/misc/databaseobjectview.cxx8
-rw-r--r--dbaccess/source/ui/misc/datasourceconnector.cxx4
-rw-r--r--dbaccess/source/ui/misc/dsmeta.cxx49
-rw-r--r--dbaccess/source/ui/misc/indexcollection.cxx12
-rw-r--r--dbaccess/source/ui/misc/linkeddocuments.cxx34
-rw-r--r--dbaccess/source/ui/misc/stringlistitem.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/JAccess.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/JoinController.cxx50
-rw-r--r--dbaccess/source/ui/querydesign/JoinTableView.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/QTableConnectionData.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/QTableWindow.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx12
-rw-r--r--dbaccess/source/ui/querydesign/QueryTableView.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryTextView.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx28
-rw-r--r--dbaccess/source/ui/querydesign/TableFieldDescription.cxx54
-rw-r--r--dbaccess/source/ui/querydesign/TableWindow.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowAccess.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowListBox.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowTitle.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/limitboxcontroller.cxx10
-rw-r--r--dbaccess/source/ui/querydesign/querycontainerwindow.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx82
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.cxx12
-rw-r--r--dbaccess/source/ui/relationdesign/RTableConnection.cxx2
-rw-r--r--dbaccess/source/ui/relationdesign/RTableConnectionData.cxx6
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx12
-rw-r--r--dbaccess/source/ui/relationdesign/RelationTableView.cxx13
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx28
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx36
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignControl.cxx8
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignView.cxx8
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx8
-rw-r--r--dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx4
-rw-r--r--dbaccess/source/ui/uno/ColumnControl.cxx4
-rw-r--r--dbaccess/source/ui/uno/ColumnModel.cxx6
-rw-r--r--dbaccess/source/ui/uno/ColumnPeer.cxx2
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlg.cxx4
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx8
-rw-r--r--dbaccess/source/ui/uno/TableFilterDlg.cxx4
-rw-r--r--dbaccess/source/ui/uno/UserSettingsDlg.cxx4
-rw-r--r--dbaccess/source/ui/uno/admindlg.cxx4
-rw-r--r--dbaccess/source/ui/uno/composerdialogs.cxx20
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx28
-rw-r--r--dbaccess/source/ui/uno/dbinteraction.cxx10
-rw-r--r--dbaccess/source/ui/uno/textconnectionsettings_uno.cxx16
-rw-r--r--dbaccess/source/ui/uno/unoDirectSql.cxx2
-rw-r--r--dbaccess/source/ui/uno/unosqlmessage.cxx4
-rw-r--r--dbaccess/uiconfig/ui/admindialog.ui77
-rw-r--r--dbaccess/uiconfig/ui/autocharsetpage.ui28
-rw-r--r--dbaccess/uiconfig/ui/deleteallrowsdialog.ui32
-rw-r--r--dbaccess/uiconfig/ui/designsavemodifieddialog.ui34
-rw-r--r--dbaccess/uiconfig/ui/directsqldialog.ui3
-rw-r--r--dbaccess/uiconfig/ui/generalpagedialog.ui64
-rw-r--r--dbaccess/uiconfig/ui/savemodifieddialog.ui34
-rw-r--r--dbaccess/uiconfig/ui/tabledesignsavemodifieddialog.ui34
246 files changed, 2492 insertions, 2572 deletions
diff --git a/dbaccess/CppunitTest_dbaccess_CRMDatabase_test.mk b/dbaccess/CppunitTest_dbaccess_CRMDatabase_test.mk
new file mode 100644
index 000000000000..118cb9a4cd97
--- /dev/null
+++ b/dbaccess/CppunitTest_dbaccess_CRMDatabase_test.mk
@@ -0,0 +1,51 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,dbaccess_CRMDatabase_test))
+
+$(eval $(call gb_CppunitTest_use_external,dbaccess_CRMDatabase_test,boost_headers))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,dbaccess_CRMDatabase_test, \
+ dbaccess/qa/unit/CRMDatabase_test \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,dbaccess_CRMDatabase_test, \
+ comphelper \
+ cppu \
+ cppuhelper \
+ dbaxml \
+ dbtools \
+ sal \
+ subsequenttest \
+ utl \
+ test \
+ tk \
+ tl \
+ unotest \
+ xo \
+))
+
+$(eval $(call gb_CppunitTest_use_api,dbaccess_CRMDatabase_test,\
+ offapi \
+ oovbaapi \
+ udkapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,dbaccess_CRMDatabase_test))
+$(eval $(call gb_CppunitTest_use_vcl,dbaccess_CRMDatabase_test))
+
+$(eval $(call gb_CppunitTest_use_rdb,dbaccess_CRMDatabase_test,services))
+
+$(eval $(call gb_CppunitTest_use_configuration,dbaccess_CRMDatabase_test))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,dbaccess_CRMDatabase_test, \
+ dbaccess \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/dbaccess/CppunitTest_dbaccess_RowSetClones.mk b/dbaccess/CppunitTest_dbaccess_RowSetClones.mk
index 1b67411fb4bd..49ca097132f0 100644
--- a/dbaccess/CppunitTest_dbaccess_RowSetClones.mk
+++ b/dbaccess/CppunitTest_dbaccess_RowSetClones.mk
@@ -108,10 +108,4 @@ $(eval $(call gb_CppunitTest_use_components,dbaccess_RowSetClones,\
$(eval $(call gb_CppunitTest_use_configuration,dbaccess_RowSetClones))
-$(call gb_CppunitTest_get_target,dbaccess_RowSetClones) : $(WORKDIR)/CppunitTest/RowSetClones.odb
-$(WORKDIR)/CppunitTest/RowSetClones.odb : $(SRCDIR)/dbaccess/qa/extras/testdocuments/RowSetClones.odb
- mkdir -p $(dir $@)
- cp -P -f "$<" "$@"
-.PHONY: $(WORKDIR)/CppunitTest/RowSetClones.odb
-
# vim: set noet sw=4 ts=4:
diff --git a/dbaccess/CppunitTest_dbaccess_dialog_save.mk b/dbaccess/CppunitTest_dbaccess_dialog_save.mk
index 81adbc733a20..b77cbfb95ec1 100644
--- a/dbaccess/CppunitTest_dbaccess_dialog_save.mk
+++ b/dbaccess/CppunitTest_dbaccess_dialog_save.mk
@@ -100,10 +100,4 @@ $(eval $(call gb_CppunitTest_use_components,dbaccess_dialog_save,\
$(eval $(call gb_CppunitTest_use_configuration,dbaccess_dialog_save))
-$(call gb_CppunitTest_get_target,dbaccess_dialog_save) : $(WORKDIR)/CppunitTest/testDialogSave.odb
-$(WORKDIR)/CppunitTest/testDialogSave.odb : $(SRCDIR)/dbaccess/qa/extras/testdocuments/testDialogSave.odb
- mkdir -p $(dir $@)
- cp -P -f "$<" "$@"
-.PHONY: $(WORKDIR)/CppunitTest/testDialogSave.odb
-
# vim: set noet sw=4 ts=4:
diff --git a/dbaccess/CppunitTest_dbaccess_embeddeddb_performancetest.mk b/dbaccess/CppunitTest_dbaccess_embeddeddb_performancetest.mk
index 6a92256937b3..80af11b4e826 100644
--- a/dbaccess/CppunitTest_dbaccess_embeddeddb_performancetest.mk
+++ b/dbaccess/CppunitTest_dbaccess_embeddeddb_performancetest.mk
@@ -41,32 +41,7 @@ $(eval $(call gb_CppunitTest_use_api,dbaccess_embeddeddb_performancetest,\
$(eval $(call gb_CppunitTest_use_ure,dbaccess_embeddeddb_performancetest))
$(eval $(call gb_CppunitTest_use_vcl,dbaccess_embeddeddb_performancetest))
-$(eval $(call gb_CppunitTest_use_components,dbaccess_embeddeddb_performancetest,\
- basic/util/sb \
- comphelper/util/comphelp \
- configmgr/source/configmgr \
- connectivity/source/cpool/dbpool2 \
- connectivity/source/drivers/firebird/firebird_sdbc \
- connectivity/source/manager/sdbc2 \
- dbaccess/util/dba \
- dbaccess/source/filter/xml/dbaxml \
- dbaccess/util/dbu \
- filter/source/config/cache/filterconfig1 \
- framework/util/fwk \
- i18npool/util/i18npool \
- linguistic/source/lng \
- package/source/xstor/xstor \
- package/util/package2 \
- sax/source/expatwrap/expwrap \
- sfx2/util/sfx \
- svl/source/fsstor/fsstorage \
- svl/util/svl \
- toolkit/util/tk \
- ucb/source/core/ucb1 \
- ucb/source/ucp/file/ucpfile1 \
- unotools/util/utl \
- xmloff/util/xo \
-))
+$(eval $(call gb_CppunitTest_use_rdb,dbaccess_embeddeddb_performancetest,services))
$(eval $(call gb_CppunitTest_use_configuration,dbaccess_embeddeddb_performancetest))
diff --git a/dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk b/dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk
index 18cda6b38be9..733045c6788b 100644
--- a/dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk
+++ b/dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk
@@ -104,10 +104,4 @@ $(eval $(call gb_CppunitTest_use_uiconfigs,dbaccess_empty_stdlib_save, \
dbaccess \
))
-$(call gb_CppunitTest_get_target,dbaccess_empty_stdlib_save) : $(WORKDIR)/CppunitTest/testEmptyStdlibSave.odb
-$(WORKDIR)/CppunitTest/testEmptyStdlibSave.odb : $(SRCDIR)/dbaccess/qa/extras/testdocuments/testDialogSave.odb
- mkdir -p $(dir $@)
- cp -P -f "$<" "$@"
-.PHONY: $(WORKDIR)/CppunitTest/testEmptyStdlibSave.odb
-
# vim: set noet sw=4 ts=4:
diff --git a/dbaccess/CppunitTest_dbaccess_macros_test.mk b/dbaccess/CppunitTest_dbaccess_macros_test.mk
deleted file mode 100644
index 248a5520c66c..000000000000
--- a/dbaccess/CppunitTest_dbaccess_macros_test.mk
+++ /dev/null
@@ -1,102 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_CppunitTest_CppunitTest,dbaccess_macros_test))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,dbaccess_macros_test, \
- dbaccess/qa/extras/macros-test \
-))
-
-$(eval $(call gb_CppunitTest_use_externals,dbaccess_macros_test,\
- boost_headers \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,dbaccess_macros_test, \
- basegfx \
- comphelper \
- cppu \
- cppuhelper \
- dba \
- dbu \
- sdbt \
- drawinglayer \
- editeng \
- for \
- forui \
- i18nlangtag \
- msfilter \
- oox \
- sal \
- salhelper \
- sax \
- sb \
- sfx \
- sot \
- svl \
- svt \
- svx \
- svxcore \
- test \
- subsequenttest \
- tl \
- tk \
- ucbhelper \
- unotest \
- utl \
- $(call gb_Helper_optional,SCRIPTING, \
- vbahelper) \
- vcl \
- xo \
-))
-
-$(eval $(call gb_CppunitTest_use_api,dbaccess_macros_test,\
- offapi \
- oovbaapi \
- udkapi \
-))
-
-$(eval $(call gb_CppunitTest_use_ure,dbaccess_macros_test))
-$(eval $(call gb_CppunitTest_use_vcl,dbaccess_macros_test))
-
-$(eval $(call gb_CppunitTest_use_components,dbaccess_macros_test,\
- basic/util/sb \
- comphelper/util/comphelp \
- configmgr/source/configmgr \
- dbaccess/util/dba \
- dbaccess/util/dbu \
- dbaccess/util/sdbt \
- dbaccess/source/filter/xml/dbaxml \
- filter/source/config/cache/filterconfig1 \
- forms/util/frm \
- framework/util/fwk \
- i18npool/util/i18npool \
- oox/util/oox \
- package/source/xstor/xstor \
- package/util/package2 \
- sax/source/expatwrap/expwrap \
- scripting/source/basprov/basprov \
- scripting/util/scriptframe \
- sfx2/util/sfx \
- sot/util/sot \
- svl/source/fsstor/fsstorage \
- svl/util/svl \
- toolkit/util/tk \
- ucb/source/core/ucb1 \
- ucb/source/ucp/file/ucpfile1 \
- ucb/source/ucp/tdoc/ucptdoc1 \
- unotools/util/utl \
- unoxml/source/rdf/unordf \
- unoxml/source/service/unoxml \
- uui/util/uui \
- xmloff/util/xo \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,dbaccess_macros_test))
-
-# vim: set noet sw=4 ts=4:
diff --git a/dbaccess/CppunitTest_dbaccess_nolib_save.mk b/dbaccess/CppunitTest_dbaccess_nolib_save.mk
index 088dc92c4310..4437548977de 100644
--- a/dbaccess/CppunitTest_dbaccess_nolib_save.mk
+++ b/dbaccess/CppunitTest_dbaccess_nolib_save.mk
@@ -100,10 +100,4 @@ $(eval $(call gb_CppunitTest_use_components,dbaccess_nolib_save,\
$(eval $(call gb_CppunitTest_use_configuration,dbaccess_nolib_save))
-$(call gb_CppunitTest_get_target,dbaccess_nolib_save) : $(WORKDIR)/CppunitTest/testNolibSave.odb
-$(WORKDIR)/CppunitTest/testNolibSave.odb : $(SRCDIR)/dbaccess/qa/extras/testdocuments/testDialogSave.odb
- mkdir -p $(dir $@)
- cp -P -f "$<" "$@"
-.PHONY: $(WORKDIR)/CppunitTest/testNolibSave.odb
-
# vim: set noet sw=4 ts=4:
diff --git a/dbaccess/JunitTest_dbaccess_complex.mk b/dbaccess/JunitTest_dbaccess_complex.mk
index ba333cbf3b27..99a3cd9f5cbc 100644
--- a/dbaccess/JunitTest_dbaccess_complex.mk
+++ b/dbaccess/JunitTest_dbaccess_complex.mk
@@ -33,7 +33,6 @@ $(eval $(call gb_JunitTest_add_sourcefiles,dbaccess_complex,\
dbaccess/qa/complex/dbaccess/CRMBasedTestCase \
dbaccess/qa/complex/dbaccess/CopyTableInterActionHandler \
dbaccess/qa/complex/dbaccess/CopyTableWizard \
- dbaccess/qa/complex/dbaccess/DataSource \
dbaccess/qa/complex/dbaccess/DatabaseApplication \
dbaccess/qa/complex/dbaccess/DatabaseDocument \
dbaccess/qa/complex/dbaccess/FileHelper \
diff --git a/dbaccess/Library_dbahsql.mk b/dbaccess/Library_dbahsql.mk
index 7929e9bd6a2b..05b99126c62e 100644
--- a/dbaccess/Library_dbahsql.mk
+++ b/dbaccess/Library_dbahsql.mk
@@ -14,11 +14,6 @@ $(eval $(call gb_Library_set_include,dbahsql,\
-I$(WORKDIR)/YaccTarget/connectivity/source/parse \
))
-$(eval $(call gb_Library_use_externals,dbahsql,\
- boost_headers \
- boost_date_time \
-))
-
$(eval $(call gb_Library_set_precompiled_header,dbahsql,dbaccess/inc/pch/precompiled_dbahsql))
$(eval $(call gb_Library_use_sdk_api,dbahsql))
diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk
index c51b66c3522d..64c92b0d2dc8 100644
--- a/dbaccess/Module_dbaccess.mk
+++ b/dbaccess/Module_dbaccess.mk
@@ -52,7 +52,6 @@ $(eval $(call gb_Module_add_check_targets,dbaccess,\
CppunitTest_dbaccess_dialog_save \
CppunitTest_dbaccess_empty_stdlib_save \
CppunitTest_dbaccess_nolib_save \
- CppunitTest_dbaccess_macros_test \
CppunitTest_dbaccess_hsqlschema_import \
))
endif
@@ -61,6 +60,7 @@ ifeq ($(ENABLE_JAVA),TRUE)
$(eval $(call gb_Module_add_check_targets,dbaccess,\
CppunitTest_dbaccess_hsqldb_test \
CppunitTest_dbaccess_RowSetClones \
+ CppunitTest_dbaccess_CRMDatabase_test \
))
endif
diff --git a/dbaccess/inc/core_resource.hxx b/dbaccess/inc/core_resource.hxx
index 000a59bf1713..713e494ae0f9 100644
--- a/dbaccess/inc/core_resource.hxx
+++ b/dbaccess/inc/core_resource.hxx
@@ -24,6 +24,7 @@
#include <unotools/resmgr.hxx>
#define DBA_RES( id ) ::dbaccess::ResourceManager::loadString( id )
+#define DBA_RES_PLURAL( id, number ) ::dbaccess::ResourceManager::loadString( id, number )
#define DBA_RES_PARAM( id, ascii, replace ) ::dbaccess::ResourceManager::loadString( id, ascii, replace )
namespace dbaccess
@@ -41,6 +42,7 @@ namespace dbaccess
/** loads the string with the specified resource id
*/
static OUString loadString(TranslateId pResId);
+ static OUString loadString(TranslateNId aContextSingularPlural, int nCardinality);
/** loads a string from the resource file, substituting two placeholders with given strings
@@ -57,9 +59,9 @@ namespace dbaccess
*/
static OUString loadString(
TranslateId pResId,
- const char* _pPlaceholderAscii1,
+ std::u16string_view _rPlaceholderAscii1,
std::u16string_view _rReplace1,
- const char* _pPlaceholderAscii2,
+ std::u16string_view _rPlaceholderAscii2,
std::u16string_view _rReplace2
);
};
diff --git a/dbaccess/inc/pch/precompiled_dbahsql.hxx b/dbaccess/inc/pch/precompiled_dbahsql.hxx
index dbc9bdfeb145..82a6f7b1d366 100644
--- a/dbaccess/inc/pch/precompiled_dbahsql.hxx
+++ b/dbaccess/inc/pch/precompiled_dbahsql.hxx
@@ -23,7 +23,6 @@
#include <sal/config.h>
#if PCH_LEVEL >= 1
#include <string_view>
-#include <boost/date_time/posix_time/posix_time.hpp>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
#include <rtl/ustrbuf.hxx>
diff --git a/dbaccess/inc/strings.hrc b/dbaccess/inc/strings.hrc
index 0691ff9f7a8b..5eeb38a0a79c 100644
--- a/dbaccess/inc/strings.hrc
+++ b/dbaccess/inc/strings.hrc
@@ -22,6 +22,7 @@
#include <unotools/resmgr.hxx>
#define NC_(Context, String) TranslateId(Context, u8##String)
+#define NNC_(Context, StringSingular, StringPlural) TranslateNId(Context, reinterpret_cast<char const *>(u8##StringSingular), reinterpret_cast<char const *>(u8##StringPlural))
#define RID_STR_CONNECTION_INVALID NC_("RID_STR_CONNECTION_INVALID", "No connection could be established.")
#define RID_STR_TABLE_IS_FILTERED NC_("RID_STR_TABLE_IS_FILTERED", "The table $name$ already exists. It is not visible because it has been filtered out.")
@@ -398,6 +399,8 @@
#define STR_SPREADSHEETPATH NC_("STR_SPREADSHEETPATH", "~Location and file name" )
#define STR_COMMAND_EXECUTED_SUCCESSFULLY NC_("STR_COMMAND_EXECUTED_SUCCESSFULLY", "Command successfully executed." )
+#define STR_COMMAND_NROWS NNC_("STR_COMMAND_NROWS", "%1 row in set", "%1 rows in set" )
+
#define STR_DIRECTSQL_CONNECTIONLOST NC_("STR_DIRECTSQL_CONNECTIONLOST", "The connection to the database has been lost. This dialog will be closed.")
#define STR_TAB_INDEX_SORTORDER NC_("STR_TAB_INDEX_SORTORDER", "Sort order" )
diff --git a/dbaccess/inc/strings.hxx b/dbaccess/inc/strings.hxx
index 9783f9e41030..d1668dd24517 100644
--- a/dbaccess/inc/strings.hxx
+++ b/dbaccess/inc/strings.hxx
@@ -256,7 +256,7 @@ inline constexpr OUString SERVICE_CONTROLDEFAULT = u"com.sun.star.comp.dbu.OColu
// other DBU properties
inline constexpr OUString PROPERTY_ENABLEOUTERJOIN(u"EnableOuterJoinEscape"_ustr);
-inline constexpr OUString PROPERTY_TABSTOP(u"TabStop"_ustr);
+inline constexpr OUString PROPERTY_TABSTOP2(u"TabStop"_ustr);
inline constexpr OUString PROPERTY_DEFAULTCONTROL(u"DefaultControl"_ustr);
inline constexpr OUString PROPERTY_ENABLED(u"Enabled"_ustr);
inline constexpr OUString PROPERTY_MOUSE_WHEEL_BEHAVIOR(u"MouseWheelBehavior"_ustr);
diff --git a/dbaccess/qa/complex/dbaccess/DataSource.java b/dbaccess/qa/complex/dbaccess/DataSource.java
deleted file mode 100644
index 0413a6e07b69..000000000000
--- a/dbaccess/qa/complex/dbaccess/DataSource.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package complex.dbaccess;
-
-import com.sun.star.container.XNameAccess;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XNamingService;
-import connectivity.tools.CRMDatabase;
-import connectivity.tools.HsqlDatabase;
-
-// ---------- junit imports -----------------
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-
-
-public class DataSource extends TestCase
-{
-
- HsqlDatabase m_database;
- connectivity.tools.DataSource m_dataSource;
-
-
- private void createTestCase() throws Exception
- {
- if (m_database == null)
- {
- final CRMDatabase database = new CRMDatabase( getMSF(), false );
- m_database = database.getDatabase();
- m_dataSource = m_database.getDataSource();
- }
- }
-
-
- @Test
- public void testRegistrationName() throws Exception
- {
- createTestCase();
- // 1. check the existing "Bibliography" data source whether it has the proper name
- String dataSourceName = "Bibliography";
- final connectivity.tools.DataSource bibliography = new connectivity.tools.DataSource(getMSF(), dataSourceName);
- assertEquals("pre-registered database has a wrong name!", dataSourceName, bibliography.getName());
- // 2. register a newly created data source, and verify it has the proper name
- dataSourceName = "someDataSource";
- final XNamingService dataSourceRegistrations = UnoRuntime.queryInterface(
- XNamingService.class, getMSF().createInstance( "com.sun.star.sdb.DatabaseContext" ) );
- final XNameAccess existenceCheck = UnoRuntime.queryInterface( XNameAccess.class, dataSourceRegistrations );
- if ( existenceCheck.hasByName( "someDataSource" ) )
- dataSourceRegistrations.revokeObject( "someDataSource" );
- dataSourceRegistrations.registerObject("someDataSource", m_dataSource.getXDataSource());
- assertEquals("registration name of a newly registered data source is wrong", dataSourceName, m_dataSource.getName());
- }
-}
diff --git a/dbaccess/qa/extras/dialog-save.cxx b/dbaccess/qa/extras/dialog-save.cxx
index 04c12b1c5e8b..56093548914a 100644
--- a/dbaccess/qa/extras/dialog-save.cxx
+++ b/dbaccess/qa/extras/dialog-save.cxx
@@ -29,25 +29,22 @@ public:
void test();
CPPUNIT_TEST_SUITE(DialogSaveTest);
-// Should we disable this test on MOX and WNT?
-// #if !defined(MACOSX) && !defined(_WIN32)
CPPUNIT_TEST(test);
-// #endif
CPPUNIT_TEST_SUITE_END();
};
DialogSaveTest::DialogSaveTest()
- : UnoApiTest("/dbaccess/qa/extras/testdocuments")
+ : UnoApiTest(u"/dbaccess/qa/extras/testdocuments"_ustr)
{
}
void DialogSaveTest::test()
{
- const OUString aFileName(m_directories.getURLFromWorkdir(u"CppunitTest/testDialogSave.odb"));
+ createTempCopy(u"testDialogSave.odb");
{
- mxComponent = loadFromDesktop(aFileName);
+ mxComponent = loadFromDesktop(maTempFile.GetURL());
uno::Reference< frame::XStorable > xDocStorable(mxComponent, UNO_QUERY_THROW);
uno::Reference< document::XEmbeddedScripts > xDocScr(mxComponent, UNO_QUERY_THROW);
uno::Reference< script::XStorageBasedLibraryContainer > xStorBasLib(xDocScr->getBasicLibraries());
@@ -78,11 +75,11 @@ void DialogSaveTest::test()
// All our uno::References are (should?) be invalid now -> let them go out of scope
}
{
- uno::Sequence<uno::Any> args{ uno::Any(aFileName) };
- Reference<container::XHierarchicalNameAccess> xHNA(getMultiServiceFactory()->createInstanceWithArguments("com.sun.star.packages.Package", args), UNO_QUERY_THROW);
- Reference< beans::XPropertySet > xPS(xHNA->getByHierarchicalName("Dialogs/Standard/Dialog1.xml"), UNO_QUERY_THROW);
+ uno::Sequence<uno::Any> args{ uno::Any(maTempFile.GetURL()) };
+ Reference<container::XHierarchicalNameAccess> xHNA(getMultiServiceFactory()->createInstanceWithArguments(u"com.sun.star.packages.Package"_ustr, args), UNO_QUERY_THROW);
+ Reference< beans::XPropertySet > xPS(xHNA->getByHierarchicalName(u"Dialogs/Standard/Dialog1.xml"_ustr), UNO_QUERY_THROW);
sal_Int64 nSize = 0;
- CPPUNIT_ASSERT(xPS->getPropertyValue("Size") >>= nSize);
+ CPPUNIT_ASSERT(xPS->getPropertyValue(u"Size"_ustr) >>= nSize);
CPPUNIT_ASSERT(nSize != 0);
}
}
diff --git a/dbaccess/qa/extras/empty-stdlib-save.cxx b/dbaccess/qa/extras/empty-stdlib-save.cxx
index 5c3b5d028d8c..67550492c258 100644
--- a/dbaccess/qa/extras/empty-stdlib-save.cxx
+++ b/dbaccess/qa/extras/empty-stdlib-save.cxx
@@ -27,25 +27,22 @@ public:
void test();
CPPUNIT_TEST_SUITE(DialogSaveTest);
-// Should we disable this test on MOX and WNT?
-// #if !defined(MACOSX) && !defined(_WIN32)
CPPUNIT_TEST(test);
-// #endif
CPPUNIT_TEST_SUITE_END();
};
DialogSaveTest::DialogSaveTest()
- : UnoApiTest("/dbaccess/qa/extras/testdocuments")
+ : UnoApiTest(u"/dbaccess/qa/extras/testdocuments"_ustr)
{
}
void DialogSaveTest::test()
{
- const OUString aFileName(m_directories.getURLFromWorkdir(u"CppunitTest/testEmptyStdlibSave.odb"));
+ createTempCopy(u"testDialogSave.odb");
{
- mxComponent = loadFromDesktop(aFileName);
+ mxComponent = loadFromDesktop(maTempFile.GetURL());
uno::Reference< frame::XStorable > xDocStorable(mxComponent, UNO_QUERY_THROW);
uno::Reference< document::XEmbeddedScripts > xDocScr(mxComponent, UNO_QUERY_THROW);
uno::Reference< script::XStorageBasedLibraryContainer > xStorBasLib(xDocScr->getBasicLibraries());
@@ -66,12 +63,12 @@ void DialogSaveTest::test()
a = xBasLib->getByName(sStandard);
a >>= xI;
CPPUNIT_ASSERT(xI.is());
- xI->removeByName("Raralix");
+ xI->removeByName(u"Raralix"_ustr);
a = xDlgLib->getByName(sStandard);
a >>= xI;
CPPUNIT_ASSERT(xI.is());
- xI->removeByName("Dialog1");
+ xI->removeByName(u"Dialog1"_ustr);
// uno::Reference< util::XModifiable > xDlgMod(xDlgLib, UNO_QUERY_THROW);
// xDlgMod->setModified(sal_True);
@@ -92,10 +89,10 @@ void DialogSaveTest::test()
// All our uno::References are (should?) be invalid now -> let them go out of scope
}
{
- uno::Sequence<uno::Any> args{ uno::Any(aFileName) };
- Reference<container::XHierarchicalNameAccess> xHNA(getMultiServiceFactory()->createInstanceWithArguments("com.sun.star.packages.Package", args), UNO_QUERY_THROW);
- CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName("Basic/Standard"));
- CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName("Dialogs/Standard"));
+ uno::Sequence<uno::Any> args{ uno::Any(maTempFile.GetURL()) };
+ Reference<container::XHierarchicalNameAccess> xHNA(getMultiServiceFactory()->createInstanceWithArguments(u"com.sun.star.packages.Package"_ustr, args), UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName(u"Basic/Standard"_ustr));
+ CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName(u"Dialogs/Standard"_ustr));
}
}
diff --git a/dbaccess/qa/extras/hsql_schema_import.cxx b/dbaccess/qa/extras/hsql_schema_import.cxx
index f5f34d38b69a..e8f7cfa26f3a 100644
--- a/dbaccess/qa/extras/hsql_schema_import.cxx
+++ b/dbaccess/qa/extras/hsql_schema_import.cxx
@@ -64,11 +64,11 @@ void HsqlSchemaImportTest::testIntegerPrimaryKeyNotNull()
FbCreateStmtParser aCreateParser;
aCreateParser.parse(u"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY)");
- CPPUNIT_ASSERT_EQUAL(OUString{ "\"myTable\"" }, aCreateParser.getTableName());
+ CPPUNIT_ASSERT_EQUAL(u"\"myTable\""_ustr, aCreateParser.getTableName());
const auto& columns = aCreateParser.getColumnDef();
CPPUNIT_ASSERT_EQUAL(1_z, columns.size());
const auto& column = columns.at(0);
- CPPUNIT_ASSERT_EQUAL(OUString{ "\"id\"" }, column.getName());
+ CPPUNIT_ASSERT_EQUAL(u"\"id\""_ustr, column.getName());
CPPUNIT_ASSERT_EQUAL(css::sdbc::DataType::INTEGER, column.getDataType());
CPPUNIT_ASSERT(column.isPrimaryKey());
CPPUNIT_ASSERT(!column.isNullable());
@@ -186,7 +186,7 @@ void HsqlSchemaImportTest::testDefaultValueNow()
const ColumnDefinition* colTimeStamp = lcl_findByType(columns, css::sdbc::DataType::TIMESTAMP);
CPPUNIT_ASSERT(colTimeStamp != nullptr);
- CPPUNIT_ASSERT_EQUAL(OUString{ "NOW" }, colTimeStamp->getDefault()); // parsed NOW
+ CPPUNIT_ASSERT_EQUAL(u"NOW"_ustr, colTimeStamp->getDefault()); // parsed NOW
OUString fbSql = aCreateParser.compose();
CPPUNIT_ASSERT(fbSql.indexOf("\'NOW\'") > 0); // composed 'NOW'
}
diff --git a/dbaccess/qa/extras/macros-test.cxx b/dbaccess/qa/extras/macros-test.cxx
deleted file mode 100644
index c2f75fa3c8f6..000000000000
--- a/dbaccess/qa/extras/macros-test.cxx
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include <sal/config.h>
-#include <test/unoapi_test.hxx>
-
-using namespace ::com::sun::star;
-
-#if !defined(MACOSX) && !defined(_WIN32)
-
-class DBAccessTest : public UnoApiTest
-{
-public:
- DBAccessTest();
-
- void test();
-
- CPPUNIT_TEST_SUITE(DBAccessTest);
- CPPUNIT_TEST(test);
- CPPUNIT_TEST_SUITE_END();
-};
-
-DBAccessTest::DBAccessTest()
- : UnoApiTest("/dbaccess/qa/extras/testdocuments")
-{
-}
-
-void DBAccessTest::test() { loadFromFile(u"testdb.odb"); }
-
-CPPUNIT_TEST_SUITE_REGISTRATION(DBAccessTest);
-
-#endif
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/qa/extras/nolib-save.cxx b/dbaccess/qa/extras/nolib-save.cxx
index 614c4f03794a..89dc9f036dff 100644
--- a/dbaccess/qa/extras/nolib-save.cxx
+++ b/dbaccess/qa/extras/nolib-save.cxx
@@ -27,25 +27,22 @@ public:
void test();
CPPUNIT_TEST_SUITE(DialogSaveTest);
-// Should we disable this test on MOX and WNT?
-// #if !defined(MACOSX) && !defined(_WIN32)
CPPUNIT_TEST(test);
-// #endif
CPPUNIT_TEST_SUITE_END();
};
DialogSaveTest::DialogSaveTest()
- : UnoApiTest("/dbaccess/qa/extras/testdocuments")
+ : UnoApiTest(u"/dbaccess/qa/extras/testdocuments"_ustr)
{
}
void DialogSaveTest::test()
{
- const OUString aFileName(m_directories.getURLFromWorkdir(u"CppunitTest/testNolibSave.odb"));
+ createTempCopy(u"testDialogSave.odb");
{
- mxComponent = loadFromDesktop(aFileName);
+ mxComponent = loadFromDesktop(maTempFile.GetURL());
uno::Reference< frame::XStorable > xDocStorable(mxComponent, UNO_QUERY_THROW);
uno::Reference< document::XEmbeddedScripts > xDocScr(mxComponent, UNO_QUERY_THROW);
uno::Reference< script::XStorageBasedLibraryContainer > xStorBasLib(xDocScr->getBasicLibraries());
@@ -82,10 +79,10 @@ void DialogSaveTest::test()
// All our uno::References are (should?) be invalid now -> let them go out of scope
}
{
- uno::Sequence<uno::Any> args{ uno::Any(aFileName) };
- Reference<container::XHierarchicalNameAccess> xHNA(getMultiServiceFactory()->createInstanceWithArguments("com.sun.star.packages.Package", args), UNO_QUERY_THROW);
- CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName("Basic/Standard"));
- CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName("Dialogs/Standard"));
+ uno::Sequence<uno::Any> args{ uno::Any(maTempFile.GetURL()) };
+ Reference<container::XHierarchicalNameAccess> xHNA(getMultiServiceFactory()->createInstanceWithArguments(u"com.sun.star.packages.Package"_ustr, args), UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName(u"Basic/Standard"_ustr));
+ CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName(u"Dialogs/Standard"_ustr));
}
}
diff --git a/dbaccess/qa/extras/rowsetclones.cxx b/dbaccess/qa/extras/rowsetclones.cxx
index 88afad9eab9e..053b58199a78 100644
--- a/dbaccess/qa/extras/rowsetclones.cxx
+++ b/dbaccess/qa/extras/rowsetclones.cxx
@@ -40,30 +40,30 @@ public:
RowSetClones::RowSetClones()
- : UnoApiTest("")
+ : UnoApiTest(u"/dbaccess/qa/extras/testdocuments/"_ustr)
{
}
void RowSetClones::test()
{
- const OUString sFilePath(m_directories.getURLFromWorkdir(u"CppunitTest/RowSetClones.odb"));
+ createTempCopy(u"RowSetClones.odb");
+ mxComponent = loadFromDesktop(maTempFile.GetURL());
- mxComponent = loadFromDesktop(sFilePath);
uno::Reference< XOfficeDatabaseDocument > xDocument(mxComponent, UNO_QUERY_THROW);
uno::Reference< XDataSource > xDataSource = xDocument->getDataSource();
CPPUNIT_ASSERT(xDataSource.is());
- uno::Reference< XConnection > xConnection = xDataSource->getConnection("","");
+ uno::Reference< XConnection > xConnection = xDataSource->getConnection(u""_ustr,u""_ustr);
CPPUNIT_ASSERT(xConnection.is());
- uno::Reference< XRowSet > xRowSet (getMultiServiceFactory()->createInstance("com.sun.star.sdb.RowSet" ), UNO_QUERY);
+ uno::Reference< XRowSet > xRowSet (getMultiServiceFactory()->createInstance(u"com.sun.star.sdb.RowSet"_ustr ), UNO_QUERY);
CPPUNIT_ASSERT(xRowSet.is());
uno::Reference< XPropertySet > rowSetProperties ( xRowSet, UNO_QUERY );
CPPUNIT_ASSERT(rowSetProperties.is());
- rowSetProperties->setPropertyValue("Command", Any(OUString("SELECT * FROM Assets ORDER BY AssetID")));
- rowSetProperties->setPropertyValue("CommandType", Any(CommandType::COMMAND));
- rowSetProperties->setPropertyValue("ActiveConnection", Any(xConnection));
+ rowSetProperties->setPropertyValue(u"Command"_ustr, Any(u"SELECT * FROM Assets ORDER BY AssetID"_ustr));
+ rowSetProperties->setPropertyValue(u"CommandType"_ustr, Any(CommandType::COMMAND));
+ rowSetProperties->setPropertyValue(u"ActiveConnection"_ustr, Any(xConnection));
xRowSet->execute();
uno::Reference< XResultSet > xResultSet = xRowSet;
diff --git a/dbaccess/qa/extras/testdocuments/testdb.odb b/dbaccess/qa/extras/testdocuments/testdb.odb
deleted file mode 100644
index 038e998e6e96..000000000000
--- a/dbaccess/qa/extras/testdocuments/testdb.odb
+++ /dev/null
Binary files differ
diff --git a/dbaccess/qa/python/fdo84315.py b/dbaccess/qa/python/fdo84315.py
index 680ba7495c3b..75954c0cd0b2 100644
--- a/dbaccess/qa/python/fdo84315.py
+++ b/dbaccess/qa/python/fdo84315.py
@@ -56,12 +56,12 @@ class Fdo84315(unittest.TestCase):
xResultset = xStatement.executeQuery('SELECT "count" FROM "test_table"')
expected_values = deque([42, 4711])
- xMeta = self.__test_Query('count', NUMERIC, xResultset)
+ self.__test_Query('count', NUMERIC, xResultset)
self.__test_ResultSetInteger(xResultset, expected_values)
xResultset = xStatement.executeQuery('SELECT "name" FROM "test_table"')
expected_values = deque(['foo', 'bar'])
- xMeta = self.__test_Query('name', VAR_CHAR, xResultset)
+ self.__test_Query('name', VAR_CHAR, xResultset)
self.__test_ResultSetString(xResultset, expected_values)
xResultset = xStatement.executeQuery('SELECT "id" FROM "test_table"')
diff --git a/dbaccess/qa/unit/CRMDatabase_test.cxx b/dbaccess/qa/unit/CRMDatabase_test.cxx
new file mode 100644
index 000000000000..634bd17b0b0d
--- /dev/null
+++ b/dbaccess/qa/unit/CRMDatabase_test.cxx
@@ -0,0 +1,134 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "dbtest_base.cxx"
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/sdb/DatabaseContext.hpp>
+#include <com/sun/star/sdb/XDocumentDataSource.hpp>
+#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
+#include <com/sun/star/sdb/XQueriesSupplier.hpp>
+#include <com/sun/star/sdbc/XDataSource.hpp>
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#include <com/sun/star/sdbc/XResultSet.hpp>
+#include <com/sun/star/sdbc/XRow.hpp>
+#include <com/sun/star/uno/XNamingService.hpp>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+class CRMDBTest : public DBTestBase
+{
+public:
+ void testCRMDatabase();
+ void testRegistrationName();
+
+ CPPUNIT_TEST_SUITE(CRMDBTest);
+ CPPUNIT_TEST(testCRMDatabase);
+ CPPUNIT_TEST(testRegistrationName);
+ CPPUNIT_TEST_SUITE_END();
+};
+
+void CRMDBTest::testCRMDatabase()
+{
+ createDBDocument(u"sdbc:embedded:hsqldb"_ustr);
+ uno::Reference<sdb::XOfficeDatabaseDocument> xDocument(mxComponent, UNO_QUERY_THROW);
+ uno::Reference<XDataSource> xDataSource = xDocument->getDataSource();
+ CPPUNIT_ASSERT(xDataSource.is());
+
+ // create queries before establishing connection to database
+ createQueries(xDataSource);
+
+ uno::Reference<XConnection> xConnection = getConnectionForDocument(xDocument);
+ createTables(xConnection);
+
+ // test selection
+ Reference<XStatement> xStatement = xConnection->createStatement();
+ Reference<XResultSet> xResults
+ = xStatement->executeQuery(u"SELECT \"NAME\" FROM \"CATEGORIES\" ORDER BY \"ID\""_ustr);
+ CPPUNIT_ASSERT(xResults.is());
+
+ Reference<XRow> xRow(xResults, UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xResults->next());
+ CPPUNIT_ASSERT_EQUAL(u"Food"_ustr, xRow->getString(1));
+ CPPUNIT_ASSERT(xResults->next());
+ CPPUNIT_ASSERT_EQUAL(u"Furniture"_ustr, xRow->getString(1));
+
+ // test if the queries have been created and can be used
+ uno::Reference<XQueriesSupplier> xQuerySupplier(xConnection, UNO_QUERY_THROW);
+ uno::Reference<container::XNameAccess> xQueryAccess = xQuerySupplier->getQueries();
+ CPPUNIT_ASSERT(xQueryAccess->hasElements());
+
+ // the unshipped orders query depends on the all orders query, so we'll test
+ // to see if both work
+ uno::Reference<sdbcx::XColumnsSupplier> xColumns(
+ xQueryAccess->getByName(u"unshipped orders"_ustr), UNO_QUERY);
+ uno::Reference<container::XNameAccess> xColumnAccess(xColumns->getColumns());
+ CPPUNIT_ASSERT(xColumnAccess->hasElements());
+
+ Sequence<OUString> ColumnNames = xColumnAccess->getElementNames();
+ CPPUNIT_ASSERT(ColumnNames.hasElements());
+ // first column returned should be from the all orders query
+ CPPUNIT_ASSERT_EQUAL(ColumnNames[0], u"Order No."_ustr);
+}
+
+void CRMDBTest::testRegistrationName()
+{
+ // 1. check the existing "Bibliography" data source whether it has the proper name
+ Reference<container::XNameAccess> xNameAccess(
+ getMultiServiceFactory()->createInstance(u"com.sun.star.sdb.DatabaseContext"_ustr),
+ UNO_QUERY);
+ Reference<sdbc::XDataSource> xBiblioDataSource(xNameAccess->getByName(u"Bibliography"_ustr),
+ UNO_QUERY);
+ CPPUNIT_ASSERT(xBiblioDataSource.is());
+
+ Reference<beans::XPropertySet> xBiblioProp(xBiblioDataSource, UNO_QUERY);
+ OUString sBiblioDataSourceName;
+ xBiblioProp->getPropertyValue(u"Name"_ustr) >>= sBiblioDataSourceName;
+
+ CPPUNIT_ASSERT_EQUAL(u"Bibliography"_ustr, sBiblioDataSourceName);
+
+ // 2. register a newly created data source, and verify it has the proper name
+ // Setup the CRMDatabase
+ createDBDocument(u"sdbc:embedded:hsqldb"_ustr);
+ uno::Reference<sdb::XOfficeDatabaseDocument> xDocument(mxComponent, UNO_QUERY_THROW);
+ uno::Reference<XConnection> xConnection = getConnectionForDocument(xDocument);
+ createTables(xConnection);
+
+ uno::Reference<XDataSource> xDataSource = xDocument->getDataSource();
+ CPPUNIT_ASSERT(xDataSource.is());
+
+ // Get a XDatabaseContext from XSingleService factory in order to register the DataSource
+ Reference<sdb::XDatabaseContext> xDatabaseContext(xNameAccess, UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xDatabaseContext.is());
+
+ // Register the datasource
+ xDatabaseContext->registerObject(u"SomeNewHsqlDataSource"_ustr, xDataSource);
+
+ // Check the newly created data source to see if it has the proper name
+ Reference<beans::XPropertySet> xProp(xDataSource, UNO_QUERY);
+ OUString sDataSourceName;
+ xProp->getPropertyValue(u"Name"_ustr) >>= sDataSourceName;
+
+ CPPUNIT_ASSERT_EQUAL(u"SomeNewHsqlDataSource"_ustr, sDataSourceName);
+
+ CPPUNIT_ASSERT_THROW_MESSAGE(
+ "Bibliography already exists",
+ xDatabaseContext->registerObject(u"Bibliography"_ustr, xDataSource),
+ container::ElementExistException);
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(CRMDBTest);
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/qa/unit/dbtest_base.cxx b/dbaccess/qa/unit/dbtest_base.cxx
index 88da4b469742..0208649906ad 100644
--- a/dbaccess/qa/unit/dbtest_base.cxx
+++ b/dbaccess/qa/unit/dbtest_base.cxx
@@ -11,15 +11,20 @@
#include <string_view>
-#include <cppunit/TestAssert.h>
-
#include <test/unoapi_test.hxx>
-#include <unotools/tempfile.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
+#include <com/sun/star/sdb/XQueryDefinitionsSupplier.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/sdbc/XDataSource.hpp>
+#include <com/sun/star/sdbc/XStatement.hpp>
+#include <com/sun/star/util/XCloseable.hpp>
using namespace ::com::sun::star;
+using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::uno;
@@ -28,13 +33,21 @@ class DBTestBase
: public UnoApiTest
{
public:
- DBTestBase() : UnoApiTest("dbaccess/qa/unit/data") {};
+ DBTestBase() : UnoApiTest(u"dbaccess/qa/unit/data"_ustr) {};
uno::Reference<XOfficeDatabaseDocument> getDocumentForUrl(OUString const & url);
uno::Reference< XConnection >
getConnectionForDocument(
uno::Reference< XOfficeDatabaseDocument > const & xDocument);
+
+ void createDBDocument(const OUString& rDriverURL);
+ void createTables(Reference< XConnection > xConnection);
+ void createQueries(Reference< XDataSource > xDataSource);
+ void createQuery(OUString sQuery, bool bEscapeProcessing,
+ OUString sQueryName, Reference<XDataSource> xDataSource);
+
+ virtual void tearDown() override;
};
uno::Reference<XOfficeDatabaseDocument> DBTestBase::getDocumentForUrl(OUString const & url) {
@@ -49,10 +62,135 @@ uno::Reference< XConnection > DBTestBase::getConnectionForDocument(
uno::Reference< XDataSource > xDataSource = xDocument->getDataSource();
CPPUNIT_ASSERT(xDataSource.is());
- uno::Reference< XConnection > xConnection = xDataSource->getConnection("","");
+ uno::Reference< XConnection > xConnection = xDataSource->getConnection(u""_ustr,u""_ustr);
CPPUNIT_ASSERT(xConnection.is());
return xConnection;
}
+void DBTestBase::createDBDocument(const OUString& rDriverURL)
+{
+ uno::Reference< XOfficeDatabaseDocument > xDocument(
+ m_xSFactory->createInstance(u"com.sun.star.sdb.OfficeDatabaseDocument"_ustr),
+ UNO_QUERY_THROW);
+ uno::Reference< com::sun::star::frame::XStorable > xStorable(xDocument, UNO_QUERY_THROW);
+
+ uno::Reference< XDataSource > xDataSource = xDocument->getDataSource();
+ uno::Reference< XPropertySet > xPropertySet(xDataSource, UNO_QUERY_THROW);
+ xPropertySet->setPropertyValue(u"URL"_ustr, Any(rDriverURL));
+
+ xStorable->storeAsURL(maTempFile.GetURL(), uno::Sequence< beans::PropertyValue >());
+
+ mxComponent = loadFromDesktop(maTempFile.GetURL());
+ CPPUNIT_ASSERT(mxComponent);
+}
+
+void DBTestBase::createTables(Reference<XConnection> xConnection)
+{
+ uno::Reference<XStatement> xStatement = xConnection->createStatement();
+
+ xStatement->execute(
+ u"CREATE TABLE \"CATEGORIES\" ( \"ID\" INTEGER NOT NULL PRIMARY KEY "
+ ", \"NAME\" VARCHAR (50) , \"DESCRIPTION\" VARCHAR (1024), \"IMAGE\" LONGVARBINARY"
+ ")"_ustr);
+
+ xStatement->execute(u"INSERT INTO \"CATEGORIES\" (\"ID\", \"NAME\") VALUES ( 1, 'Food' )"_ustr);
+ xStatement->execute(u"INSERT INTO \"CATEGORIES\" (\"ID\", \"NAME\") VALUES ( 2, 'Furniture' )"_ustr);
+
+ xStatement->execute(
+ u"CREATE TABLE \"PRODUCTS\" ( \"ID\" INTEGER NOT NULL PRIMARY KEY "
+ ", \"NAME\" VARCHAR (50) , \"CATEGORYID\" INTEGER NOT NULL, FOREIGN KEY (\"CATEGORYID\")"
+ "REFERENCES \"CATEGORIES\" (\"ID\") )"_ustr);
+
+ xStatement->execute(u"INSERT INTO \"PRODUCTS\" VALUES ( 1, 'Orange', 1 )"_ustr);
+ xStatement->execute(u"INSERT INTO \"PRODUCTS\" VALUES ( 2, 'Apples', 1 )"_ustr);
+ xStatement->execute(u"INSERT INTO \"PRODUCTS\" VALUES ( 3, 'Pears', 1 )"_ustr);
+ xStatement->execute(u"INSERT INTO \"PRODUCTS\" VALUES ( 4, 'Strawberries', 1 )"_ustr);
+
+ xStatement->execute(
+ u"CREATE TABLE \"CUSTOMERS\" ( \"ID\" INTEGER NOT NULL PRIMARY KEY "
+ ", \"NAME\" VARCHAR (50) , \"ADDRESS\" VARCHAR (50), \"CITY\" VARCHAR (50), \"POSTAL\" VARCHAR (50)"
+ ", \"COMMENT\" LONGVARCHAR )"_ustr);
+
+ xStatement->execute(u"INSERT INTO \"CUSTOMERS\" VALUES(1,'Food, Inc.','Down Under','Melbourne','509','Preferred')"_ustr);
+ xStatement->execute(u"INSERT INTO \"CUSTOMERS\" VALUES(2,'Simply Delicious','Down Under','Melbourne','518',null)"_ustr);
+ xStatement->execute(u"INSERT INTO \"CUSTOMERS\" VALUES(3,'Pure Health','10 Fish St.','San Francisco','94107',null)"_ustr);
+ xStatement->execute(u"INSERT INTO \"CUSTOMERS\" VALUES(4,'Milk And More','Arlington Road 21','Dublin','31021','Good one.')"_ustr);
+
+ xStatement->execute(
+ u"CREATE TABLE \"ORDERS\" ( \"ID\" INTEGER NOT NULL PRIMARY KEY, \"CUSTOMERID\" INTEGER NOT NULL "
+ ", \"ORDERDATE\" DATE, \"SHIPDATE\" DATE, FOREIGN KEY (\"CUSTOMERID\")"
+ "REFERENCES \"CUSTOMERS\" (\"ID\") )"_ustr);
+
+ xStatement->execute(u"INSERT INTO \"ORDERS\" (\"ID\", \"CUSTOMERID\", \"ORDERDATE\") VALUES(1, 1, {D '2009-01-01'})"_ustr);
+ xStatement->execute(u"INSERT INTO \"ORDERS\" VALUES(2, 2, {D '2009-01-01'}, {D '2009-01-23'})"_ustr);
+
+ xStatement->execute(
+ u"CREATE TABLE \"ORDERS_DETAILS\" ( \"ORDERID\" INTEGER NOT NULL, \"PRODUCTID\" INTEGER NOT NULL, \"QUANTITY\" INTEGER"
+ ", FOREIGN KEY (\"ORDERID\") REFERENCES \"ORDERS\" (\"ID\") "
+ ", FOREIGN KEY (\"PRODUCTID\") REFERENCES \"PRODUCTS\" (\"ID\"), PRIMARY KEY(\"ORDERID\", \"PRODUCTID\") )"_ustr);
+
+ xStatement->execute(u"INSERT INTO \"ORDERS_DETAILS\" VALUES(1, 1, 100)"_ustr);
+ xStatement->execute(u"INSERT INTO \"ORDERS_DETAILS\" VALUES(1, 2, 100)"_ustr);
+ xStatement->execute(u"INSERT INTO \"ORDERS_DETAILS\" VALUES(2, 2, 2000)"_ustr);
+ xStatement->execute(u"INSERT INTO \"ORDERS_DETAILS\" VALUES(2, 3, 2000)"_ustr);
+ xStatement->execute(u"INSERT INTO \"ORDERS_DETAILS\" VALUES(2, 4, 2000)"_ustr);
+ xConnection->commit();
+}
+
+void DBTestBase::createQueries(Reference<XDataSource> xDataSource)
+{
+ createQuery(
+ u"SELECT \"ORDERS\".\"ID\" AS \"Order No.\", "
+ "\"CUSTOMERS\".\"NAME\" AS \"Customer Name\", "
+ "\"ORDERS\".\"ORDERDATE\" AS \"Order Date\", "
+ "\"ORDERS\".\"SHIPDATE\" AS \"Ship Date\", "
+ "\"ORDERS_DETAILS\".\"QUANTITY\", "
+ "\"PRODUCTS\".\"NAME\" AS \"Product Name\" "
+ "FROM \"ORDERS_DETAILS\" AS \"ORDERS_DETAILS\", "
+ "\"ORDERS\" AS \"ORDERS\", "
+ "\"PRODUCTS\" AS \"PRODUCTS\", "
+ "\"CUSTOMERS\" AS \"CUSTOMERS\" "
+ "WHERE ( \"ORDERS_DETAILS\".\"ORDERID\" = \"ORDERS\".\"ID\" "
+ "AND \"ORDERS_DETAILS\".\"PRODUCTID\" = \"PRODUCTS\".\"ID\" "
+ "AND \"ORDERS\".\"CUSTOMERID\" = \"CUSTOMERS\".\"ID\" )"_ustr,
+ true, u"all orders"_ustr, xDataSource);
+
+ createQuery(
+ u"SELECT *"
+ "FROM \"all orders\""
+ "WHERE ( \"SHIPDATE\" IS NULL )"_ustr, true, u"unshipped orders"_ustr, xDataSource);
+
+ createQuery(u"SELECT * FROM \"CUSTOMERS\""_ustr, true, u"parseable"_ustr, xDataSource);
+ createQuery(u"SELECT * FROM INFORMATION_SCHEMA.SYSTEM_VIEWS"_ustr, false, u"parseable native"_ustr, xDataSource);
+}
+
+void DBTestBase::createQuery(OUString sQuery, bool bEscapeProcessing, OUString sQueryName, Reference<XDataSource> xDataSource)
+{
+ Reference<XQueryDefinitionsSupplier> xQuerySupplier(xDataSource, UNO_QUERY_THROW);
+ Reference<container::XNameAccess> xQueryAccess = xQuerySupplier->getQueryDefinitions();
+ CPPUNIT_ASSERT(xQueryAccess.is());
+
+ Reference<lang::XSingleServiceFactory> xSingleServiceFactory(xQueryAccess, UNO_QUERY_THROW);
+ Reference<beans::XPropertySet> xQueryProp(xSingleServiceFactory->createInstance(), UNO_QUERY_THROW);
+
+ xQueryProp->setPropertyValue(u"Command"_ustr, Any(sQuery));
+ xQueryProp->setPropertyValue(u"EscapeProcessing"_ustr, Any(bEscapeProcessing));
+
+ Reference<container::XNameContainer> xNameContainer(xQueryAccess, UNO_QUERY_THROW);
+ xNameContainer->insertByName(sQueryName, Any(xQueryProp));
+}
+
+void DBTestBase::tearDown()
+{
+ if (mxComponent)
+ {
+ // In order to close all windows
+ css::uno::Reference<util::XCloseable> xCloseable(mxComponent, css::uno::UNO_QUERY_THROW);
+ xCloseable->close(false);
+ }
+
+ UnoApiTest::tearDown();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/qa/unit/embeddeddb_performancetest.cxx b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
index 184ef0831ad1..d142580f2655 100644
--- a/dbaccess/qa/unit/embeddeddb_performancetest.cxx
+++ b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
@@ -14,7 +14,6 @@
#include <osl/time.h>
#include <rtl/ustrbuf.hxx>
#include <tools/stream.hxx>
-#include <unotools/tempfile.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XStorable.hpp>
@@ -172,17 +171,17 @@ void EmbeddedDBPerformanceTest::testFirebird()
{
m_aOutputBuffer.append("Standard Insert\n");
- doPerformanceTestOnODB("sdbc:embedded:firebird", u"Firebird", false);
+ doPerformanceTestOnODB(u"sdbc:embedded:firebird"_ustr, u"Firebird", false);
m_aOutputBuffer.append("PreparedStatement Insert\n");
- doPerformanceTestOnODB("sdbc:embedded:firebird", u"Firebird", true);
+ doPerformanceTestOnODB(u"sdbc:embedded:firebird"_ustr, u"Firebird", true);
}
void EmbeddedDBPerformanceTest::testHSQLDB()
{
m_aOutputBuffer.append("Standard Insert\n");
- doPerformanceTestOnODB("sdbc:embedded:hsqldb", u"HSQLDB", false);
+ doPerformanceTestOnODB(u"sdbc:embedded:hsqldb"_ustr, u"HSQLDB", false);
m_aOutputBuffer.append("PreparedStatement Insert\n");
- doPerformanceTestOnODB("sdbc:embedded:hsqldb", u"HSQLDB", true);
+ doPerformanceTestOnODB(u"sdbc:embedded:hsqldb"_ustr, u"HSQLDB", true);
}
/**
@@ -194,27 +193,10 @@ void EmbeddedDBPerformanceTest::doPerformanceTestOnODB(
std::u16string_view rDBName,
const bool bUsePreparedStatement)
{
- ::utl::TempFileNamed aFile;
- aFile.EnableKillingFile();
+ createDBDocument(rDriverURL);
+ uno::Reference< XOfficeDatabaseDocument > xDocument(mxComponent, UNO_QUERY_THROW);
- {
- uno::Reference< XOfficeDatabaseDocument > xDocument(
- m_xSFactory->createInstance("com.sun.star.sdb.OfficeDatabaseDocument"),
- UNO_QUERY_THROW);
- uno::Reference< XStorable > xStorable(xDocument, UNO_QUERY_THROW);
-
- uno::Reference< XDataSource > xDataSource = xDocument->getDataSource();
- uno::Reference< XPropertySet > xPropertySet(xDataSource, UNO_QUERY_THROW);
- xPropertySet->setPropertyValue("URL", Any(rDriverURL));
-
- xStorable->storeAsURL(aFile.GetURL(), uno::Sequence< beans::PropertyValue >());
- }
-
- uno::Reference< XOfficeDatabaseDocument > xDocument(
- loadFromDesktop(aFile.GetURL()), UNO_QUERY_THROW);
-
- uno::Reference< XConnection > xConnection =
- getConnectionForDocument(xDocument);
+ uno::Reference< XConnection > xConnection = getConnectionForDocument(xDocument);
setupTestTable(xConnection);
@@ -234,9 +216,9 @@ void EmbeddedDBPerformanceTest::setupTestTable(
// Although not strictly necessary we use quoted identifiers to reflect
// the fact that Base always uses quoted identifiers.
xStatement->execute(
- "CREATE TABLE \"PFTESTTABLE\" ( \"ID\" INTEGER NOT NULL PRIMARY KEY "
+ u"CREATE TABLE \"PFTESTTABLE\" ( \"ID\" INTEGER NOT NULL PRIMARY KEY "
", \"STRINGCOLUMNA\" VARCHAR (50) "
- ")");
+ ")"_ustr);
xConnection->commit();
}
@@ -247,9 +229,9 @@ void EmbeddedDBPerformanceTest::performPreparedStatementInsertTest(
{
uno::Reference< XPreparedStatement > xPreparedStatement =
xConnection->prepareStatement(
- "INSERT INTO \"PFTESTTABLE\" ( \"ID\", "
+ u"INSERT INTO \"PFTESTTABLE\" ( \"ID\", "
"\"STRINGCOLUMNA\" "
- ") VALUES ( ?, ? )"
+ ") VALUES ( ?, ? )"_ustr
);
uno::Reference< XParameters > xParameters(xPreparedStatement, UNO_QUERY_THROW);
@@ -330,7 +312,7 @@ void EmbeddedDBPerformanceTest::performReadTest(
TimeValue aStart, aMiddle, aEnd;
osl_getSystemTime(&aStart);
- uno::Reference< XResultSet > xResults = xStatement->executeQuery("SELECT * FROM PFTESTTABLE");
+ uno::Reference< XResultSet > xResults = xStatement->executeQuery(u"SELECT * FROM PFTESTTABLE"_ustr);
osl_getSystemTime(&aMiddle);
diff --git a/dbaccess/qa/unit/firebird.cxx b/dbaccess/qa/unit/firebird.cxx
index 1b6b7172fdbd..5f2f4077125e 100644
--- a/dbaccess/qa/unit/firebird.cxx
+++ b/dbaccess/qa/unit/firebird.cxx
@@ -15,7 +15,6 @@
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XStatement.hpp>
-#include <com/sun/star/util/XCloseable.hpp>
using namespace ::com::sun::star;
using namespace ::com::sun::star::sdb;
@@ -48,9 +47,6 @@ void FirebirdTest::testEmptyDBConnection()
getDocumentForUrl(maTempFile.GetURL());
getConnectionForDocument(xDocument);
-
- css::uno::Reference<util::XCloseable> xCloseable(mxComponent, css::uno::UNO_QUERY_THROW);
- xCloseable->close(false);
}
/**
@@ -69,7 +65,7 @@ void FirebirdTest::testIntegerDatabase()
CPPUNIT_ASSERT(xStatement.is());
uno::Reference< XResultSet > xResultSet = xStatement->executeQuery(
- "SELECT * FROM TESTTABLE");
+ u"SELECT * FROM TESTTABLE"_ustr);
CPPUNIT_ASSERT(xResultSet.is());
CPPUNIT_ASSERT(xResultSet->next());
@@ -79,20 +75,17 @@ void FirebirdTest::testIntegerDatabase()
CPPUNIT_ASSERT(xColumnLocate.is());
CPPUNIT_ASSERT_EQUAL(sal_Int16(-30000),
- xRow->getShort(xColumnLocate->findColumn("_SMALLINT")));
+ xRow->getShort(xColumnLocate->findColumn(u"_SMALLINT"_ustr)));
CPPUNIT_ASSERT_EQUAL(sal_Int32(-2100000000),
- xRow->getInt(xColumnLocate->findColumn("_INT")));
+ xRow->getInt(xColumnLocate->findColumn(u"_INT"_ustr)));
CPPUNIT_ASSERT_EQUAL(SAL_CONST_INT64(-9000000000000000000),
- xRow->getLong(xColumnLocate->findColumn("_BIGINT")));
- CPPUNIT_ASSERT_EQUAL(OUString("5"),
- xRow->getString(xColumnLocate->findColumn("_CHAR")));
- CPPUNIT_ASSERT_EQUAL(OUString("5"),
- xRow->getString(xColumnLocate->findColumn("_VARCHAR")));
+ xRow->getLong(xColumnLocate->findColumn(u"_BIGINT"_ustr)));
+ CPPUNIT_ASSERT_EQUAL(u"5"_ustr,
+ xRow->getString(xColumnLocate->findColumn(u"_CHAR"_ustr)));
+ CPPUNIT_ASSERT_EQUAL(u"5"_ustr,
+ xRow->getString(xColumnLocate->findColumn(u"_VARCHAR"_ustr)));
CPPUNIT_ASSERT(!xResultSet->next()); // Should only be one row
-
- css::uno::Reference<util::XCloseable> xCloseable(mxComponent, css::uno::UNO_QUERY_THROW);
- xCloseable->close(false);
}
void FirebirdTest::testTdf132924()
@@ -104,7 +97,7 @@ void FirebirdTest::testTdf132924()
uno::Reference<XStatement> xStatement = xConnection->createStatement();
CPPUNIT_ASSERT(xStatement.is());
- uno::Reference<XResultSet> xResultSet = xStatement->executeQuery("SELECT * FROM AliasTest");
+ uno::Reference<XResultSet> xResultSet = xStatement->executeQuery(u"SELECT * FROM AliasTest"_ustr);
CPPUNIT_ASSERT(xResultSet.is());
CPPUNIT_ASSERT(xResultSet->next());
@@ -116,11 +109,8 @@ void FirebirdTest::testTdf132924()
// Without the fix in place, this test would have failed with:
// - Expected: 1
// - Actual : The column name 'TestId' is not valid
- CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xRow->getShort(xColumnLocate->findColumn("TestId")));
- CPPUNIT_ASSERT_EQUAL(OUString("TestName"), xRow->getString(xColumnLocate->findColumn("TestName")));
-
- css::uno::Reference<util::XCloseable> xCloseable(mxComponent, css::uno::UNO_QUERY_THROW);
- xCloseable->close(false);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xRow->getShort(xColumnLocate->findColumn(u"TestId"_ustr)));
+ CPPUNIT_ASSERT_EQUAL(u"TestName"_ustr, xRow->getString(xColumnLocate->findColumn(u"TestName"_ustr)));
}
CPPUNIT_TEST_SUITE_REGISTRATION(FirebirdTest);
diff --git a/dbaccess/qa/unit/hsql_binary_import.cxx b/dbaccess/qa/unit/hsql_binary_import.cxx
index 569463e7e4ef..4a0f6dd525b6 100644
--- a/dbaccess/qa/unit/hsql_binary_import.cxx
+++ b/dbaccess/qa/unit/hsql_binary_import.cxx
@@ -32,7 +32,7 @@ public:
void HsqlBinaryImportTest::setUp()
{
DBTestBase::setUp();
- osl_setEnvironment(OUString{ "DBACCESS_HSQL_MIGRATION" }.pData, OUString{ "1" }.pData);
+ osl_setEnvironment(u"DBACCESS_HSQL_MIGRATION"_ustr.pData, u"1"_ustr.pData);
}
void HsqlBinaryImportTest::testBinaryImport()
@@ -56,16 +56,16 @@ void HsqlBinaryImportTest::testBinaryImport()
uno::Reference<XStatement> statement = xConnection->createStatement();
uno::Reference<XResultSet> xRes
- = statement->executeQuery("SELECT \"ID\", \"Power_value\", \"Power_name\", \"Retired\", "
- "\"Birth_date\" FROM \"TestTable\" ORDER BY \"ID\"");
+ = statement->executeQuery(u"SELECT \"ID\", \"Power_value\", \"Power_name\", \"Retired\", "
+ "\"Birth_date\" FROM \"TestTable\" ORDER BY \"ID\""_ustr);
uno::Reference<XRow> xRow(xRes, UNO_QUERY_THROW);
// assert first row
CPPUNIT_ASSERT(xRes->next());
constexpr sal_Int16 idExpected = 1;
CPPUNIT_ASSERT_EQUAL(idExpected, xRow->getShort(1));
- CPPUNIT_ASSERT_EQUAL(OUString{ "45.32" }, xRow->getString(2)); // numeric
- CPPUNIT_ASSERT_EQUAL(OUString{ "laser eye" }, xRow->getString(3)); // varchar
+ CPPUNIT_ASSERT_EQUAL(u"45.32"_ustr, xRow->getString(2)); // numeric
+ CPPUNIT_ASSERT_EQUAL(u"laser eye"_ustr, xRow->getString(3)); // varchar
CPPUNIT_ASSERT(xRow->getBoolean(4)); // boolean
css::util::Date date = xRow->getDate(5);
@@ -78,8 +78,8 @@ void HsqlBinaryImportTest::testBinaryImport()
CPPUNIT_ASSERT(xRes->next());
constexpr sal_Int16 secondIdExpected = 2;
CPPUNIT_ASSERT_EQUAL(secondIdExpected, xRow->getShort(1)); // ID
- CPPUNIT_ASSERT_EQUAL(OUString{ "54.12" }, xRow->getString(2)); // numeric
- CPPUNIT_ASSERT_EQUAL(OUString{ "telekinesis" }, xRow->getString(3)); // varchar
+ CPPUNIT_ASSERT_EQUAL(u"54.12"_ustr, xRow->getString(2)); // numeric
+ CPPUNIT_ASSERT_EQUAL(u"telekinesis"_ustr, xRow->getString(3)); // varchar
CPPUNIT_ASSERT(!xRow->getBoolean(4)); // boolean
date = xRow->getDate(5);
@@ -87,6 +87,18 @@ void HsqlBinaryImportTest::testBinaryImport()
CPPUNIT_ASSERT_EQUAL(sal_uInt16{ 2 }, date.Month);
CPPUNIT_ASSERT_EQUAL(sal_Int16{ 1998 }, date.Year);
+ // assert third row
+ CPPUNIT_ASSERT(xRes->next());
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(3), xRow->getShort(1)); // ID
+ CPPUNIT_ASSERT_EQUAL(u"12.00"_ustr, xRow->getString(2)); // numeric
+ CPPUNIT_ASSERT_EQUAL(u"mind-reading"_ustr, xRow->getString(3)); // varchar
+ CPPUNIT_ASSERT(xRow->getBoolean(4)); // boolean
+
+ date = xRow->getDate(5);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16{ 20 }, date.Day);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16{ 5 }, date.Month);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16{ 1967 }, date.Year);
+
if (!oldValue)
{
std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
diff --git a/dbaccess/qa/unit/tdf119625.cxx b/dbaccess/qa/unit/tdf119625.cxx
index ba0c7b2ce345..cf8296cc3a34 100644
--- a/dbaccess/qa/unit/tdf119625.cxx
+++ b/dbaccess/qa/unit/tdf119625.cxx
@@ -33,7 +33,7 @@ public:
void Tdf119625Test::setUp()
{
DBTestBase::setUp();
- osl_setEnvironment(OUString{ "DBACCESS_HSQL_MIGRATION" }.pData, OUString{ "1" }.pData);
+ osl_setEnvironment(u"DBACCESS_HSQL_MIGRATION"_ustr.pData, u"1"_ustr.pData);
}
namespace
@@ -90,9 +90,9 @@ void Tdf119625Test::testTime()
// select basically everything from the .odb
uno::Reference<XStatement> statement = xConnection->createStatement();
- uno::Reference<XResultSet> xRes = statement->executeQuery(" SELECT id, tst_dt, tst_d, tst_t "
+ uno::Reference<XResultSet> xRes = statement->executeQuery(u" SELECT id, tst_dt, tst_d, tst_t "
" FROM tst_data "
- "ORDER BY id");
+ "ORDER BY id"_ustr);
uno::Reference<XRow> xRow(xRes, UNO_QUERY_THROW);
// check result
diff --git a/dbaccess/qa/unit/tdf126268.cxx b/dbaccess/qa/unit/tdf126268.cxx
index c06fdead79c7..ab8ff19211b2 100644
--- a/dbaccess/qa/unit/tdf126268.cxx
+++ b/dbaccess/qa/unit/tdf126268.cxx
@@ -32,7 +32,7 @@ public:
void Tdf126268Test::setUp()
{
DBTestBase::setUp();
- osl_setEnvironment(OUString{ "DBACCESS_HSQL_MIGRATION" }.pData, OUString{ "1" }.pData);
+ osl_setEnvironment(u"DBACCESS_HSQL_MIGRATION"_ustr.pData, u"1"_ustr.pData);
}
namespace
@@ -45,8 +45,9 @@ struct expect_t
}
const expect_t expect[] = {
- { 1, "0.00" }, { 2, "25.00" }, { 3, "26.00" }, { 4, "30.4" }, { 5, "45.8" },
- { 6, "-25.00" }, { 7, "-26.00" }, { 8, "-30.4" }, { 9, "-45.8" },
+ { 1, u"0.0"_ustr }, { 2, u"25.0"_ustr }, { 3, u"26.0"_ustr },
+ { 4, u"30.4"_ustr }, { 5, u"45.8"_ustr }, { 6, u"-25.0"_ustr },
+ { 7, u"-26.0"_ustr }, { 8, u"-30.4"_ustr }, { 9, u"-45.8"_ustr },
};
void Tdf126268Test::testNumbers()
@@ -70,7 +71,7 @@ void Tdf126268Test::testNumbers()
uno::Reference<XStatement> statement = xConnection->createStatement();
uno::Reference<XResultSet> xRes
- = statement->executeQuery("SELECT ID, Column1, Column2 FROM tableTest ORDER BY ID");
+ = statement->executeQuery(u"SELECT ID, Column1, Column2 FROM tableTest ORDER BY ID"_ustr);
uno::Reference<XRow> xRow(xRes, UNO_QUERY_THROW);
// check result
diff --git a/dbaccess/qa/unoapi/dbaccess.props b/dbaccess/qa/unoapi/dbaccess.props
index afad9f0386d3..7d1f0064ece3 100644
--- a/dbaccess/qa/unoapi/dbaccess.props
+++ b/dbaccess/qa/unoapi/dbaccess.props
@@ -16,7 +16,7 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-#properties needed for dbbaccess
+#properties needed for dbaccess
jdbc.url=mysql://unoapi:3306/testDB
jdbc.user=unoapi
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index dd266949cb7f..064d020e87cd 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -226,8 +226,8 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
sal_Int32 nCheckCount = 1; // index for the original values
sal_Int32 i = 1;
- OUString sIsNull(" IS NULL");
- OUString sParam(" = ?");
+ OUString sIsNull(u" IS NULL"_ustr);
+ OUString sParam(u" = ?"_ustr);
ORowVector< ORowSetValue >::Vector::const_iterator aIter = _rRow->begin()+1;
ORowVector< ORowSetValue >::Vector::const_iterator aEnd = _rRow->end();
for(; aIter != aEnd;++aIter,++nCheckCount,++i)
diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx
index 0314c36b8696..7690bca3e10f 100644
--- a/dbaccess/source/core/api/FilteredContainer.cxx
+++ b/dbaccess/source/core/api/FilteredContainer.cxx
@@ -124,7 +124,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::
static void lcl_ensureComposedName( TableInfo& _io_tableInfo, const Reference< XDatabaseMetaData >& _metaData )
{
if ( !_metaData.is() )
- throw RuntimeException("lcl_ensureComposedName: _metaData cannot be null!");
+ throw RuntimeException(u"lcl_ensureComposedName: _metaData cannot be null!"_ustr);
if ( !_io_tableInfo.sComposedName )
{
@@ -145,7 +145,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::
lcl_ensureComposedName( _io_tableInfo, _metaData );
if ( !_masterContainer.is() )
- throw RuntimeException("lcl_ensureType: _masterContainer cannot be null!");
+ throw RuntimeException(u"lcl_ensureType: _masterContainer cannot be null!"_ustr);
OUString sTypeName;
try
diff --git a/dbaccess/source/core/api/HelperCollections.cxx b/dbaccess/source/core/api/HelperCollections.cxx
index 2a04b632a7ce..503c12c93a1b 100644
--- a/dbaccess/source/core/api/HelperCollections.cxx
+++ b/dbaccess/source/core/api/HelperCollections.cxx
@@ -75,9 +75,9 @@ namespace dbaccess
{
if ( m_aColumns.is() )
{
- ::connectivity::OSQLColumns::Vector::const_iterator aIter = find(m_aColumns->begin(),m_aColumns->end(),_rName,isCaseSensitive());
+ ::connectivity::OSQLColumns::Vector::const_iterator aIter = find(m_aColumns->begin(),m_aColumns->end(),_rName,UStringMixEqual(isCaseSensitive()));
if(aIter == m_aColumns->end())
- aIter = findRealName(m_aColumns->begin(),m_aColumns->end(),_rName,isCaseSensitive());
+ aIter = findRealName(m_aColumns->begin(),m_aColumns->end(),_rName,UStringMixEqual(isCaseSensitive()));
if(aIter != m_aColumns->end())
return connectivity::sdbcx::ObjectType(*aIter,UNO_QUERY);
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index e54c5fb39210..f931adbab02f 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -136,10 +136,10 @@ void OKeySet::initColumns()
{
Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData();
bool bCase = xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers();
- m_pKeyColumnNames.reset( new SelectColumnsMetaData(bCase) );
- m_pColumnNames.reset( new SelectColumnsMetaData(bCase) );
- m_pParameterNames.reset( new SelectColumnsMetaData(bCase) );
- m_pForeignColumnNames.reset( new SelectColumnsMetaData(bCase) );
+ m_pKeyColumnNames.reset( new SelectColumnsMetaData(comphelper::UStringMixLess(bCase)) );
+ m_pColumnNames.reset( new SelectColumnsMetaData(comphelper::UStringMixLess(bCase)) );
+ m_pParameterNames.reset( new SelectColumnsMetaData(comphelper::UStringMixLess(bCase)) );
+ m_pForeignColumnNames.reset( new SelectColumnsMetaData(comphelper::UStringMixLess(bCase)) );
}
void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable,
@@ -195,7 +195,7 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable,
if ( o_pKeyColumnNames->empty() )
{
- ::dbtools::throwGenericSQLException("Could not find any key column.", *this );
+ ::dbtools::throwGenericSQLException(u"Could not find any key column."_ustr, *this );
}
for (auto const& keyColumn : *o_pKeyColumnNames)
@@ -245,7 +245,7 @@ void OKeySet::setOneKeyColumnParameter( sal_Int32 &nPos, const Reference< XParam
OUStringBuffer OKeySet::createKeyFilter()
{
- connectivity::ORowVector< ORowSetValue >::Vector::const_iterator aIter = m_aKeyIter->second.first->begin();
+ connectivity::ORowVector< ORowSetValue >::Vector::const_iterator aIter = m_aKeyIter->second.m_aRowSetRow->begin();
static const char aAnd[] = " AND ";
const OUString aQuote = getIdentifierQuoteString();
@@ -311,7 +311,7 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet, const OUStrin
// the first row is empty because it's now easier for us to distinguish when we are beforefirst or first
// without extra variable to be set
- OKeySetValue keySetValue(nullptr,std::pair<sal_Int32,Reference<XRow> >(0,Reference<XRow>()));
+ OKeySetValue keySetValue{nullptr,0,nullptr};
m_aKeyMap.emplace(0, keySetValue);
m_aKeyIter = m_aKeyMap.begin();
}
@@ -321,7 +321,7 @@ void OKeySet::reset(const Reference< XResultSet>& _xDriverSet)
OCacheSet::construct(_xDriverSet, m_sRowSetFilter);
m_bRowCountFinal = false;
m_aKeyMap.clear();
- OKeySetValue keySetValue(nullptr,std::pair<sal_Int32,Reference<XRow> >(0,Reference<XRow>()));
+ OKeySetValue keySetValue{nullptr,0,nullptr};
m_aKeyMap.emplace(0,keySetValue);
m_aKeyIter = m_aKeyMap.begin();
}
@@ -331,8 +331,8 @@ void OKeySet::ensureStatement( )
// do we already have a statement for the current combination of NULLness
// of key & foreign columns?
std::vector<bool> FilterColumnsNULL;
- FilterColumnsNULL.reserve(m_aKeyIter->second.first->size());
- for (auto const& elem : *m_aKeyIter->second.first)
+ FilterColumnsNULL.reserve(m_aKeyIter->second.m_aRowSetRow->size());
+ for (auto const& elem : *m_aKeyIter->second.m_aRowSetRow)
FilterColumnsNULL.push_back(elem.isNull());
vStatements_t::const_iterator pNewStatement(m_vStatements.find(FilterColumnsNULL));
if(pNewStatement == m_vStatements.end())
@@ -440,8 +440,8 @@ void OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrigi
constexpr OUStringLiteral aPara(u" = ?,");
OUString aQuote = getIdentifierQuoteString();
constexpr OUString aAnd(u" AND "_ustr);
- OUString sIsNull(" IS NULL");
- OUString sParam(" = ?");
+ OUString sIsNull(u" IS NULL"_ustr);
+ OUString sParam(u" = ?"_ustr);
// use keys and indexes for exact positioning
Reference<XIndexesSupplier> xIndexSup(_xTable,UNO_QUERY);
@@ -575,9 +575,9 @@ void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rO
const sal_Int32 nBookmark = ::comphelper::getINT32((*_rInsertRow)[0].getAny());
m_aKeyIter = m_aKeyMap.find(nBookmark);
assert(m_aKeyIter != m_aKeyMap.end());
- m_aKeyIter->second.second.first = 2;
- m_aKeyIter->second.second.second.clear();
- copyRowValue(_rInsertRow,m_aKeyIter->second.first,nBookmark);
+ m_aKeyIter->second.m_nUpdateInsert = 2;
+ m_aKeyIter->second.m_xRow.clear();
+ copyRowValue(_rInsertRow, m_aKeyIter->second.m_aRowSetRow, nBookmark);
tryRefetch(_rInsertRow,bRefetch);
}
}
@@ -752,7 +752,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ
ORowSetRow aKeyRow = new connectivity::ORowVector< ORowSetValue >(m_pKeyColumnNames->size());
copyRowValue(_rInsertRow,aKeyRow,aKeyIter->first + 1);
- m_aKeyIter = m_aKeyMap.emplace( aKeyIter->first + 1, OKeySetValue(aKeyRow,std::pair<sal_Int32,Reference<XRow> >(1,Reference<XRow>())) ).first;
+ m_aKeyIter = m_aKeyMap.emplace( aKeyIter->first + 1, OKeySetValue{aKeyRow,1,nullptr} ).first;
// now we set the bookmark for this row
(*_rInsertRow)[0] = Any(static_cast<sal_Int32>(m_aKeyIter->first));
tryRefetch(_rInsertRow,bRefetch);
@@ -774,7 +774,7 @@ void OKeySet::tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch)
}
if ( !bRefetch )
{
- m_aKeyIter->second.second.second = new OPrivateRow(std::vector(*_rInsertRow));
+ m_aKeyIter->second.m_xRow = new OPrivateRow(std::vector(*_rInsertRow));
}
}
@@ -1102,7 +1102,7 @@ bool OKeySet::doTryRefetch_throw()
}
// now set the primary key column values
- connectivity::ORowVector< ORowSetValue >::Vector::const_iterator aIter = m_aKeyIter->second.first->begin();
+ connectivity::ORowVector< ORowSetValue >::Vector::const_iterator aIter = m_aKeyIter->second.m_aRowSetRow->begin();
for (auto const& keyColumnName : *m_pKeyColumnNames)
setOneKeyColumnParameter(nPos,xParameter,*aIter++,keyColumnName.second.nType,keyColumnName.second.nScale);
for (auto const& foreignColumnName : *m_pForeignColumnNames)
@@ -1120,9 +1120,9 @@ void OKeySet::refreshRow()
if(isBeforeFirst() || isAfterLast())
return;
- if ( m_aKeyIter->second.second.second.is() )
+ if ( m_aKeyIter->second.m_xRow.is() )
{
- m_xRow = m_aKeyIter->second.second.second;
+ m_xRow = m_aKeyIter->second.m_xRow;
return;
}
@@ -1197,7 +1197,7 @@ bool OKeySet::fetchRow()
aIter->fill(rColDesc.nPosition, rColDesc.nType, m_xRow);
++aIter;
}
- m_aKeyIter = m_aKeyMap.emplace( m_aKeyMap.rbegin()->first+1,OKeySetValue(aKeyRow,std::pair<sal_Int32,Reference<XRow> >(0,Reference<XRow>())) ).first;
+ m_aKeyIter = m_aKeyMap.emplace( m_aKeyMap.rbegin()->first+1,OKeySetValue{aKeyRow,0,nullptr} ).first;
}
else
m_bRowCountFinal = true;
@@ -1222,7 +1222,7 @@ bool OKeySet::fillAllRows()
sal_Bool SAL_CALL OKeySet::wasNull( )
{
if ( ! m_xRow.is() )
- throwGenericSQLException("Must call getFOO() for some FOO before wasNull()", *this);
+ throwGenericSQLException(u"Must call getFOO() for some FOO before wasNull()"_ustr, *this);
OSL_ENSURE(m_xRow.is(),"m_xRow is null! I've thrown, but function execution continued?");
return m_xRow->wasNull();
@@ -1233,7 +1233,7 @@ inline void OKeySet::ensureRowForData( )
if (! m_xRow.is() )
refreshRow();
if (! m_xRow.is() )
- throwSQLException("Failed to refetch row", "02000", *this, -2);
+ throwSQLException(u"Failed to refetch row"_ustr, u"02000"_ustr, *this, -2);
OSL_ENSURE(m_xRow.is(),"m_xRow is null! I've called throwSQLException but execution continued?");
}
@@ -1354,12 +1354,12 @@ Reference< XArray > SAL_CALL OKeySet::getArray( sal_Int32 columnIndex )
bool OKeySet::rowUpdated( )
{
- return m_aKeyIter != m_aKeyMap.begin() && m_aKeyIter != m_aKeyMap.end() && m_aKeyIter->second.second.first == 2;
+ return m_aKeyIter != m_aKeyMap.begin() && m_aKeyIter != m_aKeyMap.end() && m_aKeyIter->second.m_nUpdateInsert == 2;
}
bool OKeySet::rowInserted( )
{
- return m_aKeyIter != m_aKeyMap.begin() && m_aKeyIter != m_aKeyMap.end() && m_aKeyIter->second.second.first == 1;
+ return m_aKeyIter != m_aKeyMap.begin() && m_aKeyIter != m_aKeyMap.end() && m_aKeyIter->second.m_nUpdateInsert == 1;
}
bool OKeySet::rowDeleted( )
@@ -1419,7 +1419,7 @@ void getColumnPositions(const Reference<XNameAccess>& _rxQueryColumns,
{
sName = sRealName;
}
- o_rColumnNames[sName] = aColDesc;
+ o_rColumnNames[sName] = std::move(aColDesc);
break;
}
diff --git a/dbaccess/source/core/api/KeySet.hxx b/dbaccess/source/core/api/KeySet.hxx
index bd30f3960eb3..37cde22d7e32 100644
--- a/dbaccess/source/core/api/KeySet.hxx
+++ b/dbaccess/source/core/api/KeySet.hxx
@@ -32,6 +32,8 @@
namespace dbaccess
{
+ class OPrivateRow;
+
struct SelectColumnDescription
{
OUString sRealName; // may be empty
@@ -68,7 +70,12 @@ namespace dbaccess
SelectColumnsMetaData& o_rColumnNames /* out */,
bool i_bAppendTableName = false);
- typedef std::pair<ORowSetRow,std::pair<sal_Int32,css::uno::Reference< css::sdbc::XRow> > > OKeySetValue;
+ struct OKeySetValue
+ {
+ ORowSetRow m_aRowSetRow;
+ sal_Int32 m_nUpdateInsert;
+ rtl::Reference<OPrivateRow> m_xRow;
+ };
typedef std::map<sal_Int32,OKeySetValue > OKeySetMatrix;
typedef std::map<sal_Int32, rtl::Reference<ORowSetValueVector> > OUpdatedParameter;
// is used when the source supports keys
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index 946ec3f67a95..a74ec45e41d7 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -36,6 +36,7 @@
#include <algorithm>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <composertools.hxx>
+#include "PrivateRow.hxx"
using namespace dbaccess;
using namespace ::connectivity;
@@ -98,14 +99,14 @@ void OptimisticSet::construct(const Reference< XResultSet>& _xDriverSet,const OU
const Reference<XNameAccess> xTables = xTabSup->getTables();
for (auto& tableName : xTables->getElementNames())
{
- std::unique_ptr<SelectColumnsMetaData> pKeyColumNames(new SelectColumnsMetaData(bCase));
+ std::unique_ptr<SelectColumnsMetaData> pKeyColumNames(new SelectColumnsMetaData(comphelper::UStringMixLess(bCase)));
findTableColumnsMatching_throw(xTables->getByName(tableName),tableName,xMeta,xQueryColumns,pKeyColumNames);
m_pKeyColumnNames->insert(pKeyColumNames->begin(),pKeyColumNames->end());
}
// the first row is empty because it's now easier for us to distinguish when we are beforefirst or first
// without extra variable to be set
- OKeySetValue keySetValue(nullptr,std::pair<sal_Int32,Reference<XRow> >(0,Reference<XRow>()));
+ OKeySetValue keySetValue{nullptr,0,nullptr};
m_aKeyMap.emplace(0,keySetValue);
m_aKeyIter = m_aKeyMap.begin();
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 547edec23b6f..0b6e7c5a885a 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -258,7 +258,7 @@ void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const
break;
case PROPERTY_ID_FETCHDIRECTION:
if( m_nResultSetType == ResultSetType::FORWARD_ONLY)
- throw Exception("resultsettype is FORWARD_ONLY", nullptr);
+ throw Exception(u"resultsettype is FORWARD_ONLY"_ustr, nullptr);
[[fallthrough]];
default:
OPropertyStateContainer::setFastPropertyValue_NoBroadcast(nHandle,rValue);
@@ -430,7 +430,7 @@ Any SAL_CALL ORowSet::queryAggregation( const Type& rType )
// css::XServiceInfo
OUString SAL_CALL ORowSet::getImplementationName()
{
- return "com.sun.star.comp.dba.ORowSet";
+ return u"com.sun.star.comp.dba.ORowSet"_ustr;
}
sal_Bool SAL_CALL ORowSet::supportsService( const OUString& _rServiceName )
@@ -461,11 +461,7 @@ void SAL_CALL ORowSet::disposing()
// remove myself as dispose listener
Reference< XComponent > xComponent(m_xActiveConnection, UNO_QUERY);
if (xComponent.is())
- {
- Reference<XEventListener> xEvt;
- query_aggregation(this,xEvt);
- xComponent->removeEventListener(xEvt);
- }
+ xComponent->removeEventListener(query_aggregation<XEventListener>(this));
m_aActiveConnection = Any(); // the any contains a reference too
if(m_bOwnConnection)
@@ -546,11 +542,7 @@ void ORowSet::setActiveConnection( Reference< XConnection > const & _rxNewConn,
// remove the event listener for the old connection
Reference< XComponent > xComponent(m_xActiveConnection, UNO_QUERY);
if (xComponent.is())
- {
- Reference<XEventListener> xListener;
- query_aggregation(this, xListener);
- xComponent->removeEventListener(xListener);
- }
+ xComponent->removeEventListener(query_aggregation<XEventListener>(this));
// if we owned the connection, remember it for later disposing
if(m_bOwnConnection)
@@ -575,11 +567,7 @@ void ORowSet::setActiveConnection( Reference< XConnection > const & _rxNewConn,
// register as event listener for the new connection
xComponent.set(m_xActiveConnection,UNO_QUERY);
if (xComponent.is())
- {
- Reference<XEventListener> xListener;
- query_aggregation(this, xListener);
- xComponent->addEventListener(xListener);
- }
+ xComponent->addEventListener(query_aggregation<XEventListener>(this));
}
// css::XEventListener
@@ -1833,11 +1821,11 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
// retrieve the name of the column
OUString sName = xMetaData->getColumnName(i + 1);
// check for duplicate entries
- if(aColumnMap.find(sName) != aColumnMap.end())
+ if(aColumnMap.contains(sName))
{
OUString sAlias(sName);
sal_Int32 searchIndex=1;
- while(aColumnMap.find(sAlias) != aColumnMap.end())
+ while(aColumnMap.contains(sAlias))
{
sAlias = sName + OUString::number(searchIndex++);
}
@@ -2180,7 +2168,7 @@ Reference< XConnection > ORowSet::calcConnection(const Reference< XInteractionH
{
Any aError = ::cppu::getCaughtException();
OUString sMessage = ResourceManager::loadString( RID_NO_SUCH_DATA_SOURCE,
- "$name$", m_aDataSourceName, "$error$", extractExceptionMessage( m_aContext, aError ) );
+ u"$name$", m_aDataSourceName, u"$error$", extractExceptionMessage( m_aContext, aError ) );
::dbtools::throwGenericSQLException( sMessage, *this, aError );
}
}
@@ -2221,7 +2209,7 @@ Reference< XNameAccess > ORowSet::impl_getTables_throw()
m_xTables.reset(new OTableContainer(*this,m_aMutex,m_xActiveConnection,bCase,nullptr,nullptr,m_nInAppend));
xTables = m_xTables.get();
- Sequence<OUString> aTableFilter { "%" };
+ Sequence<OUString> aTableFilter { u"%"_ustr };
m_xTables->construct(aTableFilter,Sequence< OUString>());
}
@@ -2278,7 +2266,7 @@ void ORowSet::impl_initComposer_throw( OUString& _out_rCommandToExecute )
// don't simply overwrite an existent filter, this would lead to problems if this existent
// filter contains parameters (since a keyset may add parameters itself)
m_xComposer->setElementaryQuery( m_xComposer->getQuery( ) );
- m_xComposer->setFilter( "0 = 1" );
+ m_xComposer->setFilter( u"0 = 1"_ustr );
}
m_xComposer->setOrder( m_aOrder );
@@ -2544,7 +2532,7 @@ void SAL_CALL ORowSet::setBinaryStream( sal_Int32 parameterIndex, const Referenc
catch( Exception const & )
{
css::uno::Any anyEx = cppu::getCaughtException();
- throw SQLException("ORowSet::setBinaryStream", *this, "S1000", 0,anyEx);
+ throw SQLException(u"ORowSet::setBinaryStream"_ustr, *this, u"S1000"_ustr, 0,anyEx);
}
}
@@ -2568,7 +2556,7 @@ void SAL_CALL ORowSet::setCharacterStream( sal_Int32 parameterIndex, const Refer
catch( Exception const & )
{
css::uno::Any anyEx = cppu::getCaughtException();
- throw SQLException("ORowSet::setCharacterStream", *this, "S1000", 0, anyEx);
+ throw SQLException(u"ORowSet::setCharacterStream"_ustr, *this, u"S1000"_ustr, 0, anyEx);
}
}
@@ -2591,22 +2579,22 @@ void SAL_CALL ORowSet::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x
void SAL_CALL ORowSet::setRef( sal_Int32 /*parameterIndex*/, const Reference< XRef >& /*x*/ )
{
- ::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setRef", *this );
+ ::dbtools::throwFeatureNotImplementedSQLException( u"XParameters::setRef"_ustr, *this );
}
void SAL_CALL ORowSet::setBlob( sal_Int32 /*parameterIndex*/, const Reference< XBlob >& /*x*/ )
{
- ::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setBlob", *this );
+ ::dbtools::throwFeatureNotImplementedSQLException( u"XParameters::setBlob"_ustr, *this );
}
void SAL_CALL ORowSet::setClob( sal_Int32 /*parameterIndex*/, const Reference< XClob >& /*x*/ )
{
- ::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setClob", *this );
+ ::dbtools::throwFeatureNotImplementedSQLException( u"XParameters::setClob"_ustr, *this );
}
void SAL_CALL ORowSet::setArray( sal_Int32 /*parameterIndex*/, const Reference< XArray >& /*x*/ )
{
- ::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setArray", *this );
+ ::dbtools::throwFeatureNotImplementedSQLException( u"XParameters::setArray"_ustr, *this );
}
void SAL_CALL ORowSet::clearParameters( )
@@ -2720,9 +2708,9 @@ void ORowSet::impl_rebuild_throw(::osl::ResettableMutexGuard& _rGuard)
// ***********************************************************
ORowSetClone::ORowSetClone( const Reference<XComponentContext>& _rContext, ORowSet& rParent, ::osl::Mutex* _pMutex )
- :OSubComponent(m_aMutex, rParent)
+ : ::cppu::WeakComponentImplHelper<>(m_aMutex)
,ORowSetBase( _rContext, WeakComponentImplHelper::rBHelper, _pMutex )
- ,m_pParent(&rParent)
+ ,m_xParent(&rParent)
,m_nFetchDirection(rParent.m_nFetchDirection)
,m_nFetchSize(rParent.m_nFetchSize)
,m_bIsBookmarkable(true)
@@ -2813,7 +2801,7 @@ ORowSetClone::~ORowSetClone()
// css::XTypeProvider
Sequence< Type > ORowSetClone::getTypes()
{
- return ::comphelper::concatSequences(OSubComponent::getTypes(),ORowSetBase::getTypes());
+ return ::comphelper::concatSequences(::cppu::WeakComponentImplHelper<>::getTypes(),ORowSetBase::getTypes());
}
// css::XInterface
@@ -2821,24 +2809,24 @@ Any ORowSetClone::queryInterface( const Type & rType )
{
Any aRet = ORowSetBase::queryInterface(rType);
if(!aRet.hasValue())
- aRet = OSubComponent::queryInterface(rType);
+ aRet = ::cppu::WeakComponentImplHelper<>::queryInterface(rType);
return aRet;
}
void ORowSetClone::acquire() noexcept
{
- OSubComponent::acquire();
+ ::cppu::WeakComponentImplHelper<>::acquire();
}
void ORowSetClone::release() noexcept
{
- OSubComponent::release();
+ ::cppu::WeakComponentImplHelper<>::release();
}
// XServiceInfo
OUString ORowSetClone::getImplementationName( )
{
- return "com.sun.star.sdb.ORowSetClone";
+ return u"com.sun.star.sdb.ORowSetClone"_ustr;
}
sal_Bool ORowSetClone::supportsService( const OUString& _rServiceName )
@@ -2857,9 +2845,9 @@ void ORowSetClone::disposing()
MutexGuard aGuard( m_aMutex );
ORowSetBase::disposing();
- m_pParent = nullptr;
+ m_xParent = nullptr;
m_pMutex = &m_aMutex; // this must be done here because someone could hold a ref to us and try to do something
- OSubComponent::disposing();
+ ::cppu::WeakComponentImplHelper<>::disposing();
}
// XCloseable
@@ -2891,8 +2879,8 @@ void SAL_CALL ORowSetClone::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,c
{
if ( nHandle == PROPERTY_ID_FETCHSIZE )
{
- if ( m_pParent )
- m_pParent->setFastPropertyValue_NoBroadcast( nHandle, rValue );
+ if ( auto xParent = m_xParent.get() )
+ xParent->setFastPropertyValue_NoBroadcast( nHandle, rValue );
}
OPropertyStateContainer::setFastPropertyValue_NoBroadcast(nHandle,rValue);
@@ -2919,17 +2907,17 @@ bool ORowSetClone::isNew( )
void SAL_CALL ORowSetClone::execute( )
{
- throwFunctionNotSupportedSQLException( "RowSetClone::XRowSet::execute", *this );
+ throwFunctionNotSupportedSQLException( u"RowSetClone::XRowSet::execute"_ustr, *this );
}
void SAL_CALL ORowSetClone::addRowSetListener( const Reference< XRowSetListener >& )
{
- throwFunctionNotSupportedRuntimeException( "RowSetClone::XRowSet", *this );
+ throwFunctionNotSupportedRuntimeException( u"RowSetClone::XRowSet"_ustr, *this );
}
void SAL_CALL ORowSetClone::removeRowSetListener( const Reference< XRowSetListener >& )
{
- throwFunctionNotSupportedRuntimeException( "RowSetClone::XRowSet", *this );
+ throwFunctionNotSupportedRuntimeException( u"RowSetClone::XRowSet"_ustr, *this );
}
} // dbaccess
diff --git a/dbaccess/source/core/api/RowSet.hxx b/dbaccess/source/core/api/RowSet.hxx
index 3cf6fe690193..92d9e53f7461 100644
--- a/dbaccess/source/core/api/RowSet.hxx
+++ b/dbaccess/source/core/api/RowSet.hxx
@@ -48,6 +48,7 @@
#include <connectivity/paramwrapper.hxx>
#include <connectivity/FValue.hxx>
#include <connectivity/warningscontainer.hxx>
+#include <unotools/weakref.hxx>
namespace dbaccess
{
@@ -445,11 +446,11 @@ namespace dbaccess
// ORowSetClone
class ORowSetClone : public cppu::BaseMutex
- ,public OSubComponent
+ ,public ::cppu::WeakComponentImplHelper<>
,public ORowSetBase
,public ::comphelper::OPropertyArrayUsageHelper < ORowSetClone >
{
- ORowSet* m_pParent;
+ unotools::WeakReference<ORowSet> m_xParent;
sal_Int32 m_nFetchDirection;
sal_Int32 m_nFetchSize;
bool m_bIsBookmarkable;
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index 042f1fabc2d0..d2811d8af564 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -371,8 +371,7 @@ Any SAL_CALL ORowSetBase::getObject( sal_Int32 columnIndex, const Reference< XNa
Reference< XRef > SAL_CALL ORowSetBase::getRef( sal_Int32 /*columnIndex*/ )
{
- ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getRef", *m_pMySelf );
- return nullptr;
+ ::dbtools::throwFeatureNotImplementedSQLException( u"XRow::getRef"_ustr, *m_pMySelf );
}
Reference< XBlob > SAL_CALL ORowSetBase::getBlob( sal_Int32 columnIndex )
@@ -387,8 +386,7 @@ Reference< XClob > SAL_CALL ORowSetBase::getClob( sal_Int32 columnIndex )
Reference< XArray > SAL_CALL ORowSetBase::getArray( sal_Int32 /*columnIndex*/ )
{
- ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getArray", *m_pMySelf );
- return nullptr;
+ ::dbtools::throwFeatureNotImplementedSQLException( u"XRow::getArray"_ustr, *m_pMySelf );
}
// css::sdbcx::XRowLocate
@@ -1089,7 +1087,7 @@ void SAL_CALL ORowSetBase::refreshRow( )
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
if ( impl_rowDeleted() )
- throwSQLException( "The current row is deleted", StandardSQLState::INVALID_CURSOR_STATE, Reference< XRowSet >( this ) );
+ throwSQLException( u"The current row is deleted"_ustr, StandardSQLState::INVALID_CURSOR_STATE, Reference< XRowSet >( this ) );
if(!(m_bBeforeFirst || m_bAfterLast))
{
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index 3ff599c6fa49..220d4f6d5b2a 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -203,7 +203,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
{
Reference<XNameAccess> xSelColumns = xColSup->getColumns();
Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData();
- SelectColumnsMetaData aColumnNames(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers());
+ SelectColumnsMetaData aColumnNames(comphelper::UStringMixLess(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers()));
::dbaccess::getColumnPositions(xSelColumns,xPrimaryKeyColumns->getElementNames(),aUpdateTableName,aColumnNames);
bAllKeysFound = !aColumnNames.empty() && aColumnNames.size() == o3tl::make_unsigned(xPrimaryKeyColumns->getElementNames().getLength());
}
@@ -269,7 +269,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
else
{
Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData();
- SelectColumnsMetaData aColumnNames(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers());
+ SelectColumnsMetaData aColumnNames(comphelper::UStringMixLess(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers()));
Reference<XColumnsSupplier> xColSup(_xAnalyzer,UNO_QUERY);
Reference<XNameAccess> xSelColumns = xColSup->getColumns();
Reference<XNameAccess> xColumns = m_aUpdateTable->getColumns();
@@ -605,7 +605,7 @@ void ORowSetCache::updateObject( sal_Int32 columnIndex, const Any& x
if ( rInsert[columnIndex] != aTemp )
{
rInsert[columnIndex].setBound(true);
- rInsert[columnIndex] = aTemp;
+ rInsert[columnIndex] = std::move(aTemp);
rInsert[columnIndex].setModified(true);
io_aRow[columnIndex] = rInsert[columnIndex];
@@ -627,7 +627,7 @@ void ORowSetCache::updateNumericObject( sal_Int32 columnIndex, const Any& x
if ( rInsert[columnIndex] != aTemp )
{
rInsert[columnIndex].setBound(true);
- rInsert[columnIndex] = aTemp;
+ rInsert[columnIndex] = std::move(aTemp);
rInsert[columnIndex].setModified(true);
io_aRow[columnIndex] = rInsert[columnIndex];
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index f881220f69a2..3608286d36e8 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -281,7 +281,7 @@ void SAL_CALL OSingleSelectQueryComposer::disposing()
IMPLEMENT_FORWARD_XINTERFACE3(OSingleSelectQueryComposer,OSubComponent,OSingleSelectQueryComposer_BASE,OPropertyContainer)
OUString SAL_CALL OSingleSelectQueryComposer::getImplementationName()
{
- return "org.openoffice.comp.dba.OSingleSelectQueryComposer";
+ return u"org.openoffice.comp.dba.OSingleSelectQueryComposer"_ustr;
}
sal_Bool SAL_CALL OSingleSelectQueryComposer::supportsService(const OUString& _rServiceName)
{
@@ -496,13 +496,13 @@ OUString OSingleSelectQueryComposer::impl_getColumnRealName_throw(const Referenc
m_aCurrentColumns[SelectColumns]->getByName(aName) >>= xColumn;
OSL_ENSURE(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_REALNAME),"Property REALNAME not available!");
OSL_ENSURE(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_TABLENAME),"Property TABLENAME not available!");
- OSL_ENSURE(xColumn->getPropertySetInfo()->hasPropertyByName("Function"),"Property FUNCTION not available!");
+ OSL_ENSURE(xColumn->getPropertySetInfo()->hasPropertyByName(u"Function"_ustr),"Property FUNCTION not available!");
OUString sRealName, sTableName;
xColumn->getPropertyValue(PROPERTY_REALNAME) >>= sRealName;
xColumn->getPropertyValue(PROPERTY_TABLENAME) >>= sTableName;
bool bFunction = false;
- xColumn->getPropertyValue("Function") >>= bFunction;
+ xColumn->getPropertyValue(u"Function"_ustr) >>= bFunction;
if ( sRealName == aName )
{
if ( bFunction )
@@ -931,8 +931,8 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( )
continue;
rtl::Reference<::connectivity::parse::OParseColumn> pColumn = new ::connectivity::parse::OParseColumn(xProp,bCase);
- pColumn->setFunction(::comphelper::getBOOL(xProp->getPropertyValue("Function")));
- pColumn->setAggregateFunction(::comphelper::getBOOL(xProp->getPropertyValue("AggregateFunction")));
+ pColumn->setFunction(::comphelper::getBOOL(xProp->getPropertyValue(u"Function"_ustr)));
+ pColumn->setAggregateFunction(::comphelper::getBOOL(xProp->getPropertyValue(u"AggregateFunction"_ustr)));
OUString sRealName;
xProp->getPropertyValue(PROPERTY_REALNAME) >>= sRealName;
@@ -1648,7 +1648,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
m_aCurrentColumns[SelectColumns]->getByName(aName) >>= xColumn;
OSL_ENSURE(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_REALNAME),"Property REALNAME not available!");
OSL_ENSURE(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_TABLENAME),"Property TABLENAME not available!");
- OSL_ENSURE(xColumn->getPropertySetInfo()->hasPropertyByName("AggregateFunction"),"Property AggregateFunction not available!");
+ OSL_ENSURE(xColumn->getPropertySetInfo()->hasPropertyByName(u"AggregateFunction"_ustr),"Property AggregateFunction not available!");
OUString sRealName,sTableName;
xColumn->getPropertyValue(PROPERTY_REALNAME) >>= sRealName;
@@ -1662,7 +1662,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
else
sTableName = ::dbtools::quoteName(aQuote,sTableName);
- if ( !::comphelper::getBOOL(xColumn->getPropertyValue("Function")) )
+ if ( !::comphelper::getBOOL(xColumn->getPropertyValue(u"Function"_ustr)) )
{
aSQL = sTableName + "." + ::dbtools::quoteName( aQuote, sRealName );
}
diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx
index 92821750f9dc..2228042cc748 100644
--- a/dbaccess/source/core/api/TableDeco.cxx
+++ b/dbaccess/source/core/api/TableDeco.cxx
@@ -352,7 +352,7 @@ void ODBTableDecorator::construct()
// XServiceInfo
OUString SAL_CALL ODBTableDecorator::getImplementationName()
{
- return "com.sun.star.sdb.dbaccess.ODBTableDecorator";
+ return u"com.sun.star.sdb.dbaccess.ODBTableDecorator"_ustr;
}
sal_Bool SAL_CALL ODBTableDecorator::supportsService(const OUString& _rServiceName)
{
@@ -628,7 +628,7 @@ void SAL_CALL ODBTableDecorator::release() noexcept
void SAL_CALL ODBTableDecorator::setName( const OUString& /*aName*/ )
{
- throwFunctionNotSupportedRuntimeException( "XNamed::setName", *this );
+ throwFunctionNotSupportedRuntimeException( u"XNamed::setName"_ustr, *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 2e2ecda0f775..efbbd8b412df 100644
--- a/dbaccess/source/core/api/View.cxx
+++ b/dbaccess/source/core/api/View.cxx
@@ -52,7 +52,7 @@ namespace dbaccess
try
{
Reference<XMultiServiceFactory> xFac(_rxConnection,UNO_QUERY_THROW);
- m_xViewAccess.set(xFac->createInstance(lcl_getServiceNameForSetting(_rxConnection,"ViewAccessServiceName")),UNO_QUERY);
+ m_xViewAccess.set(xFac->createInstance(lcl_getServiceNameForSetting(_rxConnection,u"ViewAccessServiceName"_ustr)),UNO_QUERY);
}
catch(const Exception& )
{
diff --git a/dbaccess/source/core/api/callablestatement.cxx b/dbaccess/source/core/api/callablestatement.cxx
index 25f3f405f8c1..c03fe0aab96e 100644
--- a/dbaccess/source/core/api/callablestatement.cxx
+++ b/dbaccess/source/core/api/callablestatement.cxx
@@ -68,7 +68,7 @@ void OCallableStatement::release() noexcept
// XServiceInfo
OUString OCallableStatement::getImplementationName( )
{
- return "com.sun.star.sdb.OCallableStatement";
+ return u"com.sun.star.sdb.OCallableStatement"_ustr;
}
Sequence< OUString > OCallableStatement::getSupportedServiceNames( )
diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx
index 127620b1d650..15378e22fd82 100644
--- a/dbaccess/source/core/api/column.cxx
+++ b/dbaccess/source/core/api/column.cxx
@@ -78,7 +78,7 @@ IMPLEMENT_FORWARD_XINTERFACE2( OColumn, OColumnBase, ::comphelper::OPropertyCont
// css::lang::XServiceInfo
OUString OColumn::getImplementationName( )
{
- return "com.sun.star.sdb.OColumn";
+ return u"com.sun.star.sdb.OColumn"_ustr;
}
sal_Bool OColumn::supportsService( const OUString& _rServiceName )
@@ -169,7 +169,7 @@ OColumns::~OColumns()
// XServiceInfo
OUString OColumns::getImplementationName( )
{
- return "com.sun.star.sdb.OColumns";
+ return u"com.sun.star.sdb.OColumns"_ustr;
}
sal_Bool OColumns::supportsService( const OUString& _rServiceName )
@@ -186,7 +186,7 @@ void OColumns::append( const OUString& _rName, OColumn* _pColumn )
{
MutexGuard aGuard(m_rMutex);
- OSL_ENSURE( _pColumn, "OColumns::append: invalid column!" );
+ assert(_pColumn && "OColumns::append: invalid column!");
OSL_ENSURE( !m_pElements->exists( _rName ),"OColumns::append: Column already exists");
_pColumn->m_sName = _rName;
diff --git a/dbaccess/source/core/api/datacolumn.cxx b/dbaccess/source/core/api/datacolumn.cxx
index e0953449154a..041cbf5f4f03 100644
--- a/dbaccess/source/core/api/datacolumn.cxx
+++ b/dbaccess/source/core/api/datacolumn.cxx
@@ -75,7 +75,7 @@ Any SAL_CALL ODataColumn::queryInterface( const Type & _rType )
// XServiceInfo
OUString ODataColumn::getImplementationName( )
{
- return "com.sun.star.sdb.ODataColumn";
+ return u"com.sun.star.sdb.ODataColumn"_ustr;
}
Sequence< OUString > ODataColumn::getSupportedServiceNames( )
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx
index b952edca2e7a..49aa4c39e48c 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -84,7 +84,7 @@ IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnDescriptor )
// css::lang::XServiceInfo
OUString OTableColumnDescriptor::getImplementationName( )
{
- return "com.sun.star.sdb.OTableColumnDescriptor";
+ return u"com.sun.star.sdb.OTableColumnDescriptor"_ustr;
}
Sequence< OUString > OTableColumnDescriptor::getSupportedServiceNames( )
@@ -141,7 +141,7 @@ IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumn )
OUString OTableColumn::getImplementationName( )
{
- return "com.sun.star.sdb.OTableColumn";
+ return u"com.sun.star.sdb.OTableColumn"_ustr;
}
::cppu::IPropertyArrayHelper& SAL_CALL OTableColumn::getInfoHelper()
@@ -282,7 +282,7 @@ IMPLEMENT_GET_IMPLEMENTATION_ID( OQueryColumn )
OUString SAL_CALL OQueryColumn::getImplementationName( )
{
- return "org.openoffice.comp.dbaccess.OQueryColumn";
+ return u"org.openoffice.comp.dbaccess.OQueryColumn"_ustr;
}
::cppu::IPropertyArrayHelper& SAL_CALL OQueryColumn::getInfoHelper()
@@ -428,7 +428,7 @@ IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnDescriptorWrapper )
// css::lang::XServiceInfo
OUString OTableColumnDescriptorWrapper::getImplementationName( )
{
- return "com.sun.star.sdb.OTableColumnDescriptorWrapper";
+ return u"com.sun.star.sdb.OTableColumnDescriptorWrapper"_ustr;
}
Sequence< OUString > OTableColumnDescriptorWrapper::getSupportedServiceNames( )
@@ -588,7 +588,7 @@ IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnWrapper )
OUString OTableColumnWrapper::getImplementationName( )
{
- return "com.sun.star.sdb.OTableColumnWrapper";
+ return u"com.sun.star.sdb.OTableColumnWrapper"_ustr;
}
Sequence< OUString > OTableColumnWrapper::getSupportedServiceNames( )
diff --git a/dbaccess/source/core/api/preparedstatement.cxx b/dbaccess/source/core/api/preparedstatement.cxx
index e7ec79a2ca87..ecb1a4c1e348 100644
--- a/dbaccess/source/core/api/preparedstatement.cxx
+++ b/dbaccess/source/core/api/preparedstatement.cxx
@@ -31,6 +31,7 @@
#include <strings.hxx>
#include "resultcolumn.hxx"
#include "resultset.hxx"
+#include <connection.hxx>
#include <comphelper/diagnose_ex.hxx>
using namespace ::com::sun::star::sdbc;
@@ -42,7 +43,7 @@ using namespace ::osl;
using namespace dbaccess;
-OPreparedStatement::OPreparedStatement(const Reference< XConnection > & _xConn,
+OPreparedStatement::OPreparedStatement(const rtl::Reference< OConnection > & _xConn,
const Reference< XInterface > & _xStatement)
:OStatementBase(_xConn, _xStatement)
{
@@ -106,7 +107,7 @@ void OPreparedStatement::release() noexcept
// XServiceInfo
OUString OPreparedStatement::getImplementationName( )
{
- return "com.sun.star.sdb.OPreparedStatement";
+ return u"com.sun.star.sdb.OPreparedStatement"_ustr;
}
sal_Bool OPreparedStatement::supportsService( const OUString& _rServiceName )
@@ -220,7 +221,7 @@ sal_Bool OPreparedStatement::execute()
Reference< XConnection > OPreparedStatement::getConnection()
{
- return Reference< XConnection > (m_xParent, UNO_QUERY);
+ return m_xParent.get();
}
// XParameters
diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx
index c8e723853a7a..8d50eacde1ff 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -214,7 +214,7 @@ void OQuery::rebuildColumns()
// XServiceInfo
OUString SAL_CALL OQuery::getImplementationName()
{
- return "com.sun.star.sdb.dbaccess.OQuery";
+ return u"com.sun.star.sdb.dbaccess.OQuery"_ustr;
}
sal_Bool SAL_CALL OQuery::supportsService(const OUString& _rServiceName)
{
@@ -227,7 +227,7 @@ sal_Bool SAL_CALL OQuery::supportsService(const OUString& _rServiceName)
}
css::uno::Sequence< OUString > SAL_CALL OQuery::getSupportedServiceNames( )
{
- return { SERVICE_SDB_DATASETTINGS, SERVICE_SDB_QUERY, "com.sun.star.sdb.QueryDefinition" };
+ return { SERVICE_SDB_DATASETTINGS, SERVICE_SDB_QUERY, u"com.sun.star.sdb.QueryDefinition"_ustr };
}
// css::beans::XPropertyChangeListener
@@ -374,7 +374,7 @@ void OQuery::registerProperties()
OUString OQuery::determineContentType() const
{
- return "application/vnd.org.openoffice.DatabaseQuery";
+ return u"application/vnd.org.openoffice.DatabaseQuery"_ustr;
}
} // namespace dbaccess
diff --git a/dbaccess/source/core/api/querycomposer.cxx b/dbaccess/source/core/api/querycomposer.cxx
index 9c41f344ccf5..68d59673e310 100644
--- a/dbaccess/source/core/api/querycomposer.cxx
+++ b/dbaccess/source/core/api/querycomposer.cxx
@@ -87,7 +87,7 @@ Any SAL_CALL OQueryComposer::queryInterface( const Type & rType )
// XServiceInfo
OUString OQueryComposer::getImplementationName( )
{
- return "com.sun.star.sdb.dbaccess.OQueryComposer";
+ return u"com.sun.star.sdb.dbaccess.OQueryComposer"_ustr;
}
sal_Bool OQueryComposer::supportsService( const OUString& _rServiceName )
diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx
index c308bf9d6f9d..57307c6f1214 100644
--- a/dbaccess/source/core/api/querycontainer.cxx
+++ b/dbaccess/source/core/api/querycontainer.cxx
@@ -130,7 +130,7 @@ void OQueryContainer::disposing()
// XServiceInfo
OUString SAL_CALL OQueryContainer::getImplementationName()
{
- return "com.sun.star.sdb.dbaccess.OQueryContainer";
+ return u"com.sun.star.sdb.dbaccess.OQueryContainer"_ustr;
}
sal_Bool SAL_CALL OQueryContainer::supportsService(const OUString& _rServiceName)
{
@@ -345,7 +345,7 @@ void SAL_CALL OQueryContainer::disposing( const css::lang::EventObject& _rSource
OUString OQueryContainer::determineContentType() const
{
- return "application/vnd.org.openoffice.DatabaseQueryContainer";
+ return u"application/vnd.org.openoffice.DatabaseQueryContainer"_ustr;
}
Reference< XContent > OQueryContainer::implCreateWrapper(const OUString& _rName)
diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx
index 0aff2b0aaba1..116a132eb72d 100644
--- a/dbaccess/source/core/api/querydescriptor.cxx
+++ b/dbaccess/source/core/api/querydescriptor.cxx
@@ -192,7 +192,7 @@ Reference< XNameAccess > SAL_CALL OQueryDescriptor_Base::getColumns( )
OUString SAL_CALL OQueryDescriptor_Base::getImplementationName( )
{
- return "com.sun.star.sdb.OQueryDescriptor";
+ return u"com.sun.star.sdb.OQueryDescriptor"_ustr;
}
sal_Bool SAL_CALL OQueryDescriptor_Base::supportsService( const OUString& _rServiceName )
diff --git a/dbaccess/source/core/api/resultcolumn.cxx b/dbaccess/source/core/api/resultcolumn.cxx
index fbc8cb8a343f..45d722431bee 100644
--- a/dbaccess/source/core/api/resultcolumn.cxx
+++ b/dbaccess/source/core/api/resultcolumn.cxx
@@ -103,7 +103,7 @@ Sequence< sal_Int8 > OResultColumn::getImplementationId()
// XServiceInfo
OUString OResultColumn::getImplementationName( )
{
- return "com.sun.star.sdb.OResultColumn";
+ return u"com.sun.star.sdb.OResultColumn"_ustr;
}
Sequence< OUString > OResultColumn::getSupportedServiceNames( )
diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx
index cc6a6fe018f4..20840d3682d3 100644
--- a/dbaccess/source/core/api/resultset.cxx
+++ b/dbaccess/source/core/api/resultset.cxx
@@ -164,7 +164,7 @@ void OResultSet::close()
// XServiceInfo
OUString OResultSet::getImplementationName( )
{
- return "com.sun.star.sdb.OResultSet";
+ return u"com.sun.star.sdb.OResultSet"_ustr;
}
sal_Bool OResultSet::supportsService( const OUString& _rServiceName )
@@ -982,13 +982,13 @@ void OResultSet::checkReadOnly() const
if ( ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY )
|| !m_xDelegatorResultSetUpdate.is()
)
- throwSQLException( "The result set is read-only.", StandardSQLState::GENERAL_ERROR, *const_cast< OResultSet* >( this ) );
+ throwSQLException( u"The result set is read-only."_ustr, StandardSQLState::GENERAL_ERROR, *const_cast< OResultSet* >( this ) );
}
void OResultSet::checkBookmarkable() const
{
if ( !m_bIsBookmarkable )
- throwSQLException( "The result set does not have bookmark support.", StandardSQLState::GENERAL_ERROR, *const_cast< OResultSet* >( this ) );
+ throwSQLException( u"The result set does not have bookmark support."_ustr, StandardSQLState::GENERAL_ERROR, *const_cast< OResultSet* >( this ) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/statement.cxx b/dbaccess/source/core/api/statement.cxx
index 1a20823ab9dd..7166de42a233 100644
--- a/dbaccess/source/core/api/statement.cxx
+++ b/dbaccess/source/core/api/statement.cxx
@@ -31,6 +31,7 @@
#include <comphelper/types.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <connectivity/dbexception.hxx>
+#include <connection.hxx>
using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::sdbc;
@@ -43,10 +44,11 @@ using namespace dbaccess;
using namespace dbtools;
-OStatementBase::OStatementBase(const Reference< XConnection > & _xConn,
+OStatementBase::OStatementBase(const rtl::Reference< OConnection > & _xConn,
const Reference< XInterface > & _xStatement)
- :OSubComponent(m_aMutex, _xConn)
+ :WeakComponentImplHelper(m_aMutex)
,OPropertySetHelper(WeakComponentImplHelper::rBHelper)
+ ,m_xParent(_xConn.get())
,m_bUseBookmarks( false )
,m_bEscapeProcessing( true )
@@ -68,7 +70,7 @@ Sequence< Type > OStatementBase::getTypes()
cppu::UnoType<XCloseable>::get(),
cppu::UnoType<XMultipleResults>::get(),
cppu::UnoType<css::util::XCancellable>::get(),
- OSubComponent::getTypes() );
+ ::cppu::WeakComponentImplHelper<>::getTypes() );
Reference< XGeneratedResultSet > xGRes(m_xAggregateAsSet, UNO_QUERY);
if ( xGRes.is() )
aTypes = OTypeCollection(cppu::UnoType<XGeneratedResultSet>::get(),aTypes.getTypes());
@@ -82,7 +84,7 @@ Sequence< Type > OStatementBase::getTypes()
// css::uno::XInterface
Any OStatementBase::queryInterface( const Type & rType )
{
- Any aIface = OSubComponent::queryInterface( rType );
+ Any aIface = ::cppu::WeakComponentImplHelper<>::queryInterface( rType );
if (!aIface.hasValue())
{
aIface = ::cppu::queryInterface(
@@ -110,12 +112,12 @@ Any OStatementBase::queryInterface( const Type & rType )
void OStatementBase::acquire() noexcept
{
- OSubComponent::acquire();
+ ::cppu::WeakComponentImplHelper<>::acquire();
}
void OStatementBase::release() noexcept
{
- OSubComponent::release();
+ ::cppu::WeakComponentImplHelper<>::release();
}
void OStatementBase::disposeResultSet()
@@ -152,11 +154,14 @@ void OStatementBase::disposing()
catch(RuntimeException& )
{// don't care for anymore
}
+ catch (SQLException&)
+ {// don't care for anymore
+ }
}
m_xAggregateAsSet = nullptr;
// free the parent at last
- OSubComponent::disposing();
+ ::cppu::WeakComponentImplHelper<>::disposing();
}
// XCloseable
@@ -416,7 +421,7 @@ Reference< XResultSet > SAL_CALL OStatementBase::getGeneratedValues( )
// OStatement
-OStatement::OStatement( const Reference< XConnection >& _xConn, const Reference< XInterface > & _xStatement )
+OStatement::OStatement( const rtl::Reference< OConnection >& _xConn, const Reference< XInterface > & _xStatement )
:OStatementBase( _xConn, _xStatement )
,m_bAttemptedComposerCreation( false )
{
@@ -429,7 +434,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( OStatement, OStatementBase, OStatement_IFACE )
// XServiceInfo
OUString OStatement::getImplementationName( )
{
- return "com.sun.star.sdb.OStatement";
+ return u"com.sun.star.sdb.OStatement"_ustr;
}
sal_Bool OStatement::supportsService( const OUString& _rServiceName )
@@ -531,7 +536,7 @@ Sequence< sal_Int32 > OStatement::executeBatch( )
Reference< XConnection > OStatement::getConnection()
{
- return Reference< XConnection >( m_xParent, UNO_QUERY );
+ return m_xParent.get();
}
void SAL_CALL OStatement::disposing()
diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx
index 8bc4aececf1b..d2071c27b833 100644
--- a/dbaccess/source/core/api/table.cxx
+++ b/dbaccess/source/core/api/table.cxx
@@ -233,7 +233,7 @@ void ODBTable::construct()
// XServiceInfo
OUString SAL_CALL ODBTable::getImplementationName()
{
- return "com.sun.star.sdb.dbaccess.ODBTable";
+ return u"com.sun.star.sdb.dbaccess.ODBTable"_ustr;
}
sal_Bool SAL_CALL ODBTable::supportsService(const OUString& _rServiceName)
{
diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx
index 2ec9ce796166..37023c267504 100644
--- a/dbaccess/source/core/api/tablecontainer.cxx
+++ b/dbaccess/source/core/api/tablecontainer.cxx
@@ -120,7 +120,7 @@ OUString OTableContainer::getTableTypeRestriction() const
// XServiceInfo
OUString SAL_CALL OTableContainer::getImplementationName()
{
- return "com.sun.star.sdb.dbaccess.OTableContainer";
+ return u"com.sun.star.sdb.dbaccess.OTableContainer"_ustr;
}
sal_Bool SAL_CALL OTableContainer::supportsService(const OUString& _rServiceName)
{
@@ -366,7 +366,7 @@ void OTableContainer::dropObject(sal_Int32 _nPos, const OUString& _sElementName)
if(sComposedName.isEmpty())
::dbtools::throwFunctionSequenceException(static_cast<XTypeProvider*>(static_cast<OFilteredContainer*>(this)));
- OUString aSql("DROP ");
+ OUString aSql(u"DROP "_ustr);
if ( bIsView ) // here we have a view
aSql += "VIEW ";
diff --git a/dbaccess/source/core/api/viewcontainer.cxx b/dbaccess/source/core/api/viewcontainer.cxx
index 7e170b86d43a..b115cb3dc508 100644
--- a/dbaccess/source/core/api/viewcontainer.cxx
+++ b/dbaccess/source/core/api/viewcontainer.cxx
@@ -61,7 +61,7 @@ OViewContainer::~OViewContainer()
// XServiceInfo
OUString SAL_CALL OViewContainer::getImplementationName()
{
- return "com.sun.star.sdb.dbaccess.OViewContainer";
+ return u"com.sun.star.sdb.dbaccess.OViewContainer"_ustr;
}
sal_Bool SAL_CALL OViewContainer::supportsService(const OUString& _rServiceName)
{
@@ -246,7 +246,7 @@ void SAL_CALL OViewContainer::elementReplaced( const ContainerEvent& /*Event*/ )
OUString OViewContainer::getTableTypeRestriction() const
{
// no restriction at all (other than the ones provided externally)
- return "VIEW";
+ return u"VIEW"_ustr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
index 19076507e0b3..a36adad3f40a 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
@@ -153,12 +153,12 @@ IMPLEMENT_FORWARD_XINTERFACE3( OComponentDefinition,OContentHelper,ODataSettings
OUString SAL_CALL OComponentDefinition::getImplementationName()
{
- return "com.sun.star.comp.dba.OComponentDefinition";
+ return u"com.sun.star.comp.dba.OComponentDefinition"_ustr;
}
Sequence< OUString > SAL_CALL OComponentDefinition::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.TableDefinition", "com.sun.star.ucb.Content" };
+ return { u"com.sun.star.sdb.TableDefinition"_ustr, u"com.sun.star.ucb.Content"_ustr };
}
void SAL_CALL OComponentDefinition::disposing()
@@ -193,8 +193,8 @@ Reference< XPropertySetInfo > SAL_CALL OComponentDefinition::getPropertySetInfo(
OUString OComponentDefinition::determineContentType() const
{
return m_bTable
- ? OUString( "application/vnd.org.openoffice.DatabaseTable" )
- : OUString( "application/vnd.org.openoffice.DatabaseCommandDefinition" );
+ ? u"application/vnd.org.openoffice.DatabaseTable"_ustr
+ : u"application/vnd.org.openoffice.DatabaseCommandDefinition"_ustr;
}
Reference< XNameAccess> OComponentDefinition::getColumns()
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index e624eb709c43..6736e22d9bd6 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -86,7 +86,7 @@ void SAL_CALL OContentHelper::disposing()
OUString SAL_CALL OContentHelper::getImplementationName()
{
- return "com.sun.star.comp.sdb.Content";
+ return u"com.sun.star.comp.sdb.Content"_ustr;
}
sal_Bool SAL_CALL OContentHelper::supportsService(const OUString& _rServiceName)
{
@@ -99,7 +99,7 @@ sal_Bool SAL_CALL OContentHelper::supportsService(const OUString& _rServiceName)
}
css::uno::Sequence< OUString > SAL_CALL OContentHelper::getSupportedServiceNames()
{
- return { "com.sun.star.ucb.Content" };
+ return { u"com.sun.star.ucb.Content"_ustr };
}
@@ -343,7 +343,7 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue
if ( rValue.Name == "ContentType" || rValue.Name == "IsDocument" || rValue.Name == "IsFolder" )
{
// Read-only property!
- aRetRange[ n ] <<= IllegalAccessException("Property is read-only!",
+ aRetRange[ n ] <<= IllegalAccessException(u"Property is read-only!"_ustr,
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name == "Title" )
@@ -377,14 +377,14 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue
}
else
{
- aRetRange[ n ] <<= IllegalTypeException("Property value has wrong type!",
+ aRetRange[ n ] <<= IllegalTypeException(u"Property value has wrong type!"_ustr,
static_cast< cppu::OWeakObject * >( this ) );
}
}
else
{
- aRetRange[ n ] <<= Exception("No property set for storing the value!",
+ aRetRange[ n ] <<= Exception(u"No property set for storing the value!"_ustr,
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -437,24 +437,24 @@ Reference< XRow > OContentHelper::getPropertyValues( const Sequence< Property >&
{
// Append all Core Properties.
xRow->appendString (
- Property( "ContentType", -1,
+ Property( u"ContentType"_ustr, -1,
cppu::UnoType<OUString>::get(),
PropertyAttribute::BOUND
| PropertyAttribute::READONLY ),
getContentType() );
xRow->appendString (
- Property( "Title", -1,
+ Property( u"Title"_ustr, -1,
cppu::UnoType<OUString>::get(),
PropertyAttribute::BOUND ),
m_pImpl->m_aProps.aTitle );
xRow->appendBoolean(
- Property( "IsDocument", -1,
+ Property( u"IsDocument"_ustr, -1,
cppu::UnoType<bool>::get(),
PropertyAttribute::BOUND
| PropertyAttribute::READONLY ),
m_pImpl->m_aProps.bIsDocument );
xRow->appendBoolean(
- Property( "IsFolder", -1,
+ Property( u"IsFolder"_ustr, -1,
cppu::UnoType<bool>::get(),
PropertyAttribute::BOUND
| PropertyAttribute::READONLY ),
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 8067ef32e30a..78f1693ebc97 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -249,7 +249,7 @@ bool DocumentStorageAccess::commitEmbeddedStorage( bool _bPreventRootCommits )
bool bSuccess = false;
try
{
- NamedStorages::const_iterator pos = m_aExposedStorages.find( "database" );
+ NamedStorages::const_iterator pos = m_aExposedStorages.find( u"database"_ustr );
if ( pos != m_aExposedStorages.end() )
bSuccess = tools::stor::commitStorageIfWriteable( pos->second );
}
@@ -315,7 +315,7 @@ void SAL_CALL DocumentStorageAccess::commited( const css::lang::EventObject& aEv
Reference< XStorage > xStorage( aEvent.Source, UNO_QUERY );
// check if this is the dedicated "database" sub storage
- NamedStorages::const_iterator pos = m_aExposedStorages.find( "database" );
+ NamedStorages::const_iterator pos = m_aExposedStorages.find( u"database"_ustr );
if ( ( pos != m_aExposedStorages.end() )
&& ( pos->second == xStorage )
)
@@ -371,7 +371,7 @@ ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XComponentContext >& _r
{
// some kind of default
m_sConnectURL = "jdbc:";
- m_aTableFilter = { "%" };
+ m_aTableFilter = { u"%"_ustr };
impl_construct_nothrow();
}
@@ -457,17 +457,17 @@ namespace
{
OUString lcl_getContainerStorageName_throw( ODatabaseModelImpl::ObjectType _eType )
{
- const char* pAsciiName( nullptr );
+ OUString sName;
switch ( _eType )
{
- case ODatabaseModelImpl::ObjectType::Form: pAsciiName = "forms"; break;
- case ODatabaseModelImpl::ObjectType::Report: pAsciiName = "reports"; break;
- case ODatabaseModelImpl::ObjectType::Query: pAsciiName = "queries"; break;
- case ODatabaseModelImpl::ObjectType::Table: pAsciiName = "tables"; break;
+ case ODatabaseModelImpl::ObjectType::Form: sName = u"forms"_ustr; break;
+ case ODatabaseModelImpl::ObjectType::Report: sName = u"reports"_ustr; break;
+ case ODatabaseModelImpl::ObjectType::Query: sName = u"queries"_ustr; break;
+ case ODatabaseModelImpl::ObjectType::Table: sName = u"tables"_ustr; break;
default:
throw RuntimeException();
}
- return OUString::createFromAscii( pAsciiName );
+ return sName;
}
bool lcl_hasObjectWithMacros_throw( const ODefinitionContainer_Impl& _rObjectDefinitions, const Reference< XStorage >& _rxContainerStorage )
@@ -696,9 +696,9 @@ void ODatabaseModelImpl::setResource( const OUString& i_rDocumentURL, const Sequ
::comphelper::NamedValueCollection aMediaDescriptor( _rArgs );
#if OSL_DEBUG_LEVEL > 0
- if ( aMediaDescriptor.has( "SalvagedFile" ) )
+ if ( aMediaDescriptor.has( u"SalvagedFile"_ustr ) )
{
- OUString sSalvagedFile( aMediaDescriptor.getOrDefault( "SalvagedFile", OUString() ) );
+ OUString sSalvagedFile( aMediaDescriptor.getOrDefault( u"SalvagedFile"_ustr, OUString() ) );
// If SalvagedFile is an empty string, this indicates "the document is being recovered, but i_rDocumentURL already
// is the real document URL, not the temporary document location"
if ( sSalvagedFile.isEmpty() )
@@ -716,12 +716,12 @@ void ODatabaseModelImpl::setResource( const OUString& i_rDocumentURL, const Sequ
::comphelper::NamedValueCollection ODatabaseModelImpl::stripLoadArguments( const ::comphelper::NamedValueCollection& _rArguments )
{
- OSL_ENSURE( !_rArguments.has( "Model" ), "ODatabaseModelImpl::stripLoadArguments: this is suspicious (1)!" );
- OSL_ENSURE( !_rArguments.has( "ViewName" ), "ODatabaseModelImpl::stripLoadArguments: this is suspicious (2)!" );
+ OSL_ENSURE( !_rArguments.has( u"Model"_ustr ), "ODatabaseModelImpl::stripLoadArguments: this is suspicious (1)!" );
+ OSL_ENSURE( !_rArguments.has( u"ViewName"_ustr ), "ODatabaseModelImpl::stripLoadArguments: this is suspicious (2)!" );
::comphelper::NamedValueCollection aMutableArgs( _rArguments );
- aMutableArgs.remove( "Model" );
- aMutableArgs.remove( "ViewName" );
+ aMutableArgs.remove( u"Model"_ustr );
+ aMutableArgs.remove( u"ViewName"_ustr );
return aMutableArgs;
}
@@ -748,9 +748,9 @@ Reference< XStorage > const & ODatabaseModelImpl::getOrCreateRootStorage()
if ( !m_xDocumentStorage.is() )
{
Reference< XSingleServiceFactory> xStorageFactory = StorageFactory::create( m_aContext );
- Any aSource = m_aMediaDescriptor.get( "Stream" );
+ Any aSource = m_aMediaDescriptor.get( u"Stream"_ustr );
if ( !aSource.hasValue() )
- aSource = m_aMediaDescriptor.get( "InputStream" );
+ aSource = m_aMediaDescriptor.get( u"InputStream"_ustr );
if ( !aSource.hasValue() && !m_sDocFileLocation.isEmpty() )
aSource <<= m_sDocFileLocation;
// TODO: shouldn't we also check URL?
@@ -843,7 +843,7 @@ bool ODatabaseModelImpl::commitStorageIfWriteable_ignoreErrors( const Reference<
// For that, we need a temporary copy of the original file.
osl::File::RC rc = osl::File::copy(sLocation, sTmpFileUrl);
if (rc != osl::FileBase::E_None)
- throw uno::RuntimeException("Could not create temp file");
+ throw uno::RuntimeException(u"Could not create temp file"_ustr);
}
bool bSuccess = false;
@@ -877,10 +877,10 @@ bool ODatabaseModelImpl::commitStorageIfWriteable_ignoreErrors( const Reference<
if (!xReadOrig.is())
throw uno::RuntimeException("Could not read " + sTmpFileUrl);
uno::Reference<embed::XStorage> xMetaInf
- = xReadOrig->openStorageElement("META-INF", embed::ElementModes::READ);
+ = xReadOrig->openStorageElement(u"META-INF"_ustr, embed::ElementModes::READ);
uno::Reference<embed::XStorage> xTargetMetaInf
- = _rxStorage->openStorageElement("META-INF", embed::ElementModes::READWRITE);
+ = _rxStorage->openStorageElement(u"META-INF"_ustr, embed::ElementModes::READWRITE);
if (xMetaInf.is() && xTargetMetaInf.is() && xMetaInf->hasByName(aScriptSignName))
{
xMetaInf->copyElementTo(aScriptSignName, xTargetMetaInf, aScriptSignName);
@@ -1034,9 +1034,9 @@ std::span<const DefaultPropertyValue> ODatabaseModelImpl::getDefaultDataSourceSe
{ u"Extension"_ustr, Any( OUString() ) },
{ u"CharSet"_ustr, Any( OUString() ) },
{ u"HeaderLine"_ustr, Any( true ) },
- { u"FieldDelimiter"_ustr, Any( OUString( "," ) ) },
- { u"StringDelimiter"_ustr, Any( OUString( "\"" ) ) },
- { u"DecimalDelimiter"_ustr, Any( OUString( "." ) ) },
+ { u"FieldDelimiter"_ustr, Any( u","_ustr ) },
+ { u"StringDelimiter"_ustr, Any( u"\""_ustr ) },
+ { u"DecimalDelimiter"_ustr, Any( u"."_ustr ) },
{ u"ThousandDelimiter"_ustr, Any( OUString() ) },
{ u"ShowDeleted"_ustr, Any( false ) },
// known ODBC settings
@@ -1114,7 +1114,7 @@ bool ODatabaseModelImpl::adjustMacroMode_AutoReject()
bool ODatabaseModelImpl::checkMacrosOnLoading()
{
Reference< XInteractionHandler > xInteraction;
- xInteraction = m_aMediaDescriptor.getOrDefault( "InteractionHandler", xInteraction );
+ xInteraction = m_aMediaDescriptor.getOrDefault( u"InteractionHandler"_ustr, xInteraction );
const bool bHasMacros = m_aMacroMode.hasMacros();
return m_aMacroMode.checkMacrosOnLoading(xInteraction, false /*HasValidContentSignature*/, bHasMacros);
}
@@ -1283,7 +1283,7 @@ sal_Int16 ODatabaseModelImpl::getCurrentMacroExecMode() const
sal_Int16 nCurrentMode = MacroExecMode::NEVER_EXECUTE;
try
{
- nCurrentMode = m_aMediaDescriptor.getOrDefault( "MacroExecutionMode", nCurrentMode );
+ nCurrentMode = m_aMediaDescriptor.getOrDefault( u"MacroExecutionMode"_ustr, nCurrentMode );
}
catch( const Exception& )
{
@@ -1294,7 +1294,7 @@ sal_Int16 ODatabaseModelImpl::getCurrentMacroExecMode() const
void ODatabaseModelImpl::setCurrentMacroExecMode( sal_uInt16 nMacroMode )
{
- m_aMediaDescriptor.put( "MacroExecutionMode", nMacroMode );
+ m_aMediaDescriptor.put( u"MacroExecutionMode"_ustr, nMacroMode );
}
OUString ODatabaseModelImpl::getDocumentLocation() const
diff --git a/dbaccess/source/core/dataaccess/SharedConnection.cxx b/dbaccess/source/core/dataaccess/SharedConnection.cxx
index d893a8e298b3..86dae318ede9 100644
--- a/dbaccess/source/core/dataaccess/SharedConnection.cxx
+++ b/dbaccess/source/core/dataaccess/SharedConnection.cxx
@@ -29,19 +29,12 @@ using namespace ::com::sun::star::container;
using namespace connectivity;
OSharedConnection::OSharedConnection(Reference<XAggregation>& _rxProxyConnection)
- : OSharedConnection_BASE(m_aMutex)
{
- setDelegation(_rxProxyConnection, m_refCount);
+ setDelegation(_rxProxyConnection);
}
OSharedConnection::~OSharedConnection() {}
-void SAL_CALL OSharedConnection::disposing()
-{
- OConnectionWrapper::disposing();
- OSharedConnection_BASE::disposing();
-}
-
Reference<XStatement> SAL_CALL OSharedConnection::createStatement()
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -147,8 +140,6 @@ Reference<css::container::XNameAccess> SAL_CALL OSharedConnection::getTypeMap()
return m_xConnection->getTypeMap();
}
-IMPLEMENT_GET_IMPLEMENTATION_ID(OSharedConnection)
-
} // 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 2c88e58fd55d..e4467c44d060 100644
--- a/dbaccess/source/core/dataaccess/SharedConnection.hxx
+++ b/dbaccess/source/core/dataaccess/SharedConnection.hxx
@@ -32,39 +32,17 @@ namespace dbaccess
// All methods will be forwarded with exception of the set methods, which are not allowed
// to be called on shared connections. Instances of this class will be created when the
// datasource is asked for not isolated connection.
- typedef ::cppu::WeakComponentImplHelper< css::sdbc::XConnection
+ typedef ::cppu::ImplInheritanceHelper<connectivity::OConnectionWrapper,
+ css::sdbc::XConnection
> OSharedConnection_BASE;
- class OSharedConnection : public ::cppu::BaseMutex
- , public OSharedConnection_BASE
- , public ::connectivity::OConnectionWrapper
+ class OSharedConnection : public OSharedConnection_BASE
{
protected:
- virtual void SAL_CALL disposing() override;
virtual ~OSharedConnection() override;
public:
explicit OSharedConnection(css::uno::Reference< css::uno::XAggregation >& _rxProxyConnection);
- virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
-
- virtual void SAL_CALL acquire() noexcept override { OSharedConnection_BASE::acquire(); }
- virtual void SAL_CALL release() noexcept override { OSharedConnection_BASE::release(); }
- virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override
- {
- return ::comphelper::concatSequences(
- OSharedConnection_BASE::getTypes(),
- ::connectivity::OConnectionWrapper::getTypes()
- );
- }
-
- virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& _rType ) override
- {
- css::uno::Any aReturn = OSharedConnection_BASE::queryInterface(_rType);
- if ( !aReturn.hasValue() )
- aReturn = ::connectivity::OConnectionWrapper::queryInterface(_rType);
- return aReturn;
- }
-
// XCloseable
virtual void SAL_CALL close( ) override
{
@@ -78,23 +56,23 @@ namespace dbaccess
// XConnection
virtual void SAL_CALL setAutoCommit( sal_Bool /*autoCommit*/ ) override
{
- throw css::sdbc::SQLException("This call is not allowed when sharing connections.",*this,"S10000",0,css::uno::Any());
+ throw css::sdbc::SQLException(u"This call is not allowed when sharing connections."_ustr,*this,u"S10000"_ustr,0,css::uno::Any());
}
virtual void SAL_CALL setReadOnly( sal_Bool /*readOnly*/ ) override
{
- throw css::sdbc::SQLException("This call is not allowed when sharing connections.",*this,"S10000",0,css::uno::Any());
+ throw css::sdbc::SQLException(u"This call is not allowed when sharing connections."_ustr,*this,u"S10000"_ustr,0,css::uno::Any());
}
virtual void SAL_CALL setCatalog( const OUString& /*catalog*/ ) override
{
- throw css::sdbc::SQLException("This call is not allowed when sharing connections.",*this,"S10000",0,css::uno::Any());
+ throw css::sdbc::SQLException(u"This call is not allowed when sharing connections."_ustr,*this,u"S10000"_ustr,0,css::uno::Any());
}
virtual void SAL_CALL setTransactionIsolation( sal_Int32 /*level*/ ) override
{
- throw css::sdbc::SQLException("This call is not allowed when sharing connections.",*this,"S10000",0,css::uno::Any());
+ throw css::sdbc::SQLException(u"This call is not allowed when sharing connections."_ustr,*this,u"S10000"_ustr,0,css::uno::Any());
}
virtual void SAL_CALL setTypeMap( const css::uno::Reference< css::container::XNameAccess >& /*typeMap*/ ) override
{
- throw css::sdbc::SQLException("This call is not allowed when sharing connections.",*this,"S10000",0,css::uno::Any());
+ throw css::sdbc::SQLException(u"This call is not allowed when sharing connections."_ustr,*this,u"S10000"_ustr,0,css::uno::Any());
}
// XConnection
virtual css::uno::Reference< css::sdbc::XStatement > SAL_CALL createStatement( ) override;
diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
index a03caea57e93..3d0657e26603 100644
--- a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
@@ -63,7 +63,7 @@ OBookmarkContainer::~OBookmarkContainer()
// XServiceInfo
OUString SAL_CALL OBookmarkContainer::getImplementationName( )
{
- return "com.sun.star.comp.dba.OBookmarkContainer";
+ return u"com.sun.star.comp.dba.OBookmarkContainer"_ustr;
}
sal_Bool SAL_CALL OBookmarkContainer::supportsService( const OUString& _rServiceName )
@@ -73,7 +73,7 @@ sal_Bool SAL_CALL OBookmarkContainer::supportsService( const OUString& _rService
Sequence< OUString > SAL_CALL OBookmarkContainer::getSupportedServiceNames( )
{
- return { "com.sun.star.sdb.DefinitionContainer" };
+ return { u"com.sun.star.sdb.DefinitionContainer"_ustr };
}
// XNameContainer
diff --git a/dbaccess/source/core/dataaccess/commandcontainer.cxx b/dbaccess/source/core/dataaccess/commandcontainer.cxx
index 7f646c61722e..9f426f4651a6 100644
--- a/dbaccess/source/core/dataaccess/commandcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/commandcontainer.cxx
@@ -88,7 +88,7 @@ Reference< XInterface > SAL_CALL OCommandContainer::createInstance( )
OUString OCommandContainer::determineContentType() const
{
- return "application/vnd.org.openoffice.DatabaseCommandDefinitionContainer";
+ return u"application/vnd.org.openoffice.DatabaseCommandDefinitionContainer"_ustr;
}
} // namespace dbaccess
diff --git a/dbaccess/source/core/dataaccess/commanddefinition.cxx b/dbaccess/source/core/dataaccess/commanddefinition.cxx
index b3f4fa8b0ead..6dfe5056e7ab 100644
--- a/dbaccess/source/core/dataaccess/commanddefinition.cxx
+++ b/dbaccess/source/core/dataaccess/commanddefinition.cxx
@@ -106,15 +106,15 @@ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL OCommandDefinition
OUString SAL_CALL OCommandDefinition::getImplementationName()
{
- return "com.sun.star.comp.dba.OCommandDefinition";
+ return u"com.sun.star.comp.dba.OCommandDefinition"_ustr;
}
css::uno::Sequence<OUString> SAL_CALL OCommandDefinition::getSupportedServiceNames()
{
return {
- "com.sun.star.sdb.QueryDefinition",
- "com.sun.star.sdb.CommandDefinition",
- "com.sun.star.ucb.Content"
+ u"com.sun.star.sdb.QueryDefinition"_ustr,
+ u"com.sun.star.sdb.CommandDefinition"_ustr,
+ u"com.sun.star.ucb.Content"_ustr
};
}
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index fa4c934a056e..982303889a82 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -21,7 +21,7 @@
#include <iterator>
-#include "connection.hxx"
+#include <connection.hxx>
#include "datasource.hxx"
#include <strings.hrc>
#include <strings.hxx>
@@ -70,7 +70,7 @@ namespace dbaccess
// XServiceInfo
OUString OConnection::getImplementationName( )
{
- return "com.sun.star.comp.dbaccess.Connection";
+ return u"com.sun.star.comp.dbaccess.Connection"_ustr;
}
sal_Bool OConnection::supportsService( const OUString& _rServiceName )
@@ -255,10 +255,7 @@ void OConnection::setTypeMap(const Reference< XNameAccess > & typeMap)
OConnection::OConnection(ODatabaseSource& _rDB
, Reference< XConnection > const & _rxMaster
, const Reference< XComponentContext >& _rxORB)
- :OSubComponent(m_aMutex, static_cast< OWeakObject* >(&_rDB))
- // as the queries reroute their refcounting to us, this m_aMutex is okey. If the queries
- // container would do its own refcounting, it would have to acquire m_pMutex
- // same for tables
+ :m_xParent(&_rDB)
,m_aTableFilter(_rDB.m_pImpl->m_aTableFilter)
,m_aTableTypeFilter(_rDB.m_pImpl->m_aTableTypeFilter)
,m_aContext( _rxORB )
@@ -275,7 +272,7 @@ OConnection::OConnection(ODatabaseSource& _rDB
{
Reference< XProxyFactory > xProxyFactory = ProxyFactory::create( m_aContext );
Reference<XAggregation> xAgg = xProxyFactory->createProxy(_rxMaster);
- setDelegation(xAgg,m_refCount);
+ setDelegation(xAgg);
OSL_ENSURE(m_xConnection.is(), "OConnection::OConnection : invalid master connection !");
}
catch(const Exception&)
@@ -388,9 +385,7 @@ Sequence< Type > OConnection::getTypes()
{
TypeBag aNormalizedTypes;
- lcl_copyTypes( aNormalizedTypes, OSubComponent::getTypes() );
lcl_copyTypes( aNormalizedTypes, OConnection_Base::getTypes() );
- lcl_copyTypes( aNormalizedTypes, ::connectivity::OConnectionWrapper::getTypes() );
if ( !m_bSupportsViews )
aNormalizedTypes.erase( cppu::UnoType<XViewsSupplier>::get() );
@@ -402,11 +397,6 @@ Sequence< Type > OConnection::getTypes()
return comphelper::containerToSequence(aNormalizedTypes);
}
-Sequence< sal_Int8 > OConnection::getImplementationId()
-{
- return css::uno::Sequence<sal_Int8>();
-}
-
// css::uno::XInterface
Any OConnection::queryInterface( const Type & rType )
{
@@ -416,35 +406,15 @@ Any OConnection::queryInterface( const Type & rType )
return Any();
else if ( !m_bSupportsGroups && rType.equals( cppu::UnoType<XGroupsSupplier>::get() ) )
return Any();
- Any aReturn = OSubComponent::queryInterface( rType );
- if (!aReturn.hasValue())
- {
- aReturn = OConnection_Base::queryInterface( rType );
- if (!aReturn.hasValue())
- aReturn = OConnectionWrapper::queryInterface( rType );
- }
- return aReturn;
-}
-
-void OConnection::acquire() noexcept
-{
- // include this one when you want to see who calls it (call graph)
- OSubComponent::acquire();
-}
-
-void OConnection::release() noexcept
-{
- // include this one when you want to see who calls it (call graph)
- OSubComponent::release();
+ return OConnection_Base::queryInterface( rType );
}
-// OSubComponent
+// OConnection_Base
void OConnection::disposing()
{
MutexGuard aGuard(m_aMutex);
- OSubComponent::disposing();
- OConnectionWrapper::disposing();
+ OConnection_Base::disposing();
for (auto const& statement : m_aStatements)
{
@@ -485,7 +455,7 @@ Reference< XInterface > OConnection::getParent()
{
MutexGuard aGuard(m_aMutex);
checkDisposed();
- return m_xParent;
+ return static_cast<OWeakObject*>(m_xParent.get().get());
}
void OConnection::setParent(const Reference< XInterface > & /*Parent*/)
@@ -629,7 +599,7 @@ Reference< XInterface > SAL_CALL OConnection::createInstance( const OUString& _s
if ( aFind == m_aSupportServices.end() )
{
Reference<XConnection> xMy(this);
- Sequence<Any> aArgs{ Any(NamedValue("ActiveConnection",Any(xMy))) };
+ Sequence<Any> aArgs{ Any(NamedValue(u"ActiveConnection"_ustr,Any(xMy))) };
aFind = m_aSupportServices.emplace(
_sServiceSpecifier,
m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(_sServiceSpecifier, aArgs, m_aContext)
diff --git a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
index ef5239a6793f..ae099dfb1bed 100644
--- a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
+++ b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
@@ -146,7 +146,7 @@ namespace
OUString SAL_CALL DataAccessDescriptor::getImplementationName()
{
- return "com.sun.star.comp.dba.DataAccessDescriptor";
+ return u"com.sun.star.comp.dba.DataAccessDescriptor"_ustr;
}
sal_Bool SAL_CALL DataAccessDescriptor::supportsService( const OUString& rServiceName )
@@ -156,7 +156,7 @@ namespace
Sequence< OUString > SAL_CALL DataAccessDescriptor::getSupportedServiceNames( )
{
- return { "com.sun.star.sdb.DataAccessDescriptor" };
+ return { u"com.sun.star.sdb.DataAccessDescriptor"_ustr };
}
Reference< XPropertySetInfo > SAL_CALL DataAccessDescriptor::getPropertySetInfo()
@@ -198,7 +198,7 @@ namespace
OUString SAL_CALL DataAccessDescriptorFactory::getImplementationName()
{
- return "com.sun.star.comp.dba.DataAccessDescriptorFactory";
+ return u"com.sun.star.comp.dba.DataAccessDescriptorFactory"_ustr;
}
sal_Bool SAL_CALL DataAccessDescriptorFactory::supportsService( const OUString& rServiceName )
@@ -208,7 +208,7 @@ namespace
Sequence< OUString > SAL_CALL DataAccessDescriptorFactory::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.DataAccessDescriptorFactory" };
+ return { u"com.sun.star.sdb.DataAccessDescriptorFactory"_ustr };
}
Reference< XPropertySet > SAL_CALL DataAccessDescriptorFactory::createDataAccessDescriptor( )
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 54c2ae37f356..a63ca5af6031 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -193,7 +193,7 @@ ODatabaseContext::~ODatabaseContext()
// XServiceInfo
OUString ODatabaseContext::getImplementationName( )
{
- return "com.sun.star.comp.dba.ODatabaseContext";
+ return u"com.sun.star.comp.dba.ODatabaseContext"_ustr;
}
sal_Bool ODatabaseContext::supportsService( const OUString& _rServiceName )
@@ -203,7 +203,7 @@ sal_Bool ODatabaseContext::supportsService( const OUString& _rServiceName )
Sequence< OUString > ODatabaseContext::getSupportedServiceNames( )
{
- return { "com.sun.star.sdb.DatabaseContext" };
+ return { u"com.sun.star.sdb.DatabaseContext"_ustr };
}
Reference< XInterface > ODatabaseContext::impl_createNewDataSource()
@@ -330,9 +330,9 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rNa
Reference< XLoadable > xLoad( xModel, UNO_QUERY_THROW );
::comphelper::NamedValueCollection aArgs;
- aArgs.put( "URL", _sURL );
- aArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG );
- aArgs.put( "InteractionHandler", task::InteractionHandler::createWithParent(m_aContext, nullptr) );
+ aArgs.put( u"URL"_ustr, _sURL );
+ aArgs.put( u"MacroExecutionMode"_ustr, MacroExecMode::USE_CONFIG );
+ aArgs.put( u"InteractionHandler"_ustr, task::InteractionHandler::createWithParent(m_aContext, nullptr) );
if (bEmbeddedDataSource)
{
// In this case the host contains the real path, and the path is the embedded stream name.
@@ -346,7 +346,7 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rNa
if (auth.isEmpty() == decAuth.isEmpty()) {
// Decoding of auth to UTF-8 succeeded:
OUString sBaseURI = decAuth + uri->getPath();
- aArgs.put("BaseURI", sBaseURI);
+ aArgs.put(u"BaseURI"_ustr, sBaseURI);
} else {
SAL_WARN(
"dbaccess.core",
@@ -470,7 +470,7 @@ void ODatabaseContext::storeTransientProperties( ODatabaseModelImpl& _rModelImpl
// additionally, remember the "failed password", which is not available as property
// #i86178#
- aRememberProps.put( "AuthFailedPassword", _rModelImpl.m_sFailedPassword );
+ aRememberProps.put( u"AuthFailedPassword"_ustr, _rModelImpl.m_sFailedPassword );
OUString sDocumentURL( _rModelImpl.getURL() );
if ( m_aDatabaseObjects.find( sDocumentURL ) != m_aDatabaseObjects.end() )
@@ -718,7 +718,7 @@ void ODatabaseContext::onBasicManagerCreated( const Reference< XModel >& _rxForD
// ... whose BasicManager has just been created, then add the global DatabaseDocument variable to its scope.
if ( xDatabaseDocument.is() )
- _rBasicManager.SetGlobalUNOConstant( "ThisDatabaseDocument", Any( xDatabaseDocument ) );
+ _rBasicManager.SetGlobalUNOConstant( u"ThisDatabaseDocument"_ustr, Any( xDatabaseDocument ) );
#endif
}
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 204bad556e5d..9ece0a1493b4 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -124,7 +124,7 @@ bool ViewMonitor::onSetCurrentController( const Reference< XController >& _rxCon
// notify the respective events
if ( bLoadFinished )
- m_rEventNotifier.notifyDocumentEventAsync( m_bIsNewDocument ? "OnNew" : "OnLoad" );
+ m_rEventNotifier.notifyDocumentEventAsync( m_bIsNewDocument ? u"OnNew"_ustr : u"OnLoad"_ustr, nullptr, Any() );
return bLoadFinished;
}
@@ -231,7 +231,7 @@ namespace
Reference< XStatusIndicator > lcl_extractStatusIndicator( const ::comphelper::NamedValueCollection& _rArguments )
{
Reference< XStatusIndicator > xStatusIndicator;
- return _rArguments.getOrDefault( "StatusIndicator", xStatusIndicator );
+ return _rArguments.getOrDefault( u"StatusIndicator"_ustr, xStatusIndicator );
}
void lcl_triggerStatusIndicator_throw( const ::comphelper::NamedValueCollection& _rArguments, DocumentGuard& _rGuard, const bool _bStart )
@@ -294,8 +294,8 @@ namespace
return _rDescriptor.getPropertyValues();
::comphelper::NamedValueCollection aMutableDescriptor( _rDescriptor );
- aMutableDescriptor.put( "FileName", _rURL );
- aMutableDescriptor.put( "URL", _rURL );
+ aMutableDescriptor.put( u"FileName"_ustr, _rURL );
+ aMutableDescriptor.put( u"URL"_ustr, _rURL );
return aMutableDescriptor.getPropertyValues();
}
}
@@ -329,7 +329,7 @@ constexpr OUString sPictures = u"Pictures"_ustr;
static void lcl_uglyHackToStoreDialogeEmbedImages( const Reference< XStorageBasedLibraryContainer >& xDlgCont, const Reference< XStorage >& xStorage, const Reference< XModel >& rxModel, const Reference<XComponentContext >& rxContext )
{
const Sequence< OUString > sLibraries = xDlgCont->getElementNames();
- Reference< XStorage > xTmpPic = xStorage->openStorageElement( "tempPictures", ElementModes::READWRITE );
+ Reference< XStorage > xTmpPic = xStorage->openStorageElement( u"tempPictures"_ustr, ElementModes::READWRITE );
std::vector<uno::Reference<graphic::XGraphic>> vxGraphicList;
for ( OUString const & sLibrary : sLibraries )
@@ -415,11 +415,11 @@ namespace
/** property map for import/export info set */
comphelper::PropertyMapEntry const aExportInfoMap[] =
{
- { OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 },
- { OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 },
- { OUString("UsePrettyPrinting"), 0, ::cppu::UnoType<sal_Bool>::get(), beans::PropertyAttribute::MAYBEVOID, 0},
- { OUString("TargetStorage"), 0, cppu::UnoType<embed::XStorage>::get(), beans::PropertyAttribute::MAYBEVOID, 0},
- { OUString("StreamRelPath"), 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0},
+ { u"BaseURI"_ustr, 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 },
+ { u"StreamName"_ustr, 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 },
+ { u"UsePrettyPrinting"_ustr, 0, ::cppu::UnoType<sal_Bool>::get(), beans::PropertyAttribute::MAYBEVOID, 0},
+ { u"TargetStorage"_ustr, 0, cppu::UnoType<embed::XStorage>::get(), beans::PropertyAttribute::MAYBEVOID, 0},
+ { u"StreamRelPath"_ustr, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0},
};
}
@@ -431,19 +431,19 @@ void ODatabaseDocument::impl_import_nolck_throw( const Reference< XComponentCont
lcl_extractAndStartStatusIndicator( _rResource, xStatusIndicator, aFilterCreationArgs );
uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) );
- OUString sBaseURI = _rResource.getOrDefault("BaseURI", OUString());
+ OUString sBaseURI = _rResource.getOrDefault(u"BaseURI"_ustr, OUString());
if (sBaseURI.isEmpty())
- sBaseURI = _rResource.getOrDefault("URL",OUString());
+ sBaseURI = _rResource.getOrDefault(u"URL"_ustr,OUString());
assert(!sBaseURI.isEmpty()); // needed for relative URLs
- xInfoSet->setPropertyValue("BaseURI", uno::Any(sBaseURI));
- xInfoSet->setPropertyValue("StreamName", uno::Any(OUString("content.xml")));
+ xInfoSet->setPropertyValue(u"BaseURI"_ustr, uno::Any(sBaseURI));
+ xInfoSet->setPropertyValue(u"StreamName"_ustr, uno::Any(u"content.xml"_ustr));
const sal_Int32 nCount = aFilterCreationArgs.getLength();
aFilterCreationArgs.realloc(nCount + 1);
aFilterCreationArgs.getArray()[nCount] <<= xInfoSet;
Reference< XImporter > xImporter(
- _rContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.comp.sdb.DBFilter", aFilterCreationArgs, _rContext),
+ _rContext->getServiceManager()->createInstanceWithArgumentsAndContext(u"com.sun.star.comp.sdb.DBFilter"_ustr, aFilterCreationArgs, _rContext),
UNO_QUERY_THROW );
Reference< XComponent > xComponent( _rxTargetComponent, UNO_QUERY_THROW );
@@ -480,12 +480,12 @@ void SAL_CALL ODatabaseDocument::initNew( )
impl_setInitialized();
- m_aEventNotifier.notifyDocumentEventAsync( "OnTitleChanged" );
+ m_aEventNotifier.notifyDocumentEventAsync( u"OnTitleChanged"_ustr, nullptr, Any() );
impl_setModified_nothrow( false, aGuard );
// <- SYNCHRONIZED
- m_aEventNotifier.notifyDocumentEvent( "OnCreate" );
+ m_aEventNotifier.notifyDocumentEvent( u"OnCreate"_ustr, nullptr, Any() );
impl_notifyStorageChange_nolck_nothrow( xTempStor );
}
@@ -498,19 +498,19 @@ void SAL_CALL ODatabaseDocument::load( const Sequence< PropertyValue >& Argument
impl_reset_nothrow();
::comphelper::NamedValueCollection aResource( Arguments );
- if ( aResource.has( "FileName" ) && !aResource.has( "URL" ) )
+ if ( aResource.has( u"FileName"_ustr ) && !aResource.has( u"URL"_ustr ) )
// FileName is the compatibility name for URL, so we might have clients passing
// a FileName only. However, some of our code works with the URL only, so ensure
// we have one.
- aResource.put( "URL", aResource.get( "FileName" ) );
- if ( aResource.has( "URL" ) && !aResource.has( "FileName" ) )
+ aResource.put( u"URL"_ustr, aResource.get( u"FileName"_ustr ) );
+ if ( aResource.has( u"URL"_ustr ) && !aResource.has( u"FileName"_ustr ) )
// similar ... just in case there is legacy code which expects a FileName only
- aResource.put( "FileName", aResource.get( "URL" ) );
+ aResource.put( u"FileName"_ustr, aResource.get( u"URL"_ustr ) );
// now that somebody (perhaps) told us a macro execution mode, remember it as
// ImposedMacroExecMode
m_pImpl->setImposedMacroExecMode(
- aResource.getOrDefault( "MacroExecutionMode", m_pImpl->getImposedMacroExecMode() ) );
+ aResource.getOrDefault( u"MacroExecutionMode"_ustr, m_pImpl->getImposedMacroExecMode() ) );
impl_setInitializing();
try
@@ -653,8 +653,8 @@ void SAL_CALL ODatabaseDocument::recoverFromFile( const OUString& i_SourceLocati
// our load implementation expects the SalvagedFile and URL to be in the media descriptor
::comphelper::NamedValueCollection aMediaDescriptor( i_MediaDescriptor );
- aMediaDescriptor.put( "SalvagedFile", i_SalvagedFile );
- aMediaDescriptor.put( "URL", i_SourceLocation );
+ aMediaDescriptor.put( u"SalvagedFile"_ustr, i_SalvagedFile );
+ aMediaDescriptor.put( u"URL"_ustr, i_SourceLocation );
aGuard.clear(); // (load has an own guarding scheme)
load( aMediaDescriptor.getPropertyValues() );
@@ -731,12 +731,12 @@ bool ODatabaseDocument::impl_attachResource( const OUString& i_rLogicalDocumentU
// for
// we do not support macro signatures, so we can ignore that request
- aArgs.remove("BreakMacroSignature");
+ aArgs.remove(u"BreakMacroSignature"_ustr);
bool bMacroEventRead = false;
- if ((aArgs.get( "MacroEventRead" ) >>= bMacroEventRead) && bMacroEventRead)
+ if ((aArgs.get( u"MacroEventRead"_ustr ) >>= bMacroEventRead) && bMacroEventRead)
m_pImpl->m_bMacroCallsSeenWhileLoading = true;
- aArgs.remove( "MacroEventRead" );
+ aArgs.remove( u"MacroEventRead"_ustr );
if (aArgs.empty())
return false;
@@ -763,7 +763,7 @@ bool ODatabaseDocument::impl_attachResource( const OUString& i_rLogicalDocumentU
_rDocGuard.clear();
// <- SYNCHRONIZED
- m_aEventNotifier.notifyDocumentEvent( "OnLoadFinished" );
+ m_aEventNotifier.notifyDocumentEvent( u"OnLoadFinished"_ustr, nullptr, Any() );
}
return true;
@@ -808,7 +808,7 @@ void SAL_CALL ODatabaseDocument::connectController( const Reference< XController
m_aControllers.push_back( _xController );
- m_aEventNotifier.notifyDocumentEventAsync( "OnViewCreated", Reference< XController2 >( _xController, UNO_QUERY ) );
+ m_aEventNotifier.notifyDocumentEventAsync( u"OnViewCreated"_ustr, Reference< XController2 >( _xController, UNO_QUERY ), Any() );
bool bFirstControllerEver = m_aViewMonitor.onControllerConnected( _xController );
if ( !bFirstControllerEver )
@@ -845,7 +845,7 @@ void SAL_CALL ODatabaseDocument::disconnectController( const Reference< XControl
// <- SYNCHRONIZED
if ( bNotifyViewClosed )
- m_aEventNotifier.notifyDocumentEvent( "OnViewClosed", Reference< XController2 >( _xController, UNO_QUERY ) );
+ m_aEventNotifier.notifyDocumentEvent( u"OnViewClosed"_ustr, Reference< XController2 >( _xController, UNO_QUERY ), Any() );
if ( !bLastControllerGone || bIsClosing )
return;
@@ -901,9 +901,9 @@ void SAL_CALL ODatabaseDocument::setCurrentController( const Reference< XControl
// check if there are sub components to recover from our document storage
bool bAttemptRecovery = m_bHasBeenRecovered;
- if ( !bAttemptRecovery && m_pImpl->getMediaDescriptor().has( "ForceRecovery" ) )
+ if ( !bAttemptRecovery && m_pImpl->getMediaDescriptor().has( u"ForceRecovery"_ustr ) )
// do not use getOrDefault, it will throw for invalid types, which is not desired here
- m_pImpl->getMediaDescriptor().get( "ForceRecovery" ) >>= bAttemptRecovery;
+ m_pImpl->getMediaDescriptor().get( u"ForceRecovery"_ustr ) >>= bAttemptRecovery;
if ( !bAttemptRecovery )
return;
@@ -993,8 +993,8 @@ void ODatabaseDocument::impl_throwIOExceptionCausedBySave_throw( const Any& i_rE
OUString sErrorMessage = extractExceptionMessage( m_pImpl->m_aContext, i_rError );
sErrorMessage = ResourceManager::loadString(
RID_STR_ERROR_WHILE_SAVING,
- "$location$", i_rTargetURL,
- "$message$", sErrorMessage
+ u"$location$", i_rTargetURL,
+ u"$message$", sErrorMessage
);
throw IOException( sErrorMessage, *const_cast< ODatabaseDocument* >( this ) );
}
@@ -1013,7 +1013,7 @@ void ODatabaseDocument::impl_storeAs_throw( const OUString& _rURL, const ::comph
if ( !bIsInitializationProcess )
{
_rGuard.clear();
- m_aEventNotifier.notifyDocumentEvent( _eType == SAVE ? "OnSave" : "OnSaveAs", nullptr, Any( _rURL ) );
+ m_aEventNotifier.notifyDocumentEvent( _eType == SAVE ? u"OnSave"_ustr : u"OnSaveAs"_ustr, nullptr, Any( _rURL ) );
_rGuard.reset();
}
@@ -1073,13 +1073,13 @@ void ODatabaseDocument::impl_storeAs_throw( const OUString& _rURL, const ::comph
catch( const IOException& )
{
if ( !bIsInitializationProcess )
- m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? "OnSaveFailed" : "OnSaveAsFailed", nullptr, Any( _rURL ) );
+ m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? u"OnSaveFailed"_ustr : u"OnSaveAsFailed"_ustr, nullptr, Any( _rURL ) );
throw;
}
catch( const RuntimeException& )
{
if ( !bIsInitializationProcess )
- m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? "OnSaveFailed" : "OnSaveAsFailed", nullptr, Any( _rURL ) );
+ m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? u"OnSaveFailed"_ustr : u"OnSaveAsFailed"_ustr, nullptr, Any( _rURL ) );
throw;
}
catch( const Exception& )
@@ -1088,14 +1088,14 @@ void ODatabaseDocument::impl_storeAs_throw( const OUString& _rURL, const ::comph
// notify the failure
if ( !bIsInitializationProcess )
- m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? "OnSaveFailed" : "OnSaveAsFailed", nullptr, Any( _rURL ) );
+ m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? u"OnSaveFailed"_ustr : u"OnSaveAsFailed"_ustr, nullptr, Any( _rURL ) );
impl_throwIOExceptionCausedBySave_throw( aError, _rURL );
}
// notify the document event
if ( !bIsInitializationProcess )
- m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? "OnSaveDone" : "OnSaveAsDone", nullptr, Any( _rURL ) );
+ m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? u"OnSaveDone"_ustr : u"OnSaveAsDone"_ustr, nullptr, Any( _rURL ) );
// reset our "modified" flag, and clear the guard
impl_setModified_nothrow( false, _rGuard );
@@ -1126,12 +1126,12 @@ css::uno::Reference<css::embed::XStorage> ODatabaseDocument::impl_GetStorageOrCr
{
// Try to get the storage from arguments, then create storage for target URL
uno::Reference<embed::XStorage> xTargetStorage;
- _rArguments.get("TargetStorage") >>= xTargetStorage;
+ _rArguments.get(u"TargetStorage"_ustr) >>= xTargetStorage;
if (!xTargetStorage.is())
xTargetStorage = impl_createStorageFor_throw(_rURL);
// In case we got a StreamRelPath, then xTargetStorage should reference that sub-storage.
- OUString sStreamRelPath = _rArguments.getOrDefault("StreamRelPath", OUString());
+ OUString sStreamRelPath = _rArguments.getOrDefault(u"StreamRelPath"_ustr, OUString());
if (!sStreamRelPath.isEmpty())
xTargetStorage
= xTargetStorage->openStorageElement(sStreamRelPath, embed::ElementModes::READWRITE);
@@ -1169,7 +1169,7 @@ void SAL_CALL ODatabaseDocument::storeAsURL( const OUString& _rURL, const Sequen
// an up-to-date result, as the call is delegated to our TitleHelper instance, which itself
// updates its title only if it gets the OnSaveAsDone event (which was sent asynchronously
// by impl_storeAs_throw). So, we simply notify always, and also asynchronously
- m_aEventNotifier.notifyDocumentEventAsync( "OnTitleChanged" );
+ m_aEventNotifier.notifyDocumentEventAsync( u"OnTitleChanged"_ustr, nullptr, Any() );
}
catch( const Exception& )
{
@@ -1184,7 +1184,7 @@ void SAL_CALL ODatabaseDocument::storeAsURL( const OUString& _rURL, const Sequen
// <- SYNCHRONIZED
if ( bImplicitInitialization )
- m_aEventNotifier.notifyDocumentEvent( "OnCreate" );
+ m_aEventNotifier.notifyDocumentEvent( u"OnCreate"_ustr, nullptr, Any() );
}
void ODatabaseDocument::impl_storeToStorage_throw( const Reference< XStorage >& _rxTargetStorage, const Sequence< PropertyValue >& _rMediaDescriptor,
@@ -1235,7 +1235,7 @@ void SAL_CALL ODatabaseDocument::storeToURL( const OUString& _rURL, const Sequen
{
aGuard.clear();
- m_aEventNotifier.notifyDocumentEvent( "OnSaveTo", nullptr, Any( _rURL ) );
+ m_aEventNotifier.notifyDocumentEvent( u"OnSaveTo"_ustr, nullptr, Any( _rURL ) );
aGuard.reset();
}
@@ -1254,7 +1254,7 @@ void SAL_CALL ODatabaseDocument::storeToURL( const OUString& _rURL, const Sequen
catch( const Exception& )
{
Any aError = ::cppu::getCaughtException();
- m_aEventNotifier.notifyDocumentEventAsync( "OnSaveToFailed", nullptr, aError );
+ m_aEventNotifier.notifyDocumentEventAsync( u"OnSaveToFailed"_ustr, nullptr, aError );
if ( aError.isExtractableTo( ::cppu::UnoType< IOException >::get() )
|| aError.isExtractableTo( ::cppu::UnoType< RuntimeException >::get() )
@@ -1267,7 +1267,7 @@ void SAL_CALL ODatabaseDocument::storeToURL( const OUString& _rURL, const Sequen
impl_throwIOExceptionCausedBySave_throw( aError, _rURL );
}
- m_aEventNotifier.notifyDocumentEventAsync( "OnSaveToDone", nullptr, Any( _rURL ) );
+ m_aEventNotifier.notifyDocumentEventAsync( u"OnSaveToDone"_ustr, nullptr, Any( _rURL ) );
}
// XModifyBroadcaster
@@ -1309,7 +1309,7 @@ void ODatabaseDocument::impl_setModified_nothrow( bool _bModified, DocumentGuard
if ( bModifiedChanged )
{
m_pImpl->m_bModified = _bModified;
- m_aEventNotifier.notifyDocumentEventAsync( "OnModifyChanged" );
+ m_aEventNotifier.notifyDocumentEventAsync( u"OnModifyChanged"_ustr, nullptr, Any() );
}
_rGuard.clear();
// <- SYNCHRONIZED
@@ -1414,7 +1414,7 @@ Reference< XNameAccess > ODatabaseDocument::impl_getDocumentContainer_throw( ODa
aValue >>= sSupportService;
if ( !sSupportService.isEmpty() )
{
- Sequence<Any> aArgs{ Any(NamedValue("DatabaseDocument",Any(xMy))) };
+ Sequence<Any> aArgs{ Any(NamedValue(u"DatabaseDocument"_ustr,Any(xMy))) };
xContainer.set(
m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(sSupportService, aArgs, m_pImpl->m_aContext),
UNO_QUERY);
@@ -1497,7 +1497,7 @@ void SAL_CALL ODatabaseDocument::close(sal_Bool bDeliverOwnership)
});
// notify that we're going to unload
- m_aEventNotifier.notifyDocumentEvent( "OnPrepareUnload" );
+ m_aEventNotifier.notifyDocumentEvent( u"OnPrepareUnload"_ustr, nullptr, Any() );
impl_closeControllerFrames_nolck_throw( bDeliverOwnership );
@@ -1542,15 +1542,11 @@ Reference< XNameAccess > SAL_CALL ODatabaseDocument::getReportDocuments( )
return impl_getDocumentContainer_throw( ODatabaseModelImpl::ObjectType::Report );
}
-void ODatabaseDocument::WriteThroughComponent( const Reference< XComponent >& xComponent, const char* pStreamName,
- const char* pServiceName, const Sequence< Any >& _rArguments, const Sequence< PropertyValue >& rMediaDesc,
+void ODatabaseDocument::WriteThroughComponent( const Reference< XComponent >& xComponent, const OUString& sStreamName,
+ const OUString & rServiceName, const Sequence< Any >& _rArguments, const Sequence< PropertyValue >& rMediaDesc,
const Reference<XStorage>& _xStorageToSaveTo ) const
{
- OSL_ENSURE( pStreamName, "Need stream name!" );
- OSL_ENSURE( pServiceName, "Need service name!" );
-
// open stream
- OUString sStreamName = OUString::createFromAscii( pStreamName );
Reference< XStream > xStream = _xStorageToSaveTo->openStreamElement( sStreamName, ElementModes::READWRITE | ElementModes::TRUNCATE );
if ( !xStream.is() )
return;
@@ -1565,20 +1561,19 @@ void ODatabaseDocument::WriteThroughComponent( const Reference< XComponent >& xC
xSeek->seek(0);
Reference< XPropertySet > xStreamProp( xOutputStream, UNO_QUERY_THROW );
- xStreamProp->setPropertyValue( INFO_MEDIATYPE, Any( OUString( "text/xml" ) ) );
- xStreamProp->setPropertyValue( "Compressed", Any( true ) );
+ xStreamProp->setPropertyValue( INFO_MEDIATYPE, Any( u"text/xml"_ustr ) );
+ xStreamProp->setPropertyValue( u"Compressed"_ustr, Any( true ) );
// write the stuff
- WriteThroughComponent( xOutputStream, xComponent, pServiceName, _rArguments, rMediaDesc );
+ WriteThroughComponent( xOutputStream, xComponent, rServiceName, _rArguments, rMediaDesc );
}
void ODatabaseDocument::WriteThroughComponent( const Reference< XOutputStream >& xOutputStream,
- const Reference< XComponent >& xComponent, const char* pServiceName, const Sequence< Any >& _rArguments,
+ const Reference< XComponent >& xComponent, const OUString& rServiceName, const Sequence< Any >& _rArguments,
const Sequence< PropertyValue >& rMediaDesc ) const
{
OSL_ENSURE( xOutputStream.is(), "I really need an output stream!" );
OSL_ENSURE( xComponent.is(), "Need component!" );
- OSL_ENSURE( nullptr != pServiceName, "Need component name!" );
// get component
Reference< XWriter > xSaxWriter = xml::sax::Writer::create( m_pImpl->m_aContext );
@@ -1594,7 +1589,7 @@ void ODatabaseDocument::WriteThroughComponent( const Reference< XOutputStream >&
pArgs[ i+1 ] = _rArguments[i];
// get filter component
- Reference< XExporter > xExporter( m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(OUString::createFromAscii(pServiceName), aArgs, m_pImpl->m_aContext), UNO_QUERY_THROW );
+ Reference< XExporter > xExporter( m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(rServiceName, aArgs, m_pImpl->m_aContext), UNO_QUERY_THROW );
// connect model and filter
xExporter->setSourceDocument( xComponent );
@@ -1612,21 +1607,21 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r
uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) );
- xInfoSet->setPropertyValue("UsePrettyPrinting", uno::Any(officecfg::Office::Common::Save::Document::PrettyPrinting::get()));
+ xInfoSet->setPropertyValue(u"UsePrettyPrinting"_ustr, uno::Any(officecfg::Office::Common::Save::Document::PrettyPrinting::get()));
if ( officecfg::Office::Common::Save::URL::FileSystem::get() )
{
- OUString sBaseURI = _rMediaDescriptor.getOrDefault("BaseURI", OUString());
+ OUString sBaseURI = _rMediaDescriptor.getOrDefault(u"BaseURI"_ustr, OUString());
if (sBaseURI.isEmpty())
- sBaseURI = _rMediaDescriptor.getOrDefault("URL",OUString());
- xInfoSet->setPropertyValue("BaseURI", uno::Any(sBaseURI));
+ sBaseURI = _rMediaDescriptor.getOrDefault(u"URL"_ustr,OUString());
+ xInfoSet->setPropertyValue(u"BaseURI"_ustr, uno::Any(sBaseURI));
}
// Set TargetStorage, so it doesn't have to be re-constructed based on possibly empty URL.
- xInfoSet->setPropertyValue("TargetStorage", uno::Any(m_pImpl->getRootStorage()));
+ xInfoSet->setPropertyValue(u"TargetStorage"_ustr, uno::Any(m_pImpl->getRootStorage()));
// Set StreamRelPath, in case this document is an embedded one.
OUString sStreamRelPath;
- OUString sURL = _rMediaDescriptor.getOrDefault("URL", OUString());
+ OUString sURL = _rMediaDescriptor.getOrDefault(u"URL"_ustr, OUString());
if (sURL.startsWithIgnoreAsciiCase("vnd.sun.star.pkg:"))
{
// In this case the host contains the real path, and the path is the embedded stream name.
@@ -1636,7 +1631,7 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r
sStreamRelPath = sStreamRelPath.copy(1);
}
if (!sStreamRelPath.isEmpty())
- xInfoSet->setPropertyValue("StreamRelPath", uno::Any(sStreamRelPath));
+ xInfoSet->setPropertyValue(u"StreamRelPath"_ustr, uno::Any(sStreamRelPath));
sal_Int32 nArgsLen = aDelegatorArguments.getLength();
aDelegatorArguments.realloc(nArgsLen+1);
@@ -1663,7 +1658,7 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r
{
try
{
- xProp->setPropertyValue("Version" , uno::Any(aVersion));
+ xProp->setPropertyValue(u"Version"_ustr , uno::Any(aVersion));
}
catch (const uno::Exception&)
{
@@ -1676,12 +1671,12 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r
Sequence< PropertyValue > aMediaDescriptor;
_rMediaDescriptor >>= aMediaDescriptor;
- xInfoSet->setPropertyValue("StreamName", uno::Any(OUString("settings.xml")));
- WriteThroughComponent( xComponent, "settings.xml", "com.sun.star.comp.sdb.XMLSettingsExporter",
+ xInfoSet->setPropertyValue(u"StreamName"_ustr, uno::Any(u"settings.xml"_ustr));
+ WriteThroughComponent( xComponent, u"settings.xml"_ustr, u"com.sun.star.comp.sdb.XMLSettingsExporter"_ustr,
aDelegatorArguments, aMediaDescriptor, _rxTargetStorage );
- xInfoSet->setPropertyValue("StreamName", uno::Any(OUString("content.xml")));
- WriteThroughComponent( xComponent, "content.xml", "com.sun.star.comp.sdb.DBExportFilter",
+ xInfoSet->setPropertyValue(u"StreamName"_ustr, uno::Any(u"content.xml"_ustr));
+ WriteThroughComponent( xComponent, u"content.xml"_ustr, u"com.sun.star.comp.sdb.DBExportFilter"_ustr,
aDelegatorArguments, aMediaDescriptor, _rxTargetStorage );
if ( _rxTargetStorage->hasByName ( sPictures ) )
@@ -1718,7 +1713,7 @@ Reference< XUIConfigurationManager2 > const & ODatabaseDocument::getUIConfigurat
{
m_xUIConfigurationManager = UIConfigurationManager::create( m_pImpl->m_aContext );
- OUString aUIConfigFolderName( "Configurations2" );
+ OUString aUIConfigFolderName( u"Configurations2"_ustr );
// First try to open with READWRITE and then READ
Reference< XStorage > xConfigStorage = getDocumentSubStorage( aUIConfigFolderName, ElementModes::READWRITE );
@@ -1729,7 +1724,7 @@ Reference< XUIConfigurationManager2 > const & ODatabaseDocument::getUIConfigurat
Any a = xPropSet->getPropertyValue( INFO_MEDIATYPE );
if ( !( a >>= aMediaType ) || aMediaType.isEmpty() )
{
- a <<= OUString("application/vnd.sun.xml.ui.configuration");
+ a <<= u"application/vnd.sun.xml.ui.configuration"_ustr;
xPropSet->setPropertyValue( INFO_MEDIATYPE, a );
}
}
@@ -1777,7 +1772,7 @@ void ODatabaseDocument::disposing()
}
if ( impl_isInitialized() )
- m_aEventNotifier.notifyDocumentEvent( "OnUnload" );
+ m_aEventNotifier.notifyDocumentEvent( u"OnUnload"_ustr, nullptr, Any() );
Reference< XModel > xHoldAlive( this );
@@ -1837,7 +1832,7 @@ void ODatabaseDocument::disposing()
m_xModuleManager.clear();
{
- uno::Reference<uno::XInterface> xTitleInterface(m_xTitleHelper);
+ uno::Reference<uno::XInterface> xTitleInterface(cppu::getXWeak(m_xTitleHelper.get()));
aKeepAlive.push_back(xTitleInterface);
}
m_xTitleHelper.clear();
@@ -1873,12 +1868,12 @@ void SAL_CALL ODatabaseDocument::removeEventListener( const Reference< lang::XEv
// XServiceInfo
OUString ODatabaseDocument::getImplementationName()
{
- return "com.sun.star.comp.dba.ODatabaseDocument";
+ return u"com.sun.star.comp.dba.ODatabaseDocument"_ustr;
}
Sequence< OUString > ODatabaseDocument::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.OfficeDatabaseDocument", "com.sun.star.document.OfficeDocument" };
+ return { u"com.sun.star.sdb.OfficeDatabaseDocument"_ustr, u"com.sun.star.document.OfficeDocument"_ustr };
}
sal_Bool ODatabaseDocument::supportsService( const OUString& _rServiceName )
@@ -1897,9 +1892,9 @@ namespace
/// Property map for embedded import info set.
comphelper::PropertyMapEntry const aEmbeddedImportInfoMap[] =
{
- {OUString("StreamRelPath"), 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0},
- {OUString("StreamName"), 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0},
- {OUString("SourceStorage"), 0, cppu::UnoType<embed::XStorage>::get(), beans::PropertyAttribute::MAYBEVOID, 0},
+ {u"StreamRelPath"_ustr, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0},
+ {u"StreamName"_ustr, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0},
+ {u"SourceStorage"_ustr, 0, cppu::UnoType<embed::XStorage>::get(), beans::PropertyAttribute::MAYBEVOID, 0},
};
}
@@ -1908,13 +1903,13 @@ void SAL_CALL ODatabaseDocument::loadFromStorage(const Reference<XStorage>& xSto
DocumentGuard aGuard(*this, DocumentGuard::InitMethod);
uno::Reference<beans::XPropertySet> xInfoSet(comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aEmbeddedImportInfoMap)));
- xInfoSet->setPropertyValue("StreamRelPath", uno::Any(comphelper::NamedValueCollection::getOrDefault(rMediaDescriptor, u"HierarchicalDocumentName", OUString())));
- xInfoSet->setPropertyValue("StreamName", uno::Any(OUString("content.xml")));
- xInfoSet->setPropertyValue("SourceStorage", uno::Any(xStorage));
+ xInfoSet->setPropertyValue(u"StreamRelPath"_ustr, uno::Any(comphelper::NamedValueCollection::getOrDefault(rMediaDescriptor, u"HierarchicalDocumentName", OUString())));
+ xInfoSet->setPropertyValue(u"StreamName"_ustr, uno::Any(u"content.xml"_ustr));
+ xInfoSet->setPropertyValue(u"SourceStorage"_ustr, uno::Any(xStorage));
uno::Sequence<uno::Any> aFilterCreationArgs{ Any(xInfoSet) };
- uno::Reference<document::XImporter> xImporter(m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.comp.sdb.DBFilter", aFilterCreationArgs, m_pImpl->m_aContext), uno::UNO_QUERY_THROW);
+ uno::Reference<document::XImporter> xImporter(m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(u"com.sun.star.comp.sdb.DBFilter"_ustr, aFilterCreationArgs, m_pImpl->m_aContext), uno::UNO_QUERY_THROW);
uno::Reference<lang::XComponent> xComponent(*this, uno::UNO_QUERY_THROW);
xImporter->setTargetDocument(xComponent);
@@ -2048,7 +2043,7 @@ Sequence< OUString > SAL_CALL ODatabaseDocument::getAvailableViewControllerNames
Reference< XController2 > SAL_CALL ODatabaseDocument::createDefaultViewController( const Reference< XFrame >& Frame )
{
- return createViewController( "Default", Sequence< PropertyValue >(), Frame);
+ return createViewController( u"Default"_ustr, Sequence< PropertyValue >(), Frame);
}
Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( const OUString& ViewName, const Sequence< PropertyValue >& Arguments, const Reference< XFrame >& Frame )
@@ -2062,20 +2057,20 @@ Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( cons
aGuard.clear();
Reference< XController2 > xController(
- m_pImpl->m_aContext->getServiceManager()->createInstanceWithContext("org.openoffice.comp.dbu.OApplicationController", m_pImpl->m_aContext),
+ m_pImpl->m_aContext->getServiceManager()->createInstanceWithContext(u"org.openoffice.comp.dbu.OApplicationController"_ustr, m_pImpl->m_aContext),
UNO_QUERY_THROW );
::comphelper::NamedValueCollection aInitArgs( Arguments );
- aInitArgs.put( "Frame", Frame );
+ aInitArgs.put( u"Frame"_ustr, Frame );
if ( ViewName == "Preview" )
- aInitArgs.put( "Preview", true );
+ aInitArgs.put( u"Preview"_ustr, true );
Reference< XInitialization > xInitController( xController, UNO_QUERY_THROW );
xInitController->initialize( aInitArgs.getWrappedPropertyValues() );
return xController;
}
-Reference< XTitle > const & ODatabaseDocument::impl_getTitleHelper_throw()
+rtl::Reference< ::framework::TitleHelper > const & ODatabaseDocument::impl_getTitleHelper_throw()
{
if ( ! m_xTitleHelper.is ())
{
@@ -2128,7 +2123,7 @@ void SAL_CALL ODatabaseDocument::setTitle( const OUString& sTitle )
// SYNCHRONIZED ->
DocumentGuard aGuard(*this, DocumentGuard::DefaultMethod);
impl_getTitleHelper_throw()->setTitle( sTitle );
- m_aEventNotifier.notifyDocumentEventAsync( "OnTitleChanged" );
+ m_aEventNotifier.notifyDocumentEventAsync( u"OnTitleChanged"_ustr, nullptr, Any() );
// <- SYNCHRONIZED
}
@@ -2138,7 +2133,7 @@ void SAL_CALL ODatabaseDocument::addTitleChangeListener( const uno::Reference< f
// SYNCHRONIZED ->
DocumentGuard aGuard(*this, DocumentGuard::DefaultMethod);
- uno::Reference< frame::XTitleChangeBroadcaster > xBroadcaster( impl_getTitleHelper_throw(), uno::UNO_QUERY_THROW );
+ rtl::Reference< ::framework::TitleHelper > xBroadcaster( impl_getTitleHelper_throw() );
xBroadcaster->addTitleChangeListener( xListener );
}
@@ -2148,7 +2143,7 @@ void SAL_CALL ODatabaseDocument::removeTitleChangeListener( const uno::Reference
// SYNCHRONIZED ->
DocumentGuard aGuard(*this, DocumentGuard::DefaultMethod);
- uno::Reference< frame::XTitleChangeBroadcaster > xBroadcaster( impl_getTitleHelper_throw(), uno::UNO_QUERY_THROW );
+ rtl::Reference< ::framework::TitleHelper > xBroadcaster( impl_getTitleHelper_throw() );
xBroadcaster->removeTitleChangeListener( xListener );
}
diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx b/dbaccess/source/core/dataaccess/databasedocument.hxx
index 6278aa039a63..daccea4d1f9f 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.hxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.hxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
+#include <atomic>
#include <map>
#include <memory>
@@ -65,6 +66,7 @@
namespace comphelper {
class NamedValueCollection;
}
+namespace framework { class TitleHelper; }
namespace dbaccess
{
@@ -184,7 +186,7 @@ class ODatabaseDocument :public ModelDependentComponent // ModelDepe
/** @short such module manager is used to classify new opened documents. */
css::uno::Reference< css::frame::XModuleManager2 > m_xModuleManager;
- css::uno::Reference< css::frame::XTitle > m_xTitleHelper;
+ rtl::Reference< ::framework::TitleHelper > m_xTitleHelper;
TNumberedController m_aNumberedControllers;
/** true if and only if the DatabaseDocument's "initNew" or "load" have been called (or, well,
@@ -192,7 +194,8 @@ class ODatabaseDocument :public ModelDependentComponent // ModelDepe
*/
InitState m_eInitState;
bool m_bClosing;
- bool m_bAllowDocumentScripting;
+ /// Using atomic because locking around accessing this will lead to deadlock in queryInterface
+ std::atomic<bool> m_bAllowDocumentScripting;
bool m_bHasBeenRecovered;
/// If XModel::attachResource() was called to inform us that the document is embedded into another one.
bool m_bEmbedded;
@@ -233,8 +236,8 @@ class ODatabaseDocument :public ModelDependentComponent // ModelDepe
/// write a single XML stream into the package
void WriteThroughComponent(
const css::uno::Reference< css::lang::XComponent > & xComponent, /// the component we export
- const char* pStreamName, /// the stream name
- const char* pServiceName, /// service name of the component
+ const OUString& rStreamName, /// the stream name
+ const OUString& rServiceName, /// service name of the component
const css::uno::Sequence< css::uno::Any> & rArguments, /// the argument (XInitialization)
const css::uno::Sequence< css::beans::PropertyValue> & rMediaDesc,/// output descriptor
const css::uno::Reference< css::embed::XStorage >& _xStorageToSaveTo
@@ -245,7 +248,7 @@ class ODatabaseDocument :public ModelDependentComponent // ModelDepe
void WriteThroughComponent(
const css::uno::Reference< css::io::XOutputStream >& xOutputStream,
const css::uno::Reference< css::lang::XComponent >& xComponent,
- const char* pServiceName,
+ const OUString& rServiceName,
const css::uno::Sequence< css::uno::Any >& rArguments,
const css::uno::Sequence< css::beans::PropertyValue> & rMediaDesc
) const;
@@ -266,7 +269,7 @@ class ODatabaseDocument :public ModelDependentComponent // ModelDepe
// ModelDependentComponent overridables
virtual css::uno::Reference< css::uno::XInterface > getThis() const override;
- css::uno::Reference< css::frame::XTitle > const & impl_getTitleHelper_throw();
+ rtl::Reference< ::framework::TitleHelper> const & impl_getTitleHelper_throw();
css::uno::Reference< css::frame::XUntitledNumbers > impl_getUntitledHelper_throw(
const css::uno::Reference< css::uno::XInterface >& _xComponent = css::uno::Reference< css::uno::XInterface >());
diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.cxx b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
index 3b19de41c366..a328eb39ecf8 100644
--- a/dbaccess/source/core/dataaccess/databaseregistrations.cxx
+++ b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
@@ -49,7 +49,6 @@ namespace dbaccess
using ::com::sun::star::sdb::XDatabaseRegistrations;
using ::com::sun::star::sdb::XDatabaseRegistrationsListener;
using ::com::sun::star::sdb::DatabaseRegistrationEvent;
- using ::com::sun::star::uno::XAggregation;
constexpr OUString CONF_ROOT_PATH = u"org.openoffice.Office.DataAccess/RegisteredNames"_ustr;
constexpr OUString LOCATION = u"Location"_ustr;
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 62cacc3b1f44..f8874911b960 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -23,7 +23,7 @@
#include <core_resource.hxx>
#include <strings.hrc>
#include <strings.hxx>
-#include "connection.hxx"
+#include <connection.hxx>
#include "SharedConnection.hxx"
#include "databasedocument.hxx"
#include <OAuthenticationContinuation.hxx>
@@ -471,12 +471,12 @@ void SAL_CALL ODatabaseSource::disposing( const css::lang::EventObject& Source )
// XServiceInfo
OUString ODatabaseSource::getImplementationName( )
{
- return "com.sun.star.comp.dba.ODatabaseSource";
+ return u"com.sun.star.comp.dba.ODatabaseSource"_ustr;
}
Sequence< OUString > ODatabaseSource::getSupportedServiceNames( )
{
- return { SERVICE_SDB_DATASOURCE, "com.sun.star.sdb.DocumentDataSource" };
+ return { SERVICE_SDB_DATASOURCE, u"com.sun.star.sdb.DocumentDataSource"_ustr };
}
sal_Bool ODatabaseSource::supportsService( const OUString& _rServiceName )
@@ -545,7 +545,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
{
Reference<XStorage> const xRootStorage = m_pImpl->getOrCreateRootStorage();
OUString sMigrEnvVal;
- osl_getEnvironment(OUString("DBACCESS_HSQL_MIGRATION").pData,
+ osl_getEnvironment(u"DBACCESS_HSQL_MIGRATION"_ustr.pData,
&sMigrEnvVal.pData);
if(!sMigrEnvVal.isEmpty())
bNeedMigration = true;
@@ -553,7 +553,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
{
Reference<XPropertySet> const xPropSet(xRootStorage, UNO_QUERY_THROW);
sal_Int32 nOpenMode(0);
- if ((xPropSet->getPropertyValue("OpenMode") >>= nOpenMode)
+ if ((xPropSet->getPropertyValue(u"OpenMode"_ustr) >>= nOpenMode)
&& (nOpenMode & css::embed::ElementModes::WRITE)
&& (!Application::IsHeadlessModeEnabled()))
{
@@ -574,7 +574,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
{
SAL_INFO("dbaccess", "No file content_before_migration.xml found" );
}
- xRootStorage->copyElementTo("content.xml", xRootStorage,
+ xRootStorage->copyElementTo(u"content.xml"_ustr, xRootStorage,
BACKUP_XML_NAME);
m_pImpl->m_sConnectURL = "sdbc:embedded:firebird";
@@ -659,7 +659,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
pDriverInfo[nCount].Name = "Storage";
Reference< css::document::XDocumentSubStorageSupplier> xDocSup( m_pImpl->getDocumentSubStorageSupplier() );
- pDriverInfo[nCount++].Value <<= xDocSup->getDocumentSubStorage("database",ElementModes::READWRITE);
+ pDriverInfo[nCount++].Value <<= xDocSup->getDocumentSubStorage(u"database"_ustr,ElementModes::READWRITE);
pDriverInfo[nCount].Name = "Document";
pDriverInfo[nCount++].Value <<= getDatabaseDocument();
@@ -700,7 +700,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
Reference< css::document::XDocumentSubStorageSupplier> xDocSup(
m_pImpl->getDocumentSubStorageSupplier() );
dbahsql::HsqlImporter importer(xReturn,
- xDocSup->getDocumentSubStorage("database",ElementModes::READWRITE) );
+ xDocSup->getDocumentSubStorage(u"database"_ustr,ElementModes::READWRITE) );
importer.importHsqlDatabase(m_pImpl->GetFrameWeld());
}
#endif
@@ -1181,7 +1181,7 @@ Reference< XNameAccess > SAL_CALL ODatabaseSource::getQueryDefinitions( )
aValue >>= sSupportService;
if ( !sSupportService.isEmpty() )
{
- Sequence<Any> aArgs{ Any(NamedValue("DataSource",Any(xMy))) };
+ Sequence<Any> aArgs{ Any(NamedValue(u"DataSource"_ustr,Any(xMy))) };
xContainer.set( m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(sSupportService, aArgs, m_pImpl->m_aContext), UNO_QUERY);
}
}
@@ -1316,8 +1316,8 @@ Reference< XOfficeDatabaseDocument > SAL_CALL ODatabaseSource::getDatabaseDocume
void SAL_CALL ODatabaseSource::initialize( css::uno::Sequence< css::uno::Any > const & rArguments)
{
::comphelper::NamedValueCollection aProperties( rArguments );
- if (aProperties.has("ParentWindow"))
- aProperties.get("ParentWindow") >>= m_pImpl->m_xDialogParent;
+ if (aProperties.has(u"ParentWindow"_ustr))
+ aProperties.get(u"ParentWindow"_ustr) >>= m_pImpl->m_xDialogParent;
}
Reference< XInterface > ODatabaseSource::getThis() const
diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index 807dc5ec98c3..3dca110c3d1c 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -152,12 +152,12 @@ css::uno::Sequence<sal_Int8> ODefinitionContainer::getImplementationId()
// XServiceInfo
OUString SAL_CALL ODefinitionContainer::getImplementationName( )
{
- return "com.sun.star.sdb.ODefinitionContainer";
+ return u"com.sun.star.sdb.ODefinitionContainer"_ustr;
}
Sequence< OUString > SAL_CALL ODefinitionContainer::getSupportedServiceNames( )
{
- return { "com.sun.star.sdb.DefinitionContainer", "com.sun.star.ucb.Content" };
+ return { u"com.sun.star.sdb.DefinitionContainer"_ustr, u"com.sun.star.ucb.Content"_ustr };
}
// XNameContainer
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index e8ea1dd63869..85661d8b270c 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -126,7 +126,7 @@ css::uno::Sequence< css::uno::Type > ODocumentContainer::getTypes()
}
OUString SAL_CALL ODocumentContainer::getImplementationName()
{
- return "com.sun.star.comp.dba.ODocumentContainer";
+ return u"com.sun.star.comp.dba.ODocumentContainer"_ustr;
};
sal_Bool SAL_CALL ODocumentContainer::supportsService(const OUString& _rServiceName)
{
@@ -215,10 +215,10 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
lcl_extractAndRemove( aArgs, PROPERTY_ACTIVE_CONNECTION, xConnection );
lcl_extractAndRemove( aArgs, PROPERTY_AS_TEMPLATE, bAsTemplate );
lcl_extractAndRemove( aArgs, INFO_MEDIATYPE, sMediaType );
- lcl_extractAndRemove( aArgs, "DocumentServiceName" , sDocServiceName );
+ lcl_extractAndRemove( aArgs, u"DocumentServiceName"_ustr , sDocServiceName );
// ClassID has two allowed types, so a special treatment here
- Any aClassIDArg = aArgs.get( "ClassID" );
+ Any aClassIDArg = aArgs.get( u"ClassID"_ustr );
if ( aClassIDArg.hasValue() )
{
if ( !( aClassIDArg >>= aClassID ) )
@@ -235,7 +235,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
OUString sClassIDString = ::comphelper::MimeConfigurationHelper::GetStringClassIDRepresentation( aClassID );
(void)sClassIDString;
#endif
- aArgs.remove( "ClassID" );
+ aArgs.remove( u"ClassID"_ustr );
}
// Everything which now is still present in the arguments is passed to the embedded object
const Sequence< PropertyValue > aCreationArgs( aArgs.getPropertyValues() );
@@ -277,7 +277,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
::comphelper::MimeConfigurationHelper aConfigHelper( m_aContext );
const Sequence< NamedValue > aProps( aConfigHelper.GetObjectPropsByDocumentName( sDocServiceName ) );
const ::comphelper::NamedValueCollection aMediaTypeProps( aProps );
- aClassID = aMediaTypeProps.getOrDefault( "ClassID", Sequence< sal_Int8 >() );
+ aClassID = aMediaTypeProps.getOrDefault( u"ClassID"_ustr, Sequence< sal_Int8 >() );
}
}
}
@@ -542,12 +542,12 @@ Reference< XComponent > SAL_CALL ODocumentContainer::loadComponentFromURL( const
Command aCommand;
::comphelper::NamedValueCollection aArgs( Arguments );
- aCommand.Name = aArgs.getOrDefault( "OpenMode", OUString("open") );
- aArgs.remove( "OpenMode" );
+ aCommand.Name = aArgs.getOrDefault( u"OpenMode"_ustr, u"open"_ustr );
+ aArgs.remove( u"OpenMode"_ustr );
OpenCommandArgument2 aOpenCommand;
aOpenCommand.Mode = OpenMode::DOCUMENT;
- aArgs.put( "OpenCommandArgument", aOpenCommand );
+ aArgs.put( u"OpenCommandArgument"_ustr, aOpenCommand );
aCommand.Argument <<= aArgs.getPropertyValues();
xComp.set(xContent->execute(aCommand,xContent->createCommandIdentifier(),Reference< XCommandEnvironment >()),UNO_QUERY);
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 922d10c3b595..9c17ea97764c 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -150,8 +150,6 @@ namespace dbaccess
// OEmbedObjectHolder
typedef ::comphelper::WeakComponentImplHelper< embed::XStateChangeListener > TEmbedObjectHolder;
- namespace {
-
class OEmbedObjectHolder : public TEmbedObjectHolder
{
Reference< XEmbeddedObject > m_xBroadCaster;
@@ -178,8 +176,6 @@ namespace dbaccess
virtual void SAL_CALL disposing( const lang::EventObject& Source ) override;
};
- }
-
void OEmbedObjectHolder::disposing(std::unique_lock<std::mutex>& /*rGuard*/)
{
if ( m_xBroadCaster.is() )
@@ -375,7 +371,7 @@ OUString ODocumentDefinition::GetDocumentServiceFromMediaType( const OUString& _
OUString aEntryDocName;
if ( ( xObjConfig->getByName( classId ) >>= xObjectProps ) && xObjectProps.is()
- && ( xObjectProps->getByName("ObjectDocumentServiceName") >>= aEntryDocName )
+ && ( xObjectProps->getByName(u"ObjectDocumentServiceName"_ustr) >>= aEntryDocName )
&& aEntryDocName == sResult )
{
_rClassId = comphelper::MimeConfigurationHelper::GetSequenceClassIDRepresentation(classId);
@@ -388,9 +384,9 @@ OUString ODocumentDefinition::GetDocumentServiceFromMediaType( const OUString& _
// alternative, shorter approach
const Sequence< NamedValue > aProps( aConfigHelper.GetObjectPropsByMediaType( _rMediaType ) );
const ::comphelper::NamedValueCollection aMediaTypeProps( aProps );
- const OUString sAlternativeResult = aMediaTypeProps.getOrDefault( "ObjectDocumentServiceName", OUString() );
+ const OUString sAlternativeResult = aMediaTypeProps.getOrDefault( u"ObjectDocumentServiceName"_ustr, OUString() );
OSL_ENSURE( sAlternativeResult == sResult, "ODocumentDefinition::GetDocumentServiceFromMediaType: failed, this approach is *not* equivalent (1)!" );
- const Sequence< sal_Int8 > aAlternativeClassID = aMediaTypeProps.getOrDefault( "ClassID", Sequence< sal_Int8 >() );
+ const Sequence< sal_Int8 > aAlternativeClassID = aMediaTypeProps.getOrDefault( u"ClassID"_ustr, Sequence< sal_Int8 >() );
OSL_ENSURE( aAlternativeClassID == _rClassId, "ODocumentDefinition::GetDocumentServiceFromMediaType: failed, this approach is *not* equivalent (2)!" );
#endif
}
@@ -674,7 +670,7 @@ namespace
{
Reference< XPropertySet > xPropSet( xFrame, UNO_QUERY_THROW );
m_xLayoutManager.set(
- xPropSet->getPropertyValue( "LayoutManager" ),
+ xPropSet->getPropertyValue( u"LayoutManager"_ustr ),
UNO_QUERY_THROW );
m_xLayoutManager->lock();
@@ -720,14 +716,14 @@ void ODocumentDefinition::impl_initFormEditView( const Reference< XController >&
LayoutManagerLock aLockLayout( _rxController );
// setting of the visual properties
- xViewSettings->setPropertyValue("ShowRulers",Any(true));
- xViewSettings->setPropertyValue("ShowVertRuler",Any(true));
- xViewSettings->setPropertyValue("ShowHoriRuler",Any(true));
- xViewSettings->setPropertyValue("IsRasterVisible",Any(true));
- xViewSettings->setPropertyValue("IsSnapToRaster",Any(true));
- xViewSettings->setPropertyValue("ShowOnlineLayout",Any(true));
- xViewSettings->setPropertyValue("RasterSubdivisionX",Any(sal_Int32(5)));
- xViewSettings->setPropertyValue("RasterSubdivisionY",Any(sal_Int32(5)));
+ xViewSettings->setPropertyValue(u"ShowRulers"_ustr,Any(true));
+ xViewSettings->setPropertyValue(u"ShowVertRuler"_ustr,Any(true));
+ xViewSettings->setPropertyValue(u"ShowHoriRuler"_ustr,Any(true));
+ xViewSettings->setPropertyValue(u"IsRasterVisible"_ustr,Any(true));
+ xViewSettings->setPropertyValue(u"IsSnapToRaster"_ustr,Any(true));
+ xViewSettings->setPropertyValue(u"ShowOnlineLayout"_ustr,Any(true));
+ xViewSettings->setPropertyValue(u"RasterSubdivisionX"_ustr,Any(sal_Int32(5)));
+ xViewSettings->setPropertyValue(u"RasterSubdivisionY"_ustr,Any(sal_Int32(5)));
}
catch( const Exception& )
{
@@ -780,9 +776,9 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
// for the document, default to the interaction handler as used for loading the DB doc
// This might be overwritten below, when examining _rOpenArgument.
const ::comphelper::NamedValueCollection& aDBDocArgs( m_pImpl->m_pDataSource->getMediaDescriptor() );
- Reference< XInteractionHandler > xHandler( aDBDocArgs.getOrDefault( "InteractionHandler", Reference< XInteractionHandler >() ) );
+ Reference< XInteractionHandler > xHandler( aDBDocArgs.getOrDefault( u"InteractionHandler"_ustr, Reference< XInteractionHandler >() ) );
if ( xHandler.is() )
- aDocumentArgs.put( "InteractionHandler", xHandler );
+ aDocumentArgs.put( u"InteractionHandler"_ustr, xHandler );
::std::optional< sal_Int16 > aDocumentMacroMode;
@@ -868,7 +864,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
aDocumentMacroMode = bExecuteDBDocMacros ? MacroExecMode::ALWAYS_EXECUTE_NO_WARN
: MacroExecMode::NEVER_EXECUTE;
}
- aDocumentArgs.put( "MacroExecutionMode", *aDocumentMacroMode );
+ aDocumentArgs.put( u"MacroExecutionMode"_ustr, *aDocumentMacroMode );
if ( ( nOpenMode == OpenMode::ALL )
|| ( nOpenMode == OpenMode::FOLDERS )
@@ -895,8 +891,8 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
// embedded objects themself do not support the hidden flag. We implement support for
// it by changing the STATE to RUNNING only, instead of ACTIVE.
- bool bOpenHidden = aDocumentArgs.getOrDefault( "Hidden", false );
- aDocumentArgs.remove( "Hidden" );
+ bool bOpenHidden = aDocumentArgs.getOrDefault( u"Hidden"_ustr, false );
+ aDocumentArgs.remove( u"Hidden"_ustr );
loadEmbeddedObject( xConnection, Sequence< sal_Int8 >(), aDocumentArgs.getPropertyValues(), false, !m_bOpenInDesign );
OSL_ENSURE( m_xEmbeddedObject.is(), "ODocumentDefinition::onCommandOpenSomething: what's this?" );
@@ -910,9 +906,9 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
if ( xModule.is() )
{
if ( m_bForm )
- xModule->setIdentifier( "com.sun.star.sdb.FormDesign" );
+ xModule->setIdentifier( u"com.sun.star.sdb.FormDesign"_ustr );
else if ( !xReportDefinition.is() )
- xModule->setIdentifier( "com.sun.star.text.TextDocument" );
+ xModule->setIdentifier( u"com.sun.star.text.TextDocument"_ustr );
updateDocumentTitle();
}
@@ -922,7 +918,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
{
// we are in ReadOnly mode
// we would like to open the Writer or Calc with the report direct, without design it.
- Reference< report::XReportEngine > xReportEngine( m_aContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.report.OReportEngineJFree", m_aContext), UNO_QUERY_THROW );
+ Reference< report::XReportEngine > xReportEngine( m_aContext->getServiceManager()->createInstanceWithContext(u"com.sun.star.comp.report.OReportEngineJFree"_ustr, m_aContext), UNO_QUERY_THROW );
xReportEngine->setReportDefinition(xReportDefinition);
xReportEngine->setActiveConnection(m_xLastKnownConnection);
@@ -1343,7 +1339,7 @@ void ODocumentDefinition::saveAs()
{
Reference< XStorage> xStorage = getContainerStorage();
- OUString sPersistentName = ::dbtools::createUniqueName(xStorage,"Obj");
+ OUString sPersistentName = ::dbtools::createUniqueName(xStorage,u"Obj"_ustr);
xStorage->copyElementTo(m_pImpl->m_aProps.sPersistentName,xStorage,sPersistentName);
OUString sOldName = m_pImpl->m_aProps.aTitle;
@@ -1390,20 +1386,20 @@ namespace
if ( *_bSuppressMacros )
{
// if we're to suppress macros, do exactly this
- _io_rArgs.put( "MacroExecutionMode", MacroExecMode::NEVER_EXECUTE );
+ _io_rArgs.put( u"MacroExecutionMode"_ustr, MacroExecMode::NEVER_EXECUTE );
}
else
{
// otherwise, put the setting only if not already present
- if ( !_io_rArgs.has( "MacroExecutionMode" ) )
+ if ( !_io_rArgs.has( u"MacroExecutionMode"_ustr ) )
{
- _io_rArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG );
+ _io_rArgs.put( u"MacroExecutionMode"_ustr, MacroExecMode::USE_CONFIG );
}
}
}
if ( _bReadOnly.has_value() )
- _io_rArgs.put( "ReadOnly", *_bReadOnly );
+ _io_rArgs.put( u"ReadOnly"_ustr, *_bReadOnly );
}
}
@@ -1475,15 +1471,15 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC
Reference<XDispatchProviderInterceptor> xInterceptor = m_pInterceptor;
::comphelper::NamedValueCollection aEmbeddedDescriptor;
- aEmbeddedDescriptor.put( "OutplaceDispatchInterceptor", xInterceptor );
+ aEmbeddedDescriptor.put( u"OutplaceDispatchInterceptor"_ustr, xInterceptor );
::comphelper::NamedValueCollection aMediaDesc;
separateOpenCommandArguments( i_rOpenCommandArguments, aMediaDesc, aEmbeddedDescriptor );
// create the OutplaceFrameProperties, and put them into the descriptor of the embedded object
::comphelper::NamedValueCollection OutplaceFrameProperties;
- OutplaceFrameProperties.put( "TopWindow", true );
- OutplaceFrameProperties.put( "SupportPersistentWindowState", true );
+ OutplaceFrameProperties.put( u"TopWindow"_ustr, true );
+ OutplaceFrameProperties.put( u"SupportPersistentWindowState"_ustr, true );
Reference< XFrame > xParentFrame;
if ( m_pImpl->m_pDataSource )
@@ -1501,15 +1497,15 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC
}
OSL_ENSURE( xParentFrame.is(), "ODocumentDefinition::fillLoadArgs: no parent frame!" );
if ( xParentFrame.is() )
- OutplaceFrameProperties.put( "ParentFrame", xParentFrame );
+ OutplaceFrameProperties.put( u"ParentFrame"_ustr, xParentFrame );
- aEmbeddedDescriptor.put( "OutplaceFrameProperties", OutplaceFrameProperties.getNamedValues() );
+ aEmbeddedDescriptor.put( u"OutplaceFrameProperties"_ustr, OutplaceFrameProperties.getNamedValues() );
// tell the embedded object to have (or not have) script support
- aEmbeddedDescriptor.put( "EmbeddedScriptSupport", objectSupportsEmbeddedScripts() );
+ aEmbeddedDescriptor.put( u"EmbeddedScriptSupport"_ustr, objectSupportsEmbeddedScripts() );
// tell the embedded object to not participate in the document recovery game - the DB doc will handle it
- aEmbeddedDescriptor.put( "DocumentRecoverySupport", false );
+ aEmbeddedDescriptor.put( u"DocumentRecoverySupport"_ustr, false );
// pass the descriptor of the embedded object to the caller
aEmbeddedDescriptor >>= _out_rEmbeddedObjectDescriptor;
@@ -1517,15 +1513,15 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC
// create the ComponentData, and put it into the document's media descriptor
{
::comphelper::NamedValueCollection aComponentData;
- aComponentData.put( "ActiveConnection", _xConnection );
- aComponentData.put( "ApplyFormDesignMode", !_bReadOnly );
- aMediaDesc.put( "ComponentData", aComponentData.getPropertyValues() );
+ aComponentData.put( u"ActiveConnection"_ustr, _xConnection );
+ aComponentData.put( u"ApplyFormDesignMode"_ustr, !_bReadOnly );
+ aMediaDesc.put( u"ComponentData"_ustr, aComponentData.getPropertyValues() );
}
if ( !m_pImpl->m_aProps.aTitle.isEmpty() )
- aMediaDesc.put( "DocumentTitle", m_pImpl->m_aProps.aTitle );
+ aMediaDesc.put( u"DocumentTitle"_ustr, m_pImpl->m_aProps.aTitle );
- aMediaDesc.put( "DocumentBaseURL", m_pImpl->m_pDataSource->getURL() );
+ aMediaDesc.put( u"DocumentBaseURL"_ustr, m_pImpl->m_pDataSource->getURL() );
// put the common load arguments into the document's media descriptor
lcl_putLoadArgs( aMediaDesc, optional_bool( _bSuppressMacros ), optional_bool( _bReadOnly ) );
@@ -2007,8 +2003,8 @@ void ODocumentDefinition::fillReportData( const Reference< XComponentContext >&
try
{
Reference< XJobExecutor > xExecutable(
- _rContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.wizards.report.CallReportWizard", aArgs, _rContext), UNO_QUERY_THROW );
- xExecutable->trigger( "fill" );
+ _rContext->getServiceManager()->createInstanceWithArgumentsAndContext(u"com.sun.star.wizards.report.CallReportWizard"_ustr, aArgs, _rContext), UNO_QUERY_THROW );
+ xExecutable->trigger( u"fill"_ustr );
}
catch( const Exception& )
{
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.hxx b/dbaccess/source/core/dataaccess/documentdefinition.hxx
index 5569276d4a7d..b26ca698f412 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.hxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.hxx
@@ -44,7 +44,7 @@ namespace comphelper
namespace dbaccess
{
-
+ class OEmbedObjectHolder;
class OInterceptor;
class OEmbeddedClientHelper;
// ODocumentDefinition - a database "document" which is simply a link to a real
@@ -63,7 +63,7 @@ class ODocumentDefinition
,public ODocumentDefinition_Base
{
css::uno::Reference< css::embed::XEmbeddedObject> m_xEmbeddedObject;
- css::uno::Reference< css::embed::XStateChangeListener > m_xListener;
+ rtl::Reference< OEmbedObjectHolder > m_xListener;
css::uno::Reference< css::sdbc::XConnection > m_xLastKnownConnection;
rtl::Reference<OInterceptor> m_pInterceptor;
diff --git a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
index e1cb9f3f4e57..dca584d5b054 100644
--- a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
+++ b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
@@ -152,10 +152,10 @@ namespace dbaccess
const ::comphelper::NamedValueCollection aScriptDescriptor( xDocEvents->getByName( Event.EventName ) );
OUString sEventType;
- bool bScriptAssigned = aScriptDescriptor.get_ensureType( "EventType", sEventType );
+ bool bScriptAssigned = aScriptDescriptor.get_ensureType( u"EventType"_ustr, sEventType );
OUString sScript;
- bScriptAssigned = bScriptAssigned && aScriptDescriptor.get_ensureType( "Script", sScript );
+ bScriptAssigned = bScriptAssigned && aScriptDescriptor.get_ensureType( u"Script"_ustr, sScript );
if ( !bScriptAssigned )
// no script is assigned to this event
diff --git a/dbaccess/source/core/dataaccess/documenteventnotifier.hxx b/dbaccess/source/core/dataaccess/documenteventnotifier.hxx
index 6f3bffc4cf54..347b3ea000d3 100644
--- a/dbaccess/source/core/dataaccess/documenteventnotifier.hxx
+++ b/dbaccess/source/core/dataaccess/documenteventnotifier.hxx
@@ -87,38 +87,6 @@ namespace dbaccess
const css::uno::Any& Supplement
);
- /** notifies a document event to all registered listeners
-
- @precond
- the mutex is not locked
- @precond
- ->onDocumentInitialized has been called
- */
- void notifyDocumentEvent(
- const char* _pAsciiEventName,
- const css::uno::Reference< css::frame::XController2 >& _rxViewController = nullptr,
- const css::uno::Any& _rSupplement = css::uno::Any()
- )
- {
- notifyDocumentEvent( OUString::createFromAscii( _pAsciiEventName ), _rxViewController, _rSupplement );
- }
-
- /** notifies a document event to all registered listeners, asynchronously
-
- Note that no event is actually notified before you called ->onDocumentInitialized.
-
- @precond
- the mutex is locked
- */
- void notifyDocumentEventAsync(
- const char* _pAsciiEventName,
- const css::uno::Reference< css::frame::XController2 >& _rxViewController = nullptr,
- const css::uno::Any& _rSupplement = css::uno::Any()
- )
- {
- notifyDocumentEventAsync( OUString::createFromAscii( _pAsciiEventName ), _rxViewController, _rSupplement );
- }
-
private:
::rtl::Reference< DocumentEventNotifier_Impl > m_pImpl;
};
diff --git a/dbaccess/source/core/dataaccess/documentevents.cxx b/dbaccess/source/core/dataaccess/documentevents.cxx
index 6dbe9ad5965d..35d54727e31b 100644
--- a/dbaccess/source/core/dataaccess/documentevents.cxx
+++ b/dbaccess/source/core/dataaccess/documentevents.cxx
@@ -41,55 +41,48 @@ namespace dbaccess
// helper
struct DocumentEventData
{
- const char* pAsciiEventName;
+ OUString aAsciiEventName;
bool bNeedsSyncNotify;
};
- const DocumentEventData* lcl_getDocumentEventData()
- {
- static const DocumentEventData s_aData[] = {
- { "OnCreate", true },
- { "OnLoadFinished", true },
- { "OnNew", false }, // compatibility, see https://bz.apache.org/ooo/show_bug.cgi?id=46484
- { "OnLoad", false }, // compatibility, see https://bz.apache.org/ooo/show_bug.cgi?id=46484
- { "OnSaveAs", true },
- { "OnSaveAsDone", false },
- { "OnSaveAsFailed", false },
- { "OnSave", true },
- { "OnSaveDone", false },
- { "OnSaveFailed", false },
- { "OnSaveTo", true },
- { "OnSaveToDone", false },
- { "OnSaveToFailed", false },
- { "OnPrepareUnload", true },
- { "OnUnload", true },
- { "OnFocus", false },
- { "OnUnfocus", false },
- { "OnModifyChanged", false },
- { "OnViewCreated", false },
- { "OnPrepareViewClosing", true },
- { "OnViewClosed", false },
- { "OnTitleChanged", false },
- { "OnSubComponentOpened", false },
- { "OnSubComponentClosed", false },
- { nullptr, false }
- };
- return s_aData;
- }
+ constexpr DocumentEventData s_DocumentEventData[] {
+ { u"OnCreate"_ustr, true },
+ { u"OnLoadFinished"_ustr, true },
+ { u"OnNew"_ustr, false }, // compatibility, see https://bz.apache.org/ooo/show_bug.cgi?id=46484
+ { u"OnLoad"_ustr, false }, // compatibility, see https://bz.apache.org/ooo/show_bug.cgi?id=46484
+ { u"OnSaveAs"_ustr, true },
+ { u"OnSaveAsDone"_ustr, false },
+ { u"OnSaveAsFailed"_ustr, false },
+ { u"OnSave"_ustr, true },
+ { u"OnSaveDone"_ustr, false },
+ { u"OnSaveFailed"_ustr, false },
+ { u"OnSaveTo"_ustr, true },
+ { u"OnSaveToDone"_ustr, false },
+ { u"OnSaveToFailed"_ustr, false },
+ { u"OnPrepareUnload"_ustr, true },
+ { u"OnUnload"_ustr, true },
+ { u"OnFocus"_ustr, false },
+ { u"OnUnfocus"_ustr, false },
+ { u"OnModifyChanged"_ustr, false },
+ { u"OnViewCreated"_ustr, false },
+ { u"OnPrepareViewClosing"_ustr, true },
+ { u"OnViewClosed"_ustr, false },
+ { u"OnTitleChanged"_ustr, false },
+ { u"OnSubComponentOpened"_ustr, false },
+ { u"OnSubComponentClosed"_ustr, false },
+ };
}
// DocumentEvents
DocumentEvents::DocumentEvents( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, DocumentEventsData& _rEventsData )
:mrParent(_rParent), mrMutex(_rMutex), mrEventsData(_rEventsData)
{
- const DocumentEventData* pEventData = lcl_getDocumentEventData();
- while ( pEventData->pAsciiEventName )
+ for (const auto & rEventData : s_DocumentEventData)
{
- OUString sEventName = OUString::createFromAscii( pEventData->pAsciiEventName );
+ OUString sEventName = rEventData.aAsciiEventName;
DocumentEventsData::const_iterator existingPos = mrEventsData.find( sEventName );
if ( existingPos == mrEventsData.end() )
mrEventsData[ sEventName ] = Sequence< PropertyValue >();
- ++pEventData;
}
}
@@ -109,12 +102,10 @@ namespace dbaccess
bool DocumentEvents::needsSynchronousNotification( std::u16string_view _rEventName )
{
- const DocumentEventData* pEventData = lcl_getDocumentEventData();
- while ( pEventData->pAsciiEventName )
+ for (const auto & rEventData : s_DocumentEventData)
{
- if ( o3tl::equalsAscii( _rEventName, pEventData->pAsciiEventName ) )
- return pEventData->bNeedsSyncNotify;
- ++pEventData;
+ if ( _rEventName == rEventData.aAsciiEventName )
+ return rEventData.bNeedsSyncNotify;
}
// this is an unknown event ... assume async notification
@@ -136,16 +127,16 @@ namespace dbaccess
// Weird enough, the event assignment UI has (well: had) the idea of using an empty "EventType"/"Script"
// to indicate the event descriptor should be reset, instead of just passing an empty event descriptor.
::comphelper::NamedValueCollection aCheck( aEventDescriptor );
- if ( aCheck.has( "EventType" ) )
+ if ( aCheck.has( u"EventType"_ustr ) )
{
- OUString sEventType = aCheck.getOrDefault( "EventType", OUString() );
+ OUString sEventType = aCheck.getOrDefault( u"EventType"_ustr, OUString() );
OSL_ENSURE( !sEventType.isEmpty(), "DocumentEvents::replaceByName: doing a reset via an empty EventType is weird!" );
if ( sEventType.isEmpty() )
aEventDescriptor.realloc( 0 );
}
- if ( aCheck.has( "Script" ) )
+ if ( aCheck.has( u"Script"_ustr ) )
{
- OUString sScript = aCheck.getOrDefault( "Script", OUString() );
+ OUString sScript = aCheck.getOrDefault( u"Script"_ustr, OUString() );
OSL_ENSURE( !sScript.isEmpty(), "DocumentEvents::replaceByName: doing a reset via an empty Script is weird!" );
if ( sScript.isEmpty() )
aEventDescriptor.realloc( 0 );
diff --git a/dbaccess/source/core/dataaccess/intercept.cxx b/dbaccess/source/core/dataaccess/intercept.cxx
index 2fce725582d3..174e6e5fb56c 100644
--- a/dbaccess/source/core/dataaccess/intercept.cxx
+++ b/dbaccess/source/core/dataaccess/intercept.cxx
@@ -63,12 +63,12 @@ void OInterceptor::dispose()
OInterceptor::OInterceptor( ODocumentDefinition* _pContentHolder )
:m_pContentHolder( _pContentHolder )
- ,m_aInterceptedURL{ /* DISPATCH_SAVEAS */ ".uno:SaveAs",
- /* DISPATCH_SAVE */ ".uno:Save",
- /* DISPATCH_CLOSEDOC */ ".uno:CloseDoc",
- /* DISPATCH_CLOSEWIN */ ".uno:CloseWin",
- /* DISPATCH_CLOSEFRAME */ ".uno:CloseFrame",
- /* DISPATCH_RELOAD */ ".uno:Reload" }
+ ,m_aInterceptedURL{ /* DISPATCH_SAVEAS */ u".uno:SaveAs"_ustr,
+ /* DISPATCH_SAVE */ u".uno:Save"_ustr,
+ /* DISPATCH_CLOSEDOC */ u".uno:CloseDoc"_ustr,
+ /* DISPATCH_CLOSEWIN */ u".uno:CloseWin"_ustr,
+ /* DISPATCH_CLOSEFRAME */ u".uno:CloseFrame"_ustr,
+ /* DISPATCH_RELOAD */ u".uno:Reload"_ustr }
{
OSL_ENSURE(DISPATCH_RELOAD < m_aInterceptedURL.getLength(),"Illegal size.");
}
@@ -140,7 +140,7 @@ void SAL_CALL OInterceptor::dispatch( const URL& URL,const Sequence<PropertyValu
pNewArgs[nInd].Value <<= true;
}
- Reference< XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch(URL, "_self", 0 );
+ Reference< XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch(URL, u"_self"_ustr, 0 );
if ( xDispatch.is() )
xDispatch->dispatch( URL, aNewArgs );
}
@@ -167,7 +167,7 @@ IMPL_LINK( OInterceptor, OnDispatch, void*, _pDispatcher, void )
{
if ( m_pContentHolder && m_pContentHolder->prepareClose() && m_xSlaveDispatchProvider.is() )
{
- Reference< XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch(pHelper->aURL, "_self", 0 );
+ Reference< XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch(pHelper->aURL, u"_self"_ustr, 0 );
if ( xDispatch.is() )
{
Reference< XInterface > xKeepContentHolderAlive( *m_pContentHolder );
@@ -199,7 +199,7 @@ void SAL_CALL OInterceptor::addStatusListener(
aStateEvent.FeatureDescriptor = "SaveCopyTo";
aStateEvent.IsEnabled = true;
aStateEvent.Requery = false;
- aStateEvent.State <<= OUString("($3)");
+ aStateEvent.State <<= u"($3)"_ustr;
Control->statusChanged(aStateEvent);
}
diff --git a/dbaccess/source/core/inc/ModelImpl.hxx b/dbaccess/source/core/inc/ModelImpl.hxx
index 2978867d8eea..2ddd1889dc2f 100644
--- a/dbaccess/source/core/inc/ModelImpl.hxx
+++ b/dbaccess/source/core/inc/ModelImpl.hxx
@@ -431,7 +431,7 @@ public:
css::uno::Reference< css::script::XStorageBasedLibraryContainer >
getLibraryContainer( bool _bScript );
- /** lets our library containers store themself into the given root storage
+ /** lets our library containers store themselves into the given root storage
*/
void storeLibraryContainersTo( const css::uno::Reference< css::embed::XStorage >& _rxToRootStorage );
@@ -523,7 +523,7 @@ public:
void checkDisposed() const
{
if ( !m_pImpl.is() )
- throw css::lang::DisposedException( "Component is already disposed.", getThis() );
+ throw css::lang::DisposedException( u"Component is already disposed."_ustr, getThis() );
}
void lockModify()
diff --git a/dbaccess/source/core/inc/TableDeco.hxx b/dbaccess/source/core/inc/TableDeco.hxx
index 93a974dac4a4..289bfe5cd0bf 100644
--- a/dbaccess/source/core/inc/TableDeco.hxx
+++ b/dbaccess/source/core/inc/TableDeco.hxx
@@ -61,7 +61,7 @@ namespace dbaccess
,public ODBTableDecorator_PROP
{
void fillPrivileges() const;
- css::uno::Reference< css::container::XContainerListener > m_xColumnMediator;
+ rtl::Reference< OContainerMediator > m_xColumnMediator;
css::uno::Reference< css::sdbcx::XColumnsSupplier > m_xTable;
css::uno::Reference< css::container::XNameAccess > m_xColumnDefinitions;
css::uno::Reference< css::sdbc::XConnection > m_xConnection;
diff --git a/dbaccess/source/core/inc/callablestatement.hxx b/dbaccess/source/core/inc/callablestatement.hxx
index 58e21189aa59..c5d7b94154d9 100644
--- a/dbaccess/source/core/inc/callablestatement.hxx
+++ b/dbaccess/source/core/inc/callablestatement.hxx
@@ -32,7 +32,7 @@ namespace dbaccess
public css::sdbc::XOutParameters
{
public:
- OCallableStatement(const css::uno::Reference< css::sdbc::XConnection > & _xConn,
+ OCallableStatement(const rtl::Reference< OConnection > & _xConn,
const css::uno::Reference< css::uno::XInterface > & _xStatement)
:OPreparedStatement(_xConn, _xStatement){}
diff --git a/dbaccess/source/core/dataaccess/connection.hxx b/dbaccess/source/core/inc/connection.hxx
index 4ecfa7d709dd..28596999880d 100644
--- a/dbaccess/source/core/dataaccess/connection.hxx
+++ b/dbaccess/source/core/inc/connection.hxx
@@ -24,11 +24,10 @@
#include <cstddef>
#include <map>
-#include <apitools.hxx>
-#include <querycontainer.hxx>
-#include <tablecontainer.hxx>
-#include <viewcontainer.hxx>
-#include <RefreshListener.hxx>
+#include "querycontainer.hxx"
+#include "tablecontainer.hxx"
+#include "viewcontainer.hxx"
+#include "RefreshListener.hxx"
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
@@ -48,11 +47,13 @@
#include <connectivity/ConnectionWrapper.hxx>
#include <connectivity/CommonTools.hxx>
#include <connectivity/warningscontainer.hxx>
+#include <unotools/weakref.hxx>
namespace dbaccess
{
-typedef cppu::ImplHelper13 < css::container::XChild
+typedef cppu::ImplInheritanceHelper< connectivity::OConnectionWrapper
+ , css::container::XChild
, css::sdbcx::XTablesSupplier
, css::sdbcx::XViewsSupplier
, css::sdbc::XConnection
@@ -69,17 +70,14 @@ typedef cppu::ImplHelper13 < css::container::XChild
class ODatabaseSource;
// OConnection
-class OConnection final :public ::cppu::BaseMutex
- ,public OSubComponent
- ,public ::connectivity::OConnectionWrapper
- ,public OConnection_Base
+class OConnection final :public OConnection_Base
,public IRefreshListener
{
+ unotools::WeakReference<ODatabaseSource> m_xParent;
css::uno::Reference< css::sdbcx::XTablesSupplier >
m_xMasterTables; // just to avoid the recreation of the catalog
connectivity::OWeakRefArray m_aStatements;
- css::uno::Reference< css::container::XNameAccess >
- m_xQueries;
+ rtl::Reference< OQueryContainer > m_xQueries;
connectivity::OWeakRefArray m_aComposers;
// the filter as set on the parent data link at construction of the connection
@@ -111,12 +109,9 @@ public:
// css::lang::XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
- virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
// css::uno::XInterface
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire() noexcept override;
- virtual void SAL_CALL release() noexcept override;
// OComponentHelper
virtual void SAL_CALL disposing() override;
@@ -215,7 +210,7 @@ private:
if the implementation cannot be loaded
@postcond
- m_xConnectionTools is nol <NULL/>
+ m_xConnectionTools is not <NULL/>
*/
void impl_loadConnectionTools_throw();
diff --git a/dbaccess/source/core/inc/definitioncontainer.hxx b/dbaccess/source/core/inc/definitioncontainer.hxx
index 02f145776c8f..33367a1d2fcc 100644
--- a/dbaccess/source/core/inc/definitioncontainer.hxx
+++ b/dbaccess/source/core/inc/definitioncontainer.hxx
@@ -63,7 +63,7 @@ public:
void erase( const OUString& _rName ) { m_aDefinitions.erase( _rName ); }
void erase( const TContentPtr& _pDefinition );
- void insert( const OUString& _rName, TContentPtr _pDefinition )
+ void insert( const OUString& _rName, const TContentPtr& _pDefinition )
{
m_aDefinitions.emplace( _rName, _pDefinition );
}
diff --git a/dbaccess/source/core/inc/preparedstatement.hxx b/dbaccess/source/core/inc/preparedstatement.hxx
index cea06d79a81e..d39af31e13cb 100644
--- a/dbaccess/source/core/inc/preparedstatement.hxx
+++ b/dbaccess/source/core/inc/preparedstatement.hxx
@@ -42,7 +42,7 @@ namespace dbaccess
css::uno::Reference< css::sdbc::XParameters > m_xAggregateAsParameters;
public:
- OPreparedStatement(const css::uno::Reference< css::sdbc::XConnection > & _xConn,
+ OPreparedStatement(const rtl::Reference< OConnection > & _xConn,
const css::uno::Reference< css::uno::XInterface > & _xStatement);
virtual ~OPreparedStatement() override;
diff --git a/dbaccess/source/core/inc/statement.hxx b/dbaccess/source/core/inc/statement.hxx
index f437040682fb..3ab67085164f 100644
--- a/dbaccess/source/core/inc/statement.hxx
+++ b/dbaccess/source/core/inc/statement.hxx
@@ -33,13 +33,15 @@
#include <comphelper/proparrhlp.hxx>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase3.hxx>
-#include <apitools.hxx>
+#include <cppuhelper/compbase.hxx>
+#include <unotools/weakref.hxx>
+namespace dbaccess { class OConnection; }
// OStatementBase
class OStatementBase : public cppu::BaseMutex,
- public OSubComponent,
+ public ::cppu::WeakComponentImplHelper<>,
public ::cppu::OPropertySetHelper,
public ::comphelper::OPropertyArrayUsageHelper < OStatementBase >,
public css::util::XCancellable,
@@ -50,6 +52,7 @@ class OStatementBase : public cppu::BaseMutex,
public css::sdbc::XGeneratedResultSet
{
protected:
+ unotools::WeakReference<::dbaccess::OConnection> m_xParent;
::osl::Mutex m_aCancelMutex;
css::uno::WeakReferenceHelper m_aResultSet;
@@ -61,7 +64,7 @@ protected:
virtual ~OStatementBase() override;
public:
- OStatementBase(const css::uno::Reference< css::sdbc::XConnection > & _xConn,
+ OStatementBase(const rtl::Reference< ::dbaccess::OConnection > & _xConn,
const css::uno::Reference< css::uno::XInterface > & _xStatement);
@@ -141,7 +144,7 @@ private:
bool m_bAttemptedComposerCreation;
public:
- OStatement(const css::uno::Reference< css::sdbc::XConnection > & _xConn,
+ OStatement(const rtl::Reference< ::dbaccess::OConnection > & _xConn,
const css::uno::Reference< css::uno::XInterface > & _xStatement);
DECLARE_XINTERFACE()
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index 444c8459bddd..62bb741f6b2d 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -58,7 +58,7 @@ DatabaseDataProvider::DatabaseDataProvider(uno::Reference< uno::XComponentContex
m_EscapeProcessing(true),
m_ApplyFilter(true)
{
- m_xInternal.set( m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.chart.InternalDataProvider",m_xContext ), uno::UNO_QUERY );
+ m_xInternal.set( m_xContext->getServiceManager()->createInstanceWithContext(u"com.sun.star.comp.chart.InternalDataProvider"_ustr,m_xContext ), uno::UNO_QUERY );
m_xRangeConversion.set(m_xInternal,uno::UNO_QUERY);
m_xComplexDescriptionAccess.set(m_xInternal,uno::UNO_QUERY);
@@ -98,7 +98,7 @@ uno::Any DatabaseDataProvider::queryInterface(uno::Type const & type)
// XServiceInfo
OUString SAL_CALL DatabaseDataProvider::getImplementationName( )
{
- return "com.sun.star.comp.dbaccess.DatabaseDataProvider";
+ return u"com.sun.star.comp.dbaccess.DatabaseDataProvider"_ustr;
}
sal_Bool SAL_CALL DatabaseDataProvider::supportsService( const OUString& _rServiceName )
@@ -108,7 +108,7 @@ sal_Bool SAL_CALL DatabaseDataProvider::supportsService( const OUString& _rServi
uno::Sequence< OUString > SAL_CALL DatabaseDataProvider::getSupportedServiceNames( )
{
- return { "com.sun.star.chart2.data.DatabaseDataProvider" };
+ return { u"com.sun.star.chart2.data.DatabaseDataProvider"_ustr };
}
// lang::XInitialization:
@@ -174,9 +174,9 @@ uno::Reference< chart2::data::XDataSource > SAL_CALL DatabaseDataProvider::creat
}
::comphelper::NamedValueCollection aArgs( _aArguments );
- const bool bHasCategories = aArgs.getOrDefault( "HasCategories", true );
+ const bool bHasCategories = aArgs.getOrDefault( u"HasCategories"_ustr, true );
uno::Sequence< OUString > aColumnNames =
- aArgs.getOrDefault( "ColumnDescriptions", uno::Sequence< OUString >() );
+ aArgs.getOrDefault( u"ColumnDescriptions"_ustr, uno::Sequence< OUString >() );
bool bRet = false;
if ( !m_Command.isEmpty() && m_xActiveConnection.is() )
@@ -198,7 +198,7 @@ uno::Reference< chart2::data::XDataSource > SAL_CALL DatabaseDataProvider::creat
uno::Reference< lang::XInitialization> xIni(m_xInternal,uno::UNO_QUERY);
if ( xIni.is() )
{
- beans::NamedValue aParam("CreateDefaultData",uno::Any(true));
+ beans::NamedValue aParam(u"CreateDefaultData"_ustr,uno::Any(true));
uno::Sequence< uno::Any > aInitArgs{ uno::Any(aParam) };
xIni->initialize(aInitArgs);
}
@@ -211,10 +211,10 @@ uno::Reference< chart2::data::XDataSource > SAL_CALL DatabaseDataProvider::creat
uno::Sequence< beans::PropertyValue > SAL_CALL DatabaseDataProvider::detectArguments(const uno::Reference< chart2::data::XDataSource > & _xDataSource)
{
::comphelper::NamedValueCollection aArguments;
- aArguments.put( "CellRangeRepresentation", uno::Any( OUString( "all" ) ) );
- aArguments.put( "DataRowSource", uno::Any( chart::ChartDataRowSource_COLUMNS ) );
+ aArguments.put( u"CellRangeRepresentation"_ustr, uno::Any( u"all"_ustr ) );
+ aArguments.put( u"DataRowSource"_ustr, uno::Any( chart::ChartDataRowSource_COLUMNS ) );
// internal data always contains labels
- aArguments.put( "FirstCellAsLabel", uno::Any( true ) );
+ aArguments.put( u"FirstCellAsLabel"_ustr, uno::Any( true ) );
bool bHasCategories = false;
if( _xDataSource.is())
@@ -228,7 +228,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL DatabaseDataProvider::detectArgum
uno::Reference< beans::XPropertySet > xSeqProp( aSequences[nIdx]->getValues(), uno::UNO_QUERY );
OUString aRole;
if ( xSeqProp.is()
- && ( xSeqProp->getPropertyValue( "Role" ) >>= aRole )
+ && ( xSeqProp->getPropertyValue( u"Role"_ustr ) >>= aRole )
&& aRole == "categories"
)
{
@@ -238,7 +238,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL DatabaseDataProvider::detectArgum
}
}
}
- aArguments.put( "HasCategories", uno::Any( bHasCategories ) );
+ aArguments.put( u"HasCategories"_ustr, uno::Any( bHasCategories ) );
return aArguments.getPropertyValues();
}
@@ -416,7 +416,7 @@ uno::Sequence< OUString > SAL_CALL DatabaseDataProvider::getMasterFields()
void SAL_CALL DatabaseDataProvider::setMasterFields(const uno::Sequence< OUString > & the_value)
{
impl_invalidateParameter_nothrow();
- set("MasterFields",the_value,m_MasterFields);
+ set(u"MasterFields"_ustr,the_value,m_MasterFields);
}
uno::Sequence< OUString > SAL_CALL DatabaseDataProvider::getDetailFields()
@@ -427,7 +427,7 @@ uno::Sequence< OUString > SAL_CALL DatabaseDataProvider::getDetailFields()
void SAL_CALL DatabaseDataProvider::setDetailFields(const uno::Sequence< OUString > & the_value)
{
- set("DetailFields",the_value,m_DetailFields);
+ set(u"DetailFields"_ustr,the_value,m_DetailFields);
}
OUString SAL_CALL DatabaseDataProvider::getCommand()
@@ -555,7 +555,7 @@ void SAL_CALL DatabaseDataProvider::setEscapeProcessing(sal_Bool the_value)
void SAL_CALL DatabaseDataProvider::setRowLimit(::sal_Int32 the_value)
{
- set("RowLimit",the_value,m_RowLimit);
+ set(u"RowLimit"_ustr,the_value,m_RowLimit);
}
uno::Reference< sdbc::XConnection > SAL_CALL DatabaseDataProvider::getActiveConnection()
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index 65beb4470c8c..f3d792b4f59e 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -124,9 +124,9 @@ OUString ODsnTypeCollection::getPrefix(std::u16string_view _sURL) const
return sRet;
}
-bool ODsnTypeCollection::hasDriver( const char* _pAsciiPattern ) const
+bool ODsnTypeCollection::hasDriver( std::u16string_view _rAsciiPattern ) const
{
- OUString sPrefix( getPrefix( OUString::createFromAscii( _pAsciiPattern ) ) );
+ OUString sPrefix( getPrefix( _rAsciiPattern ) );
return !sPrefix.isEmpty();
}
@@ -149,7 +149,7 @@ bool ODsnTypeCollection::isConnectionUrlRequired(std::u16string_view _sURL) cons
OUString ODsnTypeCollection::getMediaType(std::u16string_view _sURL) const
{
const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL);
- return aFeatures.getOrDefault("MediaType",OUString());
+ return aFeatures.getOrDefault(u"MediaType"_ustr,OUString());
}
OUString ODsnTypeCollection::getDatasourcePrefixFromMediaType(std::u16string_view _sMediaType,std::u16string_view _sExtension)
@@ -158,9 +158,9 @@ OUString ODsnTypeCollection::getDatasourcePrefixFromMediaType(std::u16string_vie
for (auto& url : m_aDriverConfig.getURLs())
{
const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(url);
- if ( aFeatures.getOrDefault("MediaType",OUString()) == _sMediaType )
+ if ( aFeatures.getOrDefault(u"MediaType"_ustr,OUString()) == _sMediaType )
{
- const OUString sFileExtension = aFeatures.getOrDefault("Extension",OUString());
+ const OUString sFileExtension = aFeatures.getOrDefault(u"Extension"_ustr,OUString());
if ( _sExtension == sFileExtension )
{
sURL = url;
@@ -235,37 +235,37 @@ void ODsnTypeCollection::extractHostNamePort(const OUString& _rDsn,OUString& _sD
OUString ODsnTypeCollection::getJavaDriverClass(std::u16string_view _sURL) const
{
const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getProperties(_sURL);
- return aFeatures.getOrDefault("JavaDriverClass",OUString());
+ return aFeatures.getOrDefault(u"JavaDriverClass"_ustr,OUString());
}
bool ODsnTypeCollection::isFileSystemBased(std::u16string_view _sURL) const
{
const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL);
- return aFeatures.getOrDefault("FileSystemBased",false);
+ return aFeatures.getOrDefault(u"FileSystemBased"_ustr,false);
}
bool ODsnTypeCollection::supportsTableCreation(std::u16string_view _sURL) const
{
const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL);
- return aFeatures.getOrDefault("SupportsTableCreation",false);
+ return aFeatures.getOrDefault(u"SupportsTableCreation"_ustr,false);
}
bool ODsnTypeCollection::supportsColumnDescription(std::u16string_view _sURL) const
{
const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL);
- return aFeatures.getOrDefault("SupportsColumnDescription",false);
+ return aFeatures.getOrDefault(u"SupportsColumnDescription"_ustr,false);
}
bool ODsnTypeCollection::supportsBrowsing(std::u16string_view _sURL) const
{
const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL);
- return aFeatures.getOrDefault("SupportsBrowsing",false);
+ return aFeatures.getOrDefault(u"SupportsBrowsing"_ustr,false);
}
bool ODsnTypeCollection::supportsDBCreation(std::u16string_view _sURL) const
{
const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL);
- return aFeatures.getOrDefault("SupportsDBCreation",false);
+ return aFeatures.getOrDefault(u"SupportsDBCreation"_ustr,false);
}
Sequence<PropertyValue> ODsnTypeCollection::getDefaultDBSettings( std::u16string_view _sURL ) const
@@ -282,9 +282,9 @@ bool ODsnTypeCollection::isEmbeddedDatabase( std::u16string_view _sURL )
OUString ODsnTypeCollection::getEmbeddedDatabase()
{
if (!HAVE_FEATURE_JAVA || officecfg::Office::Common::Misc::ExperimentalMode::get())
- return "sdbc:embedded:firebird";
+ return u"sdbc:embedded:firebird"_ustr;
else
- return "sdbc:embedded:hsqldb";
+ return u"sdbc:embedded:hsqldb"_ustr;
}
@@ -364,28 +364,28 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(std::u16string_view _rDsn) con
};
const KnownPrefix aKnowPrefixes[] =
{
- KnownPrefix( "sdbc:calc:", DST_CALC, false ),
- KnownPrefix( "sdbc:writer:", DST_WRITER, false ),
- KnownPrefix( "sdbc:flat:", DST_FLAT, false ),
- KnownPrefix( "sdbc:odbc:", DST_ODBC, false ),
- KnownPrefix( "sdbc:dbase:", DST_DBASE, false ),
- KnownPrefix( "sdbc:firebird:", DST_FIREBIRD, false ),
- KnownPrefix( "sdbc:mysql:odbc:", DST_MYSQL_ODBC, false ),
- KnownPrefix( "sdbc:mysql:jdbc:", DST_MYSQL_JDBC, false ),
- KnownPrefix( "sdbc:mysql:mysqlc:", DST_MYSQL_NATIVE, false ),
- KnownPrefix( "sdbc:mysqlc:", DST_MYSQL_NATIVE_DIRECT,false ),
- KnownPrefix( "sdbc:postgresql:", DST_POSTGRES ,false ),
-
- KnownPrefix( "sdbc:address:mozilla:", DST_MOZILLA, true ),
- KnownPrefix( "sdbc:address:thunderbird:", DST_THUNDERBIRD, true ),
- KnownPrefix( "sdbc:address:ldap:", DST_LDAP, true ),
- KnownPrefix( "sdbc:address:outlook", DST_OUTLOOK, true ),
- KnownPrefix( "sdbc:address:outlookexp", DST_OUTLOOKEXP, true ),
- KnownPrefix( "sdbc:address:evolution:ldap", DST_EVOLUTION_LDAP, true ),
- KnownPrefix( "sdbc:address:evolution:groupwise",DST_EVOLUTION_GROUPWISE,true ),
- KnownPrefix( "sdbc:address:evolution:local", DST_EVOLUTION, true ),
- KnownPrefix( "sdbc:address:kab", DST_KAB, true ),
- KnownPrefix( "sdbc:address:macab", DST_MACAB, true )
+ KnownPrefix( u"sdbc:calc:"_ustr, DST_CALC, false ),
+ KnownPrefix( u"sdbc:writer:"_ustr, DST_WRITER, false ),
+ KnownPrefix( u"sdbc:flat:"_ustr, DST_FLAT, false ),
+ KnownPrefix( u"sdbc:odbc:"_ustr, DST_ODBC, false ),
+ KnownPrefix( u"sdbc:dbase:"_ustr, DST_DBASE, false ),
+ KnownPrefix( u"sdbc:firebird:"_ustr, DST_FIREBIRD, false ),
+ KnownPrefix( u"sdbc:mysql:odbc:"_ustr, DST_MYSQL_ODBC, false ),
+ KnownPrefix( u"sdbc:mysql:jdbc:"_ustr, DST_MYSQL_JDBC, false ),
+ KnownPrefix( u"sdbc:mysql:mysqlc:"_ustr, DST_MYSQL_NATIVE, false ),
+ KnownPrefix( u"sdbc:mysqlc:"_ustr, DST_MYSQL_NATIVE_DIRECT,false ),
+ KnownPrefix( u"sdbc:postgresql:"_ustr, DST_POSTGRES ,false ),
+
+ KnownPrefix( u"sdbc:address:mozilla:"_ustr, DST_MOZILLA, true ),
+ KnownPrefix( u"sdbc:address:thunderbird:"_ustr, DST_THUNDERBIRD, true ),
+ KnownPrefix( u"sdbc:address:ldap:"_ustr, DST_LDAP, true ),
+ KnownPrefix( u"sdbc:address:outlook"_ustr, DST_OUTLOOK, true ),
+ KnownPrefix( u"sdbc:address:outlookexp"_ustr, DST_OUTLOOKEXP, true ),
+ KnownPrefix( u"sdbc:address:evolution:ldap"_ustr, DST_EVOLUTION_LDAP, true ),
+ KnownPrefix( u"sdbc:address:evolution:groupwise"_ustr,DST_EVOLUTION_GROUPWISE,true ),
+ KnownPrefix( u"sdbc:address:evolution:local"_ustr, DST_EVOLUTION, true ),
+ KnownPrefix( u"sdbc:address:kab"_ustr, DST_KAB, true ),
+ KnownPrefix( u"sdbc:address:macab"_ustr, DST_MACAB, true )
};
for (const auto & aKnowPrefixe : aKnowPrefixes)
@@ -509,7 +509,7 @@ ODsnTypeCollection::TypeIterator::TypeIterator(const ODsnTypeCollection* _pConta
:m_pContainer(_pContainer)
,m_nPosition(_nInitialPos)
{
- OSL_ENSURE(m_pContainer, "ODsnTypeCollection::TypeIterator::TypeIterator : invalid container!");
+ assert(m_pContainer && "ODsnTypeCollection::TypeIterator::TypeIterator : invalid container!");
#if OSL_DEBUG_LEVEL > 0
++const_cast<ODsnTypeCollection*>(m_pContainer)->m_nLivingIterators;
#endif
diff --git a/dbaccess/source/core/misc/migrwarndlg.cxx b/dbaccess/source/core/misc/migrwarndlg.cxx
index d1712fba3f16..034d52829be3 100644
--- a/dbaccess/source/core/misc/migrwarndlg.cxx
+++ b/dbaccess/source/core/misc/migrwarndlg.cxx
@@ -12,8 +12,9 @@
namespace dbaccess
{
MigrationWarnDialog::MigrationWarnDialog(weld::Window* pParent)
- : MessageDialogController(pParent, "dbaccess/ui/migrwarndlg.ui", "MigrationWarnDialog")
- , m_xLater(m_xBuilder->weld_button("no"))
+ : MessageDialogController(pParent, u"dbaccess/ui/migrwarndlg.ui"_ustr,
+ u"MigrationWarnDialog"_ustr)
+ , m_xLater(m_xBuilder->weld_button(u"no"_ustr))
{
m_xLater->grab_focus();
}
diff --git a/dbaccess/source/core/misc/sdbcoretools.cxx b/dbaccess/source/core/misc/sdbcoretools.cxx
index 7856a1484591..f21344430333 100644
--- a/dbaccess/source/core/misc/sdbcoretools.cxx
+++ b/dbaccess/source/core/misc/sdbcoretools.cxx
@@ -111,7 +111,7 @@ namespace dbaccess
try
{
Reference< XPropertySet > xStorageProps( _rxStorage, UNO_QUERY_THROW );
- xStorageProps->getPropertyValue( "OpenMode" ) >>= nMode;
+ xStorageProps->getPropertyValue( u"OpenMode"_ustr ) >>= nMode;
}
catch( const Exception& )
{
diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx b/dbaccess/source/core/recovery/dbdocrecovery.cxx
index eead0c2c7910..d367517a0315 100644
--- a/dbaccess/source/core/recovery/dbdocrecovery.cxx
+++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx
@@ -100,7 +100,7 @@ namespace dbaccess
StorageTextOutputStream aTextOutput( i_rContext, i_rStorage, sObjectMapStreamName );
- aTextOutput.writeLine( "[storages]" );
+ aTextOutput.writeLine( u"[storages]"_ustr );
for (auto const& elem : i_mapStorageToCompDesc)
{
@@ -145,7 +145,7 @@ namespace dbaccess
sObjectMapStreamName, ElementModes::READ ), UNO_SET_THROW );
Reference< XTextInputStream2 > xTextInput = TextInputStream::create( i_rxContext );
- xTextInput->setEncoding( "UTF-8" );
+ xTextInput->setEncoding( u"UTF-8"_ustr );
xTextInput->setInputStream( xIniStream->getInputStream() );
OUString sCurrentSection;
@@ -178,7 +178,7 @@ namespace dbaccess
SubComponentDescriptor aCompDesc;
if ( !lcl_extractCompDesc( sLine, sStorageName, aCompDesc ) )
continue;
- o_mapStorageToObjectName[ sStorageName ] = aCompDesc;
+ o_mapStorageToObjectName[ sStorageName ] = std::move(aCompDesc);
}
}
diff --git a/dbaccess/source/core/recovery/settingsimport.cxx b/dbaccess/source/core/recovery/settingsimport.cxx
index 00db4ddf3bab..513dcae7e43d 100644
--- a/dbaccess/source/core/recovery/settingsimport.cxx
+++ b/dbaccess/source/core/recovery/settingsimport.cxx
@@ -45,8 +45,8 @@ namespace dbaccess
// find the name of the setting
if ( i_rAttributes.is() )
{
- m_sItemName = i_rAttributes->getValueByName( "config:name" );
- m_sItemType = i_rAttributes->getValueByName( "config:type" );
+ m_sItemName = i_rAttributes->getValueByName( u"config:name"_ustr );
+ m_sItemType = i_rAttributes->getValueByName( u"config:type"_ustr );
}
}
diff --git a/dbaccess/source/core/recovery/storagetextstream.cxx b/dbaccess/source/core/recovery/storagetextstream.cxx
index a60890fa8555..8d96a73c4d98 100644
--- a/dbaccess/source/core/recovery/storagetextstream.cxx
+++ b/dbaccess/source/core/recovery/storagetextstream.cxx
@@ -39,7 +39,7 @@ namespace dbaccess
:StorageOutputStream( i_rParentStorage, i_rStreamName )
{
mxTextOutput = TextOutputStream::create( i_rContext );
- mxTextOutput->setEncoding( "UTF-8" );
+ mxTextOutput->setEncoding( u"UTF-8"_ustr );
mxTextOutput->setOutputStream( getOutputStream() );
}
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index 3a7a30d016f0..dda79c33b897 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -84,13 +84,13 @@ namespace dbaccess
switch ( i_eType )
{
case FORM:
- return "form";
+ return u"form"_ustr;
case REPORT:
- return "report";
+ return u"report"_ustr;
case TABLE:
- return "table";
+ return u"table"_ustr;
case QUERY:
- return "query";
+ return u"query"_ustr;
default:
break;
}
@@ -126,7 +126,7 @@ namespace dbaccess
return false;
::comphelper::NamedValueCollection aDocArgs( xDocument->getArgs() );
- return aDocArgs.getOrDefault( "ReadOnly", false );
+ return aDocArgs.getOrDefault( u"ReadOnly"_ustr, false );
}
Reference< XCommandProcessor > lcl_getSubComponentDef_nothrow( const Reference< XDatabaseDocumentUI >& i_rAppUI,
@@ -215,7 +215,7 @@ namespace dbaccess
void SettingsExportContext::StartElement( enum ::xmloff::token::XMLTokenEnum i_eName )
{
- m_rDelegator.ignorableWhitespace( " " );
+ m_rDelegator.ignorableWhitespace( u" "_ustr );
m_rDelegator.startElement( impl_prefix( i_eName ) );
}
@@ -223,7 +223,7 @@ namespace dbaccess
void SettingsExportContext::EndElement( const bool i_bIgnoreWhitespace )
{
if ( i_bIgnoreWhitespace )
- m_rDelegator.ignorableWhitespace( " " );
+ m_rDelegator.ignorableWhitespace( u" "_ustr );
m_rDelegator.endElement();
}
@@ -349,15 +349,15 @@ namespace dbaccess
switch ( i_eType )
{
case FORM:
- return "forms";
+ return u"forms"_ustr;
case REPORT:
- return "reports";
+ return u"reports"_ustr;
case TABLE:
- return "tables";
+ return u"tables"_ustr;
case QUERY:
- return "queries";
+ return u"queries"_ustr;
case RELATION_DESIGN:
- return "relations";
+ return u"relations"_ustr;
default:
break;
}
@@ -472,7 +472,7 @@ namespace dbaccess
// the latter is updated only upon successful save of the design)
Reference< XPropertySet > xDesignerProps( m_xComponent, UNO_QUERY_THROW );
Sequence< PropertyValue > aCurrentQueryDesign;
- OSL_VERIFY( xDesignerProps->getPropertyValue( "CurrentQueryDesign" ) >>= aCurrentQueryDesign );
+ OSL_VERIFY( xDesignerProps->getPropertyValue( u"CurrentQueryDesign"_ustr ) >>= aCurrentQueryDesign );
// write the query design
StorageXMLOutputStream aDesignOutput( m_rContext, i_rObjectStorage, sSettingsStreamName );
@@ -480,7 +480,7 @@ namespace dbaccess
static constexpr OUString sWhitespace( u" "_ustr );
- aDesignOutput.startElement( "office:settings" );
+ aDesignOutput.startElement( u"office:settings"_ustr );
aDesignOutput.ignorableWhitespace( sWhitespace );
XMLSettingsExportHelper aSettingsExporter( aSettingsExportContext );
@@ -508,10 +508,10 @@ namespace dbaccess
Reference< XCommandProcessor > xDocDefinition;
::comphelper::NamedValueCollection aLoadArgs;
- aLoadArgs.put( "RecoveryStorage", i_rRecoveryStorage );
+ aLoadArgs.put( u"RecoveryStorage"_ustr, i_rRecoveryStorage );
// load/create the sub component hidden. We'll show it when the main app window is shown.
- aLoadArgs.put( "Hidden", true );
+ aLoadArgs.put( u"Hidden"_ustr, true );
if ( !i_rComponentName.isEmpty() )
{
@@ -569,8 +569,8 @@ namespace dbaccess
// then load the query designer
::comphelper::NamedValueCollection aLoadArgs;
- aLoadArgs.put( "CurrentQueryDesign", aCurrentQueryDesign );
- aLoadArgs.put( "Hidden", true );
+ aLoadArgs.put( u"CurrentQueryDesign"_ustr, aCurrentQueryDesign );
+ aLoadArgs.put( u"Hidden"_ustr, true );
if ( !i_rComponentName.isEmpty() )
{
diff --git a/dbaccess/source/core/resource/core_resource.cxx b/dbaccess/source/core/resource/core_resource.cxx
index fdef07e1f8f8..2bc3f7a28a04 100644
--- a/dbaccess/source/core/resource/core_resource.cxx
+++ b/dbaccess/source/core/resource/core_resource.cxx
@@ -28,12 +28,17 @@ namespace dbaccess
return Translate::get(pResId, Translate::Create("dba"));
}
- OUString ResourceManager::loadString(TranslateId pResId, const char* _pPlaceholderAscii1, std::u16string_view _rReplace1,
- const char* _pPlaceholderAscii2, std::u16string_view _rReplace2)
+ OUString ResourceManager::loadString(TranslateNId aContextSingularPlural, int nCardinality)
+ {
+ return Translate::nget(aContextSingularPlural, nCardinality, Translate::Create("dba"));
+ }
+
+ OUString ResourceManager::loadString(TranslateId pResId, std::u16string_view _rPlaceholderAscii1, std::u16string_view _rReplace1,
+ std::u16string_view _rPlaceholderAscii2, std::u16string_view _rReplace2)
{
OUString sString(loadString(pResId));
- sString = sString.replaceFirst( OUString::createFromAscii(_pPlaceholderAscii1), _rReplace1 );
- sString = sString.replaceFirst( OUString::createFromAscii(_pPlaceholderAscii2), _rReplace2 );
+ sString = sString.replaceFirst( _rPlaceholderAscii1, _rReplace1 );
+ sString = sString.replaceFirst( _rPlaceholderAscii2, _rReplace2 );
return sString;
}
}
diff --git a/dbaccess/source/filter/hsqldb/fbcreateparser.cxx b/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
index 5d4244f8085b..f19778f7439d 100644
--- a/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
+++ b/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
@@ -35,40 +35,40 @@ OUString lcl_DataTypetoFbTypeName(sal_Int32 eType)
{
case DataType::CHAR:
case DataType::BINARY:
- return "CHAR";
+ return u"CHAR"_ustr;
case DataType::VARCHAR:
case DataType::VARBINARY:
- return "VARCHAR";
+ return u"VARCHAR"_ustr;
case DataType::TINYINT: // no such type in Firebird
case DataType::SMALLINT:
- return "SMALLINT";
+ return u"SMALLINT"_ustr;
case DataType::INTEGER:
- return "INTEGER";
+ return u"INTEGER"_ustr;
case DataType::BIGINT:
- return "BIGINT";
+ return u"BIGINT"_ustr;
case DataType::NUMERIC:
- return "NUMERIC";
+ return u"NUMERIC"_ustr;
case DataType::DECIMAL:
- return "DECIMAL";
+ return u"DECIMAL"_ustr;
case DataType::BOOLEAN:
- return "BOOLEAN";
+ return u"BOOLEAN"_ustr;
case DataType::LONGVARCHAR:
case DataType::LONGVARBINARY:
case DataType::CLOB:
case DataType::BLOB:
case DataType::OTHER:
- return "BLOB";
+ return u"BLOB"_ustr;
case DataType::DATE:
- return "DATE";
+ return u"DATE"_ustr;
case DataType::TIME:
- return "TIME";
+ return u"TIME"_ustr;
case DataType::TIMESTAMP:
- return "TIMESTAMP";
+ return u"TIMESTAMP"_ustr;
case DataType::DOUBLE:
case DataType::REAL:
- return "DOUBLE PRECISION";
+ return u"DOUBLE PRECISION"_ustr;
case DataType::FLOAT:
- return "FLOAT";
+ return u"FLOAT"_ustr;
default:
assert(false);
return OUString();
@@ -83,12 +83,12 @@ OUString lcl_getTypeModifier(sal_Int32 eType)
{
case DataType::CLOB:
case DataType::LONGVARCHAR:
- return "SUB_TYPE 1";
+ return u"SUB_TYPE 1"_ustr;
case DataType::LONGVARBINARY:
- return "SUB_TYPE -9546";
+ return u"SUB_TYPE -9546"_ustr;
case DataType::BINARY:
case DataType::VARBINARY:
- return "CHARACTER SET OCTETS";
+ return u"CHARACTER SET OCTETS"_ustr;
default:
return OUString();
}
diff --git a/dbaccess/source/filter/hsqldb/parseschema.cxx b/dbaccess/source/filter/hsqldb/parseschema.cxx
index 5e512f067920..8dbeef741575 100644
--- a/dbaccess/source/filter/hsqldb/parseschema.cxx
+++ b/dbaccess/source/filter/hsqldb/parseschema.cxx
@@ -129,7 +129,7 @@ void SchemaParser::parseSchema()
Reference<XComponentContext> rContext = comphelper::getProcessComponentContext();
Reference<XTextInputStream2> xTextInput = TextInputStream::create(rContext);
- xTextInput->setEncoding("UTF-8");
+ xTextInput->setEncoding(u"UTF-8"_ustr);
xTextInput->setInputStream(xStream->getInputStream());
while (!xTextInput->isEOF())
diff --git a/dbaccess/source/filter/hsqldb/rowinputbinary.cxx b/dbaccess/source/filter/hsqldb/rowinputbinary.cxx
index 7aa11ed5f49c..c6d57a76b865 100644
--- a/dbaccess/source/filter/hsqldb/rowinputbinary.cxx
+++ b/dbaccess/source/filter/hsqldb/rowinputbinary.cxx
@@ -29,11 +29,12 @@
#include <com/sun/star/util/DateTime.hpp>
#include <unotools/ucbstreamhelper.hxx>
+#include <tools/datetime.hxx>
+#include <tools/duration.hxx>
#include <tools/stream.hxx>
+#include <tools/time.hxx>
#include <rtl/ustrbuf.hxx>
-#include <boost/date_time/posix_time/posix_time.hpp>
-
namespace
{
/**
@@ -115,18 +116,30 @@ OUString lcl_makeStringFromBigint(std::vector<sal_uInt8>&& aBytes)
return sRet.makeStringAndClear();
}
-OUString lcl_putDot(std::u16string_view sNum, sal_Int32 nScale)
+OUString lcl_putDot(const OUString& sNum, sal_Int32 nScale)
{
// e.g. sNum = "0", nScale = 2 -> "0.00"
+ if (nScale <= 0)
+ return sNum;
+
OUStringBuffer sBuf{ sNum };
- sal_Int32 nNullsToAppend = nScale - sNum.size() + 1;
+ sal_Int32 nNullsToAppend = nScale - sNum.getLength() + 1;
for (sal_Int32 i = 0; i < nNullsToAppend; ++i)
sBuf.insert(0, "0");
- if (nScale > 0)
- sBuf.insert(sBuf.getLength() - 1 - nScale, ".");
+ sBuf.insert(sBuf.getLength() - nScale, ".");
return sBuf.makeStringAndClear();
}
+
+DateTime HsqlDateTime(sal_Int64 nanoseconds)
+{
+ const DateTime epoch(Date(1, 1, 1970));
+ const bool negative = nanoseconds < 0;
+ tools::Duration duration(0, 0, 0, 0, negative ? -nanoseconds : nanoseconds);
+ if (negative)
+ duration = -duration;
+ return epoch + duration;
+}
}
namespace dbahsql
@@ -134,8 +147,6 @@ namespace dbahsql
using namespace css::uno;
using namespace css::sdbc;
using namespace css::io;
-using namespace boost::posix_time;
-using namespace boost::gregorian;
HsqlRowInputStream::HsqlRowInputStream() {}
@@ -313,12 +324,8 @@ std::vector<Any> HsqlRowInputStream::readOneRow(const std::vector<ColumnDefiniti
{
sal_Int64 value = 0;
m_pStream->ReadInt64(value); // in millisec, from 1970
- ptime epoch = time_from_string("1970-01-01 00:00:00.000");
- ptime time = epoch + milliseconds(value);
- date asDate = time.date();
-
- css::util::Date loDate(asDate.day(), asDate.month(),
- asDate.year()); // day, month, year
+ css::util::Date loDate(
+ HsqlDateTime(value * tools::Time::nanoPerMilli).GetUNODate());
aData.emplace_back(loDate);
}
break;
@@ -326,18 +333,13 @@ std::vector<Any> HsqlRowInputStream::readOneRow(const std::vector<ColumnDefiniti
{
sal_Int64 value = 0;
m_pStream->ReadInt64(value);
- auto valueInSecs = value / 1000;
- /* Observed valueInSecs fall in the range from
+ /* Observed value fall in the range from
negative one day to positive two days. Coerce
- valueInSecs between zero and positive one day.*/
- const int secPerDay = 24 * 60 * 60;
- valueInSecs = (valueInSecs + secPerDay) % secPerDay;
-
- auto nHours = valueInSecs / (60 * 60);
- valueInSecs = valueInSecs % 3600;
- const sal_uInt16 nMins = valueInSecs / 60;
- const sal_uInt16 nSecs = valueInSecs % 60;
- css::util::Time time((value % 1000) * 1000000, nSecs, nMins, nHours, true);
+ value between zero and positive one day.*/
+ value = (value + tools::Time::milliSecPerDay) % tools::Time::milliSecPerDay;
+ tools::Duration duration(0, 0, 0, 0, value * tools::Time::nanoPerMilli);
+
+ css::util::Time time(duration.GetTime().GetUNOTime());
aData.emplace_back(time);
}
break;
@@ -345,22 +347,12 @@ std::vector<Any> HsqlRowInputStream::readOneRow(const std::vector<ColumnDefiniti
{
sal_Int64 nEpochMillis = 0;
m_pStream->ReadInt64(nEpochMillis);
- ptime epoch = time_from_string("1970-01-01 00:00:00.000");
- ptime time = epoch + milliseconds(nEpochMillis);
- date asDate = time.date();
-
sal_Int32 nNanos = 0;
m_pStream->ReadInt32(nNanos);
+ DateTime result(HsqlDateTime(nEpochMillis * tools::Time::nanoPerMilli + nNanos));
// convert into LO internal representation of dateTime
- css::util::DateTime dateTime;
- dateTime.NanoSeconds = nNanos;
- dateTime.Seconds = time.time_of_day().seconds();
- dateTime.Minutes = time.time_of_day().minutes();
- dateTime.Hours = time.time_of_day().hours();
- dateTime.Day = asDate.day();
- dateTime.Month = asDate.month();
- dateTime.Year = asDate.year();
+ css::util::DateTime dateTime(result.GetUNODateTime());
aData.emplace_back(dateTime);
}
break;
diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx
index 3942dab26801..2d722b8e8c9c 100644
--- a/dbaccess/source/filter/xml/dbloader2.cxx
+++ b/dbaccess/source/filter/xml/dbloader2.cxx
@@ -106,9 +106,9 @@ OUString SAL_CALL DBTypeDetection::detect( css::uno::Sequence< css::beans::Prope
{
::comphelper::NamedValueCollection aMedia( Descriptor );
bool bStreamFromDescr = false;
- OUString sURL = aMedia.getOrDefault( "URL", OUString() );
+ OUString sURL = aMedia.getOrDefault( u"URL"_ustr, OUString() );
- Reference< XInputStream > xInStream( aMedia.getOrDefault( "InputStream", Reference< XInputStream >() ) );
+ Reference< XInputStream > xInStream( aMedia.getOrDefault( u"InputStream"_ustr, Reference< XInputStream >() ) );
Reference< XPropertySet > xStorageProperties;
if ( xInStream.is() )
{
@@ -118,7 +118,7 @@ OUString SAL_CALL DBTypeDetection::detect( css::uno::Sequence< css::beans::Prope
}
else
{
- OUString sSalvagedURL( aMedia.getOrDefault( "SalvagedFile", OUString() ) );
+ OUString sSalvagedURL( aMedia.getOrDefault( u"SalvagedFile"_ustr, OUString() ) );
OUString sFileLocation( sSalvagedURL.isEmpty() ? sURL : sSalvagedURL );
if ( !sFileLocation.isEmpty() )
@@ -138,8 +138,8 @@ OUString SAL_CALL DBTypeDetection::detect( css::uno::Sequence< css::beans::Prope
{
// After fixing of the i88522 issue ( use the new file locking for database files ) the stream from the type detection can be used further
// for now the file should be reopened to have read/write access
- aMedia.remove( "InputStream" );
- aMedia.remove( "Stream" );
+ aMedia.remove( u"InputStream"_ustr );
+ aMedia.remove( u"Stream"_ustr );
aMedia >>= Descriptor;
try
{
@@ -153,7 +153,7 @@ OUString SAL_CALL DBTypeDetection::detect( css::uno::Sequence< css::beans::Prope
}
}
- return "StarBase";
+ return u"StarBase"_ustr;
}
::comphelper::disposeComponent(xStorageProperties);
}
@@ -164,7 +164,7 @@ OUString SAL_CALL DBTypeDetection::detect( css::uno::Sequence< css::beans::Prope
// XServiceInfo
OUString SAL_CALL DBTypeDetection::getImplementationName()
{
- return "org.openoffice.comp.dbflt.DBTypeDetection";
+ return u"org.openoffice.comp.dbflt.DBTypeDetection"_ustr;
}
// XServiceInfo
@@ -176,7 +176,7 @@ sal_Bool SAL_CALL DBTypeDetection::supportsService(const OUString& ServiceName)
// XServiceInfo
Sequence< OUString > SAL_CALL DBTypeDetection::getSupportedServiceNames()
{
- return { "com.sun.star.document.ExtendedTypeDetection" };
+ return { u"com.sun.star.document.ExtendedTypeDetection"_ustr };
}
} // namespace dbaxml
@@ -197,7 +197,7 @@ class DBContentLoader : public ::cppu::WeakImplHelper< XFrameLoader, XServiceInf
{
private:
const Reference< XComponentContext > m_aContext;
- Reference< XFrameLoader > m_xMySelf;
+ rtl::Reference< DBContentLoader > m_xMySelf;
OUString m_sCurrentURL;
ImplSVEvent * m_nStartWizard;
@@ -232,7 +232,7 @@ DBContentLoader::DBContentLoader(const Reference< XComponentContext >& _rxFactor
// XServiceInfo
OUString SAL_CALL DBContentLoader::getImplementationName()
{
- return "org.openoffice.comp.dbflt.DBContentLoader2";
+ return u"org.openoffice.comp.dbflt.DBContentLoader2"_ustr;
}
// XServiceInfo
@@ -244,7 +244,7 @@ sal_Bool SAL_CALL DBContentLoader::supportsService(const OUString& ServiceName)
// XServiceInfo
Sequence< OUString > SAL_CALL DBContentLoader::getSupportedServiceNames()
{
- return { "com.sun.star.frame.FrameLoader" };
+ return { u"com.sun.star.frame.FrameLoader"_ustr };
}
@@ -297,7 +297,7 @@ bool DBContentLoader::impl_executeNewDatabaseWizard( Reference< XModel > const &
}));
// create the dialog
- Reference< XExecutableDialog > xAdminDialog( m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.sdb.DatabaseWizardDialog", aWizardArgs, m_aContext), UNO_QUERY_THROW);
+ Reference< XExecutableDialog > xAdminDialog( m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(u"com.sun.star.sdb.DatabaseWizardDialog"_ustr, aWizardArgs, m_aContext), UNO_QUERY_THROW);
// execute it
if ( RET_OK != xAdminDialog->execute() )
@@ -305,8 +305,8 @@ bool DBContentLoader::impl_executeNewDatabaseWizard( Reference< XModel > const &
Reference<XPropertySet> xProp(xAdminDialog,UNO_QUERY);
bool bSuccess = false;
- xProp->getPropertyValue("OpenDatabase") >>= bSuccess;
- xProp->getPropertyValue("StartTableWizard") >>= _bShouldStartTableWizard;
+ xProp->getPropertyValue(u"OpenDatabase"_ustr) >>= bSuccess;
+ xProp->getPropertyValue(u"StartTableWizard"_ustr) >>= _bShouldStartTableWizard;
return bSuccess;
}
@@ -316,7 +316,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
{
// first check if preview is true, if so return without creating a controller. Preview is not supported
::comphelper::NamedValueCollection aMediaDesc( rArgs );
- bool bPreview = aMediaDesc.getOrDefault( "Preview", false );
+ bool bPreview = aMediaDesc.getOrDefault( u"Preview"_ustr, false );
if ( bPreview )
{
if (rListener.is())
@@ -324,8 +324,8 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
return;
}
- Reference< XModel > xModel = aMediaDesc.getOrDefault( "Model", Reference< XModel >() );
- OUString sSalvagedURL = aMediaDesc.getOrDefault( "SalvagedFile", _rURL );
+ Reference< XModel > xModel = aMediaDesc.getOrDefault( u"Model"_ustr, Reference< XModel >() );
+ OUString sSalvagedURL = aMediaDesc.getOrDefault( u"SalvagedFile"_ustr, _rURL );
bool bCreateNew = false; // does the URL denote the private:factory URL?
bool bStartTableWizard = false; // start the table wizard after everything was loaded successfully?
@@ -338,20 +338,20 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
// a default handler, we simply ensure there is one.
// If a handler is present in the media descriptor, even if it is NULL, we will
// not touch it.
- if ( !aMediaDesc.has( "InteractionHandler" ) )
+ if ( !aMediaDesc.has( u"InteractionHandler"_ustr ) )
{
Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext, nullptr) );
- aMediaDesc.put( "InteractionHandler", xHandler );
+ aMediaDesc.put( u"InteractionHandler"_ustr, xHandler );
}
// it's allowed to pass an existing document
Reference< XOfficeDatabaseDocument > xExistentDBDoc;
- xModel.set( aMediaDesc.getOrDefault( "Model", xExistentDBDoc ), UNO_QUERY );
- aMediaDesc.remove( "Model" );
+ xModel.set( aMediaDesc.getOrDefault( u"Model"_ustr, xExistentDBDoc ), UNO_QUERY );
+ aMediaDesc.remove( u"Model"_ustr );
// also, it's allowed to specify the type of view which should be created
- OUString sViewName = aMediaDesc.getOrDefault( "ViewName", OUString( "Default" ) );
- aMediaDesc.remove( "ViewName" );
+ OUString sViewName = aMediaDesc.getOrDefault( u"ViewName"_ustr, u"Default"_ustr );
+ aMediaDesc.remove( u"ViewName"_ustr );
// this needs to stay alive for duration of this method
Reference< XDatabaseContext > xDatabaseContext;
@@ -421,7 +421,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
bool bNeedLoad = xModel->getURL().isEmpty();
try
{
- aMediaDesc.put( "FileName", _rURL );
+ aMediaDesc.put( u"FileName"_ustr, _rURL );
Sequence< PropertyValue > aResource( aMediaDesc.getPropertyValues() );
if ( bNeedLoad )
@@ -509,9 +509,9 @@ IMPL_LINK_NOARG( DBContentLoader, OnStartTableWizard, void*, void )
{"DatabaseLocation", Any(m_sCurrentURL)}
}));
SolarMutexGuard aGuard;
- Reference< XJobExecutor > xTableWizard( m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.wizards.table.CallTableWizard", aWizArgs, m_aContext), UNO_QUERY);
+ Reference< XJobExecutor > xTableWizard( m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(u"com.sun.star.wizards.table.CallTableWizard"_ustr, aWizArgs, m_aContext), UNO_QUERY);
if ( xTableWizard.is() )
- xTableWizard->trigger("start");
+ xTableWizard->trigger(u"start"_ustr);
}
catch(const Exception&)
{
diff --git a/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx b/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
index eefc08e4191a..c1400970181a 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
@@ -91,20 +91,20 @@ OXMLDataSourceInfo::OXMLDataSourceInfo( ODBFilter& rImport
if ( !bFoundField )
{
aProperty.Name = INFO_FIELDDELIMITER;
- aProperty.Value <<= OUString(";");
+ aProperty.Value <<= u";"_ustr;
rImport.addInfo(aProperty);
}
if ( !bFoundThousand )
{
aProperty.Name = INFO_THOUSANDSDELIMITER;
- aProperty.Value <<= OUString(",");
+ aProperty.Value <<= u","_ustr;
rImport.addInfo(aProperty);
}
}
if ( (nElement & TOKEN_MASK) == XML_FONT_CHARSET && !bFoundCharset )
{
aProperty.Name = INFO_CHARSET;
- aProperty.Value <<= OUString("utf8");
+ aProperty.Value <<= u"utf8"_ustr;
rImport.addInfo(aProperty);
}
}
diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
index 9402bb399dca..57318d84e964 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
@@ -169,20 +169,28 @@ Any OXMLDataSourceSetting::convertString(const css::uno::Type& _rExpectedType, c
}
break;
case TypeClass_SHORT: // sal_Int16
+ { // it's a real int16 property
+ sal_Int32 nValue(0);
+ bool const bSuccess =
+ ::sax::Converter::convertNumber(nValue, _rReadCharacters,
+ SAL_MIN_INT16, SAL_MAX_INT16);
+ SAL_WARN_IF(!bSuccess, "dbaccess",
+ "OXMLDataSourceSetting::convertString: could not convert \""
+ << _rReadCharacters << "\" into a sal_Int16!");
+ aReturn <<= static_cast<sal_Int16>(nValue);
+ break;
+ }
case TypeClass_LONG: // sal_Int32
- { // it's a real int32/16 property
- sal_Int32 nValue(0);
- bool const bSuccess =
- ::sax::Converter::convertNumber(nValue, _rReadCharacters);
- SAL_WARN_IF(!bSuccess, "dbaccess",
- "OXMLDataSourceSetting::convertString: could not convert \""
- << _rReadCharacters << "\" into an integer!");
- if (TypeClass_SHORT == _rExpectedType.getTypeClass())
- aReturn <<= static_cast<sal_Int16>(nValue);
- else
- aReturn <<= nValue;
- break;
- }
+ { // it's a real int32 property
+ sal_Int32 nValue(0);
+ bool const bSuccess =
+ ::sax::Converter::convertNumber(nValue, _rReadCharacters);
+ SAL_WARN_IF(!bSuccess, "dbaccess",
+ "OXMLDataSourceSetting::convertString: could not convert \""
+ << _rReadCharacters << "\" into a sal_Int32!");
+ aReturn <<= nValue;
+ break;
+ }
case TypeClass_HYPER:
{
OSL_FAIL("OXMLDataSourceSetting::convertString: 64-bit integers not implemented yet!");
diff --git a/dbaccess/source/filter/xml/xmlDocuments.cxx b/dbaccess/source/filter/xml/xmlDocuments.cxx
index fa763614c31e..80834d353735 100644
--- a/dbaccess/source/filter/xml/xmlDocuments.cxx
+++ b/dbaccess/source/filter/xml/xmlDocuments.cxx
@@ -71,7 +71,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > OXMLDocuments::createF
case XML_TABLE:
case XML_TABLE_REPRESENTATION:
GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
- pContext = new OXMLTable( GetOwnImport(), xAttrList, m_xContainer, "com.sun.star.sdb.TableDefinition");
+ pContext = new OXMLTable( GetOwnImport(), xAttrList, m_xContainer, u"com.sun.star.sdb.TableDefinition"_ustr);
break;
case XML_QUERY:
GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 8b96604e85d2..d0a464a4d2c1 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -63,7 +63,7 @@ com_sun_star_comp_sdb_DBExportFilter_get_implementation(
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
return cppu::acquire(new ::dbaxml::ODBExport(context,
- "com.sun.star.comp.sdb.DBExportFilter"));
+ u"com.sun.star.comp.sdb.DBExportFilter"_ustr));
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
@@ -71,7 +71,7 @@ com_sun_star_comp_sdb_XMLSettingsExporter_get_implementation(
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
return cppu::acquire(new ::dbaxml::ODBExport(context,
- "com.sun.star.comp.sdb.XMLSettingsExporter",
+ u"com.sun.star.comp.sdb.XMLSettingsExporter"_ustr,
SvXMLExportFlags::SETTINGS | SvXMLExportFlags::PRETTY ));
}
@@ -80,7 +80,7 @@ com_sun_star_comp_sdb_XMLFullExporter_get_implementation(
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
return cppu::acquire(new ::dbaxml::ODBExport(context,
- "com.sun.star.comp.sdb.XMLFullExporter",
+ u"com.sun.star.comp.sdb.XMLFullExporter"_ustr,
SvXMLExportFlags::ALL));
}
@@ -95,24 +95,24 @@ namespace dbaxml
switch (_rType.getTypeClass())
{
case TypeClass_STRING:
- return "string";
+ return u"string"_ustr;
case TypeClass_DOUBLE:
- return "double";
+ return u"double"_ustr;
case TypeClass_BOOLEAN:
- return "boolean";
+ return u"boolean"_ustr;
case TypeClass_BYTE:
case TypeClass_SHORT:
- return "short";
+ return u"short"_ustr;
case TypeClass_LONG:
- return "int";
+ return u"int"_ustr;
case TypeClass_HYPER:
- return "long";
+ return u"long"_ustr;
case TypeClass_ENUM:
- return "int";
+ return u"int"_ustr;
default:
OSL_FAIL( "lcl_implGetPropertyXMLType: unsupported value type!" );
- return "double";
+ return u"double"_ustr;
}
}
@@ -415,7 +415,7 @@ void ODBExport::exportDataSource()
if ( bAutoIncrementEnabled && !(aAutoIncrement.first.isEmpty() && aAutoIncrement.second.isEmpty()) )
m_oAutoIncrement = aAutoIncrement;
if ( aDelimiter.bUsed )
- m_aDelimiter.reset( new TDelimiter( aDelimiter ) );
+ m_aDelimiter.reset(new TDelimiter(std::move(aDelimiter)));
SvXMLElementExport aElem(*this, XML_NAMESPACE_DB, XML_DATA_SOURCE, true, true);
@@ -770,7 +770,7 @@ void ODBExport::exportComponent(XPropertySet* _xProp)
OUString sValue;
_xProp->getPropertyValue(PROPERTY_PERSISTENT_NAME) >>= sValue;
bool bIsForm = true;
- _xProp->getPropertyValue("IsForm") >>= bIsForm;
+ _xProp->getPropertyValue(u"IsForm"_ustr) >>= bIsForm;
if ( bIsForm )
sValue = "forms/" + sValue;
else
diff --git a/dbaccess/source/filter/xml/xmlQuery.cxx b/dbaccess/source/filter/xml/xmlQuery.cxx
index a707e8734533..b1cdd90bf1b7 100644
--- a/dbaccess/source/filter/xml/xmlQuery.cxx
+++ b/dbaccess/source/filter/xml/xmlQuery.cxx
@@ -37,7 +37,7 @@ OXMLQuery::OXMLQuery( ODBFilter& rImport
,const Reference< XFastAttributeList > & _xAttrList
,const css::uno::Reference< css::container::XNameAccess >& _xParentContainer
) :
- OXMLTable( rImport, _xAttrList,_xParentContainer, "com.sun.star.sdb.CommandDefinition" )
+ OXMLTable( rImport, _xAttrList,_xParentContainer, u"com.sun.star.sdb.CommandDefinition"_ustr )
,m_bEscapeProcessing(true)
{
for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index a41e7b43022b..18a1d223df86 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -125,12 +125,11 @@ static ErrCode ReadThroughComponent(
static ErrCode ReadThroughComponent(
const uno::Reference< embed::XStorage >& xStorage,
const uno::Reference<XComponent>& xModelComponent,
- const char* pStreamName,
+ const OUString& sStreamName,
const uno::Reference<XComponentContext> & rxContext,
ODBFilter& _rFilter)
{
OSL_ENSURE( xStorage.is(), "Need storage!");
- OSL_ENSURE(nullptr != pStreamName, "Please, please, give me a name!");
if ( !xStorage )
// TODO/LATER: better error handling
@@ -141,7 +140,6 @@ static ErrCode ReadThroughComponent(
try
{
// open stream (and set parser input)
- OUString sStreamName = OUString::createFromAscii(pStreamName);
if ( !xStorage->hasByName( sStreamName ) || !xStorage->isStreamElement( sStreamName ) )
{
// stream name not found! return immediately with OK signal
@@ -176,11 +174,11 @@ ODBFilter::ODBFilter( const uno::Reference< XComponentContext >& _rxContext )
GetMM100UnitConverter().SetCoreMeasureUnit(util::MeasureUnit::MM_10TH);
GetMM100UnitConverter().SetXMLMeasureUnit(util::MeasureUnit::CM);
- GetNamespaceMap().Add( "_db",
+ GetNamespaceMap().Add( u"_db"_ustr,
GetXMLToken(XML_N_DB),
XML_NAMESPACE_DB );
- GetNamespaceMap().Add( "__db",
+ GetNamespaceMap().Add( u"__db"_ustr,
GetXMLToken(XML_N_DB_OASIS),
XML_NAMESPACE_DB );
}
@@ -194,7 +192,7 @@ ODBFilter::~ODBFilter() noexcept
OUString ODBFilter::getImplementationName_Static()
{
- return "com.sun.star.comp.sdb.DBFilter";
+ return u"com.sun.star.comp.sdb.DBFilter"_ustr;
}
@@ -244,10 +242,10 @@ bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
bool bRet = true;
if (!xStorage.is())
{
- if (aMediaDescriptor.has("URL"))
- sFileName = aMediaDescriptor.getOrDefault("URL", OUString());
- if (sFileName.isEmpty() && aMediaDescriptor.has("FileName"))
- sFileName = aMediaDescriptor.getOrDefault("FileName", sFileName);
+ if (aMediaDescriptor.has(u"URL"_ustr))
+ sFileName = aMediaDescriptor.getOrDefault(u"URL"_ustr, OUString());
+ if (sFileName.isEmpty() && aMediaDescriptor.has(u"FileName"_ustr))
+ sFileName = aMediaDescriptor.getOrDefault(u"FileName"_ustr, sFileName);
OSL_ENSURE(!sFileName.isEmpty(), "ODBFilter::implImport: no URL given!");
bRet = !sFileName.isEmpty();
@@ -323,7 +321,7 @@ bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
uno::Reference<XComponent> xModel(GetModel());
ErrCode nRet = ReadThroughComponent( xStorage
,xModel
- ,"settings.xml"
+ ,u"settings.xml"_ustr
,GetComponentContext()
,*this
);
@@ -331,7 +329,7 @@ bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
if ( nRet == ERRCODE_NONE )
nRet = ReadThroughComponent( xStorage
,xModel
- ,"content.xml"
+ ,u"content.xml"_ustr
,GetComponentContext()
,*this
);
diff --git a/dbaccess/source/inc/dsntypes.hxx b/dbaccess/source/inc/dsntypes.hxx
index ebd287099fa1..c6529ab6c34a 100644
--- a/dbaccess/source/inc/dsntypes.hxx
+++ b/dbaccess/source/inc/dsntypes.hxx
@@ -128,7 +128,7 @@ public:
OUString getPrefix(std::u16string_view _sURL) const;
/// determines whether there is a driver for the given URL prefix/pattern
- bool hasDriver( const char* _pAsciiPattern ) const;
+ bool hasDriver( std::u16string_view _rAsciiPattern ) const;
/// on a given string, return the Java Driver Class
OUString getJavaDriverClass(std::u16string_view _sURL) const;
diff --git a/dbaccess/source/sdbtools/connection/connectiontools.cxx b/dbaccess/source/sdbtools/connection/connectiontools.cxx
index 5dd408bac847..c0189744700c 100644
--- a/dbaccess/source/sdbtools/connection/connectiontools.cxx
+++ b/dbaccess/source/sdbtools/connection/connectiontools.cxx
@@ -89,7 +89,7 @@ namespace sdbtools
OUString SAL_CALL ConnectionTools::getImplementationName()
{
- return "com.sun.star.comp.dbaccess.ConnectionTools";
+ return u"com.sun.star.comp.dbaccess.ConnectionTools"_ustr;
}
sal_Bool SAL_CALL ConnectionTools::supportsService(const OUString & ServiceName)
@@ -99,7 +99,7 @@ namespace sdbtools
Sequence< OUString > SAL_CALL ConnectionTools::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.tools.ConnectionTools" };
+ return { u"com.sun.star.sdb.tools.ConnectionTools"_ustr };
}
void SAL_CALL ConnectionTools::initialize(const Sequence< Any > & _rArguments)
@@ -113,7 +113,7 @@ namespace sdbtools
else
{
::comphelper::NamedValueCollection aArguments( _rArguments );
- aArguments.get( "Connection" ) >>= xConnection;
+ aArguments.get( u"Connection"_ustr ) >>= xConnection;
}
if ( !xConnection.is() )
throw IllegalArgumentException();
diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx
index e36092e30be4..fe1caa97289a 100644
--- a/dbaccess/source/sdbtools/connection/objectnames.cxx
+++ b/dbaccess/source/sdbtools/connection/objectnames.cxx
@@ -313,9 +313,9 @@ namespace sdbtools
if ( aMeta.supportsSubqueriesInFrom() )
pReturn = std::make_shared<CombinedNameCheck>( pTableCheck, pQueryCheck );
else if ( _nCommandType == CommandType::TABLE )
- pReturn = pTableCheck;
+ pReturn = std::move(pTableCheck);
else
- pReturn = pQueryCheck;
+ pReturn = std::move(pQueryCheck);
return pReturn;
}
@@ -331,7 +331,7 @@ namespace sdbtools
catch( const Exception& )
{
throw IllegalArgumentException(
- "The connection could not provide its database's meta data.",
+ u"The connection could not provide its database's meta data."_ustr,
nullptr,
0
);
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 9ec5f3c1a501..092720a38d6f 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -145,7 +145,7 @@ OUString SAL_CALL OApplicationController::getImplementationName()
Sequence< OUString> SAL_CALL OApplicationController::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.application.DefaultViewController" };
+ return { u"com.sun.star.sdb.application.DefaultViewController"_ustr };
}
namespace {
@@ -475,7 +475,7 @@ sal_Bool SAL_CALL OApplicationController::suspend(sal_Bool bSuspend)
if ( xBroadcaster.is() )
{
xBroadcaster->notifyDocumentEvent(
- "OnPrepareViewClosing",
+ u"OnPrepareViewClosing"_ustr,
this,
Any()
);
@@ -1020,7 +1020,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
std::vector<SotClipboardFormatId> aFormatIds;
getSupportedFormats(getContainer()->getElementType(),aFormatIds);
for (auto const& formatId : aFormatIds)
- pDlg->Insert(formatId,"");
+ pDlg->Insert(formatId,u""_ustr);
const TransferableDataHelper& rClipboard = getViewClipboard();
pasteFormat(pDlg->GetFormat(rClipboard.GetTransferable()));
@@ -1278,12 +1278,12 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
{
SharedConnection xConnection( ensureConnection() );
if ( xConnection.is() )
- openDialog("com.sun.star.sdb.UserAdministrationDialog");
+ openDialog(u"com.sun.star.sdb.UserAdministrationDialog"_ustr);
}
break;
case SID_DB_APP_TABLEFILTER:
// opens the table filter dialog for the selected data source
- openDialog( "com.sun.star.sdb.TableFilterDialog" );
+ openDialog( u"com.sun.star.sdb.TableFilterDialog"_ustr );
askToReconnect();
break;
case SID_DB_APP_REFRESH_TABLES:
@@ -1291,15 +1291,15 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
break;
case SID_DB_APP_DSPROPS:
// opens the administration dialog for the selected data source
- openDialog( "com.sun.star.sdb.DatasourceAdministrationDialog" );
+ openDialog( u"com.sun.star.sdb.DatasourceAdministrationDialog"_ustr );
askToReconnect();
break;
case SID_DB_APP_DSADVANCED_SETTINGS:
- openDialog("com.sun.star.sdb.AdvancedDatabaseSettingsDialog");
+ openDialog(u"com.sun.star.sdb.AdvancedDatabaseSettingsDialog"_ustr);
askToReconnect();
break;
case SID_DB_APP_DSCONNECTION_TYPE:
- openDialog("com.sun.star.sdb.DataSourceTypeChangeDialog");
+ openDialog(u"com.sun.star.sdb.DataSourceTypeChangeDialog"_ustr);
askToReconnect();
break;
case ID_DIRECT_SQL:
@@ -1357,107 +1357,107 @@ void OApplicationController::describeSupportedFeatures()
{
OGenericUnoController::describeSupportedFeatures();
- implDescribeSupportedFeature( ".uno:AddDirect", SID_NEWDOCDIRECT, CommandGroup::APPLICATION );
- implDescribeSupportedFeature( ".uno:Save", ID_BROWSER_SAVEDOC, CommandGroup::DOCUMENT );
- implDescribeSupportedFeature( ".uno:SaveAs", ID_BROWSER_SAVEASDOC, CommandGroup::DOCUMENT );
- implDescribeSupportedFeature( ".uno:SendMail", SID_MAIL_SENDDOC, CommandGroup::DOCUMENT );
- implDescribeSupportedFeature( ".uno:DBSendReportAsMail",SID_DB_APP_SENDREPORTASMAIL,
+ implDescribeSupportedFeature( u".uno:AddDirect"_ustr, SID_NEWDOCDIRECT, CommandGroup::APPLICATION );
+ implDescribeSupportedFeature( u".uno:Save"_ustr, ID_BROWSER_SAVEDOC, CommandGroup::DOCUMENT );
+ implDescribeSupportedFeature( u".uno:SaveAs"_ustr, ID_BROWSER_SAVEASDOC, CommandGroup::DOCUMENT );
+ implDescribeSupportedFeature( u".uno:SendMail"_ustr, SID_MAIL_SENDDOC, CommandGroup::DOCUMENT );
+ implDescribeSupportedFeature( u".uno:DBSendReportAsMail"_ustr,SID_DB_APP_SENDREPORTASMAIL,
CommandGroup::DOCUMENT );
- implDescribeSupportedFeature( ".uno:DBSendReportToWriter",SID_DB_APP_SENDREPORTTOWRITER,
+ implDescribeSupportedFeature( u".uno:DBSendReportToWriter"_ustr,SID_DB_APP_SENDREPORTTOWRITER,
CommandGroup::DOCUMENT );
- implDescribeSupportedFeature( ".uno:DBNewForm", SID_APP_NEW_FORM, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:DBNewFolder", SID_APP_NEW_FOLDER, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:DBNewFormAutoPilot", SID_DB_FORM_NEW_PILOT, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:DBNewFormAutoPilotWithPreSelection",
+ implDescribeSupportedFeature( u".uno:DBNewForm"_ustr, SID_APP_NEW_FORM, CommandGroup::INSERT );
+ implDescribeSupportedFeature( u".uno:DBNewFolder"_ustr, SID_APP_NEW_FOLDER, CommandGroup::INSERT );
+ implDescribeSupportedFeature( u".uno:DBNewFormAutoPilot"_ustr, SID_DB_FORM_NEW_PILOT, CommandGroup::INSERT );
+ implDescribeSupportedFeature( u".uno:DBNewFormAutoPilotWithPreSelection"_ustr,
SID_FORM_CREATE_REPWIZ_PRE_SEL,
CommandGroup::APPLICATION );
- implDescribeSupportedFeature( ".uno:DBNewReport", SID_APP_NEW_REPORT, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:DBNewReportAutoPilot",
+ implDescribeSupportedFeature( u".uno:DBNewReport"_ustr, SID_APP_NEW_REPORT, CommandGroup::INSERT );
+ implDescribeSupportedFeature( u".uno:DBNewReportAutoPilot"_ustr,
ID_DOCUMENT_CREATE_REPWIZ, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:DBNewReportAutoPilotWithPreSelection",
+ implDescribeSupportedFeature( u".uno:DBNewReportAutoPilotWithPreSelection"_ustr,
SID_REPORT_CREATE_REPWIZ_PRE_SEL,
CommandGroup::APPLICATION );
- implDescribeSupportedFeature( ".uno:DBNewQuery", ID_NEW_QUERY_DESIGN, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:DBNewQuerySql", ID_NEW_QUERY_SQL, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:DBNewQueryAutoPilot",ID_APP_NEW_QUERY_AUTO_PILOT,
+ implDescribeSupportedFeature( u".uno:DBNewQuery"_ustr, ID_NEW_QUERY_DESIGN, CommandGroup::INSERT );
+ implDescribeSupportedFeature( u".uno:DBNewQuerySql"_ustr, ID_NEW_QUERY_SQL, CommandGroup::INSERT );
+ implDescribeSupportedFeature( u".uno:DBNewQueryAutoPilot"_ustr,ID_APP_NEW_QUERY_AUTO_PILOT,
CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:DBNewTable", ID_NEW_TABLE_DESIGN, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:DBNewTableAutoPilot",ID_NEW_TABLE_DESIGN_AUTO_PILOT,
+ implDescribeSupportedFeature( u".uno:DBNewTable"_ustr, ID_NEW_TABLE_DESIGN, CommandGroup::INSERT );
+ implDescribeSupportedFeature( u".uno:DBNewTableAutoPilot"_ustr,ID_NEW_TABLE_DESIGN_AUTO_PILOT,
CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:DBNewView", ID_NEW_VIEW_DESIGN, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:DBNewViewSQL", SID_DB_NEW_VIEW_SQL, CommandGroup::INSERT );
-
- implDescribeSupportedFeature( ".uno:DBDelete", SID_DB_APP_DELETE, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:Delete", SID_DB_APP_DELETE, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBRename", SID_DB_APP_RENAME, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBEdit", SID_DB_APP_EDIT, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBEditSqlView", SID_DB_APP_EDIT_SQL_VIEW, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBOpen", SID_DB_APP_OPEN, CommandGroup::EDIT );
-
- implDescribeSupportedFeature( ".uno:DBTableDelete", SID_DB_APP_TABLE_DELETE, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBTableRename", SID_DB_APP_TABLE_RENAME, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBTableEdit", SID_DB_APP_TABLE_EDIT, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBTableOpen", SID_DB_APP_TABLE_OPEN, CommandGroup::EDIT );
-
- implDescribeSupportedFeature( ".uno:DBQueryDelete", SID_DB_APP_QUERY_DELETE, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBQueryRename", SID_DB_APP_QUERY_RENAME, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBQueryEdit", SID_DB_APP_QUERY_EDIT, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBQueryOpen", SID_DB_APP_QUERY_OPEN, CommandGroup::EDIT );
-
- implDescribeSupportedFeature( ".uno:DBFormDelete", SID_DB_APP_FORM_DELETE, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBFormRename", SID_DB_APP_FORM_RENAME, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBFormEdit", SID_DB_APP_FORM_EDIT, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBFormOpen", SID_DB_APP_FORM_OPEN, CommandGroup::EDIT );
-
- implDescribeSupportedFeature( ".uno:DBReportDelete", SID_DB_APP_REPORT_DELETE, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBReportRename", SID_DB_APP_REPORT_RENAME, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBReportEdit", SID_DB_APP_REPORT_EDIT, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBReportOpen", SID_DB_APP_REPORT_OPEN, CommandGroup::EDIT );
-
- implDescribeSupportedFeature( ".uno:SelectAll", SID_SELECTALL, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:Undo", ID_BROWSER_UNDO, CommandGroup::EDIT );
-
- implDescribeSupportedFeature( ".uno:Sortup", ID_BROWSER_SORTUP, CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:SortDown", ID_BROWSER_SORTDOWN, CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:DBRelationDesign", SID_DB_APP_DSRELDESIGN, CommandGroup::APPLICATION );
- implDescribeSupportedFeature( ".uno:DBUserAdmin", SID_DB_APP_DSUSERADMIN, CommandGroup::APPLICATION );
- implDescribeSupportedFeature( ".uno:DBTableFilter", SID_DB_APP_TABLEFILTER, CommandGroup::APPLICATION );
- implDescribeSupportedFeature( ".uno:DBDSProperties", SID_DB_APP_DSPROPS, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBDSConnectionType", SID_DB_APP_DSCONNECTION_TYPE,
+ implDescribeSupportedFeature( u".uno:DBNewView"_ustr, ID_NEW_VIEW_DESIGN, CommandGroup::INSERT );
+ implDescribeSupportedFeature( u".uno:DBNewViewSQL"_ustr, SID_DB_NEW_VIEW_SQL, CommandGroup::INSERT );
+
+ implDescribeSupportedFeature( u".uno:DBDelete"_ustr, SID_DB_APP_DELETE, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:Delete"_ustr, SID_DB_APP_DELETE, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBRename"_ustr, SID_DB_APP_RENAME, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBEdit"_ustr, SID_DB_APP_EDIT, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBEditSqlView"_ustr, SID_DB_APP_EDIT_SQL_VIEW, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBOpen"_ustr, SID_DB_APP_OPEN, CommandGroup::EDIT );
+
+ implDescribeSupportedFeature( u".uno:DBTableDelete"_ustr, SID_DB_APP_TABLE_DELETE, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBTableRename"_ustr, SID_DB_APP_TABLE_RENAME, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBTableEdit"_ustr, SID_DB_APP_TABLE_EDIT, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBTableOpen"_ustr, SID_DB_APP_TABLE_OPEN, CommandGroup::EDIT );
+
+ implDescribeSupportedFeature( u".uno:DBQueryDelete"_ustr, SID_DB_APP_QUERY_DELETE, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBQueryRename"_ustr, SID_DB_APP_QUERY_RENAME, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBQueryEdit"_ustr, SID_DB_APP_QUERY_EDIT, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBQueryOpen"_ustr, SID_DB_APP_QUERY_OPEN, CommandGroup::EDIT );
+
+ implDescribeSupportedFeature( u".uno:DBFormDelete"_ustr, SID_DB_APP_FORM_DELETE, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBFormRename"_ustr, SID_DB_APP_FORM_RENAME, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBFormEdit"_ustr, SID_DB_APP_FORM_EDIT, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBFormOpen"_ustr, SID_DB_APP_FORM_OPEN, CommandGroup::EDIT );
+
+ implDescribeSupportedFeature( u".uno:DBReportDelete"_ustr, SID_DB_APP_REPORT_DELETE, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBReportRename"_ustr, SID_DB_APP_REPORT_RENAME, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBReportEdit"_ustr, SID_DB_APP_REPORT_EDIT, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBReportOpen"_ustr, SID_DB_APP_REPORT_OPEN, CommandGroup::EDIT );
+
+ implDescribeSupportedFeature( u".uno:SelectAll"_ustr, SID_SELECTALL, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:Undo"_ustr, ID_BROWSER_UNDO, CommandGroup::EDIT );
+
+ implDescribeSupportedFeature( u".uno:Sortup"_ustr, ID_BROWSER_SORTUP, CommandGroup::VIEW );
+ implDescribeSupportedFeature( u".uno:SortDown"_ustr, ID_BROWSER_SORTDOWN, CommandGroup::VIEW );
+ implDescribeSupportedFeature( u".uno:DBRelationDesign"_ustr, SID_DB_APP_DSRELDESIGN, CommandGroup::APPLICATION );
+ implDescribeSupportedFeature( u".uno:DBUserAdmin"_ustr, SID_DB_APP_DSUSERADMIN, CommandGroup::APPLICATION );
+ implDescribeSupportedFeature( u".uno:DBTableFilter"_ustr, SID_DB_APP_TABLEFILTER, CommandGroup::APPLICATION );
+ implDescribeSupportedFeature( u".uno:DBDSProperties"_ustr, SID_DB_APP_DSPROPS, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBDSConnectionType"_ustr, SID_DB_APP_DSCONNECTION_TYPE,
CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBDSAdvancedSettings",
+ implDescribeSupportedFeature( u".uno:DBDSAdvancedSettings"_ustr,
SID_DB_APP_DSADVANCED_SETTINGS,
CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:PasteSpecial", SID_DB_APP_PASTE_SPECIAL, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBConvertToView", SID_DB_APP_CONVERTTOVIEW, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBRefreshTables", SID_DB_APP_REFRESH_TABLES, CommandGroup::APPLICATION );
- implDescribeSupportedFeature( ".uno:DBDirectSQL", ID_DIRECT_SQL, CommandGroup::APPLICATION );
- implDescribeSupportedFeature( ".uno:DBViewTables", SID_DB_APP_VIEW_TABLES, CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:DBViewQueries", SID_DB_APP_VIEW_QUERIES, CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:DBViewForms", SID_DB_APP_VIEW_FORMS, CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:DBViewReports", SID_DB_APP_VIEW_REPORTS, CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:DBDisablePreview", SID_DB_APP_DISABLE_PREVIEW,CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:DBShowDocInfoPreview",
+ implDescribeSupportedFeature( u".uno:PasteSpecial"_ustr, SID_DB_APP_PASTE_SPECIAL, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBConvertToView"_ustr, SID_DB_APP_CONVERTTOVIEW, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBRefreshTables"_ustr, SID_DB_APP_REFRESH_TABLES, CommandGroup::APPLICATION );
+ implDescribeSupportedFeature( u".uno:DBDirectSQL"_ustr, ID_DIRECT_SQL, CommandGroup::APPLICATION );
+ implDescribeSupportedFeature( u".uno:DBViewTables"_ustr, SID_DB_APP_VIEW_TABLES, CommandGroup::VIEW );
+ implDescribeSupportedFeature( u".uno:DBViewQueries"_ustr, SID_DB_APP_VIEW_QUERIES, CommandGroup::VIEW );
+ implDescribeSupportedFeature( u".uno:DBViewForms"_ustr, SID_DB_APP_VIEW_FORMS, CommandGroup::VIEW );
+ implDescribeSupportedFeature( u".uno:DBViewReports"_ustr, SID_DB_APP_VIEW_REPORTS, CommandGroup::VIEW );
+ implDescribeSupportedFeature( u".uno:DBDisablePreview"_ustr, SID_DB_APP_DISABLE_PREVIEW,CommandGroup::VIEW );
+ implDescribeSupportedFeature( u".uno:DBShowDocInfoPreview"_ustr,
SID_DB_APP_VIEW_DOCINFO_PREVIEW,
CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:DBShowDocPreview", SID_DB_APP_VIEW_DOC_PREVIEW,
+ implDescribeSupportedFeature( u".uno:DBShowDocPreview"_ustr, SID_DB_APP_VIEW_DOC_PREVIEW,
CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:OpenUrl", SID_OPENURL, CommandGroup::APPLICATION );
+ implDescribeSupportedFeature( u".uno:OpenUrl"_ustr, SID_OPENURL, CommandGroup::APPLICATION );
// this one should not appear under Tools->Customize->Keyboard
- implDescribeSupportedFeature( ".uno:DBNewReportWithPreSelection",
+ implDescribeSupportedFeature( u".uno:DBNewReportWithPreSelection"_ustr,
SID_APP_NEW_REPORT_PRE_SEL );
- implDescribeSupportedFeature( ".uno:DBDSImport", SID_DB_APP_DSIMPORT);
- implDescribeSupportedFeature( ".uno:DBDSExport", SID_DB_APP_DSEXPORT);
- implDescribeSupportedFeature( ".uno:DBDBAdmin", SID_DB_APP_DBADMIN);
+ implDescribeSupportedFeature( u".uno:DBDSImport"_ustr, SID_DB_APP_DSIMPORT);
+ implDescribeSupportedFeature( u".uno:DBDSExport"_ustr, SID_DB_APP_DSEXPORT);
+ implDescribeSupportedFeature( u".uno:DBDBAdmin"_ustr, SID_DB_APP_DBADMIN);
// status info
- implDescribeSupportedFeature( ".uno:DBStatusType", SID_DB_APP_STATUS_TYPE);
- implDescribeSupportedFeature( ".uno:DBStatusDBName", SID_DB_APP_STATUS_DBNAME);
- implDescribeSupportedFeature( ".uno:DBStatusUserName", SID_DB_APP_STATUS_USERNAME);
- implDescribeSupportedFeature( ".uno:DBStatusHostName", SID_DB_APP_STATUS_HOSTNAME);
+ implDescribeSupportedFeature( u".uno:DBStatusType"_ustr, SID_DB_APP_STATUS_TYPE);
+ implDescribeSupportedFeature( u".uno:DBStatusDBName"_ustr, SID_DB_APP_STATUS_DBNAME);
+ implDescribeSupportedFeature( u".uno:DBStatusUserName"_ustr, SID_DB_APP_STATUS_USERNAME);
+ implDescribeSupportedFeature( u".uno:DBStatusHostName"_ustr, SID_DB_APP_STATUS_HOSTNAME);
}
OApplicationView* OApplicationController::getContainer() const
@@ -2117,7 +2117,7 @@ void OApplicationController::renameEntry()
catch(const ElementExistException& e)
{
OUString sMsg(DBA_RES(STR_NAME_ALREADY_EXISTS));
- showError(SQLExceptionInfo(SQLException(sMsg.replaceAll("#", e.Message), e.Context, "S1000", 0, Any())));
+ showError(SQLExceptionInfo(SQLException(sMsg.replaceAll("#", e.Message), e.Context, u"S1000"_ustr, 0, Any())));
}
catch(const Exception& )
{
@@ -2253,7 +2253,7 @@ void OApplicationController::onDeleteEntry()
OUString OApplicationController::getContextMenuResourceName() const
{
- return "edit";
+ return u"edit"_ustr;
}
IController& OApplicationController::getCommandController()
@@ -2529,7 +2529,7 @@ void OApplicationController::OnFirstControllerConnected()
SQLException aDetail(DBA_RES(STR_SUB_DOCS_WITH_SCRIPTS_DETAIL), {}, {}, 0, {});
SQLWarning aWarning(DBA_RES(STR_SUB_DOCS_WITH_SCRIPTS), {}, {}, 0, css::uno::Any(aDetail));
- Reference< XExecutableDialog > xDialog = ErrorMessageDialog::create( getORB(), "", nullptr, Any( aWarning ) );
+ Reference< XExecutableDialog > xDialog = ErrorMessageDialog::create( getORB(), u""_ustr, nullptr, Any( aWarning ) );
xDialog->execute();
}
catch( const Exception& )
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 38c3e67dbc24..53605f046710 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -363,7 +363,7 @@ const SharedConnection& OApplicationController::ensureConnection( ::dbtools::SQL
{
if ( _pErrorInfo )
{
- *_pErrorInfo = aError;
+ *_pErrorInfo = std::move(aError);
}
else
{
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index 0f6eda11de7b..16bec3e3689d 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -109,7 +109,7 @@ void OApplicationController::convertToView(const OUString& _sName)
::dbtools::composeTableName( xMeta, sCatalog, sSchema, sName, false, ::dbtools::EComposeRule::InTableDefinitions ) );
Reference<XPropertySet> xView = ::dbaui::createView(sNewName,xConnection,xSourceObject);
if ( !xView.is() )
- throw SQLException(DBA_RES(STR_NO_TABLE_FORMAT_INSIDE),*this, "S1000",0,Any());
+ throw SQLException(DBA_RES(STR_NO_TABLE_FORMAT_INSIDE),*this, u"S1000"_ustr,0,Any());
getContainer()->elementAdded(E_TABLE,sNewName,Any(xView));
}
}
@@ -166,7 +166,7 @@ void OApplicationController::openDialog( const OUString& _sServiceName )
xWindow = VCLUnoHelper::GetInterface(getView()->Window::GetParent());
}
// the parent window
- pArgs[nArgPos++] <<= PropertyValue( "ParentWindow",
+ pArgs[nArgPos++] <<= PropertyValue( u"ParentWindow"_ustr,
0,
Any(xWindow),
PropertyState_DIRECT_VALUE);
@@ -178,7 +178,7 @@ void OApplicationController::openDialog( const OUString& _sServiceName )
if ( !sInitialSelection.isEmpty() )
{
pArgs[ nArgPos++ ] <<= PropertyValue(
- "InitialSelection", 0,
+ u"InitialSelection"_ustr, 0,
Any( sInitialSelection ), PropertyState_DIRECT_VALUE );
}
@@ -484,10 +484,10 @@ void OApplicationController::previewChanged( sal_Int32 _nMode )
try
{
::comphelper::NamedValueCollection aLayoutInfo( m_xDataSource->getPropertyValue( PROPERTY_LAYOUTINFORMATION ) );
- sal_Int32 nOldMode = aLayoutInfo.getOrDefault( "Preview", _nMode );
+ sal_Int32 nOldMode = aLayoutInfo.getOrDefault( u"Preview"_ustr, _nMode );
if ( nOldMode != _nMode )
{
- aLayoutInfo.put( "Preview", _nMode );
+ aLayoutInfo.put( u"Preview"_ustr, _nMode );
m_xDataSource->setPropertyValue( PROPERTY_LAYOUTINFORMATION, Any( aLayoutInfo.getPropertyValues() ) );
}
}
@@ -664,7 +664,7 @@ void OApplicationController::doAction(sal_uInt16 _nId, const ElementOpenMode _eO
ElementOpenMode eOpenMode = _eOpenMode;
if ( eType == E_REPORT && ElementOpenMode::Mail == _eOpenMode )
{
- aArguments.put("Hidden",true);
+ aArguments.put(u"Hidden"_ustr,true);
eOpenMode = ElementOpenMode::Normal;
}
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 6c244f202956..291786e4fa64 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -120,22 +120,22 @@ namespace
}
OAppDetailPageHelper::OAppDetailPageHelper(weld::Container* pParent, OAppBorderWindow& rBorderWin, PreviewMode ePreviewMode)
- : OChildWindow(pParent, "dbaccess/ui/detailwindow.ui", "DetailWindow")
+ : OChildWindow(pParent, u"dbaccess/ui/detailwindow.ui"_ustr, u"DetailWindow"_ustr)
, m_rBorderWin(rBorderWin)
- , m_xBox(m_xBuilder->weld_container("box"))
- , m_xFL(m_xBuilder->weld_widget("separator"))
- , m_xMBPreview(m_xBuilder->weld_menu_button("disablepreview"))
+ , m_xBox(m_xBuilder->weld_container(u"box"_ustr))
+ , m_xFL(m_xBuilder->weld_widget(u"separator"_ustr))
+ , m_xMBPreview(m_xBuilder->weld_menu_button(u"disablepreview"_ustr))
, m_xPreview(new OPreviewWindow)
- , m_xPreviewWin(new weld::CustomWeld(*m_xBuilder, "preview", *m_xPreview))
+ , m_xPreviewWin(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, *m_xPreview))
, m_xDocumentInfo(new ODocumentInfoPreview)
- , m_xDocumentInfoWin(new weld::CustomWeld(*m_xBuilder, "infopreview", *m_xDocumentInfo))
- , m_xTablePreview(m_xBuilder->weld_container("tablepreview"))
+ , m_xDocumentInfoWin(new weld::CustomWeld(*m_xBuilder, u"infopreview"_ustr, *m_xDocumentInfo))
+ , m_xTablePreview(m_xBuilder->weld_container(u"tablepreview"_ustr))
, m_ePreviewMode(ePreviewMode)
{
m_xContainer->set_stack_background();
- auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:DBDisablePreview",
- "com.sun.star.sdb.OfficeDatabaseDocument");
+ auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(u".uno:DBDisablePreview"_ustr,
+ u"com.sun.star.sdb.OfficeDatabaseDocument"_ustr);
m_xMBPreview->set_label(vcl::CommandInfoProvider::GetLabelForCommand(aProperties));
m_xMBPreview->set_help_id(HID_APP_VIEW_PREVIEW_CB);
@@ -910,7 +910,7 @@ void OAppDetailPageHelper::switchPreview(PreviewMode _eMode,bool _bForce)
break;
}
- auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aCommand, "com.sun.star.sdb.OfficeDatabaseDocument");
+ auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aCommand, u"com.sun.star.sdb.OfficeDatabaseDocument"_ustr);
OUString aCommandLabel = vcl::CommandInfoProvider::GetLabelForCommand(aProperties);
m_xMBPreview->set_label(stripTrailingDots(aCommandLabel));
@@ -1035,9 +1035,9 @@ void OAppDetailPageHelper::showPreview( const OUString& _sDataSourceName,
pDispatcher->setTargetFrame( Reference<XFrame>(m_xFrame,UNO_QUERY_THROW) );
::comphelper::NamedValueCollection aArgs;
- aArgs.put( "Preview", true );
- aArgs.put( "ReadOnly", true );
- aArgs.put( "AsTemplate", false );
+ aArgs.put( u"Preview"_ustr, true );
+ aArgs.put( u"ReadOnly"_ustr, true );
+ aArgs.put( u"AsTemplate"_ustr, false );
aArgs.put( PROPERTY_SHOWMENU, false );
Reference< XController > xPreview( pDispatcher->openExisting( Any( _sDataSourceName ), _sName, aArgs ), UNO_QUERY );
@@ -1100,12 +1100,12 @@ IMPL_LINK_NOARG(OAppDetailPageHelper, OnDropdownClickHdl, weld::Toggleable&, voi
auto xFrame = getBorderWin().getView()->getAppController().getFrame();
css::uno::Sequence<css::uno::Any> aArgs {
- css::uno::Any(comphelper::makePropertyValue("InToolbar", true)),
- css::uno::Any(comphelper::makePropertyValue("ModuleIdentifier", OUString("com.sun.star.sdb.OfficeDatabaseDocument"))),
- css::uno::Any(comphelper::makePropertyValue("Frame", xFrame)) };
+ css::uno::Any(comphelper::makePropertyValue(u"InToolbar"_ustr, true)),
+ css::uno::Any(comphelper::makePropertyValue(u"ModuleIdentifier"_ustr, u"com.sun.star.sdb.OfficeDatabaseDocument"_ustr)),
+ css::uno::Any(comphelper::makePropertyValue(u"Frame"_ustr, xFrame)) };
css::uno::Reference<css::frame::XPopupMenuController> xPopupController
- (xPopupMenuFactory->createInstanceWithArgumentsAndContext(".uno:DBPreview", aArgs, xContext), css::uno::UNO_QUERY);
+ (xPopupMenuFactory->createInstanceWithArgumentsAndContext(u".uno:DBPreview"_ustr, aArgs, xContext), css::uno::UNO_QUERY);
if (!xPopupController.is())
return;
@@ -1129,11 +1129,11 @@ IMPL_LINK_NOARG(OAppDetailPageHelper, OnDropdownClickHdl, weld::Toggleable&, voi
aTargetURL.Complete = xPopupMenu->getCommand(nItemId);
auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aTargetURL.Complete,
- "com.sun.star.sdb.OfficeDatabaseDocument");
+ u"com.sun.star.sdb.OfficeDatabaseDocument"_ustr);
m_xMBPreview->append_item(aTargetURL.Complete, vcl::CommandInfoProvider::GetLabelForCommand(aProperties));
// Add/remove status listener to get a status update once so we can remove any disabled items from the menu
- auto xDispatch = xDispatchProvider->queryDispatch(aTargetURL, "_self",
+ auto xDispatch = xDispatchProvider->queryDispatch(aTargetURL, u"_self"_ustr,
css::frame::FrameSearchFlag::SELF);
if (xDispatch.is())
{
@@ -1156,7 +1156,7 @@ IMPL_LINK(OAppDetailPageHelper, MenuSelectHdl, const OUString&, rIdent, void)
aURL.Complete = rIdent;
Reference<XDispatchProvider> xProvider(getBorderWin().getView()->getAppController().getFrame(), UNO_QUERY);
- Reference<XDispatch> xDisp = xProvider->queryDispatch(aURL, "_self", 0);
+ Reference<XDispatch> xDisp = xProvider->queryDispatch(aURL, u"_self"_ustr, 0);
xDisp->dispatch(aURL, css::uno::Sequence<css::beans::PropertyValue>());
m_xMBPreview->set_label(stripTrailingDots(m_xMBPreview->get_item_label(rIdent)));
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index 9b445d382dea..a9613e1b4b36 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -48,8 +48,8 @@ using namespace ::com::sun::star::beans;
using ::com::sun::star::util::URL;
using ::com::sun::star::sdb::application::NamedDatabaseObject;
-TaskEntry::TaskEntry( const char* _pAsciiUNOCommand, TranslateId _pHelpID, TranslateId pTitleResourceID, bool _bHideWhenDisabled )
- :sUNOCommand( OUString::createFromAscii( _pAsciiUNOCommand ) )
+TaskEntry::TaskEntry( const OUString& _rAsciiUNOCommand, TranslateId _pHelpID, TranslateId pTitleResourceID, bool _bHideWhenDisabled )
+ :sUNOCommand( _rAsciiUNOCommand )
,pHelpID( _pHelpID )
,sTitle( DBA_RES(pTitleResourceID) )
,bHideWhenDisabled( _bHideWhenDisabled )
@@ -107,10 +107,10 @@ IMPL_LINK_NOARG(OTasksWindow, OnEntrySelectHdl, weld::TreeView&, void)
}
OTasksWindow::OTasksWindow(weld::Container* pParent, OApplicationDetailView* pDetailView)
- : OChildWindow(pParent, "dbaccess/ui/taskwindow.ui", "TaskWindow")
- , m_xTreeView(m_xBuilder->weld_tree_view("treeview"))
- , m_xDescription(m_xBuilder->weld_label("description"))
- , m_xHelpText(m_xBuilder->weld_text_view("helptext"))
+ : OChildWindow(pParent, u"dbaccess/ui/taskwindow.ui"_ustr, u"TaskWindow"_ustr)
+ , m_xTreeView(m_xBuilder->weld_tree_view(u"treeview"_ustr))
+ , m_xDescription(m_xBuilder->weld_label(u"description"_ustr))
+ , m_xHelpText(m_xBuilder->weld_text_view(u"helptext"_ustr))
, m_pDetailView(pDetailView)
, m_nCursorIndex(-1)
{
@@ -150,7 +150,7 @@ void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList )
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier =
theModuleUIConfigurationManagerSupplier::get( getDetailView()->getBorderWin().getView()->getORB() );
Reference< XUIConfigurationManager > xUIConfigMgr = xModuleCfgMgrSupplier->getUIConfigurationManager(
- "com.sun.star.sdb.OfficeDatabaseDocument"
+ u"com.sun.star.sdb.OfficeDatabaseDocument"_ustr
);
Reference< XImageManager > xImageMgr( xUIConfigMgr->getImageManager(), UNO_QUERY );
@@ -194,11 +194,11 @@ void OTasksWindow::Clear()
OApplicationDetailView::OApplicationDetailView(weld::Container* pParent, OAppBorderWindow& rBorder,
PreviewMode ePreviewMode)
- : m_xBuilder(Application::CreateBuilder(pParent, "dbaccess/ui/appdetailwindow.ui"))
- , m_xContainer(m_xBuilder->weld_container("AppDetailWindow"))
- , m_xHorzSplitter(m_xBuilder->weld_paned("splitter"))
- , m_xTasksParent(m_xBuilder->weld_container("tasks"))
- , m_xContainerParent(m_xBuilder->weld_container("container"))
+ : m_xBuilder(Application::CreateBuilder(pParent, u"dbaccess/ui/appdetailwindow.ui"_ustr))
+ , m_xContainer(m_xBuilder->weld_container(u"AppDetailWindow"_ustr))
+ , m_xHorzSplitter(m_xBuilder->weld_paned(u"splitter"_ustr))
+ , m_xTasksParent(m_xBuilder->weld_container(u"tasks"_ustr))
+ , m_xContainerParent(m_xBuilder->weld_container(u"container"_ustr))
, m_xTasks(new dbaui::OTitleWindow(m_xTasksParent.get(), STR_TASKS))
, m_xTitleContainer(new dbaui::OTitleWindow(m_xContainerParent.get(), TranslateId()))
, m_rBorderWin(rBorder)
@@ -259,28 +259,28 @@ void OApplicationDetailView::impl_fillTaskPaneData(ElementType _eType, TaskPaneD
switch ( _eType )
{
case E_TABLE:
- rList.emplace_back( ".uno:DBNewTable", RID_STR_TABLES_HELP_TEXT_DESIGN, RID_STR_NEW_TABLE );
- rList.emplace_back( ".uno:DBNewTableAutoPilot", RID_STR_TABLES_HELP_TEXT_WIZARD, RID_STR_NEW_TABLE_AUTO );
- rList.emplace_back( ".uno:DBNewView", RID_STR_VIEWS_HELP_TEXT_DESIGN, RID_STR_NEW_VIEW, true );
+ rList.emplace_back( u".uno:DBNewTable"_ustr, RID_STR_TABLES_HELP_TEXT_DESIGN, RID_STR_NEW_TABLE );
+ rList.emplace_back( u".uno:DBNewTableAutoPilot"_ustr, RID_STR_TABLES_HELP_TEXT_WIZARD, RID_STR_NEW_TABLE_AUTO );
+ rList.emplace_back( u".uno:DBNewView"_ustr, RID_STR_VIEWS_HELP_TEXT_DESIGN, RID_STR_NEW_VIEW, true );
_rData.pTitleId = RID_STR_TABLES_CONTAINER;
break;
case E_FORM:
- rList.emplace_back( ".uno:DBNewForm", RID_STR_FORMS_HELP_TEXT, RID_STR_NEW_FORM );
- rList.emplace_back( ".uno:DBNewFormAutoPilot", RID_STR_FORMS_HELP_TEXT_WIZARD, RID_STR_NEW_FORM_AUTO );
+ rList.emplace_back( u".uno:DBNewForm"_ustr, RID_STR_FORMS_HELP_TEXT, RID_STR_NEW_FORM );
+ rList.emplace_back( u".uno:DBNewFormAutoPilot"_ustr, RID_STR_FORMS_HELP_TEXT_WIZARD, RID_STR_NEW_FORM_AUTO );
_rData.pTitleId = RID_STR_FORMS_CONTAINER;
break;
case E_REPORT:
- rList.emplace_back( ".uno:DBNewReport", RID_STR_REPORT_HELP_TEXT, RID_STR_NEW_REPORT, true );
- rList.emplace_back( ".uno:DBNewReportAutoPilot", RID_STR_REPORTS_HELP_TEXT_WIZARD, RID_STR_NEW_REPORT_AUTO );
+ rList.emplace_back( u".uno:DBNewReport"_ustr, RID_STR_REPORT_HELP_TEXT, RID_STR_NEW_REPORT, true );
+ rList.emplace_back( u".uno:DBNewReportAutoPilot"_ustr, RID_STR_REPORTS_HELP_TEXT_WIZARD, RID_STR_NEW_REPORT_AUTO );
_rData.pTitleId = RID_STR_REPORTS_CONTAINER;
break;
case E_QUERY:
- rList.emplace_back( ".uno:DBNewQuery", RID_STR_QUERIES_HELP_TEXT, RID_STR_NEW_QUERY );
- rList.emplace_back( ".uno:DBNewQueryAutoPilot", RID_STR_QUERIES_HELP_TEXT_WIZARD, RID_STR_NEW_QUERY_AUTO );
- rList.emplace_back( ".uno:DBNewQuerySql", RID_STR_QUERIES_HELP_TEXT_SQL, RID_STR_NEW_QUERY_SQL );
+ rList.emplace_back( u".uno:DBNewQuery"_ustr, RID_STR_QUERIES_HELP_TEXT, RID_STR_NEW_QUERY );
+ rList.emplace_back( u".uno:DBNewQueryAutoPilot"_ustr, RID_STR_QUERIES_HELP_TEXT_WIZARD, RID_STR_NEW_QUERY_AUTO );
+ rList.emplace_back( u".uno:DBNewQuerySql"_ustr, RID_STR_QUERIES_HELP_TEXT_SQL, RID_STR_NEW_QUERY_SQL );
_rData.pTitleId = RID_STR_QUERIES_CONTAINER;
break;
diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx
index f074df4401f7..18c572b1a957 100644
--- a/dbaccess/source/ui/app/AppDetailView.hxx
+++ b/dbaccess/source/ui/app/AppDetailView.hxx
@@ -47,7 +47,7 @@ namespace dbaui
// If an entry is disabled in the latter, it should also be disabled in the former.
// If an entry is *hidden* in the former, it should also be hidden in the latter.
- TaskEntry( const char* _pAsciiUNOCommand, TranslateId pHelpID, TranslateId pTitleResourceID, bool _bHideWhenDisabled = false );
+ TaskEntry( const OUString& _rAsciiUNOCommand, TranslateId pHelpID, TranslateId pTitleResourceID, bool _bHideWhenDisabled = false );
};
typedef std::vector< TaskEntry > TaskEntryList;
diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx
index ddef5a3a8ac0..b1edf21f28a6 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.cxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.cxx
@@ -31,9 +31,10 @@ using namespace ::com::sun::star::uno;
OApplicationSwapWindow::OApplicationSwapWindow(weld::Container* pParent,
OAppBorderWindow& rBorderWindow)
- : OChildWindow(pParent, "dbaccess/ui/appswapwindow.ui", "AppSwapWindow")
- , m_xIconControl(new OApplicationIconControl(m_xBuilder->weld_scrolled_window("scroll", true)))
- , m_xIconControlWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xIconControl))
+ : OChildWindow(pParent, u"dbaccess/ui/appswapwindow.ui"_ustr, u"AppSwapWindow"_ustr)
+ , m_xIconControl(
+ new OApplicationIconControl(m_xBuilder->weld_scrolled_window(u"scroll"_ustr, true)))
+ , m_xIconControlWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *m_xIconControl))
, m_eLastType(E_NONE)
, m_rBorderWin(rBorderWindow)
, m_nChangeEvent(nullptr)
diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx
index d5e604394b2f..a458a96e8dfa 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.cxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.cxx
@@ -24,11 +24,11 @@
namespace dbaui
{
OTitleWindow::OTitleWindow(weld::Container* pParent, TranslateId pTitleId)
- : m_xBuilder(Application::CreateBuilder(pParent, "dbaccess/ui/titlewindow.ui"))
- , m_xContainer(m_xBuilder->weld_container("TitleWindow"))
- , m_xTitleFrame(m_xBuilder->weld_container("titleparent"))
- , m_xTitle(m_xBuilder->weld_label("title"))
- , m_xChildContainer(m_xBuilder->weld_container("box"))
+ : m_xBuilder(Application::CreateBuilder(pParent, u"dbaccess/ui/titlewindow.ui"_ustr))
+ , m_xContainer(m_xBuilder->weld_container(u"TitleWindow"_ustr))
+ , m_xTitleFrame(m_xBuilder->weld_container(u"titleparent"_ustr))
+ , m_xTitle(m_xBuilder->weld_label(u"title"_ustr))
+ , m_xChildContainer(m_xBuilder->weld_container(u"box"_ustr))
{
setTitle(pTitleId);
diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx
index e6536beecfb8..ca2e724a1bf3 100644
--- a/dbaccess/source/ui/app/AppView.cxx
+++ b/dbaccess/source/ui/app/AppView.cxx
@@ -43,9 +43,9 @@ using namespace ::com::sun::star::container;
using ::com::sun::star::sdb::application::NamedDatabaseObject;
OAppBorderWindow::OAppBorderWindow(OApplicationView* pParent, PreviewMode ePreviewMode)
- : InterimItemWindow(pParent, "dbaccess/ui/appborderwindow.ui", "AppBorderWindow", false)
- , m_xPanelParent(m_xBuilder->weld_container("panel"))
- , m_xDetailViewParent(m_xBuilder->weld_container("detail"))
+ : InterimItemWindow(pParent, u"dbaccess/ui/appborderwindow.ui"_ustr, u"AppBorderWindow"_ustr, false)
+ , m_xPanelParent(m_xBuilder->weld_container(u"panel"_ustr))
+ , m_xDetailViewParent(m_xBuilder->weld_container(u"detail"_ustr))
, m_xView(pParent)
{
SetStyle(GetStyle() | WB_DIALOGCONTROL);
diff --git a/dbaccess/source/ui/app/DocumentInfoPreview.cxx b/dbaccess/source/ui/app/DocumentInfoPreview.cxx
index cfa79be20c1f..ed7f9f862c97 100644
--- a/dbaccess/source/ui/app/DocumentInfoPreview.cxx
+++ b/dbaccess/source/ui/app/DocumentInfoPreview.cxx
@@ -120,7 +120,7 @@ void ODocumentInfoPreview::insertEntry(
std::u16string_view title, OUString const & value)
{
if (!m_xEditEngine->GetText().isEmpty()) {
- m_xEditEngine->QuickInsertText("\n\n", InsertAtEnd(*m_xEditEngine));
+ m_xEditEngine->QuickInsertText(u"\n\n"_ustr, InsertAtEnd(*m_xEditEngine));
}
OUString caption(OUString::Concat(title) + ":\n");
diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx
index 712996e093be..de97525bcb48 100644
--- a/dbaccess/source/ui/app/subcomponentmanager.cxx
+++ b/dbaccess/source/ui/app/subcomponentmanager.cxx
@@ -107,7 +107,7 @@ namespace dbaui
Reference< XComponentSupplier > xCompSupp( i_rComponent, UNO_QUERY_THROW );
Reference< XComponent > xComponent( xCompSupp->getComponent(), UNO_QUERY_THROW );
if ( !impl_constructFrom( xComponent ) )
- throw RuntimeException("Illegal component type." );
+ throw RuntimeException(u"Illegal component type."_ustr );
xComponentCommandProcessor.set( i_rComponent, UNO_QUERY_THROW );
xDocumentDefinitionProperties.set( i_rComponent, UNO_QUERY_THROW );
}
@@ -307,14 +307,14 @@ namespace dbaui
return bSuccess;
}
- void lcl_notifySubComponentEvent( const SubComponentManager_Data& _rData, const char* _pAsciiEventName,
+ void lcl_notifySubComponentEvent( const SubComponentManager_Data& _rData, const OUString& _rAsciiEventName,
const SubComponentDescriptor& _rComponent )
{
try
{
Reference< XDocumentEventBroadcaster > xBroadcaster( _rData.m_rController.getModel(), UNO_QUERY_THROW );
xBroadcaster->notifyDocumentEvent(
- OUString::createFromAscii( _pAsciiEventName ),
+ _rAsciiEventName,
&_rData.m_rController,
Any( _rComponent.xFrame )
);
@@ -397,7 +397,7 @@ namespace dbaui
if ( aClosedComponent.is() )
{
aGuard.clear();
- lcl_notifySubComponentEvent( *m_pData, "OnSubComponentClosed", aClosedComponent );
+ lcl_notifySubComponentEvent( *m_pData, u"OnSubComponentClosed"_ustr, aClosedComponent );
}
}
@@ -474,7 +474,7 @@ namespace dbaui
// notify this to interested parties
aGuard.clear();
- lcl_notifySubComponentEvent( *m_pData, "OnSubComponentOpened", aElement );
+ lcl_notifySubComponentEvent( *m_pData, u"OnSubComponentOpened"_ustr, aElement );
}
bool SubComponentManager::activateSubFrame( const OUString& _rName, const sal_Int32 _nComponentType,
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index d9116be91886..e415e6cb5719 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -396,12 +396,12 @@ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setMode( const OUSt
OUString SAL_CALL SbaXDataBrowserController::FormControllerImpl::getMode( )
{
- return "DataMode";
+ return u"DataMode"_ustr;
}
Sequence< OUString > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getSupportedModes( )
{
- Sequence< OUString > aModes { "DataMode" };
+ Sequence< OUString > aModes { u"DataMode"_ustr };
return aModes;
}
@@ -509,7 +509,7 @@ SbaXDataBrowserController::SbaXDataBrowserController(const Reference< css::uno::
,m_aAsyncDisplayError( LINK( this, SbaXDataBrowserController, OnAsyncDisplayError ) )
,m_sStateSaveRecord(DBA_RES(RID_STR_SAVE_CURRENT_RECORD))
,m_sStateUndoRecord(DBA_RES(RID_STR_UNDO_MODIFY_RECORD))
- ,m_sModuleIdentifier( OUString( "com.sun.star.sdb.DataSourceBrowser" ) )
+ ,m_sModuleIdentifier( u"com.sun.star.sdb.DataSourceBrowser"_ustr )
,m_nFormActionNestingLevel(0)
,m_bLoadCanceled( false )
,m_bCannotSelectUnfiltered( true )
@@ -668,24 +668,24 @@ void SbaXDataBrowserController::initFormatter()
void SbaXDataBrowserController::describeSupportedFeatures()
{
SbaXDataBrowserController_Base::describeSupportedFeatures();
- implDescribeSupportedFeature( ".uno:FormSlots/undoRecord", ID_BROWSER_UNDORECORD, CommandGroup::CONTROLS );
- implDescribeSupportedFeature( ".uno:FormController/undoRecord", ID_BROWSER_UNDORECORD, CommandGroup::CONTROLS );
- implDescribeSupportedFeature( ".uno:RecUndo", ID_BROWSER_UNDORECORD, CommandGroup::CONTROLS );
- implDescribeSupportedFeature( ".uno:FormSlots/saveRecord", ID_BROWSER_SAVERECORD, CommandGroup::CONTROLS );
- implDescribeSupportedFeature( ".uno:FormController/saveRecord", ID_BROWSER_SAVERECORD, CommandGroup::CONTROLS );
- implDescribeSupportedFeature( ".uno:RecSave", ID_BROWSER_SAVERECORD, CommandGroup::CONTROLS );
- implDescribeSupportedFeature( ".uno:Save", ID_BROWSER_SAVERECORD, CommandGroup::DOCUMENT );
- implDescribeSupportedFeature( ".uno:RecSearch", SID_FM_SEARCH, CommandGroup::CONTROLS );
- implDescribeSupportedFeature( ".uno:AutoFilter", SID_FM_AUTOFILTER, CommandGroup::CONTROLS );
- implDescribeSupportedFeature( ".uno:Refresh", SID_FM_REFRESH, CommandGroup::CONTROLS );
- implDescribeSupportedFeature( ".uno:OrderCrit", SID_FM_ORDERCRIT, CommandGroup::CONTROLS );
- implDescribeSupportedFeature( ".uno:RemoveFilterSort", SID_FM_REMOVE_FILTER_SORT,CommandGroup::CONTROLS );
- implDescribeSupportedFeature( ".uno:FormFiltered", SID_FM_FORM_FILTERED, CommandGroup::CONTROLS );
- implDescribeSupportedFeature( ".uno:FilterCrit", SID_FM_FILTERCRIT, CommandGroup::CONTROLS );
- implDescribeSupportedFeature( ".uno:Sortup", ID_BROWSER_SORTUP, CommandGroup::CONTROLS );
- implDescribeSupportedFeature( ".uno:SortDown", ID_BROWSER_SORTDOWN, CommandGroup::CONTROLS );
- implDescribeSupportedFeature( ".uno:FormSlots/deleteRecord", SID_FM_DELETEROWS, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:FormSlots/insertRecord", ID_BROWSER_INSERT_ROW, CommandGroup::INSERT );
+ implDescribeSupportedFeature( u".uno:FormSlots/undoRecord"_ustr, ID_BROWSER_UNDORECORD, CommandGroup::CONTROLS );
+ implDescribeSupportedFeature( u".uno:FormController/undoRecord"_ustr, ID_BROWSER_UNDORECORD, CommandGroup::CONTROLS );
+ implDescribeSupportedFeature( u".uno:RecUndo"_ustr, ID_BROWSER_UNDORECORD, CommandGroup::CONTROLS );
+ implDescribeSupportedFeature( u".uno:FormSlots/saveRecord"_ustr, ID_BROWSER_SAVERECORD, CommandGroup::CONTROLS );
+ implDescribeSupportedFeature( u".uno:FormController/saveRecord"_ustr, ID_BROWSER_SAVERECORD, CommandGroup::CONTROLS );
+ implDescribeSupportedFeature( u".uno:RecSave"_ustr, ID_BROWSER_SAVERECORD, CommandGroup::CONTROLS );
+ implDescribeSupportedFeature( u".uno:Save"_ustr, ID_BROWSER_SAVERECORD, CommandGroup::DOCUMENT );
+ implDescribeSupportedFeature( u".uno:RecSearch"_ustr, SID_FM_SEARCH, CommandGroup::CONTROLS );
+ implDescribeSupportedFeature( u".uno:AutoFilter"_ustr, SID_FM_AUTOFILTER, CommandGroup::CONTROLS );
+ implDescribeSupportedFeature( u".uno:Refresh"_ustr, SID_FM_REFRESH, CommandGroup::CONTROLS );
+ implDescribeSupportedFeature( u".uno:OrderCrit"_ustr, SID_FM_ORDERCRIT, CommandGroup::CONTROLS );
+ implDescribeSupportedFeature( u".uno:RemoveFilterSort"_ustr, SID_FM_REMOVE_FILTER_SORT,CommandGroup::CONTROLS );
+ implDescribeSupportedFeature( u".uno:FormFiltered"_ustr, SID_FM_FORM_FILTERED, CommandGroup::CONTROLS );
+ implDescribeSupportedFeature( u".uno:FilterCrit"_ustr, SID_FM_FILTERCRIT, CommandGroup::CONTROLS );
+ implDescribeSupportedFeature( u".uno:Sortup"_ustr, ID_BROWSER_SORTUP, CommandGroup::CONTROLS );
+ implDescribeSupportedFeature( u".uno:SortDown"_ustr, ID_BROWSER_SORTDOWN, CommandGroup::CONTROLS );
+ implDescribeSupportedFeature( u".uno:FormSlots/deleteRecord"_ustr, SID_FM_DELETEROWS, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:FormSlots/insertRecord"_ustr, ID_BROWSER_INSERT_ROW, CommandGroup::INSERT );
}
bool SbaXDataBrowserController::Construct(vcl::Window* pParent)
@@ -816,14 +816,14 @@ void SbaXDataBrowserController::RemoveColumnListener(const Reference< XPropertyS
Reference< XRowSet > SbaXDataBrowserController::CreateForm()
{
return Reference< XRowSet > (
- getORB()->getServiceManager()->createInstanceWithContext("com.sun.star.form.component.Form", getORB()),
+ getORB()->getServiceManager()->createInstanceWithContext(u"com.sun.star.form.component.Form"_ustr, getORB()),
UNO_QUERY);
}
Reference< css::form::XFormComponent > SbaXDataBrowserController::CreateGridModel()
{
return Reference< css::form::XFormComponent > (
- getORB()->getServiceManager()->createInstanceWithContext("com.sun.star.form.component.GridControl", getORB()),
+ getORB()->getServiceManager()->createInstanceWithContext(u"com.sun.star.form.component.GridControl"_ustr, getORB()),
UNO_QUERY);
}
@@ -868,14 +868,13 @@ void SbaXDataBrowserController::removeModelListeners(const Reference< XControlMo
void SbaXDataBrowserController::addControlListeners(const Reference< css::awt::XControl > & _xGridControl)
{
// to ge the 'modified' for the current cell
- Reference< XModifyBroadcaster > xBroadcaster(getBrowserView()->getGridControl(), UNO_QUERY);
- if (xBroadcaster.is())
- xBroadcaster->addModifyListener(static_cast<XModifyListener*>(this));
+ rtl::Reference< SbaXGridControl > xGridControl(getBrowserView()->getGridControl() );
+ if (xGridControl.is())
+ xGridControl->addModifyListener(static_cast<XModifyListener*>(this));
// introduce ourself as dispatch provider for the grid
- Reference< XDispatchProviderInterception > xInterception(getBrowserView()->getGridControl(), UNO_QUERY);
- if (xInterception.is())
- xInterception->registerDispatchProviderInterceptor(static_cast<XDispatchProviderInterceptor*>(this));
+ if (xGridControl.is())
+ xGridControl->registerDispatchProviderInterceptor(static_cast<XDispatchProviderInterceptor*>(this));
// add as focus listener to the control (needed for the form controller functionality)
Reference< XWindow > xWindow(_xGridControl, UNO_QUERY);
@@ -929,7 +928,7 @@ void SAL_CALL SbaXDataBrowserController::focusLost(const FocusEvent& e)
m_xFormControllerImpl->m_aActivateListeners.notifyEach( &css::form::XFormControllerListener::formDeactivated, aEvt );
// commit the changes of the grid control (as we're deactivated)
- Reference< XBoundComponent > xCommitable(getBrowserView()->getGridControl(), UNO_QUERY);
+ rtl::Reference< SbaXGridControl > xCommitable(getBrowserView()->getGridControl());
if (xCommitable.is())
xCommitable->commit();
else
@@ -983,7 +982,7 @@ void SbaXDataBrowserController::disposing(const EventObject& Source)
if (getBrowserView())
{
Reference< css::awt::XControl > xSourceControl(Source.Source, UNO_QUERY);
- if (xSourceControl == getBrowserView()->getGridControl())
+ if (xSourceControl == cppu::getXWeak(getBrowserView()->getGridControl().get()))
removeControlListeners(getBrowserView()->getGridControl());
}
@@ -1239,11 +1238,11 @@ void SbaXDataBrowserController::errorOccured(const css::sdb::SQLErrorEvent& aEve
if ( m_nFormActionNestingLevel )
{
OSL_ENSURE( !m_aCurrentError.isValid(), "SbaXDataBrowserController::errorOccurred: can handle one error per transaction only!" );
- m_aCurrentError = aInfo;
+ m_aCurrentError = std::move(aInfo);
}
else
{
- m_aCurrentError = aInfo;
+ m_aCurrentError = std::move(aInfo);
m_aAsyncDisplayError.Call();
}
}
@@ -1385,7 +1384,7 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const
try
{
Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW );
- OSL_VERIFY( xRowSetProps->getPropertyValue("AllowInserts") >>= bAllowInsertions );
+ OSL_VERIFY( xRowSetProps->getPropertyValue(u"AllowInserts"_ustr) >>= bAllowInsertions );
}
catch( const Exception& )
{
@@ -1404,7 +1403,7 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const
try
{
Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW );
- OSL_VERIFY( xRowSetProps->getPropertyValue("AllowDeletes") >>= bAllowDeletions );
+ OSL_VERIFY( xRowSetProps->getPropertyValue(u"AllowDeletes"_ustr) >>= bAllowDeletions );
OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ROWCOUNT ) >>= nRowCount );
OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ISNEW ) >>= bInsertionRow );
}
@@ -1521,9 +1520,9 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const
break; // no datasource -> no edit mode
sal_Int32 nDataSourcePrivileges = ::comphelper::getINT32(xDataSourceSet->getPropertyValue(PROPERTY_PRIVILEGES));
- bool bInsertAllowedAndPossible = ((nDataSourcePrivileges & css::sdbcx::Privilege::INSERT) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowInserts"));
- bool bUpdateAllowedAndPossible = ((nDataSourcePrivileges & css::sdbcx::Privilege::UPDATE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowUpdates"));
- bool bDeleteAllowedAndPossible = ((nDataSourcePrivileges & css::sdbcx::Privilege::DELETE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowDeletes"));
+ bool bInsertAllowedAndPossible = ((nDataSourcePrivileges & css::sdbcx::Privilege::INSERT) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(u"AllowInserts"_ustr));
+ bool bUpdateAllowedAndPossible = ((nDataSourcePrivileges & css::sdbcx::Privilege::UPDATE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(u"AllowUpdates"_ustr));
+ bool bDeleteAllowedAndPossible = ((nDataSourcePrivileges & css::sdbcx::Privilege::DELETE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(u"AllowDeletes"_ustr));
if (!bInsertAllowedAndPossible && !bUpdateAllowedAndPossible && !bDeleteAllowedAndPossible)
break; // no insert/update/delete -> no edit mode
@@ -1761,7 +1760,7 @@ void SbaXDataBrowserController::ExecuteFilterSortCrit(bool bFilter)
void SbaXDataBrowserController::ExecuteSearch()
{
// calculate the control source of the active field
- Reference< css::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY);
+ rtl::Reference< SbaXGridControl > xGrid(getBrowserView()->getGridControl());
OSL_ENSURE(xGrid.is(), "SbaXDataBrowserController::ExecuteSearch : the control should have a css::form::XGrid interface !");
Reference< css::form::XGridPeer > xGridPeer(getBrowserView()->getGridControl()->getPeer(), UNO_QUERY);
@@ -1785,9 +1784,9 @@ void SbaXDataBrowserController::ExecuteSearch()
// prohibit the synchronization of the grid's display with the cursor's position
Reference< XPropertySet > xModelSet(getControlModel(), UNO_QUERY);
OSL_ENSURE(xModelSet.is(), "SbaXDataBrowserController::ExecuteSearch : no model set ?!");
- xModelSet->setPropertyValue("DisplayIsSynchron", css::uno::Any(false));
- xModelSet->setPropertyValue("AlwaysShowCursor", css::uno::Any(true));
- xModelSet->setPropertyValue("CursorColor", Any(COL_LIGHTRED));
+ xModelSet->setPropertyValue(u"DisplayIsSynchron"_ustr, css::uno::Any(false));
+ xModelSet->setPropertyValue(u"AlwaysShowCursor"_ustr, css::uno::Any(true));
+ xModelSet->setPropertyValue(u"CursorColor"_ustr, Any(COL_LIGHTRED));
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
VclPtr<AbstractFmSearchDialog> pDialog;
@@ -1801,9 +1800,9 @@ void SbaXDataBrowserController::ExecuteSearch()
pDialog.disposeAndClear();
// restore the grid's normal operating state
- xModelSet->setPropertyValue("DisplayIsSynchron", css::uno::Any(true));
- xModelSet->setPropertyValue("AlwaysShowCursor", css::uno::Any(false));
- xModelSet->setPropertyValue("CursorColor", Any());
+ xModelSet->setPropertyValue(u"DisplayIsSynchron"_ustr, css::uno::Any(true));
+ xModelSet->setPropertyValue(u"AlwaysShowCursor"_ustr, css::uno::Any(false));
+ xModelSet->setPropertyValue(u"CursorColor"_ustr, Any());
}
void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< PropertyValue >& _rArgs)
@@ -2149,8 +2148,8 @@ bool SbaXDataBrowserController::SaveModified(bool bAskFor)
{
getBrowserView()->getVclControl()->GrabFocus();
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(getFrameWeld(), "dbaccess/ui/savemodifieddialog.ui"));
- std::unique_ptr<weld::MessageDialog> xQry(xBuilder->weld_message_dialog("SaveModifiedDialog"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(getFrameWeld(), u"dbaccess/ui/savemodifieddialog.ui"_ustr));
+ std::unique_ptr<weld::MessageDialog> xQry(xBuilder->weld_message_dialog(u"SaveModifiedDialog"_ustr));
switch (xQry->run())
{
case RET_NO:
@@ -2278,7 +2277,7 @@ Reference< XPropertySet > SbaXDataBrowserController::getBoundField() const
Reference< XPropertySet > xEmptyReturn;
// get the current column from the grid
- Reference< css::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY);
+ rtl::Reference< SbaXGridControl > xGrid(getBrowserView()->getGridControl());
if (!xGrid.is())
return xEmptyReturn;
sal_uInt16 nViewPos = xGrid->getCurrentColumnPosition();
@@ -2298,7 +2297,7 @@ Reference< XPropertySet > SbaXDataBrowserController::getBoundField() const
IMPL_LINK(SbaXDataBrowserController, OnSearchContextRequest, FmSearchContext&, rContext, sal_uInt32)
{
- Reference< css::container::XIndexAccess > xPeerContainer(getBrowserView()->getGridControl(), UNO_QUERY);
+ rtl::Reference< SbaXGridControl > xPeerContainer(getBrowserView()->getGridControl());
// check all grid columns for their control source
Reference< css::container::XIndexAccess > xModelColumns(getFormComponent(), UNO_QUERY);
@@ -2353,9 +2352,9 @@ IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation&, rIn
// let the grid sync its display with the cursor
Reference< XPropertySet > xModelSet(getControlModel(), UNO_QUERY);
OSL_ENSURE(xModelSet.is(), "SbaXDataBrowserController::OnFoundData : no model set ?!");
- Any aOld = xModelSet->getPropertyValue("DisplayIsSynchron");
- xModelSet->setPropertyValue("DisplayIsSynchron", css::uno::Any(true));
- xModelSet->setPropertyValue("DisplayIsSynchron", aOld);
+ Any aOld = xModelSet->getPropertyValue(u"DisplayIsSynchron"_ustr);
+ xModelSet->setPropertyValue(u"DisplayIsSynchron"_ustr, css::uno::Any(true));
+ xModelSet->setPropertyValue(u"DisplayIsSynchron"_ustr, aOld);
// and move to the field
Reference< css::container::XIndexAccess > aColumnControls(getBrowserView()->getGridControl()->getPeer(), UNO_QUERY);
@@ -2373,7 +2372,7 @@ IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation&, rIn
}
}
- Reference< css::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY);
+ rtl::Reference< SbaXGridControl > xGrid(getBrowserView()->getGridControl());
xGrid->setCurrentColumnPosition(nViewPos); //TODO: sal_Int32 -> sal_Int16!
}
@@ -2397,9 +2396,9 @@ IMPL_LINK(SbaXDataBrowserController, OnCanceledNotFound, FmFoundRecordInformatio
// let the grid sync its display with the cursor
Reference< XPropertySet > xModelSet(getControlModel(), UNO_QUERY);
OSL_ENSURE(xModelSet.is(), "SbaXDataBrowserController::OnCanceledNotFound : no model set ?!");
- Any aOld = xModelSet->getPropertyValue("DisplayIsSynchron");
- xModelSet->setPropertyValue("DisplayIsSynchron", css::uno::Any(true));
- xModelSet->setPropertyValue("DisplayIsSynchron", aOld);
+ Any aOld = xModelSet->getPropertyValue(u"DisplayIsSynchron"_ustr);
+ xModelSet->setPropertyValue(u"DisplayIsSynchron"_ustr, css::uno::Any(true));
+ xModelSet->setPropertyValue(u"DisplayIsSynchron"_ustr, aOld);
}
catch( const Exception& )
{
@@ -2558,7 +2557,7 @@ bool SbaXDataBrowserController::isValidCursor() const
sal_Int16 SbaXDataBrowserController::getCurrentColumnPosition() const
{
- Reference< css::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY);
+ rtl::Reference< SbaXGridControl > xGrid(getBrowserView()->getGridControl());
sal_Int16 nViewPos = -1;
try
{
@@ -2571,7 +2570,7 @@ sal_Int16 SbaXDataBrowserController::getCurrentColumnPosition() const
void SbaXDataBrowserController::setCurrentColumnPosition( sal_Int16 _nPos )
{
- Reference< css::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY);
+ rtl::Reference< SbaXGridControl > xGrid(getBrowserView()->getGridControl());
try
{
if ( -1 != _nPos )
diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx
index 19ec1ef44a5a..c6be017b60f3 100644
--- a/dbaccess/source/ui/browser/brwview.cxx
+++ b/dbaccess/source/ui/browser/brwview.cxx
@@ -87,10 +87,8 @@ void UnoDataBrowserView::Construct(const Reference< css::awt::XControlModel >& x
OSL_ENSURE(m_xGrid.is(), "UnoDataBrowserView::Construct : could not create a grid control !");
// in design mode (for the moment)
m_xGrid->setDesignMode(true);
-
- Reference< css::awt::XWindow > xGridWindow(m_xGrid, UNO_QUERY);
- xGridWindow->setVisible(true);
- xGridWindow->setEnable(true);
+ m_xGrid->setVisible(true);
+ m_xGrid->setEnable(true);
// introduce the model to the grid
m_xGrid->setModel(xModel);
@@ -225,9 +223,8 @@ void UnoDataBrowserView::resizeDocumentView(tools::Rectangle& _rPlayground)
}
// set the size of grid control
- Reference< css::awt::XWindow > xGridAsWindow(m_xGrid, UNO_QUERY);
- if (xGridAsWindow.is())
- xGridAsWindow->setPosSize( aSplitPos.X() + aSplitSize.Width(), aPlaygroundPos.Y(),
+ if (m_xGrid.is())
+ m_xGrid->setPosSize( aSplitPos.X() + aSplitSize.Width(), aPlaygroundPos.Y(),
aPlaygroundSize.Width() - aSplitSize.Width() - aSplitPos.X(), aPlaygroundSize.Height(), css::awt::PosSize::POSSIZE);
// just for completeness: there is no space left, we occupied it all ...
diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx
index 84716351d45a..23657f196839 100644
--- a/dbaccess/source/ui/browser/dataview.cxx
+++ b/dbaccess/source/ui/browser/dataview.cxx
@@ -131,7 +131,7 @@ namespace dbaui
if ( xModel.is() )
{
::comphelper::NamedValueCollection aArgs( xModel->getArgs() );
- aArgs.remove( "Hidden" );
+ aArgs.remove( u"Hidden"_ustr );
xModel->attachResource( xModel->getURL(), aArgs.getPropertyValues() );
}
}
diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx
index 4199683b44d2..ba4e206d446c 100644
--- a/dbaccess/source/ui/browser/dbloader.cxx
+++ b/dbaccess/source/ui/browser/dbloader.cxx
@@ -92,7 +92,7 @@ org_openoffice_comp_dbu_DBContentLoader_get_implementation(
// XServiceInfo
OUString SAL_CALL DBContentLoader::getImplementationName()
{
- return "org.openoffice.comp.dbu.DBContentLoader";
+ return u"org.openoffice.comp.dbu.DBContentLoader"_ustr;
}
// XServiceInfo
@@ -104,7 +104,7 @@ sal_Bool SAL_CALL DBContentLoader::supportsService(const OUString& ServiceName)
// XServiceInfo
Sequence< OUString > SAL_CALL DBContentLoader::getSupportedServiceNames()
{
- return { "com.sun.star.frame.FrameLoader", "com.sun.star.sdb.ContentLoader" };
+ return { u"com.sun.star.frame.FrameLoader"_ustr, u"com.sun.star.sdb.ContentLoader"_ustr };
}
void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OUString& rURL,
@@ -117,14 +117,14 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
static constexpr struct ServiceNameToImplName
{
OUString sServiceName;
- const char* pAsciiImplementationName;
+ OUString aAsciiImplementationName;
} aImplementations[] = {
- { URL_COMPONENT_FORMGRIDVIEW, "org.openoffice.comp.dbu.OFormGridView" },
- { URL_COMPONENT_DATASOURCEBROWSER, "org.openoffice.comp.dbu.ODatasourceBrowser" },
- { URL_COMPONENT_QUERYDESIGN, "org.openoffice.comp.dbu.OQueryDesign" },
- { URL_COMPONENT_TABLEDESIGN, "org.openoffice.comp.dbu.OTableDesign" },
- { URL_COMPONENT_RELATIONDESIGN, "org.openoffice.comp.dbu.ORelationDesign" },
- { URL_COMPONENT_VIEWDESIGN, "org.openoffice.comp.dbu.OViewDesign" }
+ { URL_COMPONENT_FORMGRIDVIEW, u"org.openoffice.comp.dbu.OFormGridView"_ustr },
+ { URL_COMPONENT_DATASOURCEBROWSER, u"org.openoffice.comp.dbu.ODatasourceBrowser"_ustr },
+ { URL_COMPONENT_QUERYDESIGN, u"org.openoffice.comp.dbu.OQueryDesign"_ustr },
+ { URL_COMPONENT_TABLEDESIGN, u"org.openoffice.comp.dbu.OTableDesign"_ustr },
+ { URL_COMPONENT_RELATIONDESIGN, u"org.openoffice.comp.dbu.ORelationDesign"_ustr },
+ { URL_COMPONENT_VIEWDESIGN, u"org.openoffice.comp.dbu.OViewDesign"_ustr }
};
INetURLObject aParser( rURL );
@@ -136,7 +136,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
if ( sComponentURL == aImplementation.sServiceName )
{
xController.set( m_xContext->getServiceManager()->
- createInstanceWithContext( OUString::createFromAscii( aImplementation.pAsciiImplementationName ), m_xContext), UNO_QUERY_THROW );
+ createInstanceWithContext( aImplementation.aAsciiImplementationName, m_xContext), UNO_QUERY_THROW );
break;
}
}
@@ -148,7 +148,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
if ( sComponentURL == URL_COMPONENT_DATASOURCEBROWSER )
{
- bool bDisableBrowser = !aLoadArgs.getOrDefault( "ShowTreeViewButton", true ) // compatibility name
+ bool bDisableBrowser = !aLoadArgs.getOrDefault( u"ShowTreeViewButton"_ustr, true ) // compatibility name
|| !aLoadArgs.getOrDefault( PROPERTY_ENABLE_BROWSER, true );
if ( bDisableBrowser )
@@ -156,7 +156,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
try
{
Reference< XModule > xModule( xController, UNO_QUERY_THROW );
- xModule->setIdentifier( "com.sun.star.sdb.TableDataView" );
+ xModule->setIdentifier( u"com.sun.star.sdb.TableDataView"_ustr );
}
catch( const Exception& )
{
@@ -167,14 +167,14 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
if ( sComponentURL == URL_COMPONENT_REPORTDESIGN )
{
- bool bPreview = aLoadArgs.getOrDefault( "Preview", false );
+ bool bPreview = aLoadArgs.getOrDefault( u"Preview"_ustr, false );
if ( bPreview )
{ // report designs cannot be previewed
if ( rListener.is() )
rListener->loadCancelled( this );
return;
}
- Reference< XModel > xReportModel( aLoadArgs.getOrDefault( "Model", Reference< XModel >() ) );
+ Reference< XModel > xReportModel( aLoadArgs.getOrDefault( u"Model"_ustr, Reference< XModel >() ) );
if ( xReportModel.is() )
{
xController.set( ReportDesign::create( m_xContext ) );
@@ -186,9 +186,9 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
Reference< XModel > xDatabaseDocument;
if ( bSuccess )
{
- Reference< XDataSource > xDataSource ( aLoadArgs.getOrDefault( "DataSource", Reference< XDataSource >() ) );
- OUString sDataSourceName( aLoadArgs.getOrDefault( "DataSourceName", OUString() ) );
- Reference< XConnection > xConnection ( aLoadArgs.getOrDefault( "ActiveConnection", Reference< XConnection >() ) );
+ Reference< XDataSource > xDataSource ( aLoadArgs.getOrDefault( u"DataSource"_ustr, Reference< XDataSource >() ) );
+ OUString sDataSourceName( aLoadArgs.getOrDefault( u"DataSourceName"_ustr, OUString() ) );
+ Reference< XConnection > xConnection ( aLoadArgs.getOrDefault( u"ActiveConnection"_ustr, Reference< XConnection >() ) );
if ( xDataSource.is() )
{
xDatabaseDocument.set( getDataSourceOrModel( xDataSource ), UNO_QUERY );
@@ -215,7 +215,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
try
{
Reference<XInitialization > xIni(xController,UNO_QUERY);
- PropertyValue aFrame("Frame",0,Any(rFrame),PropertyState_DIRECT_VALUE);
+ PropertyValue aFrame(u"Frame"_ustr,0,Any(rFrame),PropertyState_DIRECT_VALUE);
Sequence< Any > aInitArgs(m_aArgs.getLength()+1);
Any* pBegin = aInitArgs.getArray();
diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
index 475768d0f8b8..f2c4dc949c64 100644
--- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
+++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
@@ -106,28 +106,28 @@ void SbaTableQueryBrowser::describeSupportedFeatures()
{
SbaXDataBrowserController::describeSupportedFeatures();
- implDescribeSupportedFeature( ".uno:Title", ID_BROWSER_TITLE );
+ implDescribeSupportedFeature( u".uno:Title"_ustr, ID_BROWSER_TITLE );
if ( !m_bShowMenu )
{
- implDescribeSupportedFeature( ".uno:DSBEditDB", ID_TREE_EDIT_DATABASE );
- implDescribeSupportedFeature( ".uno:DSBCloseConnection", ID_TREE_CLOSE_CONN );
- implDescribeSupportedFeature( ".uno:DSBAdministrate", ID_TREE_ADMINISTRATE );
+ implDescribeSupportedFeature( u".uno:DSBEditDB"_ustr, ID_TREE_EDIT_DATABASE );
+ implDescribeSupportedFeature( u".uno:DSBCloseConnection"_ustr, ID_TREE_CLOSE_CONN );
+ implDescribeSupportedFeature( u".uno:DSBAdministrate"_ustr, ID_TREE_ADMINISTRATE );
- implDescribeSupportedFeature( ".uno:DSBrowserExplorer", ID_BROWSER_EXPLORER, CommandGroup::VIEW );
+ implDescribeSupportedFeature( u".uno:DSBrowserExplorer"_ustr, ID_BROWSER_EXPLORER, CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:DSBFormLetter", ID_BROWSER_FORMLETTER, CommandGroup::DOCUMENT );
- implDescribeSupportedFeature( ".uno:DSBInsertColumns", ID_BROWSER_INSERTCOLUMNS, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:DSBInsertContent", ID_BROWSER_INSERTCONTENT, CommandGroup::INSERT );
- implDescribeSupportedFeature( ".uno:DSBDocumentDataSource", ID_BROWSER_DOCUMENT_DATASOURCE, CommandGroup::VIEW );
+ implDescribeSupportedFeature( u".uno:DSBFormLetter"_ustr, ID_BROWSER_FORMLETTER, CommandGroup::DOCUMENT );
+ implDescribeSupportedFeature( u".uno:DSBInsertColumns"_ustr, ID_BROWSER_INSERTCOLUMNS, CommandGroup::INSERT );
+ implDescribeSupportedFeature( u".uno:DSBInsertContent"_ustr, ID_BROWSER_INSERTCONTENT, CommandGroup::INSERT );
+ implDescribeSupportedFeature( u".uno:DSBDocumentDataSource"_ustr, ID_BROWSER_DOCUMENT_DATASOURCE, CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:DataSourceBrowser/FormLetter", ID_BROWSER_FORMLETTER );
- implDescribeSupportedFeature( ".uno:DataSourceBrowser/InsertColumns", ID_BROWSER_INSERTCOLUMNS );
- implDescribeSupportedFeature( ".uno:DataSourceBrowser/InsertContent", ID_BROWSER_INSERTCONTENT );
- implDescribeSupportedFeature( ".uno:DataSourceBrowser/DocumentDataSource", ID_BROWSER_DOCUMENT_DATASOURCE );
+ implDescribeSupportedFeature( u".uno:DataSourceBrowser/FormLetter"_ustr, ID_BROWSER_FORMLETTER );
+ implDescribeSupportedFeature( u".uno:DataSourceBrowser/InsertColumns"_ustr, ID_BROWSER_INSERTCOLUMNS );
+ implDescribeSupportedFeature( u".uno:DataSourceBrowser/InsertContent"_ustr, ID_BROWSER_INSERTCONTENT );
+ implDescribeSupportedFeature( u".uno:DataSourceBrowser/DocumentDataSource"_ustr, ID_BROWSER_DOCUMENT_DATASOURCE );
}
- implDescribeSupportedFeature( ".uno:CloseWin", ID_BROWSER_CLOSE, CommandGroup::DOCUMENT );
- implDescribeSupportedFeature( ".uno:DBRebuildData", ID_BROWSER_REFRESH_REBUILD, CommandGroup::DATA );
+ implDescribeSupportedFeature( u".uno:CloseWin"_ustr, ID_BROWSER_CLOSE, CommandGroup::DOCUMENT );
+ implDescribeSupportedFeature( u".uno:DBRebuildData"_ustr, ID_BROWSER_REFRESH_REBUILD, CommandGroup::DATA );
}
sal_Int32 SbaTableQueryBrowser::getDatabaseObjectType( EntryType _eType )
diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx
index 1beb1b5f2dd7..ffcf40e3c91d 100644
--- a/dbaccess/source/ui/browser/exsrcbrw.cxx
+++ b/dbaccess/source/ui/browser/exsrcbrw.cxx
@@ -71,12 +71,12 @@ SbaExternalSourceBrowser::~SbaExternalSourceBrowser()
css::uno::Sequence<OUString> SAL_CALL SbaExternalSourceBrowser::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.FormGridView" };
+ return { u"com.sun.star.sdb.FormGridView"_ustr };
}
OUString SAL_CALL SbaExternalSourceBrowser::getImplementationName()
{
- return "org.openoffice.comp.dbu.OFormGridView";
+ return u"org.openoffice.comp.dbu.OFormGridView"_ustr;
}
Reference< XRowSet > SbaExternalSourceBrowser::CreateForm()
diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx
index 24791b44fff5..2d5d526ba9c1 100644
--- a/dbaccess/source/ui/browser/formadapter.cxx
+++ b/dbaccess/source/ui/browser/formadapter.cxx
@@ -224,7 +224,7 @@ void SbaXFormAdapter::StartListening()
{
Reference< css::beans::XMultiPropertySet > xBroadcaster(m_xMainForm, UNO_QUERY);
if (xBroadcaster.is())
- xBroadcaster->addPropertiesChangeListener(css::uno::Sequence<OUString>{""}, &m_aPropertiesChangeListeners);
+ xBroadcaster->addPropertiesChangeListener(css::uno::Sequence<OUString>{u""_ustr}, &m_aPropertiesChangeListeners);
}
// log off ourself
@@ -297,8 +297,6 @@ sal_Int32 SAL_CALL SbaXFormAdapter::findColumn(const OUString& columnName)
return xIface->findColumn(columnName);
::dbtools::throwInvalidColumnException( columnName, *this );
- assert(false);
- return 0; // Never reached
}
// css::sdbcx::XColumnsSupplier
@@ -1424,7 +1422,7 @@ void SAL_CALL SbaXFormAdapter::addPropertiesChangeListener(const Sequence< OUStr
{
Reference< css::beans::XMultiPropertySet > xBroadcaster(m_xMainForm, UNO_QUERY);
if (xBroadcaster.is())
- xBroadcaster->addPropertiesChangeListener(Sequence< OUString>{""}, &m_aPropertiesChangeListeners);
+ xBroadcaster->addPropertiesChangeListener(Sequence< OUString>{u""_ustr}, &m_aPropertiesChangeListeners);
}
}
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index 189432f70abf..8105181d4eb8 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -79,7 +79,7 @@ void OGenericUnoController::executeUserDefinedFeatures( const URL& _rFeatureURL,
Reference< XDispatchProvider > xDispatchProvider( xController->getFrame(), UNO_QUERY_THROW );
Reference< XDispatch > xDispatch( xDispatchProvider->queryDispatch(
_rFeatureURL,
- "_self",
+ u"_self"_ustr,
FrameSearchFlag::AUTO
) );
@@ -196,20 +196,20 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen
try
{
if ( !xFrame.is() )
- throw IllegalArgumentException("need a frame", *this, 1 );
+ throw IllegalArgumentException(u"need a frame"_ustr, *this, 1 );
Reference<XWindow> xParent = xFrame->getContainerWindow();
VclPtr<vcl::Window> pParentWin = VCLUnoHelper::GetWindow(xParent);
if (!pParentWin)
{
- throw IllegalArgumentException("Parent window is null", *this, 1 );
+ throw IllegalArgumentException(u"Parent window is null"_ustr, *this, 1 );
}
Construct( pParentWin );
ODataView* pView = getView();
if ( !pView )
- throw RuntimeException("unable to create a view", *this );
+ throw RuntimeException(u"unable to create a view"_ustr, *this );
if ( m_bReadOnly || m_bPreview )
pView->EnableInput( false );
@@ -281,7 +281,7 @@ Reference<XSidebarProvider> SAL_CALL OGenericUnoController::getSidebar()
OUString SAL_CALL OGenericUnoController::getViewControllerName()
{
- return "Default";
+ return u"Default"_ustr;
}
Sequence< PropertyValue > SAL_CALL OGenericUnoController::getCreationArguments()
@@ -724,11 +724,11 @@ void OGenericUnoController::implDescribeSupportedFeature( const OUString& _rComm
void OGenericUnoController::describeSupportedFeatures()
{
// add all supported features
- implDescribeSupportedFeature( ".uno:Copy", ID_BROWSER_COPY, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:Cut", ID_BROWSER_CUT, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:Paste", ID_BROWSER_PASTE, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:ClipboardFormatItems", ID_BROWSER_CLIPBOARD_FORMAT_ITEMS );
- implDescribeSupportedFeature( ".uno:DSBEditDoc", ID_BROWSER_EDITDOC, CommandGroup::DOCUMENT );
+ implDescribeSupportedFeature( u".uno:Copy"_ustr, ID_BROWSER_COPY, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:Cut"_ustr, ID_BROWSER_CUT, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:Paste"_ustr, ID_BROWSER_PASTE, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:ClipboardFormatItems"_ustr, ID_BROWSER_CLIPBOARD_FORMAT_ITEMS );
+ implDescribeSupportedFeature( u".uno:DSBEditDoc"_ustr, ID_BROWSER_EDITDOC, CommandGroup::DOCUMENT );
}
FeatureState OGenericUnoController::GetState( sal_uInt16 _nId ) const
@@ -868,7 +868,7 @@ Reference< XLayoutManager > OGenericUnoController::getLayoutManager(const Refere
{
try
{
- xLayoutManager.set(xPropSet->getPropertyValue("LayoutManager"),UNO_QUERY);
+ xLayoutManager.set(xPropSet->getPropertyValue(u"LayoutManager"_ustr),UNO_QUERY);
}
catch ( Exception& )
{
@@ -883,8 +883,8 @@ void OGenericUnoController::loadMenu(const Reference< XFrame >& _xFrame)
if ( xLayoutManager.is() )
{
xLayoutManager->lock();
- xLayoutManager->createElement( "private:resource/menubar/menubar" );
- xLayoutManager->createElement( "private:resource/toolbar/toolbar" );
+ xLayoutManager->createElement( u"private:resource/menubar/menubar"_ustr );
+ xLayoutManager->createElement( u"private:resource/toolbar/toolbar"_ustr );
xLayoutManager->unlock();
xLayoutManager->doLayout();
}
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 132488ec0af4..58017ff4c24c 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -80,8 +80,8 @@ com_sun_star_comp_dbu_SbaXGridControl_get_implementation(
css::uno::Sequence<OUString> SAL_CALL SbaXGridControl::getSupportedServiceNames()
{
- return { "com.sun.star.form.control.InteractionGridControl", "com.sun.star.form.control.GridControl",
- "com.sun.star.awt.UnoControl" };
+ return { u"com.sun.star.form.control.InteractionGridControl"_ustr, u"com.sun.star.form.control.GridControl"_ustr,
+ u"com.sun.star.awt.UnoControl"_ustr };
}
@@ -89,7 +89,7 @@ css::uno::Sequence<OUString> SAL_CALL SbaXGridControl::getSupportedServiceNames(
OUString SAL_CALL SbaXGridControl::getImplementationName()
{
- return "com.sun.star.comp.dbu.SbaXGridControl";
+ return u"com.sun.star.comp.dbu.SbaXGridControl"_ustr;
}
SbaXGridControl::SbaXGridControl(const Reference< XComponentContext >& _rM)
@@ -551,10 +551,10 @@ void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, weld::Menu& r
if (bDBIsReadOnly)
{
- rMenu.set_visible("hide", false);
- rMenu.set_sensitive("hide", false);
- rMenu.set_visible("show", false);
- rMenu.set_sensitive("show", false);
+ rMenu.set_visible(u"hide"_ustr, false);
+ rMenu.set_sensitive(u"hide"_ustr, false);
+ rMenu.set_visible(u"show"_ustr, false);
+ rMenu.set_sensitive(u"show"_ustr, false);
}
// prepend some new items
@@ -580,15 +580,15 @@ void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, weld::Menu& r
case DataType::REF:
break;
default:
- rMenu.insert(nPos++, "colattrset", DBA_RES(RID_STR_COLUMN_FORMAT),
+ rMenu.insert(nPos++, u"colattrset"_ustr, DBA_RES(RID_STR_COLUMN_FORMAT),
nullptr, nullptr, nullptr, TRISTATE_INDET);
- rMenu.insert_separator(nPos++, "separator1");
+ rMenu.insert_separator(nPos++, u"separator1"_ustr);
}
}
- rMenu.insert(nPos++, "colwidth", DBA_RES(RID_STR_COLUMN_WIDTH),
+ rMenu.insert(nPos++, u"colwidth"_ustr, DBA_RES(RID_STR_COLUMN_WIDTH),
nullptr, nullptr, nullptr, TRISTATE_INDET);
- rMenu.insert_separator(nPos++, "separator2");
+ rMenu.insert_separator(nPos++, u"separator2"_ustr);
}
void SbaGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const weld::Menu& rMenu, const OUString& rExecutionResult)
@@ -645,18 +645,18 @@ void SbaGridControl::PreExecuteRowContextMenu(weld::Menu& rMenu)
if (!IsReadOnlyDB())
{
- rMenu.insert(nPos++, "tableattr", DBA_RES(RID_STR_TABLE_FORMAT),
+ rMenu.insert(nPos++, u"tableattr"_ustr, DBA_RES(RID_STR_TABLE_FORMAT),
nullptr, nullptr, nullptr, TRISTATE_INDET);
- rMenu.insert(nPos++, "rowheight", DBA_RES(RID_STR_ROW_HEIGHT),
+ rMenu.insert(nPos++, u"rowheight"_ustr, DBA_RES(RID_STR_ROW_HEIGHT),
nullptr, nullptr, nullptr, TRISTATE_INDET);
- rMenu.insert_separator(nPos++, "separator1");
+ rMenu.insert_separator(nPos++, u"separator1"_ustr);
}
if ( GetSelectRowCount() > 0 )
{
- rMenu.insert(nPos++, "copy", DBA_RES(RID_STR_COPY),
+ rMenu.insert(nPos++, u"copy"_ustr, DBA_RES(RID_STR_COPY),
nullptr, nullptr, nullptr, TRISTATE_INDET);
- rMenu.insert_separator(nPos++, "separator2");
+ rMenu.insert_separator(nPos++, u"separator2"_ustr);
}
}
@@ -775,10 +775,10 @@ void SbaGridControl::SetBrowserAttrs()
{
Reference< XComponentContext > xContext = getContext();
css::uno::Sequence<css::uno::Any> aArguments{
- Any(comphelper::makePropertyValue("IntrospectedObject", xGridModel)),
- Any(comphelper::makePropertyValue("ParentWindow", VCLUnoHelper::GetInterface(this)))
+ Any(comphelper::makePropertyValue(u"IntrospectedObject"_ustr, xGridModel)),
+ Any(comphelper::makePropertyValue(u"ParentWindow"_ustr, VCLUnoHelper::GetInterface(this)))
};
- Reference<XExecutableDialog> xExecute(xContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.form.ControlFontDialog",
+ Reference<XExecutableDialog> xExecute(xContext->getServiceManager()->createInstanceWithArgumentsAndContext(u"com.sun.star.form.ControlFontDialog"_ustr,
aArguments, xContext), css::uno::UNO_QUERY_THROW);
xExecute->execute();
}
@@ -898,7 +898,7 @@ void SbaGridControl::MouseButtonDown( const BrowserMouseEvent& rMEvt)
{
sal_Int32 nRow = GetRowAtYPosPixel(rMEvt.GetPosPixel().Y());
sal_uInt16 nColPos = GetColumnAtXPosPixel(rMEvt.GetPosPixel().X());
- sal_uInt16 nViewPos = (nColPos == BROWSER_INVALIDID) ? sal_uInt16(-1) : nColPos-1;
+ sal_uInt16 nViewPos = (nColPos == BROWSER_INVALIDID) ? sal_uInt16(-1) : sal_uInt16(nColPos - 1);
// 'the handle column' and 'no valid column' will both result in a view position of -1 !
bool bHitEmptySpace = (nRow > GetRowCount()) || (nViewPos == sal_uInt16(-1));
@@ -924,7 +924,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
// my laziness says 'do it here'...)
sal_Int32 nRow = GetRowAtYPosPixel(_rPosPixel.Y());
sal_uInt16 nColPos = GetColumnAtXPosPixel(_rPosPixel.X());
- sal_uInt16 nViewPos = (nColPos == BROWSER_INVALIDID) ? sal_uInt16(-1) : nColPos-1;
+ sal_uInt16 nViewPos = (nColPos == BROWSER_INVALIDID) ? sal_uInt16(-1) : sal_uInt16(nColPos-1);
// 'the handle column' and 'no valid column' will both result in a view position of -1 !
bool bCurrentRowVirtual = IsCurrentAppending() && IsModified();
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 889c168247f0..b6d18610011c 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -151,12 +151,12 @@ static void SafeRemovePropertyListener(const Reference< XPropertySet > & xSet, c
OUString SAL_CALL SbaTableQueryBrowser::getImplementationName()
{
- return "org.openoffice.comp.dbu.ODatasourceBrowser";
+ return u"org.openoffice.comp.dbu.ODatasourceBrowser"_ustr;
}
css::uno::Sequence<OUString> SAL_CALL SbaTableQueryBrowser::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.DataSourceBrowser" };
+ return { u"com.sun.star.sdb.DataSourceBrowser"_ustr };
}
SbaTableQueryBrowser::SbaTableQueryBrowser(const Reference< XComponentContext >& _rM)
@@ -417,7 +417,7 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow()
{
// reset the complete order statement at both the row set and the parser
xRowSetProps->setPropertyValue( PROPERTY_ORDER, Any( OUString() ) );
- xComposer->setOrder( "" );
+ xComposer->setOrder( u""_ustr );
}
// check if the columns participating in the filter refer to existing tables
@@ -523,9 +523,9 @@ void SbaTableQueryBrowser::initializePreviewMode()
Reference< XPropertySet > xDataSourceSet(getRowSet(), UNO_QUERY);
if ( xDataSourceSet.is() )
{
- xDataSourceSet->setPropertyValue("AllowInserts",Any(false));
- xDataSourceSet->setPropertyValue("AllowUpdates",Any(false));
- xDataSourceSet->setPropertyValue("AllowDeletes",Any(false));
+ xDataSourceSet->setPropertyValue(u"AllowInserts"_ustr,Any(false));
+ xDataSourceSet->setPropertyValue(u"AllowUpdates"_ustr,Any(false));
+ xDataSourceSet->setPropertyValue(u"AllowDeletes"_ustr,Any(false));
}
}
@@ -1055,7 +1055,7 @@ OUString SbaTableQueryBrowser::getDataSourceAccessor(const weld::TreeIter& rData
{
weld::TreeView& rTreeView = m_pTreeView->GetWidget();
DBTreeListUserData* pData = weld::fromId<DBTreeListUserData*>(rTreeView.get_id(rDataSourceEntry));
- OSL_ENSURE( pData, "SbaTableQueryBrowser::getDataSourceAccessor: invalid entry data!" );
+ assert(pData && "SbaTableQueryBrowser::getDataSourceAccessor: invalid entry data!");
OSL_ENSURE( pData->eType == etDatasource, "SbaTableQueryBrowser::getDataSourceAccessor: entry does not denote a data source!" );
return !pData->sAccessor.isEmpty() ? pData->sAccessor : GetEntryText(rDataSourceEntry);
}
@@ -1226,23 +1226,23 @@ void SbaTableQueryBrowser::connectExternalDispatches()
if ( m_aExternalFeatures.empty() )
{
- const char* pURLs[] = {
- ".uno:DataSourceBrowser/DocumentDataSource",
- ".uno:DataSourceBrowser/FormLetter",
- ".uno:DataSourceBrowser/InsertColumns",
- ".uno:DataSourceBrowser/InsertContent",
+ constexpr OUString aURLs[] {
+ u".uno:DataSourceBrowser/DocumentDataSource"_ustr,
+ u".uno:DataSourceBrowser/FormLetter"_ustr,
+ u".uno:DataSourceBrowser/InsertColumns"_ustr,
+ u".uno:DataSourceBrowser/InsertContent"_ustr,
};
- const sal_uInt16 nIds[] = {
+ constexpr sal_uInt16 nIds[] = {
ID_BROWSER_DOCUMENT_DATASOURCE,
ID_BROWSER_FORMLETTER,
ID_BROWSER_INSERTCOLUMNS,
ID_BROWSER_INSERTCONTENT
};
- for ( size_t i=0; i < std::size( pURLs ); ++i )
+ for ( size_t i=0; i < std::size( aURLs ); ++i )
{
URL aURL;
- aURL.Complete = OUString::createFromAscii( pURLs[i] );
+ aURL.Complete = aURLs[i];
if ( m_xUrlTransformer.is() )
m_xUrlTransformer->parseStrict( aURL );
m_aExternalFeatures[ nIds[ i ] ] = ExternalFeature( std::move(aURL) );
@@ -1252,7 +1252,7 @@ void SbaTableQueryBrowser::connectExternalDispatches()
for (auto & externalFeature : m_aExternalFeatures)
{
externalFeature.second.xDispatcher = xProvider->queryDispatch(
- externalFeature.second.aURL, "_parent", FrameSearchFlag::PARENT
+ externalFeature.second.aURL, u"_parent"_ustr, FrameSearchFlag::PARENT
);
if ( externalFeature.second.xDispatcher.get() == static_cast< XDispatch* >( this ) )
@@ -1459,7 +1459,7 @@ void SbaTableQueryBrowser::attachFrame(const Reference< css::frame::XFrame > & _
Reference< XFrame > xCurrentFrame( getFrame() );
if ( xCurrentFrame.is() )
{
- m_xCurrentFrameParent = xCurrentFrame->findFrame("_parent",FrameSearchFlag::PARENT);
+ m_xCurrentFrameParent = xCurrentFrame->findFrame(u"_parent"_ustr,FrameSearchFlag::PARENT);
if ( m_xCurrentFrameParent.is() )
m_xCurrentFrameParent->addFrameActionListener(static_cast<css::frame::XFrameActionListener*>(this));
@@ -1468,13 +1468,13 @@ void SbaTableQueryBrowser::attachFrame(const Reference< css::frame::XFrame > & _
{
Reference< XPropertySet > xFrameProps( m_aCurrentFrame.getFrame(), UNO_QUERY_THROW );
Reference< XLayoutManager > xLayouter(
- xFrameProps->getPropertyValue("LayoutManager"),
+ xFrameProps->getPropertyValue(u"LayoutManager"_ustr),
UNO_QUERY );
if ( xLayouter.is() )
{
Reference< XUIElement > xUI(
- xLayouter->getElement( "private:resource/toolbar/toolbar" ),
+ xLayouter->getElement( u"private:resource/toolbar/toolbar"_ustr ),
UNO_SET_THROW );
m_xMainToolbar.set(xUI->getRealInterface(), css::uno::UNO_QUERY);
OSL_ENSURE( m_xMainToolbar.is(), "SbaTableQueryBrowser::attachFrame: where's my toolbox?" );
@@ -1655,9 +1655,9 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
else if ( nId == ID_TREE_EDIT_DATABASE )
{
::utl::OConfigurationTreeRoot aConfig( ::utl::OConfigurationTreeRoot::createWithComponentContext( getORB(),
- "/org.openoffice.Office.DataAccess/Policies/Features/Common" ) );
+ u"/org.openoffice.Office.DataAccess/Policies/Features/Common"_ustr ) );
bool bHaveEditDatabase( true );
- OSL_VERIFY( aConfig.getNodeValue( "EditDatabaseFromDataSourceView" ) >>= bHaveEditDatabase );
+ OSL_VERIFY( aConfig.getNodeValue( u"EditDatabaseFromDataSourceView"_ustr ) >>= bHaveEditDatabase );
aReturn.bEnabled = getORB().is() && xDataSourceEntry && bHaveEditDatabase;
}
else if ( nId == ID_BROWSER_COPY )
@@ -2159,9 +2159,7 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, const weld::TreeIter&, rParent, b
// it could be that we already have a connection
SharedConnection xConnection;
- ensureConnection(xFirstParent.get(), xConnection);
-
- if ( xConnection.is() )
+ if (ensureConnection(xFirstParent.get(), xConnection) && xConnection.is())
{
SQLExceptionInfo aInfo;
try
@@ -2253,7 +2251,7 @@ bool SbaTableQueryBrowser::ensureEntryObject(const weld::TreeIter& rEntry)
// the user data of the entry
weld::TreeView& rTreeView = m_pTreeView->GetWidget();
DBTreeListUserData* pEntryData = weld::fromId<DBTreeListUserData*>(rTreeView.get_id(rEntry));
- OSL_ENSURE(pEntryData,"ensureEntryObject: user data should already be set!");
+ assert(pEntryData && "ensureEntryObject: user data should already be set!");
std::unique_ptr<weld::TreeIter> xDataSourceEntry = m_pTreeView->GetRootLevelParent(&rEntry);
@@ -2577,7 +2575,7 @@ bool SbaTableQueryBrowser::implSelect(const weld::TreeIter* pEntry)
selectPath(m_xCurrentlyDisplayed.get());
// get the name of the data source currently selected
- ensureConnection(m_xCurrentlyDisplayed.get(), pConData->xConnection);
+ (void)ensureConnection(m_xCurrentlyDisplayed.get(), pConData->xConnection);
if ( !pConData->xConnection.is() )
{
@@ -2655,7 +2653,7 @@ bool SbaTableQueryBrowser::implSelect(const weld::TreeIter* pEntry)
OUString sReplace = sSql.replaceFirst(sFilter, "");
xAnalyzer->setQuery(sReplace);
Reference<XSingleSelectQueryComposer> xComposer(xAnalyzer,UNO_QUERY);
- xComposer->setFilter("0=1");
+ xComposer->setFilter(u"0=1"_ustr);
aName = xAnalyzer->getQuery();
nCommandType = CommandType::COMMAND;
}
@@ -2759,7 +2757,7 @@ void SAL_CALL SbaTableQueryBrowser::elementInserted(const ContainerEvent& rEvent
// insert the new entry into the tree
DBTreeListUserData* pContainerData = weld::fromId<DBTreeListUserData*>(rTreeView.get_id(*xEntry));
- OSL_ENSURE(pContainerData, "elementInserted: There must be user data for this type!");
+ assert(pContainerData && "elementInserted: There must be user data for this type!");
DBTreeListUserData* pNewData = new DBTreeListUserData;
bool bIsTable = etTableContainer == pContainerData->eType;
@@ -2863,7 +2861,7 @@ void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEve
std::unique_ptr<weld::TreeIter> xContainer = getEntryFromContainer(xNames);
if (xContainer)
{
- // a table or query as been replaced
+ // a table or query has been replaced
OUString aName = ::comphelper::getString(_rEvent.Accessor);
weld::TreeView& rTreeView = m_pTreeView->GetWidget();
@@ -3120,22 +3118,22 @@ void SbaTableQueryBrowser::impl_initialize(const ::comphelper::NamedValueCollect
rArguments.get_ensureType( PROPERTY_UPDATE_SCHEMANAME, aSchemaName );
rArguments.get_ensureType( PROPERTY_UPDATE_TABLENAME, aTableName );
rArguments.get_ensureType( PROPERTY_ESCAPE_PROCESSING, bEscapeProcessing );
- rArguments.get_ensureType( "Frame", xFrame );
+ rArguments.get_ensureType( u"Frame"_ustr, xFrame );
rArguments.get_ensureType( PROPERTY_SHOWMENU, m_bShowMenu );
// disable the browser if either of ShowTreeViewButton (compatibility name) or EnableBrowser
// is present and set to FALSE
- bool bDisableBrowser = !rArguments.getOrDefault( "ShowTreeViewButton", true ) // compatibility name
+ bool bDisableBrowser = !rArguments.getOrDefault( u"ShowTreeViewButton"_ustr, true ) // compatibility name
|| !rArguments.getOrDefault( PROPERTY_ENABLE_BROWSER, true );
- OSL_ENSURE( !rArguments.has( "ShowTreeViewButton" ),
+ OSL_ENSURE( !rArguments.has( u"ShowTreeViewButton"_ustr ),
"SbaTableQueryBrowser::impl_initialize: ShowTreeViewButton is superseded by EnableBrowser!" );
m_bEnableBrowser = !bDisableBrowser;
// hide the tree view it is disabled in general, or if the settings tell to hide it initially
bool bHideTreeView = ( !m_bEnableBrowser )
- || !rArguments.getOrDefault( "ShowTreeView", true ) // compatibility name
+ || !rArguments.getOrDefault( u"ShowTreeView"_ustr, true ) // compatibility name
|| !rArguments.getOrDefault( PROPERTY_SHOW_BROWSER, true );
- OSL_ENSURE( !rArguments.has( "ShowTreeView" ),
+ OSL_ENSURE( !rArguments.has( u"ShowTreeView"_ustr ),
"SbaTableQueryBrowser::impl_initialize: ShowTreeView is superseded by ShowBrowser!" );
if ( bHideTreeView )
@@ -3149,7 +3147,7 @@ void SbaTableQueryBrowser::impl_initialize(const ::comphelper::NamedValueCollect
{
Sequence< OUString> aProperties
{
- "AlwaysShowCursor", PROPERTY_BORDER, "HasNavigationBar", "HasRecordMarker", "Tabstop"
+ u"AlwaysShowCursor"_ustr, PROPERTY_BORDER, u"HasNavigationBar"_ustr, u"HasRecordMarker"_ustr, u"Tabstop"_ustr
};
Sequence< Any> aValues
{
@@ -3458,16 +3456,16 @@ void SbaTableQueryBrowser::implAdministrate(const weld::TreeIter& rApplyTo)
InteractionHandler::createWithParent(getORB(), nullptr) );
::comphelper::NamedValueCollection aLoadArgs;
- aLoadArgs.put( "Model", xDocumentModel );
- aLoadArgs.put( "InteractionHandler", xInteractionHandler );
- aLoadArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG );
+ aLoadArgs.put( u"Model"_ustr, xDocumentModel );
+ aLoadArgs.put( u"InteractionHandler"_ustr, xInteractionHandler );
+ aLoadArgs.put( u"MacroExecutionMode"_ustr, MacroExecMode::USE_CONFIG );
Sequence< PropertyValue > aLoadArgPV;
aLoadArgs >>= aLoadArgPV;
xFrameLoader->loadComponentFromURL(
xDocumentModel->getURL(),
- "_default",
+ u"_default"_ustr,
FrameSearchFlag::ALL | FrameSearchFlag::GLOBAL,
aLoadArgPV
);
@@ -3492,7 +3490,7 @@ bool SbaTableQueryBrowser::requestQuickHelp(const void* pUserData, OUString& rTe
OUString SbaTableQueryBrowser::getContextMenuResourceName() const
{
- return "explorer";
+ return u"explorer"_ustr;
}
IController& SbaTableQueryBrowser::getCommandController()
@@ -3641,7 +3639,7 @@ void SbaTableQueryBrowser::loadMenu(const Reference< XFrame >& _xFrame)
if ( xLayoutManager.is() )
{
xLayoutManager->lock();
- xLayoutManager->createElement( "private:resource/toolbar/toolbar" );
+ xLayoutManager->createElement( u"private:resource/toolbar/toolbar"_ustr );
xLayoutManager->unlock();
xLayoutManager->doLayout();
}
diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx
index f9f786f22ec3..c17d0952215b 100644
--- a/dbaccess/source/ui/control/ColumnControlWindow.cxx
+++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx
@@ -37,7 +37,7 @@ using namespace ::com::sun::star::lang;
OColumnControlTopLevel::OColumnControlTopLevel(vcl::Window* pParent,
const Reference<XComponentContext>& _rxContext)
- : InterimItemWindow(pParent, "dbaccess/ui/colcontrolbox.ui", "ColControlBox")
+ : InterimItemWindow(pParent, u"dbaccess/ui/colcontrolbox.ui"_ustr, u"ColControlBox"_ustr)
, m_xControl(new OColumnControlWindow(m_xContainer.get(), _rxContext))
{
}
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index f341482ea92f..08d9211d4fc9 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -65,8 +65,8 @@ namespace
}
OFieldDescControl::OFieldDescControl(weld::Container* pPage, OTableDesignHelpBar* pHelpBar)
- : m_xBuilder(Application::CreateBuilder(pPage, "dbaccess/ui/fielddescpage.ui"))
- , m_xContainer(m_xBuilder->weld_container("FieldDescPage"))
+ : m_xBuilder(Application::CreateBuilder(pPage, u"dbaccess/ui/fielddescpage.ui"_ustr))
+ , m_xContainer(m_xBuilder->weld_container(u"FieldDescPage"_ustr))
, m_pHelp( pHelpBar )
, m_pLastFocusWindow(nullptr)
, m_pActFocusWindow(nullptr)
@@ -389,10 +389,10 @@ void OFieldDescControl::ActivateAggregate( EControlType eType )
if (m_xDefault)
return;
m_nPos++;
- m_xDefaultText = m_xBuilder->weld_label("DefaultValueText");
+ m_xDefaultText = m_xBuilder->weld_label(u"DefaultValueText"_ustr);
m_xDefaultText->show();
m_xDefault = std::make_unique<OPropEditCtrl>(
- m_xBuilder->weld_entry("DefaultValue"), STR_HELP_DEFAULT_VALUE, FIELD_PROPERTY_DEFAULT);
+ m_xBuilder->weld_entry(u"DefaultValue"_ustr), STR_HELP_DEFAULT_VALUE, FIELD_PROPERTY_DEFAULT);
InitializeControl(m_xDefault->GetWidget(),HID_TAB_ENT_DEFAULT);
m_xDefault->show();
break;
@@ -400,10 +400,10 @@ void OFieldDescControl::ActivateAggregate( EControlType eType )
if (m_xAutoIncrementValue || !isAutoIncrementValueEnabled())
return;
m_nPos++;
- m_xAutoIncrementValueText = m_xBuilder->weld_label("AutoIncrementValueText");
+ m_xAutoIncrementValueText = m_xBuilder->weld_label(u"AutoIncrementValueText"_ustr);
m_xAutoIncrementValueText->show();
m_xAutoIncrementValue = std::make_unique<OPropEditCtrl>(
- m_xBuilder->weld_spin_button("AutoIncrementValue"), STR_HELP_AUTOINCREMENT_VALUE,
+ m_xBuilder->weld_spin_button(u"AutoIncrementValue"_ustr), STR_HELP_AUTOINCREMENT_VALUE,
FIELD_PROPERTY_AUTOINCREMENT);
m_xAutoIncrementValue->set_text( getAutoIncrementValue() );
InitializeControl(m_xAutoIncrementValue->GetWidget(),HID_TAB_AUTOINCREMENTVALUE);
@@ -419,10 +419,10 @@ void OFieldDescControl::ActivateAggregate( EControlType eType )
if(xMetaData.is() && xMetaData->supportsNonNullableColumns())
{
m_nPos++;
- m_xRequiredText = m_xBuilder->weld_label("RequiredText");
+ m_xRequiredText = m_xBuilder->weld_label(u"RequiredText"_ustr);
m_xRequiredText->show();
m_xRequired = std::make_unique<OPropListBoxCtrl>(
- m_xBuilder->weld_combo_box("Required"), STR_HELP_AUTOINCREMENT_VALUE,
+ m_xBuilder->weld_combo_box(u"Required"_ustr), STR_HELP_AUTOINCREMENT_VALUE,
FIELD_PROPERTY_AUTOINCREMENT);
m_xRequired->append_text(aYes);
m_xRequired->append_text(aNo);
@@ -438,10 +438,10 @@ void OFieldDescControl::ActivateAggregate( EControlType eType )
if (m_xAutoIncrement)
return;
m_nPos++;
- m_xAutoIncrementText = m_xBuilder->weld_label("AutoIncrementText");
+ m_xAutoIncrementText = m_xBuilder->weld_label(u"AutoIncrementText"_ustr);
m_xAutoIncrementText->show();
m_xAutoIncrement = std::make_unique<OPropListBoxCtrl>(
- m_xBuilder->weld_combo_box("AutoIncrement"), STR_HELP_AUTOINCREMENT,
+ m_xBuilder->weld_combo_box(u"AutoIncrement"_ustr), STR_HELP_AUTOINCREMENT,
FIELD_PROPERTY_AUTOINC);
m_xAutoIncrement->append_text(aYes);
m_xAutoIncrement->append_text(aNo);
@@ -454,19 +454,19 @@ void OFieldDescControl::ActivateAggregate( EControlType eType )
if (m_xTextLen)
return;
m_nPos++;
- m_xTextLenText = m_xBuilder->weld_label("TextLengthText");
+ m_xTextLenText = m_xBuilder->weld_label(u"TextLengthText"_ustr);
m_xTextLenText->show();
- m_xTextLen = CreateNumericControl("TextLength", STR_HELP_TEXT_LENGTH, FIELD_PROPERTY_TEXTLEN,HID_TAB_ENT_TEXT_LEN);
+ m_xTextLen = CreateNumericControl(u"TextLength"_ustr, STR_HELP_TEXT_LENGTH, FIELD_PROPERTY_TEXTLEN,HID_TAB_ENT_TEXT_LEN);
break;
case tpType:
if (m_xType)
return;
m_nPos++;
- m_xTypeText = m_xBuilder->weld_label("TypeText");
+ m_xTypeText = m_xBuilder->weld_label(u"TypeText"_ustr);
m_xTypeText->show();
m_xType = std::make_unique<OPropListBoxCtrl>(
- m_xBuilder->weld_combo_box("Type"), STR_HELP_AUTOINCREMENT, FIELD_PROPERTY_TYPE);
+ m_xBuilder->weld_combo_box(u"Type"_ustr), STR_HELP_AUTOINCREMENT, FIELD_PROPERTY_TYPE);
{
const OTypeInfoMap* pTypeInfo = getTypeInfo();
for (auto const& elem : *pTypeInfo)
@@ -496,10 +496,10 @@ void OFieldDescControl::ActivateAggregate( EControlType eType )
{
DBG_UNHANDLED_EXCEPTION("dbaccess");
}
- m_xColumnNameText = m_xBuilder->weld_label("ColumnNameText");
+ m_xColumnNameText = m_xBuilder->weld_label(u"ColumnNameText"_ustr);
m_xColumnNameText->show();
m_xColumnName = std::make_unique<OPropColumnEditCtrl>(
- m_xBuilder->weld_entry("ColumnName"), aTmpString,
+ m_xBuilder->weld_entry(u"ColumnName"_ustr), aTmpString,
STR_HELP_DEFAULT_VALUE, FIELD_PROPERTY_COLUMNNAME);
m_xColumnName->set_max_length(nMax);
m_xColumnName->setCheck( isSQL92CheckEnabled(getConnection()) );
@@ -512,15 +512,15 @@ void OFieldDescControl::ActivateAggregate( EControlType eType )
if (m_xNumType)
return;
m_nPos++;
- m_xNumTypeText = m_xBuilder->weld_label("NumTypeText");
+ m_xNumTypeText = m_xBuilder->weld_label(u"NumTypeText"_ustr);
m_xNumTypeText->show();
m_xNumType = std::make_unique<OPropListBoxCtrl>(
- m_xBuilder->weld_combo_box("NumType"), STR_HELP_NUMERIC_TYPE, FIELD_PROPERTY_NUMTYPE);
- m_xNumType->append_text("Byte");
- m_xNumType->append_text("SmallInt");
- m_xNumType->append_text("Integer");
- m_xNumType->append_text("Single");
- m_xNumType->append_text("Double");
+ m_xBuilder->weld_combo_box(u"NumType"_ustr), STR_HELP_NUMERIC_TYPE, FIELD_PROPERTY_NUMTYPE);
+ m_xNumType->append_text(u"Byte"_ustr);
+ m_xNumType->append_text(u"SmallInt"_ustr);
+ m_xNumType->append_text(u"Integer"_ustr);
+ m_xNumType->append_text(u"Single"_ustr);
+ m_xNumType->append_text(u"Double"_ustr);
m_xNumType->set_active(2);
InitializeControl(m_xNumType.get(),HID_TAB_ENT_NUMTYP, true);
m_xNumType->show();
@@ -530,35 +530,35 @@ void OFieldDescControl::ActivateAggregate( EControlType eType )
if (m_xLength)
return;
m_nPos++;
- m_xLengthText = m_xBuilder->weld_label("LengthText");
+ m_xLengthText = m_xBuilder->weld_label(u"LengthText"_ustr);
m_xLengthText->show();
- m_xLength = CreateNumericControl("Length", STR_HELP_LENGTH, FIELD_PROPERTY_LENGTH,HID_TAB_ENT_LEN);
+ m_xLength = CreateNumericControl(u"Length"_ustr, STR_HELP_LENGTH, FIELD_PROPERTY_LENGTH,HID_TAB_ENT_LEN);
break;
case tpScale:
if (m_xScale)
return;
m_nPos++;
- m_xScaleText = m_xBuilder->weld_label("ScaleText");
+ m_xScaleText = m_xBuilder->weld_label(u"ScaleText"_ustr);
m_xScaleText->show();
- m_xScale = CreateNumericControl("Scale", STR_HELP_SCALE, FIELD_PROPERTY_SCALE,HID_TAB_ENT_SCALE);
+ m_xScale = CreateNumericControl(u"Scale"_ustr, STR_HELP_SCALE, FIELD_PROPERTY_SCALE,HID_TAB_ENT_SCALE);
break;
case tpFormat:
if (!m_xFormat)
{
m_nPos++;
- m_xFormatText = m_xBuilder->weld_label("FormatTextText");
+ m_xFormatText = m_xBuilder->weld_label(u"FormatTextText"_ustr);
m_xFormatText->show();
m_xFormatSample = std::make_unique<OPropEditCtrl>(
- m_xBuilder->weld_entry("FormatText"), STR_HELP_FORMAT_CODE, -1);
+ m_xBuilder->weld_entry(u"FormatText"_ustr), STR_HELP_FORMAT_CODE, -1);
m_xFormatSample->set_editable(false);
m_xFormatSample->set_sensitive(false);
InitializeControl(m_xFormatSample->GetWidget(),HID_TAB_ENT_FORMAT_SAMPLE);
m_xFormatSample->show();
- m_xFormat = m_xBuilder->weld_button("FormatButton");
+ m_xFormat = m_xBuilder->weld_button(u"FormatButton"_ustr);
m_xFormat->connect_clicked( LINK( this, OFieldDescControl, FormatClickHdl ) );
InitializeControl(m_xFormat.get(),HID_TAB_ENT_FORMAT);
m_xFormat->show();
@@ -571,10 +571,10 @@ void OFieldDescControl::ActivateAggregate( EControlType eType )
return;
m_nPos++;
- m_xBoolDefaultText = m_xBuilder->weld_label("BoolDefaultText");
+ m_xBoolDefaultText = m_xBuilder->weld_label(u"BoolDefaultText"_ustr);
m_xBoolDefaultText->show();
m_xBoolDefault = std::make_unique<OPropListBoxCtrl>(
- m_xBuilder->weld_combo_box("BoolDefault"), STR_HELP_BOOL_DEFAULT,
+ m_xBuilder->weld_combo_box(u"BoolDefault"_ustr), STR_HELP_BOOL_DEFAULT,
FIELD_PROPERTY_BOOL_DEFAULT);
m_xBoolDefault->append_text(DBA_RES(STR_VALUE_NONE));
m_xBoolDefault->append_text(aYes);
@@ -789,6 +789,8 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
case DataType::DATE:
case DataType::TIME:
case DataType::TIMESTAMP:
+ case DataType::TIME_WITH_TIMEZONE:
+ case DataType::TIMESTAMP_WITH_TIMEZONE:
DeactivateAggregate( tpLength ); // we don't need a length for date types
DeactivateAggregate( tpTextLen );
DeactivateAggregate( tpBoolDefault );
@@ -1309,12 +1311,12 @@ OUString OFieldDescControl::getControlDefault( const OFieldDescription* _pFieldD
Reference<XPropertySet> xFormSet = xNumberFormatter->getNumberFormatsSupplier()->getNumberFormats()->getByKey(nFormatKey);
OSL_ENSURE(xFormSet.is(),"XPropertySet is null!");
OUString sFormat;
- xFormSet->getPropertyValue("FormatString") >>= sFormat;
+ xFormSet->getPropertyValue(u"FormatString"_ustr) >>= sFormat;
if ( !bTextFormat )
{
Locale aLocale;
- ::comphelper::getNumberFormatProperty(xNumberFormatter,nFormatKey,"Locale") >>= aLocale;
+ ::comphelper::getNumberFormatProperty(xNumberFormatter,nFormatKey,u"Locale"_ustr) >>= aLocale;
sal_Int32 nNumberFormat = ::comphelper::getNumberFormatType(xNumberFormatter,nFormatKey);
if( (nNumberFormat & css::util::NumberFormat::DATE) == css::util::NumberFormat::DATE
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index e0c5b54f0627..4856b0c3b188 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -433,9 +433,9 @@ namespace dbaui
OTableListBoxControl::OTableListBoxControl(weld::Builder* _pParent,
const OJoinTableView::OTableWindowMap* _pTableMap,
IRelationControlInterface* _pParentDialog)
- : m_xLeftTable(_pParent->weld_combo_box("table1"))
- , m_xRightTable(_pParent->weld_combo_box("table2"))
- , m_xTable(_pParent->weld_container("relations"))
+ : m_xLeftTable(_pParent->weld_combo_box(u"table1"_ustr))
+ , m_xRightTable(_pParent->weld_combo_box(u"table2"_ustr))
+ , m_xTable(_pParent->weld_container(u"relations"_ustr))
, m_xTableCtrlParent(m_xTable->CreateChildFrame())
, m_xRC_Tables(VclPtr<ORelationControl>::Create(m_xTableCtrlParent))
, m_pTableMap(_pTableMap)
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index be900d650f63..f6153be992d8 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -55,9 +55,9 @@ using namespace ::com::sun::star::ui;
using namespace ::com::sun::star::view;
InterimDBTreeListBox::InterimDBTreeListBox(vcl::Window* pParent)
- : InterimItemWindow(pParent, "dbaccess/ui/dbtreelist.ui", "DBTreeList")
- , TreeListBox(m_xBuilder->weld_tree_view("treeview"), true)
- , m_xStatusBar(m_xBuilder->weld_label("statusbar"))
+ : InterimItemWindow(pParent, u"dbaccess/ui/dbtreelist.ui"_ustr, u"DBTreeList"_ustr)
+ , TreeListBox(m_xBuilder->weld_tree_view(u"treeview"_ustr), true)
+ , m_xStatusBar(m_xBuilder->weld_label(u"statusbar"_ustr))
{
InitControlBase(&GetWidget());
}
@@ -376,15 +376,15 @@ IMPL_LINK(TreeListBox, CommandHdl, const CommandEvent&, rCEvt, bool)
return false;
css::uno::Sequence< css::uno::Any > aArgs{
- css::uno::Any(comphelper::makePropertyValue( "Value", aResourceName )),
- css::uno::Any(comphelper::makePropertyValue( "Frame", m_pContextMenuProvider->getCommandController().getXController()->getFrame() )),
- css::uno::Any(comphelper::makePropertyValue( "IsContextMenu", true ))
+ css::uno::Any(comphelper::makePropertyValue( u"Value"_ustr, aResourceName )),
+ css::uno::Any(comphelper::makePropertyValue( u"Frame"_ustr, m_pContextMenuProvider->getCommandController().getXController()->getFrame() )),
+ css::uno::Any(comphelper::makePropertyValue( u"IsContextMenu"_ustr, true ))
};
css::uno::Reference< css::uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
css::uno::Reference<css::frame::XPopupMenuController> xMenuController
(xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- "com.sun.star.comp.framework.ResourceMenuController", aArgs, xContext), css::uno::UNO_QUERY);
+ u"com.sun.star.comp.framework.ResourceMenuController"_ustr, aArgs, xContext), css::uno::UNO_QUERY);
if (!xMenuController.is())
return false;
@@ -493,8 +493,8 @@ std::unique_ptr<weld::TreeIter> TreeListBox::GetRootLevelParent(const weld::Tree
}
DBTreeViewBase::DBTreeViewBase(weld::Container* pContainer)
- : m_xBuilder(Application::CreateBuilder(pContainer, "dbaccess/ui/dbtreelist.ui"))
- , m_xContainer(m_xBuilder->weld_container("DBTreeList"))
+ : m_xBuilder(Application::CreateBuilder(pContainer, u"dbaccess/ui/dbtreelist.ui"_ustr))
+ , m_xContainer(m_xBuilder->weld_container(u"DBTreeList"_ustr))
{
}
@@ -505,7 +505,7 @@ DBTreeViewBase::~DBTreeViewBase()
DBTreeView::DBTreeView(weld::Container* pContainer, bool bSQLType)
: DBTreeViewBase(pContainer)
{
- m_xTreeListBox.reset(new TreeListBox(m_xBuilder->weld_tree_view("treeview"), bSQLType));
+ m_xTreeListBox.reset(new TreeListBox(m_xBuilder->weld_tree_view(u"treeview"_ustr), bSQLType));
}
} // namespace dbaui
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx
index 3847df5f54d0..0c8dfa901c5b 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -52,12 +52,8 @@ namespace dbaui
using ::com::sun::star::ui::XImageManager;
using ::com::sun::star::graphic::XGraphic;
- Reference< XGraphic> GetCommandIcon( const char* _pCommandURL, const OUString& _rModuleName )
+ Reference< XGraphic> GetCommandIcon( const OUString& sCommandURL, const OUString& _rModuleName )
{
- if ( !_pCommandURL || !*_pCommandURL )
- return nullptr;
-
- OUString sCommandURL = OUString::createFromAscii( _pCommandURL );
try
{
do
@@ -94,24 +90,16 @@ namespace dbaui
// OpenButton
- OpenDocumentButton::OpenDocumentButton(std::unique_ptr<weld::Button> xControl, const char* _pAsciiModuleName)
+ OpenDocumentButton::OpenDocumentButton(std::unique_ptr<weld::Button> xControl, const OUString& _rAsciiModuleName)
: m_xControl(std::move(xControl))
{
- impl_init( _pAsciiModuleName );
- }
-
- void OpenDocumentButton::impl_init( const char* _pAsciiModuleName )
- {
- OSL_ENSURE( _pAsciiModuleName, "OpenDocumentButton::impl_init: invalid module name!" );
- m_sModule = OUString::createFromAscii( _pAsciiModuleName );
-
// our label should equal the UI text of the "Open" command
- auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:Open", m_sModule);
+ auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(u".uno:Open"_ustr, _rAsciiModuleName);
OUString sLabel(vcl::CommandInfoProvider::GetLabelForCommand(aProperties));
m_xControl->set_label(" " + sLabel.replaceAll("~", ""));
// Place icon left of text and both centered in the button.
- m_xControl->set_image(GetCommandIcon(".uno:Open", m_sModule));
+ m_xControl->set_image(GetCommandIcon(u".uno:Open"_ustr, _rAsciiModuleName));
}
// OpenDocumentListBox
@@ -133,7 +121,7 @@ namespace dbaui
std::vector< SvtHistoryOptions::HistoryItem > aHistory = SvtHistoryOptions::GetList( EHistoryType::PickList );
Reference< XNameAccess > xFilterFactory;
xFilterFactory.set(::comphelper::getProcessServiceFactory()->createInstance(
- "com.sun.star.document.FilterFactory" ), css::uno::UNO_QUERY);
+ u"com.sun.star.document.FilterFactory"_ustr ), css::uno::UNO_QUERY);
for ( const SvtHistoryOptions::HistoryItem& rHistoryItem : aHistory )
{
@@ -151,7 +139,7 @@ namespace dbaui
::comphelper::SequenceAsHashMap aFilterProperties( aProps );
OUString sDocumentService = aFilterProperties.getUnpackedValueOrDefault(
- "DocumentService", OUString() );
+ u"DocumentService"_ustr, OUString() );
if ( sDocumentService.equalsAscii( _pAsciiModuleName ) )
{
// yes, it's a Base document
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 4d00c32293d2..b616f1303ac8 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -97,13 +97,13 @@ void SQLEditView::SetItemPoolFont(SfxItemPool* pItemPool)
vcl::Font aAppFont(sFontName, aFontSize);
pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
- "", PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
+ u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
EE_CHAR_FONTINFO));
pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
- "", PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
+ u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
EE_CHAR_FONTINFO_CJK));
pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
- "", PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
+ u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
EE_CHAR_FONTINFO_CTL));
pItemPool->SetUserDefaultItem(
@@ -148,7 +148,7 @@ void SQLEditView::SetDrawingArea(weld::DrawingArea* pDrawingArea)
std::unique_lock g(m_mutex);
m_notifier = n;
}
- css::uno::Sequence< OUString > s { "FontHeight", "FontName" };
+ css::uno::Sequence< OUString > s { u"FontHeight"_ustr, u"FontName"_ustr };
n->addPropertiesChangeListener(s, m_listener);
m_ColorConfig.AddListener(this);
}
@@ -369,8 +369,8 @@ bool SQLEditView::Command(const CommandEvent& rCEvt)
{
::tools::Rectangle aRect(rCEvt.GetMousePosPixel(), Size(1, 1));
weld::Widget* pPopupParent = GetDrawingArea();
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "vcl/ui/editmenu.ui"));
- std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, u"vcl/ui/editmenu.ui"_ustr));
+ std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr));
bool bEnableCut = true;
bool bEnableCopy = true;
@@ -395,13 +395,13 @@ bool SQLEditView::Command(const CommandEvent& rCEvt)
bEnableSpecialChar = false;
}
- xContextMenu->set_sensitive("cut", bEnableCut);
- xContextMenu->set_sensitive("copy", bEnableCopy);
- xContextMenu->set_sensitive("delete", bEnableDelete);
- xContextMenu->set_sensitive("paste", bEnablePaste);
- xContextMenu->set_sensitive("specialchar", bEnableSpecialChar);
- xContextMenu->set_visible("undo", false);
- xContextMenu->set_visible("specialchar", vcl::GetGetSpecialCharsFunction() != nullptr);
+ xContextMenu->set_sensitive(u"cut"_ustr, bEnableCut);
+ xContextMenu->set_sensitive(u"copy"_ustr, bEnableCopy);
+ xContextMenu->set_sensitive(u"delete"_ustr, bEnableDelete);
+ xContextMenu->set_sensitive(u"paste"_ustr, bEnablePaste);
+ xContextMenu->set_sensitive(u"specialchar"_ustr, bEnableSpecialChar);
+ xContextMenu->set_visible(u"undo"_ustr, false);
+ xContextMenu->set_visible(u"specialchar"_ustr, vcl::GetGetSpecialCharsFunction() != nullptr);
OUString sCommand = xContextMenu->popup_at_rect(pPopupParent, aRect);
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index e68132d4ea82..d1090a9aae0f 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -112,7 +112,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn
{
css::uno::Any anyEx = cppu::getCaughtException();
// a non-SQLException exception occurred ... simply throw an SQLException
- throw SQLException(sCurrentActionError, nullptr, "", 0, anyEx);
+ throw SQLException(sCurrentActionError, nullptr, u""_ustr, 0, anyEx);
}
UpdateTableList( _rxConnection, sTables, sViews );
@@ -698,7 +698,7 @@ TriState OTableTreeListBox::implDetermineState(const weld::TreeIter& rEntry)
DBTableTreeView::DBTableTreeView(weld::Container* pContainer)
: DBTreeViewBase(pContainer)
{
- m_xTreeListBox.reset(new OTableTreeListBox(m_xBuilder->weld_tree_view("treeview"), /*bShowToggles*/false));
+ m_xTreeListBox.reset(new OTableTreeListBox(m_xBuilder->weld_tree_view(u"treeview"_ustr), /*bShowToggles*/false));
}
} // namespace dbaui
diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx
index 63f018f9e176..78e025ea748c 100644
--- a/dbaccess/source/ui/dlg/CollectionView.cxx
+++ b/dbaccess/source/ui/dlg/CollectionView.cxx
@@ -58,16 +58,16 @@ OCollectionView::OCollectionView(weld::Window* pParent,
const Reference< XContent>& _xContent,
const OUString& _sDefaultName,
css::uno::Reference< css::uno::XComponentContext > _xContext)
- : GenericDialogController(pParent, "dbaccess/ui/collectionviewdialog.ui", "CollectionView")
+ : GenericDialogController(pParent, u"dbaccess/ui/collectionviewdialog.ui"_ustr, u"CollectionView"_ustr)
, m_xContent(_xContent)
, m_xContext(std::move(_xContext))
, m_bCreateForm(true)
- , m_xFTCurrentPath(m_xBuilder->weld_label("currentPathLabel"))
- , m_xNewFolder(m_xBuilder->weld_button("newFolderButton"))
- , m_xUp(m_xBuilder->weld_button("upButton"))
- , m_xView(m_xBuilder->weld_tree_view("viewTreeview"))
- , m_xName(m_xBuilder->weld_entry("fileNameEntry"))
- , m_xPB_OK(m_xBuilder->weld_button("ok"))
+ , m_xFTCurrentPath(m_xBuilder->weld_label(u"currentPathLabel"_ustr))
+ , m_xNewFolder(m_xBuilder->weld_button(u"newFolderButton"_ustr))
+ , m_xUp(m_xBuilder->weld_button(u"upButton"_ustr))
+ , m_xView(m_xBuilder->weld_tree_view(u"viewTreeview"_ustr))
+ , m_xName(m_xBuilder->weld_entry(u"fileNameEntry"_ustr))
+ , m_xPB_OK(m_xBuilder->weld_button(u"ok"_ustr))
{
Reference<XInteractionHandler2> xHandler(
InteractionHandler::createWithParent(m_xContext, m_xDialog->GetXWindow()));
@@ -133,7 +133,7 @@ IMPL_LINK_NOARG(OCollectionView, Save_Click, weld::Button&, void)
Sequence<Any> aValues(comphelper::InitAnyPropertySequence(
{
{"ResourceName", Any(sSubFolder)},
- {"ResourceType", Any(OUString("folder"))}
+ {"ResourceType", Any(u"folder"_ustr)}
}));
InteractiveAugmentedIOException aException(OUString(),Reference<XInterface>(),
InteractionClassification_ERROR,
@@ -255,7 +255,7 @@ void OCollectionView::initCurrentPath()
static const char s_sFormsCID[] = "private:forms";
static const char s_sReportsCID[] = "private:reports";
m_bCreateForm = s_sFormsCID == sCID;
- OUString sPath("/");
+ OUString sPath(u"/"_ustr);
if ( m_bCreateForm && o3tl::make_unsigned(sCID.getLength()) != strlen(s_sFormsCID))
sPath = sCID.copy(strlen(s_sFormsCID));
else if ( !m_bCreateForm && o3tl::make_unsigned(sCID.getLength()) != strlen(s_sReportsCID) )
@@ -290,7 +290,7 @@ void OCollectionView::Initialize()
try
{
::ucbhelper::Content aContent(m_xContent, m_xCmdEnv, comphelper::getProcessComponentContext());
- Sequence<OUString> aProps { "Title", "IsFolder" };
+ Sequence<OUString> aProps { u"Title"_ustr, u"IsFolder"_ustr };
auto xDynResultSet = aContent.createDynamicCursor(aProps, ucbhelper::INCLUDE_FOLDERS_ONLY);
if (!xDynResultSet.is())
return;
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index c3310e2a29c0..c7bbaf22b88d 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -72,10 +72,10 @@ namespace dbaui
: OGenericAdministrationPage(pPage, pController, _rUIXMLDescription, _rId, _rCoreAttrs)
, m_bUserGrabFocus(false)
, m_pCollection(nullptr)
- , m_xFT_Connection(m_xBuilder->weld_label("browseurllabel"))
- , m_xPB_Connection(m_xBuilder->weld_button("browse"))
- , m_xPB_CreateDB(m_xBuilder->weld_button("create"))
- , m_xConnectionURL(new OConnectionURLEdit(m_xBuilder->weld_entry("browseurl"), m_xBuilder->weld_label("browselabel")))
+ , m_xFT_Connection(m_xBuilder->weld_label(u"browseurllabel"_ustr))
+ , m_xPB_Connection(m_xBuilder->weld_button(u"browse"_ustr))
+ , m_xPB_CreateDB(m_xBuilder->weld_button(u"create"_ustr))
+ , m_xConnectionURL(new OConnectionURLEdit(m_xBuilder->weld_entry(u"browseurl"_ustr), m_xBuilder->weld_label(u"browselabel"_ustr)))
{
// extract the datasource type collection from the item set
const DbuTypeCollectionItem* pCollectionItem = dynamic_cast<const DbuTypeCollectionItem*>( _rCoreAttrs.GetItem(DSID_TYPECOLLECTION) );
@@ -217,7 +217,7 @@ namespace dbaui
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
FileDialogFlags::NONE, GetFrameWeld());
- aFileDlg.AddFilter(sFilterName,"*.accdb;*.accde;*.mdb;*.mde");
+ aFileDlg.AddFilter(sFilterName,u"*.accdb;*.accde;*.mdb;*.mde"_ustr);
aFileDlg.SetCurrentFilter(sFilterName);
askForFileName(aFileDlg);
}
@@ -303,7 +303,7 @@ namespace dbaui
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
FileDialogFlags::NONE, GetFrameWeld());
- aFileDlg.AddFilter(sFilterName,"*.fdb");
+ aFileDlg.AddFilter(sFilterName,u"*.fdb"_ustr);
aFileDlg.SetCurrentFilter(sFilterName);
askForFileName(aFileDlg);
break;
@@ -327,7 +327,7 @@ namespace dbaui
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
FileDialogFlags::NONE, GetFrameWeld());
- aFileDlg.AddFilter(sFilterName,"*.fdb");
+ aFileDlg.AddFilter(sFilterName,u"*.fdb"_ustr);
aFileDlg.SetCurrentFilter(sFilterName);
askForFileName(aFileDlg);
break;
@@ -587,12 +587,12 @@ namespace dbaui
}
else
{
- Any aContentType = aParent.getPropertyValue("ContentType");
+ Any aContentType = aParent.getPropertyValue(u"ContentType"_ustr);
aContentType >>= sContentType;
}
// the properties which need to be set on the new content
- Sequence< OUString > aNewDirectoryProperties { "Title" };
+ Sequence< OUString > aNewDirectoryProperties { u"Title"_ustr };
// loop
for ( std::vector< OUString >::const_reverse_iterator aLocalName = aToBeCreated.rbegin();
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index 557045800658..46f577703891 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -49,16 +49,16 @@ namespace dbaui
// OConnectionTabPage
OConnectionTabPage::OConnectionTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs)
- : OConnectionHelper(pPage, pController, "dbaccess/ui/connectionpage.ui", "ConnectionPage", _rCoreAttrs)
- , m_xFL2(m_xBuilder->weld_label("userlabel"))
- , m_xUserNameLabel(m_xBuilder->weld_label("userNameLabel"))
- , m_xUserName(m_xBuilder->weld_entry("userNameEntry"))
- , m_xPasswordRequired(m_xBuilder->weld_check_button("passCheckbutton"))
- , m_xFL3(m_xBuilder->weld_label("JDBCLabel"))
- , m_xJavaDriverLabel(m_xBuilder->weld_label("javaDriverLabel"))
- , m_xJavaDriver(m_xBuilder->weld_entry("driverEntry"))
- , m_xTestJavaDriver(m_xBuilder->weld_button("driverButton"))
- , m_xTestConnection(m_xBuilder->weld_button("connectionButton"))
+ : OConnectionHelper(pPage, pController, u"dbaccess/ui/connectionpage.ui"_ustr, u"ConnectionPage"_ustr, _rCoreAttrs)
+ , m_xFL2(m_xBuilder->weld_label(u"userlabel"_ustr))
+ , m_xUserNameLabel(m_xBuilder->weld_label(u"userNameLabel"_ustr))
+ , m_xUserName(m_xBuilder->weld_entry(u"userNameEntry"_ustr))
+ , m_xPasswordRequired(m_xBuilder->weld_check_button(u"passCheckbutton"_ustr))
+ , m_xFL3(m_xBuilder->weld_label(u"JDBCLabel"_ustr))
+ , m_xJavaDriverLabel(m_xBuilder->weld_label(u"javaDriverLabel"_ustr))
+ , m_xJavaDriver(m_xBuilder->weld_entry(u"driverEntry"_ustr))
+ , m_xTestJavaDriver(m_xBuilder->weld_button(u"driverButton"_ustr))
+ , m_xTestConnection(m_xBuilder->weld_button(u"connectionButton"_ustr))
{
m_xConnectionURL->connect_changed(LINK(this, OConnectionTabPage, OnEditModified));
m_xJavaDriver->connect_changed(LINK(this, OConnectionTabPage, OnEditModified));
@@ -231,7 +231,7 @@ namespace dbaui
}
IMPL_LINK_NOARG(OConnectionTabPage, OnTestJavaClickHdl, weld::Button&, void)
{
- OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
+ assert(m_pAdminDialog && "No Admin dialog set! ->GPF");
bool bSuccess = false;
#if HAVE_FEATURE_JAVA
try
@@ -255,7 +255,7 @@ namespace dbaui
}
bool OConnectionTabPage::checkTestConnection()
{
- OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
+ assert(m_pAdminDialog && "No Admin dialog set! ->GPF");
bool bEnableTestConnection = !m_xConnectionURL->get_visible() || !m_xConnectionURL->GetTextNoPrefix().isEmpty();
if ( m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC )
bEnableTestConnection = bEnableTestConnection && (!o3tl::trim(m_xJavaDriver->get_text()).empty());
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
index 0282e46a1d7f..f27225c003be 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
@@ -55,8 +55,8 @@ namespace dbaui
OConnectionTabPageSetup::OConnectionTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OUString& _rId, const SfxItemSet& _rCoreAttrs, TranslateId pHelpTextResId, TranslateId pHeaderResId, TranslateId pUrlResId)
: OConnectionHelper(pPage, pController, _rUIXMLDescription, _rId, _rCoreAttrs)
- , m_xHelpText(m_xBuilder->weld_label("helptext"))
- , m_xHeaderText(m_xBuilder->weld_label("header"))
+ , m_xHelpText(m_xBuilder->weld_label(u"helptext"_ustr))
+ , m_xHeaderText(m_xBuilder->weld_label(u"header"_ustr))
{
if (pHelpTextResId)
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index ad81680ba421..2a3824bec6a4 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -53,9 +53,9 @@ using namespace ::com::sun::star;
// OTextConnectionPageSetup
OTextConnectionPageSetup::OTextConnectionPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
- : OConnectionTabPageSetup(pPage, pController, "dbaccess/ui/dbwiztextpage.ui", "DBWizTextPage",
+ : OConnectionTabPageSetup(pPage, pController, u"dbaccess/ui/dbwiztextpage.ui"_ustr, u"DBWizTextPage"_ustr,
rCoreAttrs, STR_TEXT_HELPTEXT, STR_TEXT_HEADERTEXT, STR_TEXT_PATH_OR_FILE)
- , m_xSubContainer(m_xBuilder->weld_widget("TextPageContainer"))
+ , m_xSubContainer(m_xBuilder->weld_widget(u"TextPageContainer"_ustr))
, m_xTextConnectionHelper(new OTextConnectionHelper(m_xSubContainer.get(), TC_EXTENSION | TC_SEPARATORS))
{
m_xTextConnectionHelper->SetClickHandler(LINK( this, OTextConnectionPageSetup, ImplGetExtensionHdl ) );
@@ -119,16 +119,16 @@ using namespace ::com::sun::star;
// OLDAPPageSetup
OLDAPConnectionPageSetup::OLDAPConnectionPageSetup( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs )
- : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/ldapconnectionpage.ui", "LDAPConnectionPage", _rCoreAttrs)
- , m_xFTHelpText(m_xBuilder->weld_label("helpLabel"))
- , m_xFTHostServer(m_xBuilder->weld_label("hostNameLabel"))
- , m_xETHostServer(m_xBuilder->weld_entry("hostNameEntry"))
- , m_xFTBaseDN(m_xBuilder->weld_label("baseDNLabel"))
- , m_xETBaseDN(m_xBuilder->weld_entry("baseDNEntry"))
- , m_xFTPortNumber(m_xBuilder->weld_label("portNumLabel"))
- , m_xNFPortNumber(m_xBuilder->weld_spin_button("portNumEntry"))
- , m_xFTDefaultPortNumber(m_xBuilder->weld_label("portNumDefLabel"))
- , m_xCBUseSSL(m_xBuilder->weld_check_button("useSSLCheckbutton"))
+ : OGenericAdministrationPage(pPage, pController, u"dbaccess/ui/ldapconnectionpage.ui"_ustr, u"LDAPConnectionPage"_ustr, _rCoreAttrs)
+ , m_xFTHelpText(m_xBuilder->weld_label(u"helpLabel"_ustr))
+ , m_xFTHostServer(m_xBuilder->weld_label(u"hostNameLabel"_ustr))
+ , m_xETHostServer(m_xBuilder->weld_entry(u"hostNameEntry"_ustr))
+ , m_xFTBaseDN(m_xBuilder->weld_label(u"baseDNLabel"_ustr))
+ , m_xETBaseDN(m_xBuilder->weld_entry(u"baseDNEntry"_ustr))
+ , m_xFTPortNumber(m_xBuilder->weld_label(u"portNumLabel"_ustr))
+ , m_xNFPortNumber(m_xBuilder->weld_spin_button(u"portNumEntry"_ustr))
+ , m_xFTDefaultPortNumber(m_xBuilder->weld_label(u"portNumDefLabel"_ustr))
+ , m_xCBUseSSL(m_xBuilder->weld_check_button(u"useSSLCheckbutton"_ustr))
{
m_xETHostServer->connect_changed(LINK(this, OGenericAdministrationPage, OnControlEntryModifyHdl));
m_xETBaseDN->connect_changed(LINK(this, OGenericAdministrationPage, OnControlEntryModifyHdl));
@@ -211,10 +211,10 @@ using namespace ::com::sun::star;
}
OMySQLIntroPageSetup::OMySQLIntroPageSetup(weld::Container* pPage, ODbTypeWizDialogSetup* pController, const SfxItemSet& _rCoreAttrs)
- : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/dbwizmysqlintropage.ui", "DBWizMysqlIntroPage", _rCoreAttrs)
- , m_xODBCDatabase(m_xBuilder->weld_radio_button("odbc"))
- , m_xJDBCDatabase(m_xBuilder->weld_radio_button("jdbc"))
- , m_xNATIVEDatabase(m_xBuilder->weld_radio_button("directly"))
+ : OGenericAdministrationPage(pPage, pController, u"dbaccess/ui/dbwizmysqlintropage.ui"_ustr, u"DBWizMysqlIntroPage"_ustr, _rCoreAttrs)
+ , m_xODBCDatabase(m_xBuilder->weld_radio_button(u"odbc"_ustr))
+ , m_xJDBCDatabase(m_xBuilder->weld_radio_button(u"jdbc"_ustr))
+ , m_xNATIVEDatabase(m_xBuilder->weld_radio_button(u"directly"_ustr))
{
m_xODBCDatabase->connect_toggled(LINK(this, OMySQLIntroPageSetup, OnSetupModeSelected));
m_xJDBCDatabase->connect_toggled(LINK(this, OMySQLIntroPageSetup, OnSetupModeSelected));
@@ -235,7 +235,7 @@ using namespace ::com::sun::star;
{
// show the "Connect directly" option only if the driver is installed
const DbuTypeCollectionItem* pCollectionItem = dynamic_cast<const DbuTypeCollectionItem*>( _rSet.GetItem(DSID_TYPECOLLECTION) );
- bool bHasMySQLNative = ( pCollectionItem != nullptr ) && pCollectionItem->getCollection()->hasDriver( "sdbc:mysql:mysqlc:" );
+ bool bHasMySQLNative = ( pCollectionItem != nullptr ) && pCollectionItem->getCollection()->hasDriver( u"sdbc:mysql:mysqlc:" );
if ( bHasMySQLNative )
m_xNATIVEDatabase->show();
@@ -280,9 +280,9 @@ using namespace ::com::sun::star;
// MySQLNativeSetupPage
MySQLNativeSetupPage::MySQLNativeSetupPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs )
- : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/dbwizmysqlnativepage.ui", "DBWizMysqlNativePage", rCoreAttrs)
- , m_xHelpText(m_xBuilder->weld_label("helptext"))
- , m_xSettingsContainer(m_xBuilder->weld_container("MySQLSettingsContainer"))
+ : OGenericAdministrationPage(pPage, pController, u"dbaccess/ui/dbwizmysqlnativepage.ui"_ustr, u"DBWizMysqlNativePage"_ustr, rCoreAttrs)
+ , m_xHelpText(m_xBuilder->weld_label(u"helptext"_ustr))
+ , m_xSettingsContainer(m_xBuilder->weld_container(u"MySQLSettingsContainer"_ustr))
, m_xMySQLSettings(new MySQLNativeSettings(m_xSettingsContainer.get(), LINK(this, OGenericAdministrationPage, OnControlModified)))
{
SetRoadmapStateValue(false);
@@ -332,20 +332,20 @@ using namespace ::com::sun::star;
// OMySQLJDBCConnectionPageSetup
OGeneralSpecialJDBCConnectionPageSetup::OGeneralSpecialJDBCConnectionPageSetup( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs ,sal_uInt16 _nPortId, TranslateId pDefaultPortResId, TranslateId pHelpTextResId, TranslateId pHeaderTextResId, TranslateId pDriverClassId)
- : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/specialjdbcconnectionpage.ui", "SpecialJDBCConnectionPage", _rCoreAttrs)
+ : OGenericAdministrationPage(pPage, pController, u"dbaccess/ui/specialjdbcconnectionpage.ui"_ustr, u"SpecialJDBCConnectionPage"_ustr, _rCoreAttrs)
, m_nPortId(_nPortId)
- , m_xHeaderText(m_xBuilder->weld_label("header"))
- , m_xFTHelpText(m_xBuilder->weld_label("helpLabel"))
- , m_xFTDatabasename(m_xBuilder->weld_label("dbNameLabel"))
- , m_xETDatabasename(m_xBuilder->weld_entry("dbNameEntry"))
- , m_xFTHostname(m_xBuilder->weld_label("hostNameLabel"))
- , m_xETHostname(m_xBuilder->weld_entry("hostNameEntry"))
- , m_xFTPortNumber(m_xBuilder->weld_label("portNumLabel"))
- , m_xFTDefaultPortNumber(m_xBuilder->weld_label("portNumDefLabel"))
- , m_xNFPortNumber(m_xBuilder->weld_spin_button("portNumEntry"))
- , m_xFTDriverClass(m_xBuilder->weld_label("jdbcDriverLabel"))
- , m_xETDriverClass(m_xBuilder->weld_entry("jdbcDriverEntry"))
- , m_xPBTestJavaDriver(m_xBuilder->weld_button("testDriverButton"))
+ , m_xHeaderText(m_xBuilder->weld_label(u"header"_ustr))
+ , m_xFTHelpText(m_xBuilder->weld_label(u"helpLabel"_ustr))
+ , m_xFTDatabasename(m_xBuilder->weld_label(u"dbNameLabel"_ustr))
+ , m_xETDatabasename(m_xBuilder->weld_entry(u"dbNameEntry"_ustr))
+ , m_xFTHostname(m_xBuilder->weld_label(u"hostNameLabel"_ustr))
+ , m_xETHostname(m_xBuilder->weld_entry(u"hostNameEntry"_ustr))
+ , m_xFTPortNumber(m_xBuilder->weld_label(u"portNumLabel"_ustr))
+ , m_xFTDefaultPortNumber(m_xBuilder->weld_label(u"portNumDefLabel"_ustr))
+ , m_xNFPortNumber(m_xBuilder->weld_spin_button(u"portNumEntry"_ustr))
+ , m_xFTDriverClass(m_xBuilder->weld_label(u"jdbcDriverLabel"_ustr))
+ , m_xETDriverClass(m_xBuilder->weld_entry(u"jdbcDriverEntry"_ustr))
+ , m_xPBTestJavaDriver(m_xBuilder->weld_button(u"testDriverButton"_ustr))
{
m_xFTDriverClass->set_label(DBA_RES(pDriverClassId));
@@ -468,7 +468,7 @@ using namespace ::com::sun::star;
IMPL_LINK_NOARG(OGeneralSpecialJDBCConnectionPageSetup, OnTestJavaClickHdl, weld::Button&, void)
{
- OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
+ assert(m_pAdminDialog && "No Admin dialog set! ->GPF");
bool bSuccess = false;
#if HAVE_FEATURE_JAVA
@@ -508,12 +508,12 @@ using namespace ::com::sun::star;
// OPostgresConnectionPageSetup
OPostgresConnectionPageSetup::OPostgresConnectionPageSetup( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs , sal_uInt16 _nPortId )
- : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/postgrespage.ui", "SpecialPostgresPage", _rCoreAttrs)
+ : OGenericAdministrationPage(pPage, pController, u"dbaccess/ui/postgrespage.ui"_ustr, u"SpecialPostgresPage"_ustr, _rCoreAttrs)
, m_nPortId(_nPortId)
- , m_xETDatabasename(m_xBuilder->weld_entry("dbNameEntry"))
- , m_xETHostname(m_xBuilder->weld_entry("hostNameEntry"))
- , m_xNFPortNumber(m_xBuilder->weld_spin_button("portNumEntry"))
- , m_xConnectionURL(new OConnectionURLEdit(m_xBuilder->weld_entry("browseurl"), m_xBuilder->weld_label("browselabel")))
+ , m_xETDatabasename(m_xBuilder->weld_entry(u"dbNameEntry"_ustr))
+ , m_xETHostname(m_xBuilder->weld_entry(u"hostNameEntry"_ustr))
+ , m_xNFPortNumber(m_xBuilder->weld_spin_button(u"portNumEntry"_ustr))
+ , m_xConnectionURL(new OConnectionURLEdit(m_xBuilder->weld_entry(u"browseurl"_ustr), m_xBuilder->weld_label(u"browselabel"_ustr)))
{
m_xETDatabasename->connect_changed(LINK(this, OGenericAdministrationPage, OnControlEntryModifyHdl));
m_xETHostname->connect_changed(LINK(this, OGenericAdministrationPage, OnControlEntryModifyHdl));
@@ -631,11 +631,11 @@ using namespace ::com::sun::star;
// OMySQLJDBCConnectionPageSetup
OJDBCConnectionPageSetup::OJDBCConnectionPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
- : OConnectionTabPageSetup(pPage, pController, "dbaccess/ui/jdbcconnectionpage.ui", "JDBCConnectionPage", rCoreAttrs,
+ : OConnectionTabPageSetup(pPage, pController, u"dbaccess/ui/jdbcconnectionpage.ui"_ustr, u"JDBCConnectionPage"_ustr, rCoreAttrs,
STR_JDBC_HELPTEXT, STR_JDBC_HEADERTEXT, STR_COMMONURL)
- , m_xFTDriverClass(m_xBuilder->weld_label("jdbcLabel"))
- , m_xETDriverClass(m_xBuilder->weld_entry("jdbcEntry"))
- , m_xPBTestJavaDriver(m_xBuilder->weld_button("jdbcButton"))
+ , m_xFTDriverClass(m_xBuilder->weld_label(u"jdbcLabel"_ustr))
+ , m_xETDriverClass(m_xBuilder->weld_entry(u"jdbcEntry"_ustr))
+ , m_xPBTestJavaDriver(m_xBuilder->weld_button(u"jdbcButton"_ustr))
{
m_xETDriverClass->connect_changed(LINK(this, OJDBCConnectionPageSetup, OnEditModified));
m_xPBTestJavaDriver->connect_clicked(LINK(this,OJDBCConnectionPageSetup,OnTestJavaClickHdl));
@@ -704,7 +704,7 @@ using namespace ::com::sun::star;
IMPL_LINK_NOARG(OJDBCConnectionPageSetup, OnTestJavaClickHdl, weld::Button&, void)
{
- OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
+ assert(m_pAdminDialog && "No Admin dialog set! ->GPF");
bool bSuccess = false;
#if HAVE_FEATURE_JAVA
try
@@ -742,9 +742,9 @@ using namespace ::com::sun::star;
}
OSpreadSheetConnectionPageSetup::OSpreadSheetConnectionPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
- : OConnectionTabPageSetup(pPage, pController, "dbaccess/ui/dbwizspreadsheetpage.ui", "DBWizSpreadsheetPage",
+ : OConnectionTabPageSetup(pPage, pController, u"dbaccess/ui/dbwizspreadsheetpage.ui"_ustr, u"DBWizSpreadsheetPage"_ustr,
rCoreAttrs, STR_SPREADSHEET_HELPTEXT, STR_SPREADSHEET_HEADERTEXT, STR_SPREADSHEETPATH)
- , m_xPasswordrequired(m_xBuilder->weld_check_button("passwordrequired"))
+ , m_xPasswordrequired(m_xBuilder->weld_check_button(u"passwordrequired"_ustr))
{
m_xPasswordrequired->connect_toggled(LINK(this, OGenericAdministrationPage, OnControlModifiedButtonClick));
}
@@ -777,12 +777,12 @@ using namespace ::com::sun::star;
}
OAuthentificationPageSetup::OAuthentificationPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs)
- : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/authentificationpage.ui", "AuthentificationPage", _rCoreAttrs)
- , m_xFTHelpText(m_xBuilder->weld_label("helptext"))
- , m_xFTUserName(m_xBuilder->weld_label("generalUserNameLabel"))
- , m_xETUserName(m_xBuilder->weld_entry("generalUserNameEntry"))
- , m_xCBPasswordRequired(m_xBuilder->weld_check_button("passRequiredCheckbutton"))
- , m_xPBTestConnection(m_xBuilder->weld_button("testConnectionButton"))
+ : OGenericAdministrationPage(pPage, pController, u"dbaccess/ui/authentificationpage.ui"_ustr, u"AuthentificationPage"_ustr, _rCoreAttrs)
+ , m_xFTHelpText(m_xBuilder->weld_label(u"helptext"_ustr))
+ , m_xFTUserName(m_xBuilder->weld_label(u"generalUserNameLabel"_ustr))
+ , m_xETUserName(m_xBuilder->weld_entry(u"generalUserNameEntry"_ustr))
+ , m_xCBPasswordRequired(m_xBuilder->weld_check_button(u"passRequiredCheckbutton"_ustr))
+ , m_xPBTestConnection(m_xBuilder->weld_button(u"testConnectionButton"_ustr))
{
m_xETUserName->connect_changed(LINK(this,OGenericAdministrationPage,OnControlEntryModifyHdl));
m_xCBPasswordRequired->connect_toggled(LINK(this,OGenericAdministrationPage,OnControlModifiedButtonClick));
@@ -840,15 +840,15 @@ using namespace ::com::sun::star;
}
OFinalDBPageSetup::OFinalDBPageSetup(weld::Container* pPage, ODbTypeWizDialogSetup* pController, const SfxItemSet& _rCoreAttrs)
- : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/finalpagewizard.ui", "PageFinal", _rCoreAttrs)
- , m_xFTFinalHeader(m_xBuilder->weld_label("headerText"))
- , m_xFTFinalHelpText(m_xBuilder->weld_label("helpText"))
- , m_xRBRegisterDataSource(m_xBuilder->weld_radio_button("yesregister"))
- , m_xRBDontregisterDataSource(m_xBuilder->weld_radio_button("noregister"))
- , m_xFTAdditionalSettings(m_xBuilder->weld_label("additionalText"))
- , m_xCBOpenAfterwards(m_xBuilder->weld_check_button("openediting"))
- , m_xCBStartTableWizard(m_xBuilder->weld_check_button("usewizard"))
- , m_xFTFinalText(m_xBuilder->weld_label("finishText"))
+ : OGenericAdministrationPage(pPage, pController, u"dbaccess/ui/finalpagewizard.ui"_ustr, u"PageFinal"_ustr, _rCoreAttrs)
+ , m_xFTFinalHeader(m_xBuilder->weld_label(u"headerText"_ustr))
+ , m_xFTFinalHelpText(m_xBuilder->weld_label(u"helpText"_ustr))
+ , m_xRBRegisterDataSource(m_xBuilder->weld_radio_button(u"yesregister"_ustr))
+ , m_xRBDontregisterDataSource(m_xBuilder->weld_radio_button(u"noregister"_ustr))
+ , m_xFTAdditionalSettings(m_xBuilder->weld_label(u"additionalText"_ustr))
+ , m_xCBOpenAfterwards(m_xBuilder->weld_check_button(u"openediting"_ustr))
+ , m_xCBStartTableWizard(m_xBuilder->weld_check_button(u"usewizard"_ustr))
+ , m_xFTFinalText(m_xBuilder->weld_label(u"finishText"_ustr))
{
m_xCBOpenAfterwards->connect_toggled(LINK(this, OFinalDBPageSetup, OnOpenSelected));
m_xRBRegisterDataSource->set_active(true);
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 3fa122bf6c69..78a19a9dd813 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -162,30 +162,30 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer
m_aIndirectPropTranslator.emplace( DSID_AS_BEFORE_CORRNAME, INFO_AS_BEFORE_CORRELATION_NAME );
m_aIndirectPropTranslator.emplace( DSID_CHECK_REQUIRED_FIELDS, INFO_FORMS_CHECK_REQUIRED_FIELDS );
m_aIndirectPropTranslator.emplace( DSID_ESCAPE_DATETIME, INFO_ESCAPE_DATETIME );
- m_aIndirectPropTranslator.emplace( DSID_PRIMARY_KEY_SUPPORT, OUString("PrimaryKeySupport") );
+ m_aIndirectPropTranslator.emplace( DSID_PRIMARY_KEY_SUPPORT, u"PrimaryKeySupport"_ustr );
m_aIndirectPropTranslator.emplace( DSID_PARAMETERNAMESUBST, INFO_PARAMETERNAMESUBST );
m_aIndirectPropTranslator.emplace( DSID_IGNOREDRIVER_PRIV, INFO_IGNOREDRIVER_PRIV );
m_aIndirectPropTranslator.emplace( DSID_BOOLEANCOMPARISON, PROPERTY_BOOLEANCOMPARISONMODE );
m_aIndirectPropTranslator.emplace( DSID_ENABLEOUTERJOIN, PROPERTY_ENABLEOUTERJOIN );
m_aIndirectPropTranslator.emplace( DSID_CATALOG, PROPERTY_USECATALOGINSELECT );
m_aIndirectPropTranslator.emplace( DSID_SCHEMA, PROPERTY_USESCHEMAINSELECT );
- m_aIndirectPropTranslator.emplace( DSID_INDEXAPPENDIX, OUString("AddIndexAppendix") );
- m_aIndirectPropTranslator.emplace( DSID_DOSLINEENDS, OUString("PreferDosLikeLineEnds") );
- m_aIndirectPropTranslator.emplace( DSID_CONN_SOCKET, OUString("LocalSocket") );
- m_aIndirectPropTranslator.emplace( DSID_NAMED_PIPE, OUString("NamedPipe") );
- m_aIndirectPropTranslator.emplace( DSID_RESPECTRESULTSETTYPE, OUString("RespectDriverResultSetType") );
- m_aIndirectPropTranslator.emplace( DSID_MAX_ROW_SCAN, OUString("MaxRowScan") );
+ m_aIndirectPropTranslator.emplace( DSID_INDEXAPPENDIX, u"AddIndexAppendix"_ustr );
+ m_aIndirectPropTranslator.emplace( DSID_DOSLINEENDS, u"PreferDosLikeLineEnds"_ustr );
+ m_aIndirectPropTranslator.emplace( DSID_CONN_SOCKET, u"LocalSocket"_ustr );
+ m_aIndirectPropTranslator.emplace( DSID_NAMED_PIPE, u"NamedPipe"_ustr );
+ m_aIndirectPropTranslator.emplace( DSID_RESPECTRESULTSETTYPE, u"RespectDriverResultSetType"_ustr );
+ m_aIndirectPropTranslator.emplace( DSID_MAX_ROW_SCAN, u"MaxRowScan"_ustr );
// extra settings for ODBC
m_aIndirectPropTranslator.emplace( DSID_USECATALOG, INFO_USECATALOG );
// extra settings for an LDAP address book
m_aIndirectPropTranslator.emplace( DSID_CONN_LDAP_BASEDN, INFO_CONN_LDAP_BASEDN );
m_aIndirectPropTranslator.emplace( DSID_CONN_LDAP_ROWCOUNT, INFO_CONN_LDAP_ROWCOUNT );
- m_aIndirectPropTranslator.emplace( DSID_CONN_LDAP_USESSL, OUString("UseSSL") );
+ m_aIndirectPropTranslator.emplace( DSID_CONN_LDAP_USESSL, u"UseSSL"_ustr );
m_aIndirectPropTranslator.emplace( DSID_DOCUMENT_URL, PROPERTY_URL );
// Oracle
- m_aIndirectPropTranslator.emplace( DSID_IGNORECURRENCY, OUString("IgnoreCurrency") );
+ m_aIndirectPropTranslator.emplace( DSID_IGNORECURRENCY, u"IgnoreCurrency"_ustr );
try
{
@@ -226,7 +226,7 @@ bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyVal
Reference< XModel > xModel( getDataSourceOrModel( m_xDatasource ), UNO_QUERY_THROW );
::comphelper::NamedValueCollection aArgs( xModel->getArgs() );
- Reference< XInteractionHandler > xHandler( aArgs.getOrDefault( "InteractionHandler", Reference< XInteractionHandler >() ) );
+ Reference< XInteractionHandler > xHandler( aArgs.getOrDefault( u"InteractionHandler"_ustr, Reference< XInteractionHandler >() ) );
if ( !xHandler.is() )
{
@@ -380,7 +380,7 @@ Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const OUString
{
css::uno::Any anyEx = cppu::getCaughtException();
// wrap the exception into an SQLException
- throw SQLException(sCurrentActionError, getORB(), "S1000", 0, anyEx);
+ throw SQLException(sCurrentActionError, getORB(), u"S1000"_ustr, 0, anyEx);
}
Reference< XDriver > xDriver = xDriverManager->getDriverByURL(_sURL);
@@ -389,7 +389,7 @@ Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const OUString
sCurrentActionError = DBA_RES(STR_NOREGISTEREDDRIVER);
sCurrentActionError = sCurrentActionError.replaceFirst("#connurl#", _sURL);
// will be caught and translated into an SQLContext exception
- throw SQLException(sCurrentActionError, getORB(), "S1000", 0, Any());
+ throw SQLException(sCurrentActionError, getORB(), u"S1000"_ustr, 0, Any());
}
return xDriver;
}
@@ -431,9 +431,9 @@ Reference< XPropertySet > const & ODbDataSourceAdministrationHelper::getCurrentD
OUString ODbDataSourceAdministrationHelper::getDatasourceType( const SfxItemSet& _rSet )
{
const SfxStringItem* pConnectURL = _rSet.GetItem<SfxStringItem>(DSID_CONNECTURL);
- OSL_ENSURE( pConnectURL , "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!" );
+ assert(pConnectURL && "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!");
const DbuTypeCollectionItem* pTypeCollection = _rSet.GetItem<DbuTypeCollectionItem>(DSID_TYPECOLLECTION);
- OSL_ENSURE(pTypeCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!");
+ assert(pTypeCollection && "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!");
::dbaccess::ODsnTypeCollection* pCollection = pTypeCollection->getCollection();
return pCollection->getType(pConnectURL->GetValue());
}
@@ -452,10 +452,10 @@ OUString ODbDataSourceAdministrationHelper::getConnectionURL() const
const SfxStringItem* pUrlItem = m_pItemSetHelper->getOutputSet()->GetItem<SfxStringItem>(DSID_CONNECTURL);
const DbuTypeCollectionItem* pTypeCollection = m_pItemSetHelper->getOutputSet()->GetItem<DbuTypeCollectionItem>(DSID_TYPECOLLECTION);
- OSL_ENSURE(pUrlItem,"Connection URL is NULL. -> GPF!");
- OSL_ENSURE(pTypeCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!");
+ assert(pUrlItem && "Connection URL is NULL. -> GPF!");
+ assert(pTypeCollection && "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!");
::dbaccess::ODsnTypeCollection* pCollection = pTypeCollection->getCollection();
- OSL_ENSURE(pCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid type collection!");
+ assert(pCollection && "ODbDataSourceAdministrationHelper::getDatasourceType: invalid type collection!");
switch( pCollection->determineType(eType) )
{
@@ -798,11 +798,11 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
}
Sequence< Any> aTypeSettings;
- aTypeSettings = aProperties.getOrDefault("TypeInfoSettings",aTypeSettings);
+ aTypeSettings = aProperties.getOrDefault(u"TypeInfoSettings"_ustr,aTypeSettings);
// here we have a special entry for types from oracle
if ( aTypeSettings.hasElements() )
{
- aRelevantSettings.insert(PropertyValue("TypeInfoSettings", 0, Any(aTypeSettings), PropertyState_DIRECT_VALUE));
+ aRelevantSettings.insert(PropertyValue(u"TypeInfoSettings"_ustr, 0, Any(aTypeSettings), PropertyState_DIRECT_VALUE));
}
// check which values are still left ('cause they were not present in the original sequence, but are to be set)
@@ -961,7 +961,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
TypeDescription aTD(_rValue.getValueType());
typelib_IndirectTypeDescription* pSequenceTD =
reinterpret_cast< typelib_IndirectTypeDescription* >(aTD.get());
- OSL_ENSURE(pSequenceTD && pSequenceTD->pType, "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid sequence type!");
+ assert(pSequenceTD && pSequenceTD->pType && "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid sequence type!");
Type aElementType(pSequenceTD->pType);
switch (aElementType.getTypeClass())
@@ -996,7 +996,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
OUString ODbDataSourceAdministrationHelper::getDocumentUrl(SfxItemSet const & _rDest)
{
const SfxStringItem* pUrlItem = _rDest.GetItem<SfxStringItem>(DSID_DOCUMENT_URL);
- OSL_ENSURE(pUrlItem,"Document URL is NULL. -> GPF!");
+ assert(pUrlItem && "Document URL is NULL. -> GPF!");
return pUrlItem->GetValue();
}
@@ -1007,10 +1007,10 @@ void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest)
const SfxStringItem* pUrlItem = _rDest.GetItem<SfxStringItem>(DSID_CONNECTURL);
const DbuTypeCollectionItem* pTypeCollection = _rDest.GetItem<DbuTypeCollectionItem>(DSID_TYPECOLLECTION);
- OSL_ENSURE(pUrlItem,"Connection URL is NULL. -> GPF!");
- OSL_ENSURE(pTypeCollection, "ODbAdminDialog::getDatasourceType: invalid items in the source set!");
+ assert(pUrlItem && "Connection URL is NULL. -> GPF!");
+ assert(pTypeCollection && "ODbAdminDialog::getDatasourceType: invalid items in the source set!");
::dbaccess::ODsnTypeCollection* pCollection = pTypeCollection->getCollection();
- OSL_ENSURE(pCollection, "ODbAdminDialog::getDatasourceType: invalid type collection!");
+ assert(pCollection && "ODbAdminDialog::getDatasourceType: invalid type collection!");
TypedWhichId<SfxInt32Item> nPortNumberId(0);
sal_Int32 nPortNumber = -1;
@@ -1081,7 +1081,7 @@ void ODbDataSourceAdministrationHelper::setDataSourceOrName( const Any& _rDataSo
// DbuTypeCollectionItem
DbuTypeCollectionItem::DbuTypeCollectionItem(sal_Int16 _nWhich, ::dbaccess::ODsnTypeCollection* _pCollection)
- :SfxPoolItem(_nWhich)
+ :SfxPoolItem(_nWhich, SfxItemType::DbuTypeCollectionItemType)
,m_pCollection(_pCollection)
{
}
diff --git a/dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx b/dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx
index df0d38e4ba87..5bede295c029 100644
--- a/dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx
+++ b/dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx
@@ -16,10 +16,10 @@ namespace dbaui
QueryPropertiesDialog::QueryPropertiesDialog(
weld::Window* pParent, const bool bDistinct, const sal_Int64 nLimit )
- : GenericDialogController(pParent, "dbaccess/ui/querypropertiesdialog.ui", "QueryPropertiesDialog")
- , m_xRB_Distinct(m_xBuilder->weld_radio_button("distinct"))
- , m_xRB_NonDistinct(m_xBuilder->weld_radio_button("nondistinct"))
- , m_xLB_Limit(m_xBuilder->weld_combo_box("limitbox"))
+ : GenericDialogController(pParent, u"dbaccess/ui/querypropertiesdialog.ui"_ustr, u"QueryPropertiesDialog"_ustr)
+ , m_xRB_Distinct(m_xBuilder->weld_radio_button(u"distinct"_ustr))
+ , m_xRB_NonDistinct(m_xBuilder->weld_radio_button(u"nondistinct"_ustr))
+ , m_xLB_Limit(m_xBuilder->weld_combo_box(u"limitbox"_ustr))
{
m_xRB_Distinct->set_active(bDistinct);
m_xRB_NonDistinct->set_active(!bDistinct);
diff --git a/dbaccess/source/ui/dlg/RelationDlg.cxx b/dbaccess/source/ui/dlg/RelationDlg.cxx
index 373f3c5242bd..c1bba08df1c5 100644
--- a/dbaccess/source/ui/dlg/RelationDlg.cxx
+++ b/dbaccess/source/ui/dlg/RelationDlg.cxx
@@ -40,19 +40,19 @@ ORelationDialog::ORelationDialog( OJoinTableView* pParent,
const TTableConnectionData::value_type& pConnectionData,
bool bAllowTableSelect )
: GenericDialogController(pParent->GetFrameWeld(),
- "dbaccess/ui/relationdialog.ui", "RelationDialog")
+ u"dbaccess/ui/relationdialog.ui"_ustr, u"RelationDialog"_ustr)
, m_pParent(pParent)
, m_pOrigConnData(pConnectionData)
, m_bTriedOneUpdate(false)
- , m_xRB_NoCascUpd(m_xBuilder->weld_radio_button("addaction"))
- , m_xRB_CascUpd(m_xBuilder->weld_radio_button("addcascade"))
- , m_xRB_CascUpdNull(m_xBuilder->weld_radio_button("addnull"))
- , m_xRB_CascUpdDefault(m_xBuilder->weld_radio_button("adddefault"))
- , m_xRB_NoCascDel(m_xBuilder->weld_radio_button("delaction"))
- , m_xRB_CascDel(m_xBuilder->weld_radio_button("delcascade"))
- , m_xRB_CascDelNull(m_xBuilder->weld_radio_button("delnull"))
- , m_xRB_CascDelDefault(m_xBuilder->weld_radio_button("deldefault"))
- , m_xPB_OK(m_xBuilder->weld_button("ok"))
+ , m_xRB_NoCascUpd(m_xBuilder->weld_radio_button(u"addaction"_ustr))
+ , m_xRB_CascUpd(m_xBuilder->weld_radio_button(u"addcascade"_ustr))
+ , m_xRB_CascUpdNull(m_xBuilder->weld_radio_button(u"addnull"_ustr))
+ , m_xRB_CascUpdDefault(m_xBuilder->weld_radio_button(u"adddefault"_ustr))
+ , m_xRB_NoCascDel(m_xBuilder->weld_radio_button(u"delaction"_ustr))
+ , m_xRB_CascDel(m_xBuilder->weld_radio_button(u"delcascade"_ustr))
+ , m_xRB_CascDelNull(m_xBuilder->weld_radio_button(u"delnull"_ustr))
+ , m_xRB_CascDelDefault(m_xBuilder->weld_radio_button(u"deldefault"_ustr))
+ , m_xPB_OK(m_xBuilder->weld_button(u"ok"_ustr))
{
// Copy connection
m_pConnData = pConnectionData->NewInstance();
diff --git a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx
index 872824c6e14c..1e17bf568d2d 100644
--- a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx
+++ b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx
@@ -33,7 +33,7 @@ OTableSubscriptionDialog::OTableSubscriptionDialog(weld::Window* pParent
,const Reference< XComponentContext >& _rxORB
,const css::uno::Any& _aDataSourceName)
: SfxSingleTabDialogController(pParent, _pItems,
- "dbaccess/ui/tablesfilterdialog.ui", "TablesFilterDialog")
+ u"dbaccess/ui/tablesfilterdialog.ui"_ustr, u"TablesFilterDialog"_ustr)
, m_pImpl(new ODbDataSourceAdministrationHelper(_rxORB, m_xDialog.get(), pParent, this))
, m_bStopExecution(false)
{
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
index 3148aad27924..e186b139c4e1 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
@@ -61,27 +61,27 @@ namespace dbaui
, m_aTextSeparatorList (STR_AUTOTEXTSEPARATORLIST)
, m_aTextNone (DBA_RES(STR_AUTOTEXT_FIELD_SEP_NONE))
, m_nAvailableSections( _nAvailableSections )
- , m_xBuilder(Application::CreateBuilder(pParent, "dbaccess/ui/textpage.ui"))
- , m_xContainer(m_xBuilder->weld_widget("TextPage"))
- , m_xExtensionHeader(m_xBuilder->weld_widget("extensionframe"))
- , m_xAccessTextFiles(m_xBuilder->weld_radio_button("textfile"))
- , m_xAccessCSVFiles(m_xBuilder->weld_radio_button("csvfile"))
- , m_xAccessOtherFiles(m_xBuilder->weld_radio_button("custom"))
- , m_xOwnExtension(m_xBuilder->weld_entry("extension"))
- , m_xExtensionExample(m_xBuilder->weld_label("example"))
- , m_xFormatHeader(m_xBuilder->weld_widget("formatframe"))
- , m_xFieldSeparatorLabel(m_xBuilder->weld_label("fieldlabel"))
- , m_xFieldSeparator(m_xBuilder->weld_combo_box("fieldseparator"))
- , m_xTextSeparatorLabel(m_xBuilder->weld_label("textlabel"))
- , m_xTextSeparator(m_xBuilder->weld_combo_box("textseparator"))
- , m_xDecimalSeparatorLabel(m_xBuilder->weld_label("decimallabel"))
- , m_xDecimalSeparator(m_xBuilder->weld_combo_box("decimalseparator"))
- , m_xThousandsSeparatorLabel(m_xBuilder->weld_label("thousandslabel"))
- , m_xThousandsSeparator(m_xBuilder->weld_combo_box("thousandsseparator"))
- , m_xRowHeader(m_xBuilder->weld_check_button("containsheaders"))
- , m_xCharSetHeader(m_xBuilder->weld_widget("charsetframe"))
- , m_xCharSetLabel(m_xBuilder->weld_label("charsetlabel"))
- , m_xCharSet(new CharSetListBox(m_xBuilder->weld_combo_box("charset")))
+ , m_xBuilder(Application::CreateBuilder(pParent, u"dbaccess/ui/textpage.ui"_ustr))
+ , m_xContainer(m_xBuilder->weld_widget(u"TextPage"_ustr))
+ , m_xExtensionHeader(m_xBuilder->weld_widget(u"extensionframe"_ustr))
+ , m_xAccessTextFiles(m_xBuilder->weld_radio_button(u"textfile"_ustr))
+ , m_xAccessCSVFiles(m_xBuilder->weld_radio_button(u"csvfile"_ustr))
+ , m_xAccessOtherFiles(m_xBuilder->weld_radio_button(u"custom"_ustr))
+ , m_xOwnExtension(m_xBuilder->weld_entry(u"extension"_ustr))
+ , m_xExtensionExample(m_xBuilder->weld_label(u"example"_ustr))
+ , m_xFormatHeader(m_xBuilder->weld_widget(u"formatframe"_ustr))
+ , m_xFieldSeparatorLabel(m_xBuilder->weld_label(u"fieldlabel"_ustr))
+ , m_xFieldSeparator(m_xBuilder->weld_combo_box(u"fieldseparator"_ustr))
+ , m_xTextSeparatorLabel(m_xBuilder->weld_label(u"textlabel"_ustr))
+ , m_xTextSeparator(m_xBuilder->weld_combo_box(u"textseparator"_ustr))
+ , m_xDecimalSeparatorLabel(m_xBuilder->weld_label(u"decimallabel"_ustr))
+ , m_xDecimalSeparator(m_xBuilder->weld_combo_box(u"decimalseparator"_ustr))
+ , m_xThousandsSeparatorLabel(m_xBuilder->weld_label(u"thousandslabel"_ustr))
+ , m_xThousandsSeparator(m_xBuilder->weld_combo_box(u"thousandsseparator"_ustr))
+ , m_xRowHeader(m_xBuilder->weld_check_button(u"containsheaders"_ustr))
+ , m_xCharSetHeader(m_xBuilder->weld_widget(u"charsetframe"_ustr))
+ , m_xCharSetLabel(m_xBuilder->weld_label(u"charsetlabel"_ustr))
+ , m_xCharSet(new CharSetListBox(m_xBuilder->weld_combo_box(u"charset"_ustr)))
{
for(sal_Int32 nIdx {0}; nIdx>=0;)
m_xFieldSeparator->append_text( lcl_getListEntry(m_aFieldSeparatorList, nIdx) );
diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx
index 82f901715461..21e293d75f07 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.cxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.cxx
@@ -73,12 +73,12 @@ public:
}
OPasswordDialog::OPasswordDialog(weld::Window* _pParent, std::u16string_view rUserName)
- : GenericDialogController(_pParent, "dbaccess/ui/password.ui", "PasswordDialog")
- , m_xUser(m_xBuilder->weld_frame("userframe"))
- , m_xEDOldPassword(m_xBuilder->weld_entry("oldpassword"))
- , m_xEDPassword(m_xBuilder->weld_entry("newpassword"))
- , m_xEDPasswordRepeat(m_xBuilder->weld_entry("confirmpassword"))
- , m_xOKBtn(m_xBuilder->weld_button("ok"))
+ : GenericDialogController(_pParent, u"dbaccess/ui/password.ui"_ustr, u"PasswordDialog"_ustr)
+ , m_xUser(m_xBuilder->weld_frame(u"userframe"_ustr))
+ , m_xEDOldPassword(m_xBuilder->weld_entry(u"oldpassword"_ustr))
+ , m_xEDPassword(m_xBuilder->weld_entry(u"newpassword"_ustr))
+ , m_xEDPasswordRepeat(m_xBuilder->weld_entry(u"confirmpassword"_ustr))
+ , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr))
{
OUString sUser = m_xUser->get_label();
sUser = sUser.replaceFirst("$name$: $", rUserName);
@@ -113,16 +113,16 @@ IMPL_LINK(OPasswordDialog, ModifiedHdl, weld::Entry&, rEdit, void)
// OUserAdmin
OUserAdmin::OUserAdmin(weld::Container* pPage, weld::DialogController* pController,const SfxItemSet& _rAttrSet)
- : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/useradminpage.ui", "UserAdminPage", _rAttrSet)
- , mxActionBar(m_xBuilder->weld_menu_button("action_menu"))
- , m_xUSER(m_xBuilder->weld_combo_box("user"))
- , m_xTable(m_xBuilder->weld_container("table"))
+ : OGenericAdministrationPage(pPage, pController, u"dbaccess/ui/useradminpage.ui"_ustr, u"UserAdminPage"_ustr, _rAttrSet)
+ , mxActionBar(m_xBuilder->weld_menu_button(u"action_menu"_ustr))
+ , m_xUSER(m_xBuilder->weld_combo_box(u"user"_ustr))
+ , m_xTable(m_xBuilder->weld_container(u"table"_ustr))
, m_xTableCtrlParent(m_xTable->CreateChildFrame())
, m_xTableCtrl(VclPtr<OTableGrantControl>::Create(m_xTableCtrlParent))
{
- mxActionBar->append_item(MNI_ACTION_ADD_USER, DBA_RES(STR_ADD_USER));
- mxActionBar->append_item(MNI_ACTION_DEL_USER, DBA_RES(STR_DELETE_USER));
- mxActionBar->append_item(MNI_ACTION_CHANGE_PASSWORD, DBA_RES(STR_CHANGE_PASSWORD));
+ mxActionBar->append_item(u"" MNI_ACTION_ADD_USER ""_ustr, DBA_RES(STR_ADD_USER));
+ mxActionBar->append_item(u"" MNI_ACTION_DEL_USER ""_ustr, DBA_RES(STR_DELETE_USER));
+ mxActionBar->append_item(u"" MNI_ACTION_CHANGE_PASSWORD ""_ustr, DBA_RES(STR_CHANGE_PASSWORD));
mxActionBar->connect_selected(LINK(this,OUserAdmin,MenuSelectHdl));
m_xTableCtrl->Show();
@@ -240,10 +240,10 @@ void OUserAdmin::FillUserNames()
}
Reference<XAppend> xAppend(m_xUsers,UNO_QUERY);
- mxActionBar->set_item_sensitive(MNI_ACTION_ADD_USER, xAppend.is());
+ mxActionBar->set_item_sensitive(u"" MNI_ACTION_ADD_USER ""_ustr, xAppend.is());
Reference<XDrop> xDrop(m_xUsers,UNO_QUERY);
- mxActionBar->set_item_sensitive(MNI_ACTION_DEL_USER, xDrop.is());
- mxActionBar->set_item_sensitive(MNI_ACTION_CHANGE_PASSWORD, m_xUsers.is());
+ mxActionBar->set_item_sensitive(u"" MNI_ACTION_DEL_USER ""_ustr, xDrop.is());
+ mxActionBar->set_item_sensitive(u"" MNI_ACTION_CHANGE_PASSWORD ""_ustr, m_xUsers.is());
m_xTableCtrl->Enable(m_xUsers.is());
}
diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.cxx b/dbaccess/source/ui/dlg/UserAdminDlg.cxx
index 3e554e1f3f57..a70db89f7c49 100644
--- a/dbaccess/source/ui/dlg/UserAdminDlg.cxx
+++ b/dbaccess/source/ui/dlg/UserAdminDlg.cxx
@@ -45,7 +45,7 @@ namespace dbaui
const Reference< XComponentContext >& rxORB,
const css::uno::Any& rDataSourceName,
const Reference< XConnection >& xConnection)
- : SfxTabDialogController(pParent, "dbaccess/ui/useradmindialog.ui", "UserAdminDialog", pItems)
+ : SfxTabDialogController(pParent, u"dbaccess/ui/useradmindialog.ui"_ustr, u"UserAdminDialog"_ustr, pItems)
, m_pParent(pParent)
, m_pItemSet(pItems)
, m_xConnection(xConnection)
@@ -59,7 +59,7 @@ namespace dbaui
// propagate this set as our new input set and reset the example set
m_xExampleSet.reset(new SfxItemSet(*GetInputSetImpl()));
- AddTabPage("settings", OUserAdmin::Create, nullptr);
+ AddTabPage(u"settings"_ustr, OUserAdmin::Create, nullptr);
// remove the reset button - it's meaning is much too ambiguous in this dialog
RemoveResetButton();
@@ -89,7 +89,7 @@ namespace dbaui
if ( !aMetaData.supportsUserAdministration( getORB() ) )
{
OUString sError(DBA_RES(STR_USERADMIN_NOT_AVAILABLE));
- throw SQLException(sError, nullptr, "S1000", 0, Any());
+ throw SQLException(sError, nullptr, u"S1000"_ustr, 0, Any());
}
}
catch(const SQLException&)
diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx
index de515f9e3777..cc98d6cf96ae 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -30,20 +30,20 @@ namespace dbaui
// MySQLNativeSettings
MySQLNativeSettings::MySQLNativeSettings(weld::Widget* pParent, const Link<weld::Widget*,void>& rControlModificationLink)
- : m_xBuilder(Application::CreateBuilder(pParent, "dbaccess/ui/mysqlnativesettings.ui"))
- , m_xContainer(m_xBuilder->weld_widget("MysqlNativeSettings"))
- , m_xDatabaseNameLabel(m_xBuilder->weld_label("dbnamelabel"))
- , m_xDatabaseName(m_xBuilder->weld_entry("dbname"))
- , m_xHostPortRadio(m_xBuilder->weld_radio_button("hostport"))
- , m_xSocketRadio(m_xBuilder->weld_radio_button("socketlabel"))
- , m_xNamedPipeRadio(m_xBuilder->weld_radio_button("namedpipelabel"))
- , m_xHostNameLabel(m_xBuilder->weld_label("serverlabel"))
- , m_xHostName(m_xBuilder->weld_entry("server"))
- , m_xPortLabel(m_xBuilder->weld_label("portlabel"))
- , m_xPort(m_xBuilder->weld_spin_button("port"))
- , m_xDefaultPort(m_xBuilder->weld_label("defaultport"))
- , m_xSocket(m_xBuilder->weld_entry("socket"))
- , m_xNamedPipe(m_xBuilder->weld_entry("namedpipe"))
+ : m_xBuilder(Application::CreateBuilder(pParent, u"dbaccess/ui/mysqlnativesettings.ui"_ustr))
+ , m_xContainer(m_xBuilder->weld_widget(u"MysqlNativeSettings"_ustr))
+ , m_xDatabaseNameLabel(m_xBuilder->weld_label(u"dbnamelabel"_ustr))
+ , m_xDatabaseName(m_xBuilder->weld_entry(u"dbname"_ustr))
+ , m_xHostPortRadio(m_xBuilder->weld_radio_button(u"hostport"_ustr))
+ , m_xSocketRadio(m_xBuilder->weld_radio_button(u"socketlabel"_ustr))
+ , m_xNamedPipeRadio(m_xBuilder->weld_radio_button(u"namedpipelabel"_ustr))
+ , m_xHostNameLabel(m_xBuilder->weld_label(u"serverlabel"_ustr))
+ , m_xHostName(m_xBuilder->weld_entry(u"server"_ustr))
+ , m_xPortLabel(m_xBuilder->weld_label(u"portlabel"_ustr))
+ , m_xPort(m_xBuilder->weld_spin_button(u"port"_ustr))
+ , m_xDefaultPort(m_xBuilder->weld_label(u"defaultport"_ustr))
+ , m_xSocket(m_xBuilder->weld_entry(u"socket"_ustr))
+ , m_xNamedPipe(m_xBuilder->weld_entry(u"namedpipe"_ustr))
, m_aControlModificationLink(rControlModificationLink)
{
m_xDatabaseName->connect_changed( LINK(this, MySQLNativeSettings, EditModifyHdl) );
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx
index 7d13a3886e44..b3bb07274d59 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -19,6 +19,7 @@
#pragma once
+#include <osl/diagnose.h>
#include <sfx2/tabdlg.hxx>
#include <vcl/wizardmachine.hxx>
#include <curledit.hxx>
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index a5056b1a8a4f..9c06085cb2e0 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -267,7 +267,7 @@ void QueryListFacade::_elementInserted( const container::ContainerEvent& _rEvent
if ( _rEvent.Accessor >>= sName )
{
OUString aQueryImage(ImageProvider::getDefaultImageResourceID(css::sdb::application::DatabaseObject::QUERY));
- m_rQueryList.append("", sName, aQueryImage);
+ m_rQueryList.append(u""_ustr, sName, aQueryImage);
}
}
@@ -297,7 +297,7 @@ void QueryListFacade::updateTableObjectList( bool /*_bAllowViews*/ )
const Sequence< OUString > aQueryNames = xQueries->getElementNames();
for ( auto const & name : aQueryNames )
- m_rQueryList.append("", name, aQueryImage);
+ m_rQueryList.append(u""_ustr, name, aQueryImage);
}
catch( const Exception& )
{
@@ -324,15 +324,15 @@ bool QueryListFacade::isLeafSelected() const
}
OAddTableDlg::OAddTableDlg(weld::Window* pParent, IAddTableDialogContext& _rContext)
- : GenericDialogController(pParent, "dbaccess/ui/tablesjoindialog.ui", "TablesJoinDialog")
+ : GenericDialogController(pParent, u"dbaccess/ui/tablesjoindialog.ui"_ustr, u"TablesJoinDialog"_ustr)
, m_rContext(_rContext)
- , m_xCaseTables(m_xBuilder->weld_radio_button("tables"))
- , m_xCaseQueries(m_xBuilder->weld_radio_button("queries"))
+ , m_xCaseTables(m_xBuilder->weld_radio_button(u"tables"_ustr))
+ , m_xCaseQueries(m_xBuilder->weld_radio_button(u"queries"_ustr))
// false means: do not show any buttons
- , m_xTableList(new OTableTreeListBox(m_xBuilder->weld_tree_view("tablelist"), false))
- , m_xQueryList(m_xBuilder->weld_tree_view("querylist"))
- , m_xAddButton(m_xBuilder->weld_button("add"))
- , m_xCloseButton(m_xBuilder->weld_button("close"))
+ , m_xTableList(new OTableTreeListBox(m_xBuilder->weld_tree_view(u"tablelist"_ustr), false))
+ , m_xQueryList(m_xBuilder->weld_tree_view(u"querylist"_ustr))
+ , m_xAddButton(m_xBuilder->weld_button(u"add"_ustr))
+ , m_xCloseButton(m_xBuilder->weld_button(u"close"_ustr))
{
weld::TreeView& rTableList = m_xTableList->GetWidget();
Size aSize(rTableList.get_approximate_digit_width() * 23,
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index 935a5370de11..09d7430fc926 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -54,24 +54,24 @@ namespace dbaui
// SpecialSettingsPage
SpecialSettingsPage::SpecialSettingsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs, const DataSourceMetaData& _rDSMeta)
- : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/specialsettingspage.ui", "SpecialSettingsPage", _rCoreAttrs)
+ : OGenericAdministrationPage(pPage, pController, u"dbaccess/ui/specialsettingspage.ui"_ustr, u"SpecialSettingsPage"_ustr, _rCoreAttrs)
, m_aBooleanSettings {
- { m_xIsSQL92Check, "usesql92", DSID_SQL92CHECK, false, false },
- { m_xAppendTableAlias, "append", DSID_APPEND_TABLE_ALIAS, false, false },
- { m_xAsBeforeCorrelationName, "useas", DSID_AS_BEFORE_CORRNAME, false, false },
- { m_xEnableOuterJoin, "useoj", DSID_ENABLEOUTERJOIN, false, false },
- { m_xIgnoreDriverPrivileges, "ignoreprivs", DSID_IGNOREDRIVER_PRIV, false, false },
- { m_xParameterSubstitution, "replaceparams", DSID_PARAMETERNAMESUBST, false, false },
- { m_xSuppressVersionColumn, "displayver", DSID_SUPPRESSVERSIONCL, true, false },
- { m_xCatalog, "usecatalogname", DSID_CATALOG, false, false },
- { m_xSchema, "useschemaname", DSID_SCHEMA, false, false },
- { m_xIndexAppendix, "createindex", DSID_INDEXAPPENDIX, false, false },
- { m_xDosLineEnds, "eol", DSID_DOSLINEENDS, false, false },
- { m_xCheckRequiredFields, "inputchecks", DSID_CHECK_REQUIRED_FIELDS, false, false },
- { m_xIgnoreCurrency, "ignorecurrency", DSID_IGNORECURRENCY, false, false },
- { m_xEscapeDateTime, "useodbcliterals", DSID_ESCAPE_DATETIME, false, false },
- { m_xPrimaryKeySupport, "primarykeys", DSID_PRIMARY_KEY_SUPPORT, false, false },
- { m_xRespectDriverResultSetType, "resulttype", DSID_RESPECTRESULTSETTYPE, false, false } }
+ { m_xIsSQL92Check, u"usesql92"_ustr, DSID_SQL92CHECK, false, false },
+ { m_xAppendTableAlias, u"append"_ustr, DSID_APPEND_TABLE_ALIAS, false, false },
+ { m_xAsBeforeCorrelationName, u"useas"_ustr, DSID_AS_BEFORE_CORRNAME, false, false },
+ { m_xEnableOuterJoin, u"useoj"_ustr, DSID_ENABLEOUTERJOIN, false, false },
+ { m_xIgnoreDriverPrivileges, u"ignoreprivs"_ustr, DSID_IGNOREDRIVER_PRIV, false, false },
+ { m_xParameterSubstitution, u"replaceparams"_ustr, DSID_PARAMETERNAMESUBST, false, false },
+ { m_xSuppressVersionColumn, u"displayver"_ustr, DSID_SUPPRESSVERSIONCL, true, false },
+ { m_xCatalog, u"usecatalogname"_ustr, DSID_CATALOG, false, false },
+ { m_xSchema, u"useschemaname"_ustr, DSID_SCHEMA, false, false },
+ { m_xIndexAppendix, u"createindex"_ustr, DSID_INDEXAPPENDIX, false, false },
+ { m_xDosLineEnds, u"eol"_ustr, DSID_DOSLINEENDS, false, false },
+ { m_xCheckRequiredFields, u"inputchecks"_ustr, DSID_CHECK_REQUIRED_FIELDS, false, false },
+ { m_xIgnoreCurrency, u"ignorecurrency"_ustr, DSID_IGNORECURRENCY, false, false },
+ { m_xEscapeDateTime, u"useodbcliterals"_ustr, DSID_ESCAPE_DATETIME, false, false },
+ { m_xPrimaryKeySupport, u"primarykeys"_ustr, DSID_PRIMARY_KEY_SUPPORT, false, false },
+ { m_xRespectDriverResultSetType, u"resulttype"_ustr, DSID_RESPECTRESULTSETTYPE, false, false } }
, m_bHasBooleanComparisonMode( _rDSMeta.getFeatureSet().has( DSID_BOOLEANCOMPARISON ) )
, m_bHasMaxRowScan( _rDSMeta.getFeatureSet().has( DSID_MAX_ROW_SCAN ) )
{
@@ -97,8 +97,8 @@ namespace dbaui
// create the controls for the boolean comparison mode
if ( m_bHasBooleanComparisonMode )
{
- m_xBooleanComparisonModeLabel = m_xBuilder->weld_label("comparisonft");
- m_xBooleanComparisonMode = m_xBuilder->weld_combo_box("comparison");
+ m_xBooleanComparisonModeLabel = m_xBuilder->weld_label(u"comparisonft"_ustr);
+ m_xBooleanComparisonMode = m_xBuilder->weld_combo_box(u"comparison"_ustr);
m_xBooleanComparisonMode->connect_changed(LINK(this, SpecialSettingsPage, BooleanComparisonSelectHdl));
m_xBooleanComparisonModeLabel->show();
m_xBooleanComparisonMode->show();
@@ -106,8 +106,8 @@ namespace dbaui
// create the controls for the max row scan
if ( m_bHasMaxRowScan )
{
- m_xMaxRowScanLabel = m_xBuilder->weld_label("rowsft");
- m_xMaxRowScan = m_xBuilder->weld_spin_button("rows");
+ m_xMaxRowScanLabel = m_xBuilder->weld_label(u"rowsft"_ustr);
+ m_xMaxRowScan = m_xBuilder->weld_spin_button(u"rows"_ustr);
m_xMaxRowScan->connect_value_changed(LINK(this, OGenericAdministrationPage, OnControlSpinButtonModifyHdl));
m_xMaxRowScanLabel->show();
m_xMaxRowScan->show();
@@ -284,11 +284,11 @@ namespace dbaui
// GeneratedValuesPage
GeneratedValuesPage::GeneratedValuesPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs)
- : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/generatedvaluespage.ui", "GeneratedValuesPage", _rCoreAttrs)
- , m_xAutoRetrievingEnabled(m_xBuilder->weld_check_button("autoretrieve"))
- , m_xGrid(m_xBuilder->weld_widget("grid"))
- , m_xAutoIncrement(m_xBuilder->weld_entry("statement"))
- , m_xAutoRetrieving(m_xBuilder->weld_entry("query"))
+ : OGenericAdministrationPage(pPage, pController, u"dbaccess/ui/generatedvaluespage.ui"_ustr, u"GeneratedValuesPage"_ustr, _rCoreAttrs)
+ , m_xAutoRetrievingEnabled(m_xBuilder->weld_check_button(u"autoretrieve"_ustr))
+ , m_xGrid(m_xBuilder->weld_widget(u"grid"_ustr))
+ , m_xAutoIncrement(m_xBuilder->weld_entry(u"statement"_ustr))
+ , m_xAutoRetrieving(m_xBuilder->weld_entry(u"query"_ustr))
{
m_xAutoRetrievingEnabled->connect_toggled(LINK(this, GeneratedValuesPage, OnAutoToggleHdl));
m_xAutoIncrement->connect_changed(LINK(this, OGenericAdministrationPage, OnControlEntryModifyHdl));
@@ -356,7 +356,7 @@ namespace dbaui
// AdvancedSettingsDialog
AdvancedSettingsDialog::AdvancedSettingsDialog(weld::Window* pParent, SfxItemSet* _pItems,
const Reference< XComponentContext >& _rxContext, const Any& _aDataSourceName )
- : SfxTabDialogController(pParent, "dbaccess/ui/advancedsettingsdialog.ui", "AdvancedSettingsDialog", _pItems)
+ : SfxTabDialogController(pParent, u"dbaccess/ui/advancedsettingsdialog.ui"_ustr, u"AdvancedSettingsDialog"_ustr, _pItems)
{
m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxContext, m_xDialog.get(), pParent, this));
m_pImpl->setDataSourceOrName(_aDataSourceName);
@@ -373,15 +373,15 @@ namespace dbaui
// auto-generated values?
if (rFeatures.supportsGeneratedValues())
- AddTabPage("generated", ODriversSettings::CreateGeneratedValuesPage, nullptr);
+ AddTabPage(u"generated"_ustr, ODriversSettings::CreateGeneratedValuesPage, nullptr);
else
- RemoveTabPage("generated");
+ RemoveTabPage(u"generated"_ustr);
// any "special settings"?
if (rFeatures.supportsAnySpecialSetting())
- AddTabPage("special", ODriversSettings::CreateSpecialSettingsPage, nullptr);
+ AddTabPage(u"special"_ustr, ODriversSettings::CreateSpecialSettingsPage, nullptr);
else
- RemoveTabPage("special");
+ RemoveTabPage(u"special"_ustr);
// remove the reset button - it's meaning is much too ambiguous in this dialog
RemoveResetButton();
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index 2705d56362de..27b226256736 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -44,8 +44,8 @@ using namespace com::sun::star::beans;
ODbAdminDialog::ODbAdminDialog(weld::Window* pParent,
SfxItemSet const * _pItems,
const Reference< XComponentContext >& _rxContext)
- : SfxTabDialogController(pParent, "dbaccess/ui/admindialog.ui", "AdminDialog", _pItems)
- , m_sMainPageID("advanced")
+ : SfxTabDialogController(pParent, u"dbaccess/ui/admindialog.ui"_ustr, u"AdminDialog"_ustr, _pItems)
+ , m_sMainPageID(u"advanced"_ustr)
{
m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxContext, m_xDialog.get(), pParent, this));
@@ -97,35 +97,35 @@ void ODbAdminDialog::impl_selectDataSource(const css::uno::Any& _aDataSourceName
switch ( eType )
{
case ::dbaccess::DST_DBASE:
- addDetailPage("dbase", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateDbase);
+ addDetailPage(u"dbase"_ustr, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateDbase);
break;
case ::dbaccess::DST_ADO:
- addDetailPage("ado", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateAdo);
+ addDetailPage(u"ado"_ustr, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateAdo);
break;
case ::dbaccess::DST_FLAT:
- addDetailPage("text", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateText);
+ addDetailPage(u"text"_ustr, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateText);
break;
case ::dbaccess::DST_ODBC:
- addDetailPage("odbc", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateODBC);
+ addDetailPage(u"odbc"_ustr, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateODBC);
break;
case ::dbaccess::DST_MYSQL_ODBC:
- addDetailPage("mysqlodbc", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateMySQLODBC);
+ addDetailPage(u"mysqlodbc"_ustr, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateMySQLODBC);
break;
case ::dbaccess::DST_MYSQL_JDBC:
- addDetailPage("mysqljdbc", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateMySQLJDBC);
+ addDetailPage(u"mysqljdbc"_ustr, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateMySQLJDBC);
break;
case ::dbaccess::DST_ORACLE_JDBC:
- addDetailPage("oraclejdbc", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateOracleJDBC);
+ addDetailPage(u"oraclejdbc"_ustr, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateOracleJDBC);
break;
case ::dbaccess::DST_LDAP:
- addDetailPage("ldap",STR_PAGETITLE_ADVANCED,ODriversSettings::CreateLDAP);
+ addDetailPage(u"ldap"_ustr,STR_PAGETITLE_ADVANCED,ODriversSettings::CreateLDAP);
break;
case ::dbaccess::DST_USERDEFINE1: /// first user defined driver
case ::dbaccess::DST_USERDEFINE2:
@@ -180,9 +180,9 @@ void ODbAdminDialog::impl_resetPages(const Reference< XPropertySet >& _rxDatasou
::dbaccess::ODsnTypeCollection* pCollection = pCollectionItem->getCollection();
if ( pCollection->determineType(getDatasourceType( *m_xExampleSet )) == ::dbaccess::DST_MYSQL_NATIVE )
{
- OUString sMySqlNative("mysqlnative");
+ OUString sMySqlNative(u"mysqlnative"_ustr);
AddTabPage(sMySqlNative, DBA_RES(STR_PAGETITLE_CONNECTION), ODriversSettings::CreateMySQLNATIVE);
- RemoveTabPage("advanced");
+ RemoveTabPage(u"advanced"_ustr);
m_sMainPageID = sMySqlNative;
}
@@ -292,7 +292,7 @@ static ItemInfoPackage& getItemInfoPackageAdminDlg()
{ DSID_TEXTDELIMITER, new SfxStringItem(DSID_TEXTDELIMITER, OUString('"')), 0, SFX_ITEMINFOFLAG_NONE },
{ DSID_DECIMALDELIMITER, new SfxStringItem(DSID_DECIMALDELIMITER, OUString('.')), 0, SFX_ITEMINFOFLAG_NONE },
{ DSID_THOUSANDSDELIMITER, new SfxStringItem(DSID_THOUSANDSDELIMITER, OUString()), 0, SFX_ITEMINFOFLAG_NONE },
- { DSID_TEXTFILEEXTENSION, new SfxStringItem(DSID_TEXTFILEEXTENSION, "txt"), 0, SFX_ITEMINFOFLAG_NONE },
+ { DSID_TEXTFILEEXTENSION, new SfxStringItem(DSID_TEXTFILEEXTENSION, u"txt"_ustr), 0, SFX_ITEMINFOFLAG_NONE },
{ DSID_TEXTFILEHEADER, new SfxBoolItem(DSID_TEXTFILEHEADER, true), 0, SFX_ITEMINFOFLAG_NONE },
{ DSID_PARAMETERNAMESUBST, new SfxBoolItem(DSID_PARAMETERNAMESUBST, false), 0, SFX_ITEMINFOFLAG_NONE },
{ DSID_CONN_PORTNUMBER, new SfxInt32Item(DSID_CONN_PORTNUMBER, 8100), 0, SFX_ITEMINFOFLAG_NONE },
@@ -362,7 +362,7 @@ void ODbAdminDialog::createItemSet(std::unique_ptr<SfxItemSet>& _rpSet, rtl::Ref
// just to be sure...
_rpSet = nullptr;
_rpPool = nullptr;
- _rpPool = new SfxItemPool("DSAItemPool");
+ _rpPool = new SfxItemPool(u"DSAItemPool"_ustr);
// here we have to use the callback to create all needed default entries since
// the DSID_TYPECOLLECTION needs the local given _pTypeCollection. Thus this will
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index 35db6e446ee4..bb6f685ce0c1 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -41,17 +41,17 @@ constexpr OString aGroupIdent("dBase III"_ostr);
ODbaseIndexDialog::ODbaseIndexDialog(weld::Window * pParent, OUString aDataSrcName)
- : GenericDialogController(pParent, "dbaccess/ui/dbaseindexdialog.ui", "DBaseIndexDialog")
+ : GenericDialogController(pParent, u"dbaccess/ui/dbaseindexdialog.ui"_ustr, u"DBaseIndexDialog"_ustr)
, m_aDSN(std::move(aDataSrcName))
- , m_xPB_OK(m_xBuilder->weld_button("ok"))
- , m_xCB_Tables(m_xBuilder->weld_combo_box("table"))
- , m_xIndexes(m_xBuilder->weld_widget("frame"))
- , m_xLB_TableIndexes(m_xBuilder->weld_tree_view("tableindex"))
- , m_xLB_FreeIndexes(m_xBuilder->weld_tree_view("freeindex"))
- , m_xAdd(m_xBuilder->weld_button("add"))
- , m_xRemove(m_xBuilder->weld_button("remove"))
- , m_xAddAll(m_xBuilder->weld_button("addall"))
- , m_xRemoveAll(m_xBuilder->weld_button("removeall"))
+ , m_xPB_OK(m_xBuilder->weld_button(u"ok"_ustr))
+ , m_xCB_Tables(m_xBuilder->weld_combo_box(u"table"_ustr))
+ , m_xIndexes(m_xBuilder->weld_widget(u"frame"_ustr))
+ , m_xLB_TableIndexes(m_xBuilder->weld_tree_view(u"tableindex"_ustr))
+ , m_xLB_FreeIndexes(m_xBuilder->weld_tree_view(u"freeindex"_ustr))
+ , m_xAdd(m_xBuilder->weld_button(u"add"_ustr))
+ , m_xRemove(m_xBuilder->weld_button(u"remove"_ustr))
+ , m_xAddAll(m_xBuilder->weld_button(u"addall"_ustr))
+ , m_xRemoveAll(m_xBuilder->weld_button(u"removeall"_ustr))
{
int nWidth = m_xLB_TableIndexes->get_approximate_digit_width() * 18;
int nHeight = m_xLB_TableIndexes->get_height_rows(10);
@@ -411,7 +411,7 @@ void OTableInfo::WriteInfFile( const OUString& rDSN ) const
try
{
::ucbhelper::Content aContent(aURL.GetURLNoPass(),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
- aContent.executeCommand( "delete", Any( true ) );
+ aContent.executeCommand( u"delete"_ustr, Any( true ) );
}
catch (const Exception& )
{
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 8aa4c3e22ffd..9b9e05dbc317 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -676,10 +676,10 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
CreateDatabase();
::comphelper::NamedValueCollection aArgs( xModel->getArgs() );
- aArgs.put( "Overwrite", true );
- aArgs.put( "InteractionHandler", xHandler );
- aArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG );
- aArgs.put( "IgnoreFirebirdMigration", true );
+ aArgs.put( u"Overwrite"_ustr, true );
+ aArgs.put( u"InteractionHandler"_ustr, xHandler );
+ aArgs.put( u"MacroExecutionMode"_ustr, MacroExecMode::USE_CONFIG );
+ aArgs.put( u"IgnoreFirebirdMigration"_ustr, true );
OUString sPath = ODbDataSourceAdministrationHelper::getDocumentUrl( *m_pOutSet );
xStore->storeAsURL( sPath, aArgs.getPropertyValues() );
@@ -915,14 +915,14 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
if ( m_xFrameLoader.is() )
{
::comphelper::NamedValueCollection aLoadArgs;
- aLoadArgs.put( "InteractionHandler", m_xInteractionHandler );
- aLoadArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG );
+ aLoadArgs.put( u"InteractionHandler"_ustr, m_xInteractionHandler );
+ aLoadArgs.put( u"MacroExecutionMode"_ustr, MacroExecMode::USE_CONFIG );
Sequence< PropertyValue > aLoadArgPV;
aLoadArgs >>= aLoadArgPV;
m_xFrameLoader->loadComponentFromURL( m_sURL,
- "_default",
+ u"_default"_ustr,
FrameSearchFlag::ALL,
aLoadArgPV
);
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index ed3d60692f34..65af148913ba 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -54,20 +54,20 @@ namespace dbaui
{
if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseOptions)
{
- m_xOptionsLabel = m_xBuilder->weld_label("optionslabel");
+ m_xOptionsLabel = m_xBuilder->weld_label(u"optionslabel"_ustr);
m_xOptionsLabel->show();
- m_xOptions = m_xBuilder->weld_entry("options");
+ m_xOptions = m_xBuilder->weld_entry(u"options"_ustr);
m_xOptions->show();
m_xOptions->connect_changed(LINK(this,OGenericAdministrationPage,OnControlEntryModifyHdl));
}
if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseCharset)
{
- m_xDataConvertLabel = m_xBuilder->weld_label("charsetheader");
+ m_xDataConvertLabel = m_xBuilder->weld_label(u"charsetheader"_ustr);
m_xDataConvertLabel->show();
- m_xCharsetLabel = m_xBuilder->weld_label("charsetlabel");
+ m_xCharsetLabel = m_xBuilder->weld_label(u"charsetlabel"_ustr);
m_xCharsetLabel->show();
- m_xCharset.reset(new CharSetListBox(m_xBuilder->weld_combo_box("charset")));
+ m_xCharset.reset(new CharSetListBox(m_xBuilder->weld_combo_box(u"charset"_ustr)));
m_xCharset->show();
m_xCharset->connect_changed(LINK(this, OCommonBehaviourTabPage, CharsetSelectHdl));
}
@@ -152,11 +152,11 @@ namespace dbaui
// ODbaseDetailsPage
ODbaseDetailsPage::ODbaseDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs)
- : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/dbasepage.ui", "DbasePage",
+ : OCommonBehaviourTabPage(pPage, pController, u"dbaccess/ui/dbasepage.ui"_ustr, u"DbasePage"_ustr,
_rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset)
- , m_xShowDeleted(m_xBuilder->weld_check_button("showDelRowsCheckbutton"))
- , m_xFT_Message(m_xBuilder->weld_label("specMessageLabel"))
- , m_xIndexes(m_xBuilder->weld_button("indiciesButton"))
+ , m_xShowDeleted(m_xBuilder->weld_check_button(u"showDelRowsCheckbutton"_ustr))
+ , m_xFT_Message(m_xBuilder->weld_label(u"specMessageLabel"_ustr))
+ , m_xIndexes(m_xBuilder->weld_button(u"indiciesButton"_ustr))
{
m_xIndexes->connect_clicked(LINK(this, ODbaseDetailsPage, OnButtonClicked));
m_xShowDeleted->connect_toggled(LINK(this, ODbaseDetailsPage, OnButtonToggled));
@@ -220,7 +220,7 @@ namespace dbaui
// OAdoDetailsPage
OAdoDetailsPage::OAdoDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
- : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/autocharsetpage.ui", "AutoCharset",
+ : OCommonBehaviourTabPage(pPage, pController, u"dbaccess/ui/autocharsetpage.ui"_ustr, u"AutoCharset"_ustr,
rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset )
{
@@ -233,9 +233,9 @@ namespace dbaui
// OOdbcDetailsPage
OOdbcDetailsPage::OOdbcDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
- : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/odbcpage.ui", "ODBC", rCoreAttrs,
+ : OCommonBehaviourTabPage(pPage, pController, u"dbaccess/ui/odbcpage.ui"_ustr, u"ODBC"_ustr, rCoreAttrs,
OCommonBehaviourTabPageFlags::UseCharset | OCommonBehaviourTabPageFlags::UseOptions)
- , m_xUseCatalog(m_xBuilder->weld_check_button("useCatalogCheckbutton"))
+ , m_xUseCatalog(m_xBuilder->weld_check_button(u"useCatalogCheckbutton"_ustr))
{
m_xUseCatalog->connect_toggled(LINK(this, OGenericAdministrationPage, OnControlModifiedButtonClick));
}
@@ -270,13 +270,13 @@ namespace dbaui
}
// OOdbcDetailsPage
OUserDriverDetailsPage::OUserDriverDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
- : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/userdetailspage.ui", "UserDetailsPage",
+ : OCommonBehaviourTabPage(pPage, pController, u"dbaccess/ui/userdetailspage.ui"_ustr, u"UserDetailsPage"_ustr,
rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset | OCommonBehaviourTabPageFlags::UseOptions)
- , m_xFTHostname(m_xBuilder->weld_label("hostnameft"))
- , m_xEDHostname(m_xBuilder->weld_entry("hostname"))
- , m_xPortNumber(m_xBuilder->weld_label("portnumberft"))
- , m_xNFPortNumber(m_xBuilder->weld_spin_button("portnumber"))
- , m_xUseCatalog(m_xBuilder->weld_check_button("usecatalog"))
+ , m_xFTHostname(m_xBuilder->weld_label(u"hostnameft"_ustr))
+ , m_xEDHostname(m_xBuilder->weld_entry(u"hostname"_ustr))
+ , m_xPortNumber(m_xBuilder->weld_label(u"portnumberft"_ustr))
+ , m_xNFPortNumber(m_xBuilder->weld_spin_button(u"portnumber"_ustr))
+ , m_xUseCatalog(m_xBuilder->weld_check_button(u"usecatalog"_ustr))
{
m_xUseCatalog->connect_toggled(LINK(this, OGenericAdministrationPage, OnControlModifiedButtonClick));
}
@@ -338,7 +338,7 @@ namespace dbaui
}
// OMySQLODBCDetailsPage
OMySQLODBCDetailsPage::OMySQLODBCDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
- : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/autocharsetpage.ui", "AutoCharset",
+ : OCommonBehaviourTabPage(pPage, pController, u"dbaccess/ui/autocharsetpage.ui"_ustr, u"AutoCharset"_ustr,
rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset )
{
}
@@ -350,17 +350,17 @@ namespace dbaui
// OMySQLJDBCDetailsPage
OGeneralSpecialJDBCDetailsPage::OGeneralSpecialJDBCDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs ,sal_uInt16 _nPortId, bool bShowSocket)
- : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/generalspecialjdbcdetailspage.ui", "GeneralSpecialJDBCDetails",
+ : OCommonBehaviourTabPage(pPage, pController, u"dbaccess/ui/generalspecialjdbcdetailspage.ui"_ustr, u"GeneralSpecialJDBCDetails"_ustr,
rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset)
, m_nPortId(_nPortId)
, m_bUseClass(true)
- , m_xEDHostname(m_xBuilder->weld_entry("hostNameEntry"))
- , m_xNFPortNumber(m_xBuilder->weld_spin_button("portNumberSpinbutton"))
- , m_xFTSocket(m_xBuilder->weld_label("socketLabel"))
- , m_xEDSocket(m_xBuilder->weld_entry("socketEntry"))
- , m_xFTDriverClass(m_xBuilder->weld_label("driverClassLabel"))
- , m_xEDDriverClass(m_xBuilder->weld_entry("jdbcDriverClassEntry"))
- , m_xTestJavaDriver(m_xBuilder->weld_button("testDriverClassButton"))
+ , m_xEDHostname(m_xBuilder->weld_entry(u"hostNameEntry"_ustr))
+ , m_xNFPortNumber(m_xBuilder->weld_spin_button(u"portNumberSpinbutton"_ustr))
+ , m_xFTSocket(m_xBuilder->weld_label(u"socketLabel"_ustr))
+ , m_xEDSocket(m_xBuilder->weld_entry(u"socketEntry"_ustr))
+ , m_xFTDriverClass(m_xBuilder->weld_label(u"driverClassLabel"_ustr))
+ , m_xEDDriverClass(m_xBuilder->weld_entry(u"jdbcDriverClassEntry"_ustr))
+ , m_xTestJavaDriver(m_xBuilder->weld_button(u"testDriverClassButton"_ustr))
{
const SfxStringItem* pUrlItem = rCoreAttrs.GetItem<SfxStringItem>(DSID_CONNECTURL);
const DbuTypeCollectionItem* pTypesItem = rCoreAttrs.GetItem<DbuTypeCollectionItem>(DSID_TYPECOLLECTION);
@@ -445,7 +445,7 @@ namespace dbaui
}
IMPL_LINK_NOARG(OGeneralSpecialJDBCDetailsPage, OnTestJavaClickHdl, weld::Button&, void)
{
- OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
+ assert(m_pAdminDialog && "No Admin dialog set! ->GPF");
OSL_ENSURE(m_bUseClass,"Who called me?");
bool bSuccess = false;
@@ -481,14 +481,14 @@ namespace dbaui
// MySQLNativePage
MySQLNativePage::MySQLNativePage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
- : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/mysqlnativepage.ui", "MysqlNativePage", rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset)
- , m_xMySQLSettingsContainer(m_xBuilder->weld_widget("MySQLSettingsContainer"))
+ : OCommonBehaviourTabPage(pPage, pController, u"dbaccess/ui/mysqlnativepage.ui"_ustr, u"MysqlNativePage"_ustr, rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset)
+ , m_xMySQLSettingsContainer(m_xBuilder->weld_widget(u"MySQLSettingsContainer"_ustr))
, m_xMySQLSettings(new MySQLNativeSettings(m_xMySQLSettingsContainer.get(), LINK(this,OGenericAdministrationPage,OnControlModified)))
- , m_xSeparator1(m_xBuilder->weld_label("connectionheader"))
- , m_xSeparator2(m_xBuilder->weld_label("userheader"))
- , m_xUserNameLabel(m_xBuilder->weld_label("usernamelabel"))
- , m_xUserName(m_xBuilder->weld_entry("username"))
- , m_xPasswordRequired(m_xBuilder->weld_check_button("passwordrequired"))
+ , m_xSeparator1(m_xBuilder->weld_label(u"connectionheader"_ustr))
+ , m_xSeparator2(m_xBuilder->weld_label(u"userheader"_ustr))
+ , m_xUserNameLabel(m_xBuilder->weld_label(u"usernamelabel"_ustr))
+ , m_xUserName(m_xBuilder->weld_entry(u"username"_ustr))
+ , m_xPasswordRequired(m_xBuilder->weld_check_button(u"passwordrequired"_ustr))
{
m_xUserName->connect_changed(LINK(this,OGenericAdministrationPage,OnControlEntryModifyHdl));
}
@@ -571,12 +571,12 @@ namespace dbaui
// OLDAPDetailsPage
OLDAPDetailsPage::OLDAPDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
- : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/ldappage.ui", "LDAP",
+ : OCommonBehaviourTabPage(pPage, pController, u"dbaccess/ui/ldappage.ui"_ustr, u"LDAP"_ustr,
rCoreAttrs, OCommonBehaviourTabPageFlags::NONE)
- , m_xETBaseDN(m_xBuilder->weld_entry("baseDNEntry"))
- , m_xCBUseSSL(m_xBuilder->weld_check_button("useSSLCheckbutton"))
- , m_xNFPortNumber(m_xBuilder->weld_spin_button("portNumberSpinbutton"))
- , m_xNFRowCount(m_xBuilder->weld_spin_button("LDAPRowCountspinbutton"))
+ , m_xETBaseDN(m_xBuilder->weld_entry(u"baseDNEntry"_ustr))
+ , m_xCBUseSSL(m_xBuilder->weld_check_button(u"useSSLCheckbutton"_ustr))
+ , m_xNFPortNumber(m_xBuilder->weld_spin_button(u"portNumberSpinbutton"_ustr))
+ , m_xNFRowCount(m_xBuilder->weld_spin_button(u"LDAPRowCountspinbutton"_ustr))
{
m_xETBaseDN->connect_changed(LINK(this,OGenericAdministrationPage,OnControlEntryModifyHdl));
m_xNFPortNumber->connect_value_changed(LINK(this,OGenericAdministrationPage,OnControlSpinButtonModifyHdl));
@@ -647,7 +647,7 @@ namespace dbaui
// OTextDetailsPage
OTextDetailsPage::OTextDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
- : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/emptypage.ui", "EmptyPage", rCoreAttrs, OCommonBehaviourTabPageFlags::NONE)
+ : OCommonBehaviourTabPage(pPage, pController, u"dbaccess/ui/emptypage.ui"_ustr, u"EmptyPage"_ustr, rCoreAttrs, OCommonBehaviourTabPageFlags::NONE)
, m_xTextConnectionHelper(new OTextConnectionHelper(m_xContainer.get(), TC_EXTENSION | TC_HEADER | TC_SEPARATORS | TC_CHARSET))
{
}
diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx
index eab893e4e4b1..1b2be95019be 100644
--- a/dbaccess/source/ui/dlg/directsql.cxx
+++ b/dbaccess/source/ui/dlg/directsql.cxx
@@ -25,6 +25,7 @@
#include <comphelper/types.hxx>
#include <osl/mutex.hxx>
#include <rtl/ustrbuf.hxx>
+#include <rtl/ustring.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
@@ -36,8 +37,21 @@
#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
+// tdf#140298 - remember user settings within the current session
+// memp is filled in dtor and restored after initialization
+namespace
+{
+ struct memParam {
+ std::vector<OUString> SQLHistory;
+ bool DirectSQL;
+ bool ShowOutput;
+ };
+ memParam memp;
+}
+
namespace dbaui
{
+
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::lang;
@@ -46,16 +60,16 @@ namespace dbaui
// DirectSQLDialog
DirectSQLDialog::DirectSQLDialog(weld::Window* _pParent, const Reference< XConnection >& _rxConn)
- : GenericDialogController(_pParent, "dbaccess/ui/directsqldialog.ui", "DirectSQLDialog")
- , m_xExecute(m_xBuilder->weld_button("execute"))
- , m_xSQLHistory(m_xBuilder->weld_combo_box("sqlhistory"))
- , m_xStatus(m_xBuilder->weld_text_view("status"))
- , m_xDirectSQL(m_xBuilder->weld_check_button("directsql"))
- , m_xShowOutput(m_xBuilder->weld_check_button("showoutput"))
- , m_xOutput(m_xBuilder->weld_text_view("output"))
- , m_xClose(m_xBuilder->weld_button("close"))
- , m_xSQL(new SQLEditView(m_xBuilder->weld_scrolled_window("scrolledwindow", true)))
- , m_xSQLEd(new weld::CustomWeld(*m_xBuilder, "sql", *m_xSQL))
+ : GenericDialogController(_pParent, u"dbaccess/ui/directsqldialog.ui"_ustr, u"DirectSQLDialog"_ustr)
+ , m_xExecute(m_xBuilder->weld_button(u"execute"_ustr))
+ , m_xSQLHistory(m_xBuilder->weld_combo_box(u"sqlhistory"_ustr))
+ , m_xStatus(m_xBuilder->weld_text_view(u"status"_ustr))
+ , m_xDirectSQL(m_xBuilder->weld_check_button(u"directsql"_ustr))
+ , m_xShowOutput(m_xBuilder->weld_check_button(u"showoutput"_ustr))
+ , m_xOutput(m_xBuilder->weld_text_view(u"output"_ustr))
+ , m_xClose(m_xBuilder->weld_button(u"close"_ustr))
+ , m_xSQL(new SQLEditView(m_xBuilder->weld_scrolled_window(u"scrolledwindow"_ustr, true)))
+ , m_xSQLEd(new weld::CustomWeld(*m_xBuilder, u"sql"_ustr, *m_xSQL))
, m_nStatusCount(1)
, m_xConnection(_rxConn)
, m_pClosingEvent(nullptr)
@@ -73,6 +87,13 @@ namespace dbaui
m_xClose->connect_clicked(LINK(this, DirectSQLDialog, OnCloseClick));
m_xSQLHistory->connect_changed(LINK(this, DirectSQLDialog, OnListEntrySelected));
+ for (size_t i = 0; i < memp.SQLHistory.size(); i++)
+ {
+ implAddToStatementHistory(memp.SQLHistory[i], true);
+ m_xDirectSQL->set_active(memp.DirectSQL);
+ m_xShowOutput->set_active(memp.ShowOutput);
+ }
+
// add a dispose listener to the connection
Reference< XComponent > xConnComp(m_xConnection, UNO_QUERY);
OSL_ENSURE(xConnComp.is(), "DirectSQLDialog::DirectSQLDialog: invalid connection!");
@@ -85,6 +106,9 @@ namespace dbaui
DirectSQLDialog::~DirectSQLDialog()
{
+ memp.DirectSQL = m_xDirectSQL->get_active();
+ memp.ShowOutput = m_xShowOutput->get_active();
+
::osl::MutexGuard aGuard(m_aMutex);
if (m_pClosingEvent)
Application::RemoveUserEvent(m_pClosingEvent);
@@ -147,7 +171,7 @@ namespace dbaui
}
}
- void DirectSQLDialog::implAddToStatementHistory(const OUString& _rStatement)
+ void DirectSQLDialog::implAddToStatementHistory(const OUString& _rStatement, const bool bFromMemory)
{
#ifdef DBG_UTIL
{
@@ -159,6 +183,8 @@ namespace dbaui
// add the statement to the history
m_aStatementHistory.push_back(_rStatement);
+ if (!bFromMemory)
+ memp.SQLHistory.push_back(_rStatement);
// normalize the statement, and remember the normalized form, too
OUString sNormalized = _rStatement.replaceAll("\n", " ");
@@ -311,7 +337,7 @@ namespace dbaui
const Reference<XResultSetMetaData> xResultSetMetaData = Reference<XResultSetMetaDataSupplier>(xRS,UNO_QUERY_THROW)->getMetaData();
const sal_Int32 nColumnsCount = xResultSetMetaData->getColumnCount();
-
+ sal_Int32 nRowCount = 0;
// get a handle for the rows
css::uno::Reference< css::sdbc::XRow > xRow( xRS, css::uno::UNO_QUERY );
// work through each of the rows
@@ -348,6 +374,7 @@ namespace dbaui
out.append(xRow->getString(i) + ",");
}
}
+ nRowCount++;
}
// trap for when we fall off the end of the row
catch (const SQLException&)
@@ -356,6 +383,7 @@ namespace dbaui
// report the output
addOutputText(out);
}
+ addOutputText(DBA_RES_PLURAL(STR_COMMAND_NROWS, nRowCount).replaceAll("%1", OUString::number(nRowCount)));
}
void DirectSQLDialog::addStatusText(std::u16string_view _rMessage)
diff --git a/dbaccess/source/ui/dlg/dlgattr.cxx b/dbaccess/source/ui/dlg/dlgattr.cxx
index 24a1c4e81c2d..2e8b16910584 100644
--- a/dbaccess/source/ui/dlg/dlgattr.cxx
+++ b/dbaccess/source/ui/dlg/dlgattr.cxx
@@ -32,15 +32,15 @@ using namespace dbaui;
SbaSbAttrDlg::SbaSbAttrDlg(weld::Widget* pParent, const SfxItemSet* pCellAttrs,
SvNumberFormatter* pFormatter, bool bHasFormat)
- : SfxTabDialogController(pParent, "dbaccess/ui/fielddialog.ui", "FieldDialog", pCellAttrs)
+ : SfxTabDialogController(pParent, u"dbaccess/ui/fielddialog.ui"_ustr, u"FieldDialog"_ustr, pCellAttrs)
{
pNumberInfoItem.reset( new SvxNumberInfoItem( pFormatter, SID_ATTR_NUMBERFORMAT_INFO ) );
if (bHasFormat)
- AddTabPage("format", RID_SVXPAGE_NUMBERFORMAT);
+ AddTabPage(u"format"_ustr, RID_SVXPAGE_NUMBERFORMAT);
else
- RemoveTabPage("format");
- AddTabPage("alignment", RID_SVXPAGE_ALIGNMENT);
+ RemoveTabPage(u"format"_ustr);
+ AddTabPage(u"alignment"_ustr, RID_SVXPAGE_ALIGNMENT);
}
SbaSbAttrDlg::~SbaSbAttrDlg()
diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx
index 44c98cd49e63..0bb460428d46 100644
--- a/dbaccess/source/ui/dlg/dlgsave.cxx
+++ b/dbaccess/source/ui/dlg/dlgsave.cxx
@@ -80,21 +80,21 @@ OSaveAsDlg::OSaveAsDlg( weld::Window * pParent,
const OUString& rDefault,
const IObjectNameCheck& _rObjectNameCheck,
SADFlags _nFlags)
- : GenericDialogController(pParent, "dbaccess/ui/savedialog.ui", "SaveDialog")
+ : GenericDialogController(pParent, u"dbaccess/ui/savedialog.ui"_ustr, u"SaveDialog"_ustr)
, m_xContext( _rxContext )
, m_aName(rDefault)
, m_rObjectNameCheck( _rObjectNameCheck )
, m_nType(_rType)
, m_nFlags(_nFlags)
, m_aChecker(OUString())
- , m_xDescription(m_xBuilder->weld_label("descriptionft"))
- , m_xCatalogLbl(m_xBuilder->weld_label("catalogft"))
- , m_xCatalog(m_xBuilder->weld_combo_box("catalog"))
- , m_xSchemaLbl(m_xBuilder->weld_label("schemaft"))
- , m_xSchema(m_xBuilder->weld_combo_box("schema"))
- , m_xLabel(m_xBuilder->weld_label("titleft"))
- , m_xTitle(m_xBuilder->weld_entry("title"))
- , m_xPB_OK(m_xBuilder->weld_button("ok"))
+ , m_xDescription(m_xBuilder->weld_label(u"descriptionft"_ustr))
+ , m_xCatalogLbl(m_xBuilder->weld_label(u"catalogft"_ustr))
+ , m_xCatalog(m_xBuilder->weld_combo_box(u"catalog"_ustr))
+ , m_xSchemaLbl(m_xBuilder->weld_label(u"schemaft"_ustr))
+ , m_xSchema(m_xBuilder->weld_combo_box(u"schema"_ustr))
+ , m_xLabel(m_xBuilder->weld_label(u"titleft"_ustr))
+ , m_xTitle(m_xBuilder->weld_entry(u"title"_ustr))
+ , m_xPB_OK(m_xBuilder->weld_button(u"ok"_ustr))
{
if ( _xConnection.is() )
m_xMetaData = _xConnection->getMetaData();
@@ -185,21 +185,21 @@ OSaveAsDlg::OSaveAsDlg(weld::Window * pParent,
const OUString& _sLabel,
const IObjectNameCheck& _rObjectNameCheck,
SADFlags _nFlags)
- : GenericDialogController(pParent, "dbaccess/ui/savedialog.ui", "SaveDialog")
+ : GenericDialogController(pParent, u"dbaccess/ui/savedialog.ui"_ustr, u"SaveDialog"_ustr)
, m_xContext( _rxContext )
, m_aName(rDefault)
, m_rObjectNameCheck( _rObjectNameCheck )
, m_nType(CommandType::COMMAND)
, m_nFlags(_nFlags)
, m_aChecker(OUString())
- , m_xDescription(m_xBuilder->weld_label("descriptionft"))
- , m_xCatalogLbl(m_xBuilder->weld_label("catalogft"))
- , m_xCatalog(m_xBuilder->weld_combo_box("catalog"))
- , m_xSchemaLbl(m_xBuilder->weld_label("schemaft"))
- , m_xSchema(m_xBuilder->weld_combo_box("schema"))
- , m_xLabel(m_xBuilder->weld_label("titleft"))
- , m_xTitle(m_xBuilder->weld_entry("title"))
- , m_xPB_OK(m_xBuilder->weld_button("ok"))
+ , m_xDescription(m_xBuilder->weld_label(u"descriptionft"_ustr))
+ , m_xCatalogLbl(m_xBuilder->weld_label(u"catalogft"_ustr))
+ , m_xCatalog(m_xBuilder->weld_combo_box(u"catalog"_ustr))
+ , m_xSchemaLbl(m_xBuilder->weld_label(u"schemaft"_ustr))
+ , m_xSchema(m_xBuilder->weld_combo_box(u"schema"_ustr))
+ , m_xLabel(m_xBuilder->weld_label(u"titleft"_ustr))
+ , m_xTitle(m_xBuilder->weld_entry(u"title"_ustr))
+ , m_xPB_OK(m_xBuilder->weld_button(u"ok"_ustr))
{
m_xTitle->connect_insert_text(LINK(this, OSaveAsDlg, TextFilterHdl));
m_xSchema->connect_entry_insert_text(LINK(this, OSaveAsDlg, TextFilterHdl));
diff --git a/dbaccess/source/ui/dlg/dlgsize.cxx b/dbaccess/source/ui/dlg/dlgsize.cxx
index be9e96612a83..ad1d1e4f5dc5 100644
--- a/dbaccess/source/ui/dlg/dlgsize.cxx
+++ b/dbaccess/source/ui/dlg/dlgsize.cxx
@@ -26,11 +26,11 @@ namespace dbaui
#define DEF_COL_WIDTH 227
DlgSize::DlgSize(weld::Window* pParent, sal_Int32 nVal, bool bRow, sal_Int32 _nAlternativeStandard )
- : GenericDialogController(pParent, bRow ? OUString("dbaccess/ui/rowheightdialog.ui") : OUString("dbaccess/ui/colwidthdialog.ui"),
- bRow ? OUString("RowHeightDialog") : OUString("ColWidthDialog"))
+ : GenericDialogController(pParent, bRow ? u"dbaccess/ui/rowheightdialog.ui"_ustr : u"dbaccess/ui/colwidthdialog.ui"_ustr,
+ bRow ? u"RowHeightDialog"_ustr : u"ColWidthDialog"_ustr)
, m_nPrevValue(nVal)
- , m_xMF_VALUE(m_xBuilder->weld_metric_spin_button("value", FieldUnit::CM))
- , m_xCB_STANDARD(m_xBuilder->weld_check_button("automatic"))
+ , m_xMF_VALUE(m_xBuilder->weld_metric_spin_button(u"value"_ustr, FieldUnit::CM))
+ , m_xCB_STANDARD(m_xBuilder->weld_check_button(u"automatic"_ustr))
{
sal_Int32 nStandard(bRow ? DEF_ROW_HEIGHT : DEF_COL_WIDTH);
if ( _nAlternativeStandard > 0 )
@@ -70,7 +70,7 @@ IMPL_LINK_NOARG(DlgSize, CbClickHdl, weld::Toggleable&, void)
{
// don't use getValue as this will use m_xCB_STANDARD->to determine if we're standard
m_nPrevValue = static_cast<sal_Int32>(m_xMF_VALUE->get_value(FieldUnit::CM));
- m_xMF_VALUE->set_text("");
+ m_xMF_VALUE->set_text(u""_ustr);
}
else
{
diff --git a/dbaccess/source/ui/dlg/dsselect.cxx b/dbaccess/source/ui/dlg/dsselect.cxx
index 34be198cb44c..3d4a17b8ffcd 100644
--- a/dbaccess/source/ui/dlg/dsselect.cxx
+++ b/dbaccess/source/ui/dlg/dsselect.cxx
@@ -25,8 +25,8 @@
namespace dbaui
{
ODatasourceSelectDialog::ODatasourceSelectDialog(weld::Window* _pParent, const std::set<OUString>& _rDatasources)
- : GenericDialogController(_pParent, "dbaccess/ui/choosedatasourcedialog.ui", "ChooseDataSourceDialog")
- , m_xDatasource(m_xBuilder->weld_tree_view("treeview"))
+ : GenericDialogController(_pParent, u"dbaccess/ui/choosedatasourcedialog.ui"_ustr, u"ChooseDataSourceDialog"_ustr)
+ , m_xDatasource(m_xBuilder->weld_tree_view(u"treeview"_ustr))
{
m_xDatasource->set_size_request(-1, m_xDatasource->get_height_rows(6));
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index bb308845528e..2030860d1ac6 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -50,11 +50,11 @@ namespace dbaui
// OGeneralPage
OGeneralPage::OGeneralPage(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const SfxItemSet& _rItems)
- : OGenericAdministrationPage(pPage, pController, _rUIXMLDescription, "PageGeneral", _rItems)
- , m_xSpecialMessage(m_xBuilder->weld_label("specialMessage"))
+ : OGenericAdministrationPage(pPage, pController, _rUIXMLDescription, u"PageGeneral"_ustr, _rItems)
+ , m_xSpecialMessage(m_xBuilder->weld_label(u"specialMessage"_ustr))
, m_eLastMessage(smNone)
, m_bInitTypeList(true)
- , m_xDatasourceType(m_xBuilder->weld_combo_box("datasourceType"))
+ , m_xDatasourceType(m_xBuilder->weld_combo_box(u"datasourceType"_ustr))
, m_pCollection(nullptr)
{
// extract the datasource type collection from the item set
@@ -310,7 +310,7 @@ namespace dbaui
{
// do not display the Connector/OOo driver itself, it is always wrapped via the MySQL-Driver, if
// this driver is installed
- if ( m_pCollection->hasDriver( "sdbc:mysql:mysqlc:" ) )
+ if ( m_pCollection->hasDriver( u"sdbc:mysql:mysqlc:" ) )
_inout_rDisplayName.clear();
}
@@ -402,7 +402,7 @@ namespace dbaui
// OGeneralPageDialog
OGeneralPageDialog::OGeneralPageDialog(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rItems)
- : OGeneralPage(pPage, pController, "dbaccess/ui/generalpagedialog.ui", _rItems)
+ : OGeneralPage(pPage, pController, u"dbaccess/ui/generalpagedialog.ui"_ustr, _rItems)
{
}
@@ -445,16 +445,16 @@ namespace dbaui
// OGeneralPageWizard
OGeneralPageWizard::OGeneralPageWizard(weld::Container* pPage, ODbTypeWizDialogSetup* pController, const SfxItemSet& _rItems)
- : OGeneralPage( pPage, pController, "dbaccess/ui/generalpagewizard.ui", _rItems )
- , m_xRB_CreateDatabase(m_xBuilder->weld_radio_button("createDatabase"))
- , m_xRB_OpenExistingDatabase(m_xBuilder->weld_radio_button("openExistingDatabase"))
- , m_xRB_ConnectDatabase(m_xBuilder->weld_radio_button("connectDatabase"))
- , m_xFT_EmbeddedDBLabel(m_xBuilder->weld_label("embeddeddbLabel"))
- , m_xEmbeddedDBType(m_xBuilder->weld_combo_box("embeddeddbList"))
- , m_xFT_DocListLabel(m_xBuilder->weld_label("docListLabel"))
- , m_xLB_DocumentList(new OpenDocumentListBox(m_xBuilder->weld_combo_box("documentList"), "com.sun.star.sdb.OfficeDatabaseDocument"))
- , m_xPB_OpenDatabase(new OpenDocumentButton(m_xBuilder->weld_button("openDatabase"), "com.sun.star.sdb.OfficeDatabaseDocument"))
- , m_xFT_NoEmbeddedDBLabel(m_xBuilder->weld_label("noembeddeddbLabel"))
+ : OGeneralPage( pPage, pController, u"dbaccess/ui/generalpagewizard.ui"_ustr, _rItems )
+ , m_xRB_CreateDatabase(m_xBuilder->weld_radio_button(u"createDatabase"_ustr))
+ , m_xRB_OpenExistingDatabase(m_xBuilder->weld_radio_button(u"openExistingDatabase"_ustr))
+ , m_xRB_ConnectDatabase(m_xBuilder->weld_radio_button(u"connectDatabase"_ustr))
+ , m_xFT_EmbeddedDBLabel(m_xBuilder->weld_label(u"embeddeddbLabel"_ustr))
+ , m_xEmbeddedDBType(m_xBuilder->weld_combo_box(u"embeddeddbList"_ustr))
+ , m_xFT_DocListLabel(m_xBuilder->weld_label(u"docListLabel"_ustr))
+ , m_xLB_DocumentList(new OpenDocumentListBox(m_xBuilder->weld_combo_box(u"documentList"_ustr), "com.sun.star.sdb.OfficeDatabaseDocument"))
+ , m_xPB_OpenDatabase(new OpenDocumentButton(m_xBuilder->weld_button(u"openDatabase"_ustr), u"com.sun.star.sdb.OfficeDatabaseDocument"_ustr))
+ , m_xFT_NoEmbeddedDBLabel(m_xBuilder->weld_label(u"noembeddeddbLabel"_ustr))
, m_eOriginalCreationMode(eCreateNew)
, m_bInitEmbeddedDBList(true)
, m_bIsDisplayedTypesEmpty(true)
@@ -468,10 +468,10 @@ namespace dbaui
// also, if our application policies tell us to hide the option, do it
::utl::OConfigurationTreeRoot aConfig( ::utl::OConfigurationTreeRoot::createWithComponentContext(
::comphelper::getProcessComponentContext(),
- "/org.openoffice.Office.DataAccess/Policies/Features/Base"
+ u"/org.openoffice.Office.DataAccess/Policies/Features/Base"_ustr
) );
bool bAllowCreateLocalDatabase( true );
- OSL_VERIFY( aConfig.getNodeValue( "CreateLocalDatabase" ) >>= bAllowCreateLocalDatabase );
+ OSL_VERIFY( aConfig.getNodeValue( u"CreateLocalDatabase"_ustr ) >>= bAllowCreateLocalDatabase );
if ( !bAllowCreateLocalDatabase )
bHideCreateNew = true;
@@ -582,7 +582,7 @@ namespace dbaui
if ( m_xRB_CreateDatabase->get_active() )
{
- _rCoreAttrs->Put( SfxStringItem( DSID_CONNECTURL, "sdbc:dbase:" ) );
+ _rCoreAttrs->Put( SfxStringItem( DSID_CONNECTURL, u"sdbc:dbase:"_ustr ) );
bChangedSomething = true;
bCommitTypeSelection = false;
}
@@ -664,7 +664,7 @@ namespace dbaui
{
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- FileDialogFlags::NONE, "sdatabase", SfxFilterFlags::NONE, SfxFilterFlags::NONE, GetFrameWeld());
+ FileDialogFlags::NONE, u"sdatabase"_ustr, SfxFilterFlags::NONE, SfxFilterFlags::NONE, GetFrameWeld());
aFileDlg.SetContext(sfx2::FileDialogHelper::BaseDataSource);
std::shared_ptr<const SfxFilter> pFilter = getStandardDatabaseFilter();
if ( pFilter )
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index d12602ce2eec..738b9c07df3b 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -65,21 +65,21 @@ namespace dbaui
const Reference< XNameAccess >& _rxIndexes,
const Reference< XConnection >& _rxConnection,
const Reference< XComponentContext >& _rxContext)
- : GenericDialogController(pParent, "dbaccess/ui/indexdesigndialog.ui", "IndexDesignDialog")
+ : GenericDialogController(pParent, u"dbaccess/ui/indexdesigndialog.ui"_ustr, u"IndexDesignDialog"_ustr)
, m_xConnection(_rxConnection)
, m_bEditingActive(false)
, m_bEditAgain(false)
, m_bNoHandlerCall(false)
, m_xContext(_rxContext)
- , m_xActions(m_xBuilder->weld_toolbar("ACTIONS"))
- , m_xIndexList(m_xBuilder->weld_tree_view("INDEX_LIST"))
- , m_xIndexDetails(m_xBuilder->weld_label("INDEX_DETAILS"))
- , m_xDescriptionLabel(m_xBuilder->weld_label("DESC_LABEL"))
- , m_xDescription(m_xBuilder->weld_label("DESCRIPTION"))
- , m_xUnique(m_xBuilder->weld_check_button("UNIQUE"))
- , m_xFieldsLabel(m_xBuilder->weld_label("FIELDS_LABEL"))
- , m_xClose(m_xBuilder->weld_button("close"))
- , m_xTable(m_xBuilder->weld_container("FIELDS"))
+ , m_xActions(m_xBuilder->weld_toolbar(u"ACTIONS"_ustr))
+ , m_xIndexList(m_xBuilder->weld_tree_view(u"INDEX_LIST"_ustr))
+ , m_xIndexDetails(m_xBuilder->weld_label(u"INDEX_DETAILS"_ustr))
+ , m_xDescriptionLabel(m_xBuilder->weld_label(u"DESC_LABEL"_ustr))
+ , m_xDescription(m_xBuilder->weld_label(u"DESCRIPTION"_ustr))
+ , m_xUnique(m_xBuilder->weld_check_button(u"UNIQUE"_ustr))
+ , m_xFieldsLabel(m_xBuilder->weld_label(u"FIELDS_LABEL"_ustr))
+ , m_xClose(m_xBuilder->weld_button(u"close"_ustr))
+ , m_xTable(m_xBuilder->weld_container(u"FIELDS"_ustr))
, m_xTableCtrlParent(m_xTable->CreateChildFrame())
, m_xFields(VclPtr<IndexFieldsControl>::Create(m_xTableCtrlParent))
{
@@ -141,7 +141,7 @@ namespace dbaui
void DbaIndexDialog::updateToolbox()
{
- m_xActions->set_item_sensitive("ID_INDEX_NEW", !m_bEditingActive);
+ m_xActions->set_item_sensitive(u"ID_INDEX_NEW"_ustr, !m_bEditingActive);
int nSelected = m_xIndexList->get_selected_index();
bool bSelectedAnything = nSelected != -1;
@@ -149,17 +149,17 @@ namespace dbaui
{
// is the current entry modified?
Indexes::const_iterator aSelectedPos = m_xIndexes->begin() + m_xIndexList->get_id(nSelected).toUInt32();
- m_xActions->set_item_sensitive("ID_INDEX_SAVE", aSelectedPos->isModified() || aSelectedPos->isNew());
- m_xActions->set_item_sensitive("ID_INDEX_RESET", aSelectedPos->isModified() || aSelectedPos->isNew());
+ m_xActions->set_item_sensitive(u"ID_INDEX_SAVE"_ustr, aSelectedPos->isModified() || aSelectedPos->isNew());
+ m_xActions->set_item_sensitive(u"ID_INDEX_RESET"_ustr, aSelectedPos->isModified() || aSelectedPos->isNew());
bSelectedAnything = !aSelectedPos->bPrimaryKey;
}
else
{
- m_xActions->set_item_sensitive("ID_INDEX_SAVE", false);
- m_xActions->set_item_sensitive("ID_INDEX_RESET", false);
+ m_xActions->set_item_sensitive(u"ID_INDEX_SAVE"_ustr, false);
+ m_xActions->set_item_sensitive(u"ID_INDEX_RESET"_ustr, false);
}
- m_xActions->set_item_sensitive("ID_INDEX_DROP", bSelectedAnything);
- m_xActions->set_item_sensitive("ID_INDEX_RENAME", bSelectedAnything);
+ m_xActions->set_item_sensitive(u"ID_INDEX_DROP"_ustr, bSelectedAnything);
+ m_xActions->set_item_sensitive(u"ID_INDEX_RENAME"_ustr, bSelectedAnything);
}
void DbaIndexDialog::fillIndexList()
@@ -451,8 +451,8 @@ namespace dbaui
Indexes::const_iterator aSelected = m_xIndexes->begin() + m_xIndexList->get_id(*xSelected).toUInt32();
if (aSelected->isModified() || aSelected->isNew())
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), "dbaccess/ui/saveindexdialog.ui"));
- std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog("SaveIndexDialog"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), u"dbaccess/ui/saveindexdialog.ui"_ustr));
+ std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog(u"SaveIndexDialog"_ustr));
nResponse = xQuery->run();
}
}
diff --git a/dbaccess/source/ui/dlg/optionalboolitem.cxx b/dbaccess/source/ui/dlg/optionalboolitem.cxx
index 30d176391ba4..1caf1c884393 100644
--- a/dbaccess/source/ui/dlg/optionalboolitem.cxx
+++ b/dbaccess/source/ui/dlg/optionalboolitem.cxx
@@ -24,7 +24,7 @@ namespace dbaui
// OptionalBoolItem
OptionalBoolItem::OptionalBoolItem( sal_uInt16 _nWhich )
- :SfxPoolItem( _nWhich )
+ :SfxPoolItem( _nWhich, SfxItemType::OptionalBoolItemType )
{
}
diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx
index fddb77f4bd8c..ad1c23baa9f4 100644
--- a/dbaccess/source/ui/dlg/paramdialog.cxx
+++ b/dbaccess/source/ui/dlg/paramdialog.cxx
@@ -44,16 +44,16 @@ namespace dbaui
OParameterDialog::OParameterDialog(
weld::Window* pParent, const Reference< XIndexAccess > & rParamContainer,
const Reference< XConnection > & _rxConnection, const Reference< XComponentContext >& rxContext)
- : GenericDialogController(pParent, "dbaccess/ui/parametersdialog.ui", "Parameters")
+ : GenericDialogController(pParent, u"dbaccess/ui/parametersdialog.ui"_ustr, u"Parameters"_ustr)
, m_nCurrentlySelected(-1)
, m_xConnection(_rxConnection)
, m_aPredicateInput( rxContext, _rxConnection, getParseContext() )
, m_aResetVisitFlag("dbaccess OParameterDialog m_aResetVisitFlag")
- , m_xAllParams(m_xBuilder->weld_tree_view("allParamTreeview"))
- , m_xParam(m_xBuilder->weld_entry("paramEntry"))
- , m_xTravelNext(m_xBuilder->weld_button("next"))
- , m_xOKBtn(m_xBuilder->weld_button("ok"))
- , m_xCancelBtn(m_xBuilder->weld_button("cancel"))
+ , m_xAllParams(m_xBuilder->weld_tree_view(u"allParamTreeview"_ustr))
+ , m_xParam(m_xBuilder->weld_entry(u"paramEntry"_ustr))
+ , m_xTravelNext(m_xBuilder->weld_button(u"next"_ustr))
+ , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr))
+ , m_xCancelBtn(m_xBuilder->weld_button(u"cancel"_ustr))
{
m_xAllParams->set_size_request(-1, m_xAllParams->get_height_rows(10));
diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx
index 077200349497..4ffd8d070249 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -56,23 +56,23 @@ DlgFilterCrit::DlgFilterCrit(weld::Window * pParent,
const Reference< XConnection>& _rxConnection,
const Reference< XSingleSelectQueryComposer >& _rxComposer,
const Reference< XNameAccess>& _rxCols)
- : GenericDialogController(pParent, "dbaccess/ui/queryfilterdialog.ui", "QueryFilterDialog")
+ : GenericDialogController(pParent, u"dbaccess/ui/queryfilterdialog.ui"_ustr, u"QueryFilterDialog"_ustr)
, m_xQueryComposer(_rxComposer)
, m_xColumns( _rxCols )
, m_xConnection( _rxConnection )
, m_xMetaData( _rxConnection->getMetaData() )
, m_aPredicateInput( rxContext, _rxConnection, getParseContext() )
- , m_xLB_WHEREFIELD1(m_xBuilder->weld_combo_box("field1"))
- , m_xLB_WHERECOMP1(m_xBuilder->weld_combo_box("cond1"))
- , m_xET_WHEREVALUE1(m_xBuilder->weld_entry("value1"))
- , m_xLB_WHERECOND2(m_xBuilder->weld_combo_box("op2"))
- , m_xLB_WHEREFIELD2(m_xBuilder->weld_combo_box("field2"))
- , m_xLB_WHERECOMP2(m_xBuilder->weld_combo_box("cond2"))
- , m_xET_WHEREVALUE2(m_xBuilder->weld_entry("value2"))
- , m_xLB_WHERECOND3(m_xBuilder->weld_combo_box("op3"))
- , m_xLB_WHEREFIELD3(m_xBuilder->weld_combo_box("field3"))
- , m_xLB_WHERECOMP3(m_xBuilder->weld_combo_box("cond3"))
- , m_xET_WHEREVALUE3(m_xBuilder->weld_entry("value3"))
+ , m_xLB_WHEREFIELD1(m_xBuilder->weld_combo_box(u"field1"_ustr))
+ , m_xLB_WHERECOMP1(m_xBuilder->weld_combo_box(u"cond1"_ustr))
+ , m_xET_WHEREVALUE1(m_xBuilder->weld_entry(u"value1"_ustr))
+ , m_xLB_WHERECOND2(m_xBuilder->weld_combo_box(u"op2"_ustr))
+ , m_xLB_WHEREFIELD2(m_xBuilder->weld_combo_box(u"field2"_ustr))
+ , m_xLB_WHERECOMP2(m_xBuilder->weld_combo_box(u"cond2"_ustr))
+ , m_xET_WHEREVALUE2(m_xBuilder->weld_entry(u"value2"_ustr))
+ , m_xLB_WHERECOND3(m_xBuilder->weld_combo_box(u"op3"_ustr))
+ , m_xLB_WHEREFIELD3(m_xBuilder->weld_combo_box(u"field3"_ustr))
+ , m_xLB_WHERECOMP3(m_xBuilder->weld_combo_box(u"cond3"_ustr))
+ , m_xET_WHEREVALUE3(m_xBuilder->weld_entry(u"value3"_ustr))
{
//set all condition preferred width to max width
//if all entries exist
@@ -667,11 +667,11 @@ void DlgFilterCrit::BuildWherePart()
PropertyValue aValue;
if ( getCondition(*m_xLB_WHEREFIELD1,*m_xLB_WHERECOMP1,*m_xET_WHEREVALUE1,aValue) )
{
- aHaving = { { aValue } };
+ aHaving = { { std::move(aValue) } };
}
else
{
- aFilter = { { aValue} };
+ aFilter = { { std::move(aValue) } };
}
}
@@ -687,7 +687,7 @@ void DlgFilterCrit::BuildWherePart()
sal_Int32 nAndPos = _rValues[nPos].getLength();
auto pValues = _rValues.getArray();
pValues[nPos].realloc( _rValues[nPos].getLength() + 1);
- pValues[nPos].getArray()[nAndPos] = aValue;
+ pValues[nPos].getArray()[nAndPos] = std::move(aValue);
}
if( m_xLB_WHEREFIELD3->get_active() != 0 )
@@ -702,7 +702,7 @@ void DlgFilterCrit::BuildWherePart()
sal_Int32 nAndPos = _rValues[nPos].getLength();
auto pValues = _rValues.getArray();
pValues[nPos].realloc( _rValues[nPos].getLength() + 1);
- pValues[nPos].getArray()[nAndPos] = aValue;
+ pValues[nPos].getArray()[nAndPos] = std::move(aValue);
}
try
{
diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx
index ee320e4650c8..2afbfed14eb5 100644
--- a/dbaccess/source/ui/dlg/queryorder.cxx
+++ b/dbaccess/source/ui/dlg/queryorder.cxx
@@ -41,16 +41,16 @@ DlgOrderCrit::DlgOrderCrit(weld::Window * pParent,
const Reference< XConnection>& _rxConnection,
const Reference< XSingleSelectQueryComposer >& _rxComposer,
const Reference< XNameAccess>& _rxCols)
- : GenericDialogController(pParent, "dbaccess/ui/sortdialog.ui", "SortDialog")
+ : GenericDialogController(pParent, u"dbaccess/ui/sortdialog.ui"_ustr, u"SortDialog"_ustr)
, m_xQueryComposer(_rxComposer)
, m_xColumns(_rxCols)
, m_xConnection(_rxConnection)
- , m_xLB_ORDERFIELD1(m_xBuilder->weld_combo_box("field1"))
- , m_xLB_ORDERVALUE1(m_xBuilder->weld_combo_box("value1"))
- , m_xLB_ORDERFIELD2(m_xBuilder->weld_combo_box("field2"))
- , m_xLB_ORDERVALUE2(m_xBuilder->weld_combo_box("value2"))
- , m_xLB_ORDERFIELD3(m_xBuilder->weld_combo_box("field3"))
- , m_xLB_ORDERVALUE3(m_xBuilder->weld_combo_box("value3"))
+ , m_xLB_ORDERFIELD1(m_xBuilder->weld_combo_box(u"field1"_ustr))
+ , m_xLB_ORDERVALUE1(m_xBuilder->weld_combo_box(u"value1"_ustr))
+ , m_xLB_ORDERFIELD2(m_xBuilder->weld_combo_box(u"field2"_ustr))
+ , m_xLB_ORDERVALUE2(m_xBuilder->weld_combo_box(u"value2"_ustr))
+ , m_xLB_ORDERFIELD3(m_xBuilder->weld_combo_box(u"field3"_ustr))
+ , m_xLB_ORDERVALUE3(m_xBuilder->weld_combo_box(u"value3"_ustr))
{
m_aColumnList[0] = m_xLB_ORDERFIELD1.get();
m_aColumnList[1] = m_xLB_ORDERFIELD2.get();
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index e5cd612c282c..07891f773cfd 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -96,7 +96,7 @@ namespace
std::shared_ptr< ImageProvider > const & getImageProvider( SQLExceptionInfo::TYPE _eType ) const
{
std::shared_ptr< ImageProvider >* ppProvider( &m_pErrorImage );
- OUString sNormalImageID("dialog-error");
+ OUString sNormalImageID(u"dialog-error"_ustr);
switch ( _eType )
{
@@ -207,7 +207,7 @@ namespace
iter.next( aCurrentElement );
const SQLException* pCurrentError = aCurrentElement;
- OSL_ENSURE( pCurrentError, "lcl_buildExceptionChain: iterator failure!" );
+ assert(pCurrentError && "lcl_buildExceptionChain: iterator failure!");
// hasMoreElements should not have returned <TRUE/> in this case
ExceptionDisplayInfo aDisplayInfo( aCurrentElement.getType() );
@@ -276,9 +276,9 @@ protected:
}
OExceptionChainDialog::OExceptionChainDialog(weld::Window* pParent, ExceptionDisplayChain&& rExceptions)
- : GenericDialogController(pParent, "dbaccess/ui/sqlexception.ui", "SQLExceptionDialog")
- , m_xExceptionList(m_xBuilder->weld_tree_view("list"))
- , m_xExceptionText(m_xBuilder->weld_text_view("description"))
+ : GenericDialogController(pParent, u"dbaccess/ui/sqlexception.ui"_ustr, u"SQLExceptionDialog"_ustr)
+ , m_xExceptionList(m_xBuilder->weld_tree_view(u"list"_ustr))
+ , m_xExceptionText(m_xBuilder->weld_text_view(u"description"_ustr))
, m_aExceptions(std::move(rExceptions))
{
int nListWidth = m_xExceptionText->get_approximate_digit_width() * 28;
@@ -546,7 +546,7 @@ void OSQLMessageBox::Construct(weld::Window* pParent, MessBoxStyle _nStyle, Mess
break;
}
- m_xDialog.reset(Application::CreateMessageDialog(pParent, eMessageType, VclButtonsType::NONE, ""));
+ m_xDialog.reset(Application::CreateMessageDialog(pParent, eMessageType, VclButtonsType::NONE, u""_ustr));
m_xDialog->set_title(utl::ConfigManager::getProductName() + " Base");
impl_fillMessages();
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index 5b956558d15f..75e6d657771b 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -48,11 +48,11 @@ namespace dbaui
// OTableSubscriptionPage
OTableSubscriptionPage::OTableSubscriptionPage(weld::Container* pPage, OTableSubscriptionDialog* pTablesDlg, const SfxItemSet& _rCoreAttrs)
- : OGenericAdministrationPage(pPage, pTablesDlg, "dbaccess/ui/tablesfilterpage.ui", "TablesFilterPage", _rCoreAttrs)
+ : OGenericAdministrationPage(pPage, pTablesDlg, u"dbaccess/ui/tablesfilterpage.ui"_ustr, u"TablesFilterPage"_ustr, _rCoreAttrs)
, m_bCatalogAtStart(true)
, m_pTablesDlg(pTablesDlg)
- , m_xTables(m_xBuilder->weld_widget("TablesFilterPage"))
- , m_xTablesList(new OTableTreeListBox(m_xBuilder->weld_tree_view("treeview"), true))
+ , m_xTables(m_xBuilder->weld_widget(u"TablesFilterPage"_ustr))
+ , m_xTablesList(new OTableTreeListBox(m_xBuilder->weld_tree_view(u"treeview"_ustr), true))
{
m_xTablesList->init();
@@ -201,7 +201,7 @@ namespace dbaui
Reference<XModifiable> xModi(getDataSourceOrModel(xProp),UNO_QUERY);
bool bModified = ( xModi.is() && xModi->isModified() );
- Sequence< OUString > aNewTableFilter { "%" };
+ Sequence< OUString > aNewTableFilter { u"%"_ustr };
xProp->setPropertyValue(PROPERTY_TABLEFILTER,Any(aNewTableFilter));
xProp->setPropertyValue( PROPERTY_TABLETYPEFILTER, Any( Sequence< OUString >() ) );
@@ -460,7 +460,7 @@ namespace dbaui
auto xRoot = m_xTablesList->getAllObjectsEntry();
if (xRoot && m_xTablesList->isWildcardChecked(*xRoot))
{
- aTableFilter = { "%" };
+ aTableFilter = { u"%"_ustr };
}
else
{
diff --git a/dbaccess/source/ui/dlg/textconnectionsettings.cxx b/dbaccess/source/ui/dlg/textconnectionsettings.cxx
index 5076b3d328c3..224b24e5fe79 100644
--- a/dbaccess/source/ui/dlg/textconnectionsettings.cxx
+++ b/dbaccess/source/ui/dlg/textconnectionsettings.cxx
@@ -26,10 +26,10 @@ namespace dbaui
{
// TextConnectionSettingsDialog
TextConnectionSettingsDialog::TextConnectionSettingsDialog(weld::Window* pParent, SfxItemSet& rItems)
- : GenericDialogController(pParent, "dbaccess/ui/textconnectionsettings.ui", "TextConnectionSettingsDialog")
+ : GenericDialogController(pParent, u"dbaccess/ui/textconnectionsettings.ui"_ustr, u"TextConnectionSettingsDialog"_ustr)
, m_rItems(rItems)
- , m_xContainer(m_xBuilder->weld_widget("TextPageContainer"))
- , m_xOK(m_xBuilder->weld_button("ok"))
+ , m_xContainer(m_xBuilder->weld_widget(u"TextPageContainer"_ustr))
+ , m_xOK(m_xBuilder->weld_button(u"ok"_ustr))
, m_xTextConnectionHelper(new OTextConnectionHelper(m_xContainer.get(), TC_HEADER | TC_SEPARATORS | TC_CHARSET))
{
m_xOK->connect_clicked(LINK(this, TextConnectionSettingsDialog, OnOK));
diff --git a/dbaccess/source/ui/inc/CollectionView.hxx b/dbaccess/source/ui/inc/CollectionView.hxx
index c49a5fd4fc14..8162dcd2d676 100644
--- a/dbaccess/source/ui/inc/CollectionView.hxx
+++ b/dbaccess/source/ui/inc/CollectionView.hxx
@@ -24,6 +24,8 @@
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
+namespace ucbhelper { class CommandEnvironment; }
+
namespace dbaui
{
/* this class allows to browse through the collection of forms and reports
@@ -32,7 +34,7 @@ namespace dbaui
{
css::uno::Reference< css::ucb::XContent> m_xContent;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
- css::uno::Reference< css::ucb::XCommandEnvironment > m_xCmdEnv;
+ rtl::Reference< ::ucbhelper::CommandEnvironment > m_xCmdEnv;
bool m_bCreateForm;
std::unique_ptr<weld::Label> m_xFTCurrentPath;
diff --git a/dbaccess/source/ui/inc/brwview.hxx b/dbaccess/source/ui/inc/brwview.hxx
index 0933861b8cf3..12d3d8822073 100644
--- a/dbaccess/source/ui/inc/brwview.hxx
+++ b/dbaccess/source/ui/inc/brwview.hxx
@@ -36,10 +36,11 @@ class Splitter;
namespace dbaui
{
class SbaGridControl;
+ class SbaXGridControl;
class UnoDataBrowserView final : public ODataView, public ::utl::OEventListenerAdapter
{
- css::uno::Reference< css::awt::XControl > m_xGrid; // our grid's UNO representation
+ rtl::Reference< SbaXGridControl > m_xGrid; // our grid's UNO representation
css::uno::Reference< css::awt::XControlContainer > m_xMe; // our own UNO representation
VclPtr<InterimDBTreeListBox> m_pTreeView;
VclPtr<Splitter> m_pSplitter;
@@ -48,7 +49,7 @@ namespace dbaui
DECL_LINK( SplitHdl, Splitter*, void );
// attribute access
public:
- const css::uno::Reference< css::awt::XControl >& getGridControl() const { return m_xGrid; }
+ const rtl::Reference< SbaXGridControl >& getGridControl() const { return m_xGrid; }
SbaGridControl* getVclControl() const;
UnoDataBrowserView( vcl::Window* pParent,
diff --git a/dbaccess/source/ui/inc/directsql.hxx b/dbaccess/source/ui/inc/directsql.hxx
index bfe8195fc5ff..4d141d8a2f02 100644
--- a/dbaccess/source/ui/inc/directsql.hxx
+++ b/dbaccess/source/ui/inc/directsql.hxx
@@ -86,7 +86,7 @@ namespace dbaui
DECL_LINK( OnStatementModified, LinkParamNone*, void );
/// adds a statement to the statement history
- void implAddToStatementHistory(const OUString& _rStatement);
+ void implAddToStatementHistory(const OUString& _rStatement, const bool bFromMemory = false);
/// ensures that our history has at most m_nHistoryLimit entries
void implEnsureHistoryLimit();
diff --git a/dbaccess/source/ui/inc/opendoccontrols.hxx b/dbaccess/source/ui/inc/opendoccontrols.hxx
index 8448a047dc7b..d2cca5281111 100644
--- a/dbaccess/source/ui/inc/opendoccontrols.hxx
+++ b/dbaccess/source/ui/inc/opendoccontrols.hxx
@@ -34,17 +34,12 @@ namespace dbaui
class OpenDocumentButton
{
private:
- OUString m_sModule;
-
std::unique_ptr<weld::Button> m_xControl;
public:
- OpenDocumentButton(std::unique_ptr<weld::Button> xControl, const char* _pAsciiModuleName);
+ OpenDocumentButton(std::unique_ptr<weld::Button> xControl, const OUString& _rAsciiModuleName);
void set_sensitive(bool bSensitive) { m_xControl->set_sensitive(bSensitive); }
void connect_clicked(const Link<weld::Button&, void>& rLink) { m_xControl->connect_clicked(rLink); }
-
- private:
- void impl_init( const char* _pAsciiModuleName );
};
// OpenDocumentListBox
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index fa618fb11b32..f8bdea3050f2 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -76,7 +76,7 @@ ODatabaseExport::ODatabaseExport(sal_Int32 nRows,
bool _bAutoIncrementEnabled,
SvStream& _rInputStream)
:m_vColumnPositions(std::move(_rColumnPositions))
- ,m_aDestColumns(true)
+ ,m_aDestColumns(comphelper::UStringMixLess(true))
,m_xFormatter(_rxNumberF)
,m_xContext(_rxContext)
,m_pFormatter(nullptr)
@@ -125,7 +125,7 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection,
const Reference< XNumberFormatter >& _rxNumberF,
const Reference< css::uno::XComponentContext >& _rxContext,
SvStream& _rInputStream)
- :m_aDestColumns(_rxConnection->getMetaData().is() && _rxConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers())
+ :m_aDestColumns(comphelper::UStringMixLess(_rxConnection->getMetaData().is() && _rxConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()))
,m_xConnection(_rxConnection)
,m_xFormatter(_rxNumberF)
,m_xContext(_rxContext)
@@ -774,7 +774,7 @@ void ODatabaseExport::ensureFormatter()
auto pSupplierImpl = comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>(xSupplier);
m_pFormatter = pSupplierImpl ? pSupplierImpl->GetNumberFormatter() : nullptr;
Reference<XPropertySet> xNumberFormatSettings = xSupplier->getNumberFormatSettings();
- xNumberFormatSettings->getPropertyValue("NullDate") >>= m_aNullDate;
+ xNumberFormatSettings->getPropertyValue(u"NullDate"_ustr) >>= m_aNullDate;
}
}
@@ -803,17 +803,17 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatement( const
{
return Reference< XPreparedStatement > ();
}
- std::vector<OUString> aInsertList(aDestColumnNames.getLength() + 1);
- for(size_t j=0; j < aInsertList.size(); ++j)
+
+ std::vector<OUString> aInsertList;
+ auto sortedColumns = _rvColumns;
+ std::sort(sortedColumns.begin(), sortedColumns.end());
+ aInsertList.reserve(_rvColumns.size());
+ for (const auto& [nSrc, nDest] : sortedColumns)
{
- ODatabaseExport::TPositions::const_iterator aFind = std::find_if(_rvColumns.begin(),_rvColumns.end(),
- [j] (const ODatabaseExport::TPositions::value_type& tPos)
- { return tPos.second == static_cast<sal_Int32>(j+1); });
- if ( _rvColumns.end() != aFind && aFind->second != COLUMN_POSITION_NOT_FOUND && aFind->first != COLUMN_POSITION_NOT_FOUND )
- {
- OSL_ENSURE((aFind->first) < static_cast<sal_Int32>(aInsertList.size()),"aInsertList: Illegal index for vector");
- aInsertList[aFind->first] = ::dbtools::quoteName(aQuote, aDestColumnNames[j]);
- }
+ if (nSrc == COLUMN_POSITION_NOT_FOUND || nDest == COLUMN_POSITION_NOT_FOUND)
+ continue;
+ assert(nDest > 0 && nDest <= aDestColumnNames.getLength());
+ aInsertList.push_back(dbtools::quoteName(aQuote, aDestColumnNames[nDest - 1]));
}
// create the sql string
diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx
index a7dd0e817cfc..2efbe1cf414d 100644
--- a/dbaccess/source/ui/misc/RowSetDrop.cxx
+++ b/dbaccess/source/ui/misc/RowSetDrop.cxx
@@ -58,7 +58,7 @@ void ORowSetImportExport::initialize()
m_xTargetResultSetMetaData = Reference<XResultSetMetaDataSupplier>(m_xTargetResultSetUpdate,UNO_QUERY_THROW)->getMetaData();
if(!m_xTargetResultSetMetaData.is() || !xColumnLocate.is() || !m_xResultSetMetaData.is() )
- throw SQLException(DBA_RES(STR_UNEXPECTED_ERROR),*this,"S1000",0,Any());
+ throw SQLException(DBA_RES(STR_UNEXPECTED_ERROR),*this,u"S1000"_ustr,0,Any());
sal_Int32 nCount = m_xTargetResultSetMetaData->getColumnCount();
m_aColumnMapping.reserve(nCount);
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index 5d22c90468c8..75be554a1cd1 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -107,7 +107,7 @@ void OTableCopyHelper::insertTable( std::u16string_view i_rSourceDataSource, con
bool bAppendToExisting = !sTableNameForAppend.isEmpty();
xWizard->setOperation( bAppendToExisting ? CopyTableOperation::AppendData : CopyTableOperation::CopyDefinitionAndData );
- xWizard->execute();
+ (void)xWizard->execute();
}
catch( const SQLException& )
{
@@ -189,7 +189,7 @@ void OTableCopyHelper::pasteTable( SotClipboardFormatId _nFormatId
aTrans.bHtml = SotClipboardFormatId::HTML == _nFormatId;
aTrans.sDefaultTableName = GetTableNameForAppend();
if ( !aTrans.aHtmlRtfStorage || !copyTagTable(aTrans,false,_xConnection) )
- m_pController->showError(SQLException(DBA_RES(STR_NO_TABLE_FORMAT_INSIDE), *m_pController, "S1000", 0, Any()));
+ m_pController->showError(SQLException(DBA_RES(STR_NO_TABLE_FORMAT_INSIDE), *m_pController, u"S1000"_ustr, 0, Any()));
}
catch(const SQLException&)
{
@@ -201,7 +201,7 @@ void OTableCopyHelper::pasteTable( SotClipboardFormatId _nFormatId
}
}
else
- m_pController->showError(SQLException(DBA_RES(STR_NO_TABLE_FORMAT_INSIDE), *m_pController, "S1000", 0, Any()));
+ m_pController->showError(SQLException(DBA_RES(STR_NO_TABLE_FORMAT_INSIDE), *m_pController, u"S1000"_ustr, 0, Any()));
}
void OTableCopyHelper::pasteTable( const TransferableDataHelper& _rTransData
@@ -291,7 +291,7 @@ void OTableCopyHelper::asyncCopyTagTable( DropDescriptor& _rDesc
else if ( !_rDesc.bError )
pasteTable(_rDesc.aDroppedData,i_rDestDataSource,_xConnection);
else
- m_pController->showError(SQLException(DBA_RES(STR_NO_TABLE_FORMAT_INSIDE), *m_pController, "S1000", 0, Any()));
+ m_pController->showError(SQLException(DBA_RES(STR_NO_TABLE_FORMAT_INSIDE), *m_pController, u"S1000"_ustr, 0, Any()));
}
} // namespace dbaui
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index fb25922e6804..6dac55891f19 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -260,7 +260,7 @@ void ODatabaseImportExport::initialize()
// the result set may be already set with the datadescriptor
if ( !m_xResultSet.is() )
{
- m_xResultSet.set( m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.sdb.RowSet", m_xContext), UNO_QUERY );
+ m_xResultSet.set( m_xContext->getServiceManager()->createInstanceWithContext(u"com.sun.star.sdb.RowSet"_ustr, m_xContext), UNO_QUERY );
Reference< XPropertySet > xProp( m_xResultSet, UNO_QUERY_THROW );
xProp->setPropertyValue( PROPERTY_ACTIVE_CONNECTION, Any( m_xConnection.getTyped() ) );
xProp->setPropertyValue( PROPERTY_COMMAND_TYPE, Any( m_nCommandType ) );
@@ -412,7 +412,7 @@ bool ORTFImportExport::Write()
sColumnName = m_xResultSetMetaData->getColumnName(i);
else
{
- sColumnName = aNames[i];
+ sColumnName = aNames[i - 1];
Reference<XPropertySet> xColumn;
xColumns->getByName(sColumnName) >>= xColumn;
xColumn->getPropertyValue(PROPERTY_ALIGN) >>= nAlign;
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index b8efb2fb60c0..831116797646 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -231,7 +231,7 @@ Reference< XDataSource > getDataSourceByName( const OUString& _rDataSourceName,
{
if ( _pErrorInfo )
{
- *_pErrorInfo = aSQLError;
+ *_pErrorInfo = std::move(aSQLError);
}
else
{
@@ -791,7 +791,7 @@ bool callColumnFormatDialog(weld::Widget* _pParent,
SID_ATTR_NUMBERFORMAT_ONE_AREA, SID_ATTR_NUMBERFORMAT_ONE_AREA
>;
- rtl::Reference<SfxItemPool> pPool(new SfxItemPool("GridBrowserProperties"));
+ rtl::Reference<SfxItemPool> pPool(new SfxItemPool(u"GridBrowserProperties"_ustr));
pPool->registerItemInfoPackage(getItemInfoPackageColumnFormatDialog());
pPool->SetDefaultMetric( MapUnit::MapTwip ); // ripped, don't understand why
@@ -865,7 +865,7 @@ bool callColumnFormatDialog(weld::Widget* _pParent,
std::shared_ptr<const SfxFilter> getStandardDatabaseFilter()
{
- std::shared_ptr<const SfxFilter> pFilter = SfxFilter::GetFilterByName("StarOffice XML (Base)");
+ std::shared_ptr<const SfxFilter> pFilter = SfxFilter::GetFilterByName(u"StarOffice XML (Base)"_ustr);
OSL_ENSURE(pFilter,"Filter: StarOffice XML (Base) could not be found!");
return pFilter;
}
@@ -1084,7 +1084,7 @@ TOTypeInfoSP queryPrimaryKeyType(const OTypeInfoMap& _rTypeInfo)
pFallback = elem.second; // alternative
}
if ( !pTypeInfo ) // just a fallback
- pTypeInfo = pFallback ? pFallback : queryTypeInfoByType(DataType::VARCHAR, _rTypeInfo);
+ pTypeInfo = pFallback ? std::move(pFallback) : queryTypeInfoByType(DataType::VARCHAR, _rTypeInfo);
OSL_ENSURE(pTypeInfo,"checkColumns: can't find a type which is usable as a key!");
return pTypeInfo;
@@ -1156,7 +1156,7 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
if ( !pTypeInfo )
{
bool bForce = true;
- pTypeInfo = ::dbaui::getTypeInfoFromType(_rTypeInfo,DataType::VARCHAR,OUString(),"x",50,0,false,bForce);
+ pTypeInfo = ::dbaui::getTypeInfoFromType(_rTypeInfo,DataType::VARCHAR,OUString(),u"x"_ustr,50,0,false,bForce);
}
OSL_ENSURE(pTypeInfo,"Wrong DataType supplied!");
return pTypeInfo;
@@ -1327,7 +1327,7 @@ bool insertHierarchyElement(weld::Window* pParent, const Reference< XComponentCo
{
OUString sError(DBA_RES(STR_NAME_ALREADY_EXISTS));
sError = sError.replaceFirst("#",sNewName);
- throw SQLException(sError,nullptr,"S1000",0,Any());
+ throw SQLException(sError,nullptr,u"S1000"_ustr,0,Any());
}
try
diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx
index 6176c19700ef..123db5efc548 100644
--- a/dbaccess/source/ui/misc/WCPage.cxx
+++ b/dbaccess/source/ui/misc/WCPage.cxx
@@ -41,19 +41,19 @@ using namespace ::com::sun::star::sdbcx;
namespace CopyTableOperation = css::sdb::application::CopyTableOperation;
OCopyTable::OCopyTable(weld::Container* pPage, OCopyTableWizard* pWizard)
- : OWizardPage(pPage, pWizard, "dbaccess/ui/copytablepage.ui", "CopyTablePage")
+ : OWizardPage(pPage, pWizard, u"dbaccess/ui/copytablepage.ui"_ustr, u"CopyTablePage"_ustr)
, m_bPKeyAllowed(false)
, m_bUseHeaderAllowed(true)
, m_nOldOperation(0)
- , m_xEdTableName(m_xBuilder->weld_entry("name"))
- , m_xRB_DefData(m_xBuilder->weld_radio_button("defdata"))
- , m_xRB_Def(m_xBuilder->weld_radio_button("def"))
- , m_xRB_View(m_xBuilder->weld_radio_button("view"))
- , m_xRB_AppendData(m_xBuilder->weld_radio_button("data"))
- , m_xCB_UseHeaderLine(m_xBuilder->weld_check_button("firstline"))
- , m_xCB_PrimaryColumn(m_xBuilder->weld_check_button("primarykey"))
- , m_xFT_KeyName(m_xBuilder->weld_label("keynamelabel"))
- , m_xEdKeyName(m_xBuilder->weld_entry("keyname"))
+ , m_xEdTableName(m_xBuilder->weld_entry(u"name"_ustr))
+ , m_xRB_DefData(m_xBuilder->weld_radio_button(u"defdata"_ustr))
+ , m_xRB_Def(m_xBuilder->weld_radio_button(u"def"_ustr))
+ , m_xRB_View(m_xBuilder->weld_radio_button(u"view"_ustr))
+ , m_xRB_AppendData(m_xBuilder->weld_radio_button(u"data"_ustr))
+ , m_xCB_UseHeaderLine(m_xBuilder->weld_check_button(u"firstline"_ustr))
+ , m_xCB_PrimaryColumn(m_xBuilder->weld_check_button(u"primarykey"_ustr))
+ , m_xFT_KeyName(m_xBuilder->weld_label(u"keynamelabel"_ustr))
+ , m_xEdKeyName(m_xBuilder->weld_entry(u"keyname"_ustr))
{
if ( m_pParent->m_xDestConnection.is() )
{
@@ -74,7 +74,7 @@ OCopyTable::OCopyTable(weld::Container* pPage, OCopyTableWizard* pWizard)
m_xFT_KeyName->set_sensitive(false);
m_xEdKeyName->set_sensitive(false);
- m_xEdKeyName->set_text(m_pParent->createUniqueName("ID"));
+ m_xEdKeyName->set_text(m_pParent->createUniqueName(u"ID"_ustr));
const sal_Int32 nMaxLen = m_pParent->getMaxColumnNameLength();
m_xEdKeyName->set_max_length(nMaxLen);
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index 28f4d50e4a81..8cc8868760cd 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -46,13 +46,13 @@ OWizardPage::~OWizardPage()
// OWizColumnSelect
OWizColumnSelect::OWizColumnSelect(weld::Container* pPage, OCopyTableWizard* pWizard)
- : OWizardPage(pPage, pWizard, "dbaccess/ui/applycolpage.ui", "ApplyColPage")
- , m_xOrgColumnNames(m_xBuilder->weld_tree_view("from"))
- , m_xColumn_RH(m_xBuilder->weld_button("colrh"))
- , m_xColumns_RH(m_xBuilder->weld_button("colsrh"))
- , m_xColumn_LH(m_xBuilder->weld_button("collh"))
- , m_xColumns_LH(m_xBuilder->weld_button("colslh"))
- , m_xNewColumnNames(m_xBuilder->weld_tree_view("to"))
+ : OWizardPage(pPage, pWizard, u"dbaccess/ui/applycolpage.ui"_ustr, u"ApplyColPage"_ustr)
+ , m_xOrgColumnNames(m_xBuilder->weld_tree_view(u"from"_ustr))
+ , m_xColumn_RH(m_xBuilder->weld_button(u"colrh"_ustr))
+ , m_xColumns_RH(m_xBuilder->weld_button(u"colsrh"_ustr))
+ , m_xColumn_LH(m_xBuilder->weld_button(u"collh"_ustr))
+ , m_xColumns_LH(m_xBuilder->weld_button(u"colslh"_ustr))
+ , m_xNewColumnNames(m_xBuilder->weld_tree_view(u"to"_ustr))
{
m_xColumn_RH->connect_clicked(LINK(this,OWizColumnSelect,ButtonClickHdl));
m_xColumn_LH->connect_clicked(LINK(this,OWizColumnSelect,ButtonClickHdl));
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 756f60f857a1..7825c1af26c8 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -133,7 +133,7 @@ bool ObjectCopySource::isView() const
void ObjectCopySource::copyUISettingsTo( const Reference< XPropertySet >& _rxObject ) const
{
- const OUString aCopyProperties[] = {
+ static constexpr OUString aCopyProperties[] {
PROPERTY_FONT, PROPERTY_ROW_HEIGHT, PROPERTY_TEXTCOLOR,PROPERTY_TEXTLINECOLOR,PROPERTY_TEXTEMPHASIS,PROPERTY_TEXTRELIEF
};
for (const auto & aCopyProperty : aCopyProperties)
@@ -145,9 +145,9 @@ void ObjectCopySource::copyUISettingsTo( const Reference< XPropertySet >& _rxObj
void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _xConnection,const Reference< XPropertySet >& _rxObject ) const
{
- std::pair< OUString, OUString > aProperties[] = {
- std::pair< OUString, OUString >(PROPERTY_FILTER,OUString(" AND "))
- ,std::pair< OUString, OUString >(PROPERTY_ORDER,OUString(" ORDER BY "))
+ static constexpr std::pair< OUString, OUString > aProperties[] {
+ std::pair< OUString, OUString >(PROPERTY_FILTER,u" AND "_ustr)
+ ,std::pair< OUString, OUString >(PROPERTY_ORDER,u" ORDER BY "_ustr)
};
try
@@ -481,7 +481,7 @@ OCopyTableWizard::OCopyTableWizard(weld::Window* pParent, const OUString& _rDefa
const Reference< XConnection >& _xConnection, const Reference< XComponentContext >& _rxContext,
const Reference< XInteractionHandler>& _xInteractionHandler)
: vcl::RoadmapWizardMachine(pParent)
- , m_mNameMapping(_xConnection->getMetaData().is() && _xConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers())
+ , m_mNameMapping(comphelper::UStringMixLess(_xConnection->getMetaData().is() && _xConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()))
, m_xDestConnection( _xConnection )
, m_rSourceObject( _rSourceObject )
, m_xFormatter( getNumberFormatter( _xConnection, _rxContext ) )
@@ -584,7 +584,7 @@ OCopyTableWizard::OCopyTableWizard( weld::Window* pParent, OUString _sDefaultNam
TypeSelectionPageFactory _pTypeSelectionPageFactory, SvStream& _rTypeSelectionPageArg, const Reference< XComponentContext >& _rxContext )
: vcl::RoadmapWizardMachine(pParent)
, m_vSourceColumns(std::move(_rSourceColumns))
- , m_mNameMapping(_xConnection->getMetaData().is() && _xConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers())
+ , m_mNameMapping(comphelper::UStringMixLess(_xConnection->getMetaData().is() && _xConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()))
, m_xDestConnection( _xConnection )
, m_rSourceObject( DummyCopySource::Instance() )
, m_xFormatter(_xFormatter)
@@ -1182,7 +1182,7 @@ Reference< XPropertySet > OCopyTableWizard::createTable()
if(xMetaData->getDatabaseProductName() == "MySQL")
{
Reference< XStatement > xSelect = m_xDestConnection->createStatement();
- Reference< XResultSet > xRs = xSelect->executeQuery("select database()");
+ Reference< XResultSet > xRs = xSelect->executeQuery(u"select database()"_ustr);
(void)xRs->next(); // first and only result
Reference< XRow > xRow( xRs, UNO_QUERY_THROW );
sSchema = xRow->getString(1);
@@ -1477,7 +1477,7 @@ TOTypeInfoSP OCopyTableWizard::convertType(const TOTypeInfoSP& _pType, bool& _bN
if ( !pType )
{
_bNotConvert = false;
- pType = ::dbaui::getTypeInfoFromType(m_aDestTypeInfo,DataType::VARCHAR,_pType->aTypeName,"x",50,0,false,bForce);
+ pType = ::dbaui::getTypeInfoFromType(m_aDestTypeInfo,DataType::VARCHAR,_pType->aTypeName,u"x"_ustr,50,0,false,bForce);
if ( !pType )
pType = m_pTypeInfo;
}
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index a6bb59da8eea..0d6c3c835163 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -30,17 +30,17 @@ using namespace ::dbaui;
// OWizColumnSelect
OWizNameMatching::OWizNameMatching(weld::Container* pPage, OCopyTableWizard* pWizard)
- : OWizardPage(pPage, pWizard, "dbaccess/ui/namematchingpage.ui", "NameMatching")
- , m_xTABLE_LEFT(m_xBuilder->weld_label("leftlabel"))
- , m_xTABLE_RIGHT(m_xBuilder->weld_label("rightlabel"))
- , m_xCTRL_LEFT(m_xBuilder->weld_tree_view("left"))
- , m_xCTRL_RIGHT(m_xBuilder->weld_tree_view("right"))
- , m_xColumn_up(m_xBuilder->weld_button("up"))
- , m_xColumn_down(m_xBuilder->weld_button("down"))
- , m_xColumn_up_right(m_xBuilder->weld_button("up_right"))
- , m_xColumn_down_right(m_xBuilder->weld_button("down_right"))
- , m_xAll(m_xBuilder->weld_button("all"))
- , m_xNone(m_xBuilder->weld_button("none"))
+ : OWizardPage(pPage, pWizard, u"dbaccess/ui/namematchingpage.ui"_ustr, u"NameMatching"_ustr)
+ , m_xTABLE_LEFT(m_xBuilder->weld_label(u"leftlabel"_ustr))
+ , m_xTABLE_RIGHT(m_xBuilder->weld_label(u"rightlabel"_ustr))
+ , m_xCTRL_LEFT(m_xBuilder->weld_tree_view(u"left"_ustr))
+ , m_xCTRL_RIGHT(m_xBuilder->weld_tree_view(u"right"_ustr))
+ , m_xColumn_up(m_xBuilder->weld_button(u"up"_ustr))
+ , m_xColumn_down(m_xBuilder->weld_button(u"down"_ustr))
+ , m_xColumn_up_right(m_xBuilder->weld_button(u"up_right"_ustr))
+ , m_xColumn_down_right(m_xBuilder->weld_button(u"down_right"_ustr))
+ , m_xAll(m_xBuilder->weld_button(u"all"_ustr))
+ , m_xNone(m_xBuilder->weld_button(u"none"_ustr))
{
OUString aImgUp(BMP_UP);
OUString aImgDown(BMP_DOWN);
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index f27dcc921168..4224ea66b9f8 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -202,14 +202,14 @@ OUString OWizTypeSelectControl::getAutoIncrementValue() const
}
OWizTypeSelect::OWizTypeSelect(weld::Container* pPage, OCopyTableWizard* pWizard, SvStream* pStream)
- : OWizardPage(pPage, pWizard, "dbaccess/ui/typeselectpage.ui", "TypeSelect")
- , m_xColumnNames(new OWizTypeSelectList(m_xBuilder->weld_tree_view("columnnames")))
- , m_xControlContainer(m_xBuilder->weld_container("control_container"))
+ : OWizardPage(pPage, pWizard, u"dbaccess/ui/typeselectpage.ui"_ustr, u"TypeSelect"_ustr)
+ , m_xColumnNames(new OWizTypeSelectList(m_xBuilder->weld_tree_view(u"columnnames"_ustr)))
+ , m_xControlContainer(m_xBuilder->weld_container(u"control_container"_ustr))
, m_xTypeControl(new OWizTypeSelectControl(m_xControlContainer.get(), this))
- , m_xAutoType(m_xBuilder->weld_label("autotype"))
- , m_xAutoFt(m_xBuilder->weld_label("autolabel"))
- , m_xAutoEt(m_xBuilder->weld_spin_button("auto"))
- , m_xAutoPb(m_xBuilder->weld_button("autobutton"))
+ , m_xAutoType(m_xBuilder->weld_label(u"autotype"_ustr))
+ , m_xAutoFt(m_xBuilder->weld_label(u"autolabel"_ustr))
+ , m_xAutoEt(m_xBuilder->weld_spin_button(u"auto"_ustr))
+ , m_xAutoPb(m_xBuilder->weld_button(u"autobutton"_ustr))
, m_pParserStream(pStream)
, m_nDisplayRow(0)
, m_bAutoIncrementEnabled(false)
@@ -219,7 +219,7 @@ OWizTypeSelect::OWizTypeSelect(weld::Container* pPage, OCopyTableWizard* pWizard
m_xTypeControl->Init();
- m_xAutoEt->set_text("10");
+ m_xAutoEt->set_text(u"10"_ustr);
m_xAutoEt->set_digits(0);
m_xAutoPb->connect_clicked(LINK(this,OWizTypeSelect,ButtonClickHdl));
m_xColumnNames->set_selection_mode(SelectionMode::Multiple);
@@ -365,8 +365,8 @@ IMPL_LINK(OWizTypeSelectList, CommandHdl, const CommandEvent&, rCEvt, bool)
if (!IsPrimaryKeyAllowed())
return false;
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xControl.get(), "dbaccess/ui/keymenu.ui"));
- auto xContextMenu = xBuilder->weld_menu("menu");
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xControl.get(), u"dbaccess/ui/keymenu.ui"_ustr));
+ auto xContextMenu = xBuilder->weld_menu(u"menu"_ustr);
// Should primary key checkbox be checked?
const sal_Int32 nCount = m_xControl->n_children();
bool bCheckOk = false;
@@ -386,7 +386,7 @@ IMPL_LINK(OWizTypeSelectList, CommandHdl, const CommandEvent&, rCEvt, bool)
}
if (bCheckOk)
- xContextMenu->set_active("primarykey", true);
+ xContextMenu->set_active(u"primarykey"_ustr, true);
OUString sCommand(xContextMenu->popup_at_rect(m_xControl.get(), tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1,1))));
if (sCommand != "primarykey")
diff --git a/dbaccess/source/ui/misc/asyncmodaldialog.cxx b/dbaccess/source/ui/misc/asyncmodaldialog.cxx
index 8323d47dba6f..2c7db57be16e 100644
--- a/dbaccess/source/ui/misc/asyncmodaldialog.cxx
+++ b/dbaccess/source/ui/misc/asyncmodaldialog.cxx
@@ -65,7 +65,7 @@ namespace dbaui
{
try
{
- m_xDialog->execute();
+ (void)m_xDialog->execute();
}
catch( const Exception& )
{
diff --git a/dbaccess/source/ui/misc/controllerframe.cxx b/dbaccess/source/ui/misc/controllerframe.cxx
index 365e144390c0..cfca8f73413e 100644
--- a/dbaccess/source/ui/misc/controllerframe.cxx
+++ b/dbaccess/source/ui/misc/controllerframe.cxx
@@ -208,7 +208,7 @@ namespace dbaui
{
if ( _rData.m_xDocEventBroadcaster.is() )
{
- OUString sEventName = _bActive ? OUString("OnFocus") : OUString("OnUnfocus");
+ OUString sEventName = _bActive ? u"OnFocus"_ustr : u"OnUnfocus"_ustr;
Reference< XController2 > xController( _rData.m_rController.getXController(), UNO_QUERY_THROW );
_rData.m_xDocEventBroadcaster->notifyDocumentEvent( sEventName, xController, Any() );
}
diff --git a/dbaccess/source/ui/misc/databaseobjectview.cxx b/dbaccess/source/ui/misc/databaseobjectview.cxx
index 47c3932ca21a..112c79947393 100644
--- a/dbaccess/source/ui/misc/databaseobjectview.cxx
+++ b/dbaccess/source/ui/misc/databaseobjectview.cxx
@@ -104,9 +104,9 @@ namespace dbaui
if ( !m_xFrameLoader.is() )
{
Reference< XSingleServiceFactory > xFact = TaskCreator::create(m_xORB);
- Sequence< Any > lArgs{ Any(NamedValue("ParentFrame", Any(m_xParentFrame))),
- Any(NamedValue("TopWindow", Any(true))),
- Any(NamedValue("SupportPersistentWindowState",
+ Sequence< Any > lArgs{ Any(NamedValue(u"ParentFrame"_ustr, Any(m_xParentFrame))),
+ Any(NamedValue(u"TopWindow"_ustr, Any(true))),
+ Any(NamedValue(u"SupportPersistentWindowState"_ustr,
Any(true))) };
m_xFrameLoader.set(xFact->createInstanceWithArguments(lArgs), UNO_QUERY_THROW);
@@ -124,7 +124,7 @@ namespace dbaui
Reference< XComponentLoader > xFrameLoader( m_xFrameLoader, UNO_SET_THROW );
xReturn = xFrameLoader->loadComponentFromURL(
m_sComponentURL,
- "_self",
+ u"_self"_ustr,
0,
i_rDispatchArgs.getPropertyValues()
);
diff --git a/dbaccess/source/ui/misc/datasourceconnector.cxx b/dbaccess/source/ui/misc/datasourceconnector.cxx
index a170d02963f9..11fcf5ff6c1e 100644
--- a/dbaccess/source/ui/misc/datasourceconnector.cxx
+++ b/dbaccess/source/ui/misc/datasourceconnector.cxx
@@ -120,7 +120,7 @@ namespace dbaui
Reference< XModel > xModel( getDataSourceOrModel( _xDataSource ), UNO_QUERY_THROW );
::comphelper::NamedValueCollection aArgs( xModel->getArgs() );
- Reference< XInteractionHandler > xHandler( aArgs.getOrDefault( "InteractionHandler", Reference< XInteractionHandler >() ) );
+ Reference< XInteractionHandler > xHandler( aArgs.getOrDefault( u"InteractionHandler"_ustr, Reference< XInteractionHandler >() ) );
if ( !xHandler.is() )
{
@@ -184,7 +184,7 @@ namespace dbaui
{
if ( _pErrorInfo )
{
- *_pErrorInfo = aInfo;
+ *_pErrorInfo = std::move(aInfo);
}
else
{
diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx
index f098a95900c9..c25fb8eda16a 100644
--- a/dbaccess/source/ui/misc/dsmeta.cxx
+++ b/dbaccess/source/ui/misc/dsmeta.cxx
@@ -21,6 +21,7 @@
#include <connectivity/DriversConfig.hxx>
#include <dsntypes.hxx>
#include <comphelper/processfactory.hxx>
+#include <osl/diagnose.h>
#include <map>
#include <utility>
@@ -57,27 +58,27 @@ namespace dbaui
// global tables
const FeatureMapping s_aMappings[] = {
- { DSID_AUTORETRIEVEENABLED, "GeneratedValues" },
- { DSID_AUTOINCREMENTVALUE, "GeneratedValues" },
- { DSID_AUTORETRIEVEVALUE, "GeneratedValues" },
- { DSID_SQL92CHECK, "UseSQL92NamingConstraints" },
- { DSID_APPEND_TABLE_ALIAS, "AppendTableAliasInSelect" },
- { DSID_AS_BEFORE_CORRNAME, "UseKeywordAsBeforeAlias" },
- { DSID_ENABLEOUTERJOIN, "UseBracketedOuterJoinSyntax" },
- { DSID_IGNOREDRIVER_PRIV, "IgnoreDriverPrivileges" },
- { DSID_PARAMETERNAMESUBST, "ParameterNameSubstitution" },
- { DSID_SUPPRESSVERSIONCL, "DisplayVersionColumns" },
- { DSID_CATALOG, "UseCatalogInSelect" },
- { DSID_SCHEMA, "UseSchemaInSelect" },
- { DSID_INDEXAPPENDIX, "UseIndexDirectionKeyword" },
- { DSID_DOSLINEENDS, "UseDOSLineEnds" },
- { DSID_BOOLEANCOMPARISON, "BooleanComparisonMode" },
- { DSID_CHECK_REQUIRED_FIELDS, "FormsCheckRequiredFields" },
- { DSID_IGNORECURRENCY, "IgnoreCurrency" },
- { DSID_ESCAPE_DATETIME, "EscapeDateTime" },
- { DSID_PRIMARY_KEY_SUPPORT, "PrimaryKeySupport" },
- { DSID_RESPECTRESULTSETTYPE, "RespectDriverResultSetType" },
- { DSID_MAX_ROW_SCAN, "MaxRowScan" },
+ { DSID_AUTORETRIEVEENABLED, u"GeneratedValues"_ustr },
+ { DSID_AUTOINCREMENTVALUE, u"GeneratedValues"_ustr },
+ { DSID_AUTORETRIEVEVALUE, u"GeneratedValues"_ustr },
+ { DSID_SQL92CHECK, u"UseSQL92NamingConstraints"_ustr },
+ { DSID_APPEND_TABLE_ALIAS, u"AppendTableAliasInSelect"_ustr },
+ { DSID_AS_BEFORE_CORRNAME, u"UseKeywordAsBeforeAlias"_ustr },
+ { DSID_ENABLEOUTERJOIN, u"UseBracketedOuterJoinSyntax"_ustr },
+ { DSID_IGNOREDRIVER_PRIV, u"IgnoreDriverPrivileges"_ustr },
+ { DSID_PARAMETERNAMESUBST, u"ParameterNameSubstitution"_ustr },
+ { DSID_SUPPRESSVERSIONCL, u"DisplayVersionColumns"_ustr },
+ { DSID_CATALOG, u"UseCatalogInSelect"_ustr },
+ { DSID_SCHEMA, u"UseSchemaInSelect"_ustr },
+ { DSID_INDEXAPPENDIX, u"UseIndexDirectionKeyword"_ustr },
+ { DSID_DOSLINEENDS, u"UseDOSLineEnds"_ustr },
+ { DSID_BOOLEANCOMPARISON, u"BooleanComparisonMode"_ustr },
+ { DSID_CHECK_REQUIRED_FIELDS, u"FormsCheckRequiredFields"_ustr },
+ { DSID_IGNORECURRENCY, u"IgnoreCurrency"_ustr },
+ { DSID_ESCAPE_DATETIME, u"EscapeDateTime"_ustr },
+ { DSID_PRIMARY_KEY_SUPPORT, u"PrimaryKeySupport"_ustr },
+ { DSID_RESPECTRESULTSETTYPE, u"RespectDriverResultSetType"_ustr },
+ { DSID_MAX_ROW_SCAN, u"MaxRowScan"_ustr },
};
}
@@ -100,7 +101,7 @@ namespace dbaui
aCurrentSet.put( rFeatureMapping.nItemID );
}
- tmp[ pattern ] = aCurrentSet;
+ tmp[pattern] = std::move(aCurrentSet);
}
return tmp;
}();
@@ -119,10 +120,10 @@ namespace dbaui
{
FeatureSupport aInit( AuthNone );
const ::comphelper::NamedValueCollection& aMetaData = aDriverConfig.getMetaData(url);
- if ( aMetaData.has("Authentication") )
+ if ( aMetaData.has(u"Authentication"_ustr) )
{
OUString sAuth;
- aMetaData.get("Authentication") >>= sAuth;
+ aMetaData.get(u"Authentication"_ustr) >>= sAuth;
if ( sAuth == "UserPassword" )
aInit = FeatureSupport(AuthUserPwd);
else if ( sAuth == "Password" )
diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx
index dd275b80fda4..f61c68452be8 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -124,7 +124,7 @@ namespace dbaui
// set the properties
static constexpr OUString s_sNamePropertyName = u"Name"_ustr;
// the index' own props
- xIndexDescriptor->setPropertyValue("IsUnique", css::uno::Any(_rPos->bUnique));
+ xIndexDescriptor->setPropertyValue(u"IsUnique"_ustr, css::uno::Any(_rPos->bUnique));
xIndexDescriptor->setPropertyValue(s_sNamePropertyName, Any(_rPos->sName));
// the fields
@@ -136,7 +136,7 @@ namespace dbaui
OSL_ENSURE(xColDescriptor.is(), "OIndexCollection::commitNewIndex: invalid column descriptor!");
if (xColDescriptor.is())
{
- xColDescriptor->setPropertyValue("IsAscending", css::uno::Any(field.bSortAscending));
+ xColDescriptor->setPropertyValue(u"IsAscending"_ustr, css::uno::Any(field.bSortAscending));
xColDescriptor->setPropertyValue(s_sNamePropertyName, Any(field.sFieldName));
xAppendCols->appendByDescriptor(xColDescriptor);
}
@@ -219,9 +219,9 @@ namespace dbaui
void OIndexCollection::implFillIndexInfo(OIndex& _rIndex, const Reference< XPropertySet >& _rxDescriptor)
{
- _rIndex.bPrimaryKey = ::cppu::any2bool(_rxDescriptor->getPropertyValue("IsPrimaryKeyIndex"));
- _rIndex.bUnique = ::cppu::any2bool(_rxDescriptor->getPropertyValue("IsUnique"));
- _rxDescriptor->getPropertyValue("Catalog") >>= _rIndex.sDescription;
+ _rIndex.bPrimaryKey = ::cppu::any2bool(_rxDescriptor->getPropertyValue(u"IsPrimaryKeyIndex"_ustr));
+ _rIndex.bUnique = ::cppu::any2bool(_rxDescriptor->getPropertyValue(u"IsUnique"_ustr));
+ _rxDescriptor->getPropertyValue(u"Catalog"_ustr) >>= _rIndex.sDescription;
// the columns
Reference< XColumnsSupplier > xSuppCols(_rxDescriptor, UNO_QUERY);
@@ -250,7 +250,7 @@ namespace dbaui
// get the relevant properties
_rIndex.aFields.push_back({ .sFieldName = fieldName,
.bSortAscending = cppu::any2bool(
- xIndexColumn->getPropertyValue("IsAscending")) });
+ xIndexColumn->getPropertyValue(u"IsAscending"_ustr)) });
}
}
diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx
index d1f7fa6aa1a1..03b44d955de2 100644
--- a/dbaccess/source/ui/misc/linkeddocuments.cxx
+++ b/dbaccess/source/ui/misc/linkeddocuments.cxx
@@ -120,7 +120,7 @@ namespace dbaui
break;
case ElementOpenMode::Mail:
- aArguments.put( "Hidden", true );
+ aArguments.put( u"Hidden"_ustr, true );
[[fallthrough]];
case ElementOpenMode::Design:
@@ -131,7 +131,7 @@ namespace dbaui
OSL_FAIL( "OLinkedDocumentsAccess::implOpen: invalid open mode!" );
break;
}
- aArguments.put( "OpenMode", sOpenMode );
+ aArguments.put( u"OpenMode"_ustr, sOpenMode );
aArguments.put( PROPERTY_ACTIVE_CONNECTION, m_xConnection );
@@ -153,18 +153,18 @@ namespace dbaui
try
{
::comphelper::NamedValueCollection aArgs;
- aArgs.put( "DataSourceName", m_sDataSourceName );
+ aArgs.put( u"DataSourceName"_ustr, m_sDataSourceName );
if ( m_xConnection.is() )
- aArgs.put( "ActiveConnection", m_xConnection );
+ aArgs.put( u"ActiveConnection"_ustr, m_xConnection );
if ( !_rObjectName.isEmpty() && ( _nCommandType != -1 ) )
{
- aArgs.put( "CommandType", _nCommandType );
- aArgs.put( "Command", _rObjectName );
+ aArgs.put( u"CommandType"_ustr, _nCommandType );
+ aArgs.put( u"Command"_ustr, _rObjectName );
}
- aArgs.put( "DocumentUI", m_xDocumentUI );
+ aArgs.put( u"DocumentUI"_ustr, m_xDocumentUI );
Reference< XJobExecutor > xWizard;
{
@@ -176,7 +176,7 @@ namespace dbaui
), UNO_QUERY_THROW );
}
- xWizard->trigger( "start" );
+ xWizard->trigger( u"start"_ustr );
::comphelper::disposeComponent( xWizard );
}
catch(const Exception&)
@@ -207,9 +207,9 @@ namespace dbaui
OSL_ENSURE(m_xDocumentContainer.is(), "OLinkedDocumentsAccess::newDocument: invalid document container!");
// determine the class ID to use for the new document
Sequence<sal_Int8> aClassId;
- if ( !i_rCreationArgs.has( "ClassID" )
- && !i_rCreationArgs.has( "MediaType" )
- && !i_rCreationArgs.has( "DocumentServiceName" )
+ if ( !i_rCreationArgs.has( u"ClassID"_ustr )
+ && !i_rCreationArgs.has( u"MediaType"_ustr )
+ && !i_rCreationArgs.has( u"DocumentServiceName"_ustr )
)
{
switch ( i_nActionID )
@@ -248,15 +248,15 @@ namespace dbaui
{
::comphelper::NamedValueCollection aCreationArgs( i_rCreationArgs );
if ( aClassId.hasElements() )
- aCreationArgs.put( "ClassID", aClassId );
+ aCreationArgs.put( u"ClassID"_ustr, aClassId );
aCreationArgs.put( PROPERTY_ACTIVE_CONNECTION, m_xConnection );
// separate values which are real creation args from args relevant for opening the doc
::comphelper::NamedValueCollection aCommandArgs;
- if ( aCreationArgs.has( "Hidden" ) )
+ if ( aCreationArgs.has( u"Hidden"_ustr ) )
{
- aCommandArgs.put( "Hidden", aCreationArgs.get( "Hidden" ) );
- aCreationArgs.remove( "Hidden" );
+ aCommandArgs.put( u"Hidden"_ustr, aCreationArgs.get( u"Hidden"_ustr ) );
+ aCreationArgs.remove( u"Hidden"_ustr );
}
Reference< XCommandProcessor > xContent( xORB->createInstanceWithArguments(
@@ -270,7 +270,7 @@ namespace dbaui
// put the OpenMode into the OpenArgs
OpenCommandArgument aOpenModeArg;
aOpenModeArg.Mode = OpenMode::DOCUMENT;
- aCommandArgs.put( "OpenMode", aOpenModeArg );
+ aCommandArgs.put( u"OpenMode"_ustr, aOpenModeArg );
Command aCommand;
aCommand.Name = "openDesign";
@@ -328,7 +328,7 @@ namespace dbaui
aInfo = dbtools::SQLExceptionInfo(aSQLException);
// more like a hack, insert an empty message
- aInfo.prepend(" \n");
+ aInfo.prepend(u" \n"_ustr);
OUString sMessage = DBA_RES(STR_COULDNOTOPEN_LINKEDDOC);
sMessage = sMessage.replaceFirst("$file$",_rLinkName);
diff --git a/dbaccess/source/ui/misc/stringlistitem.cxx b/dbaccess/source/ui/misc/stringlistitem.cxx
index 97e75fe6d4b6..ea50c99e04c2 100644
--- a/dbaccess/source/ui/misc/stringlistitem.cxx
+++ b/dbaccess/source/ui/misc/stringlistitem.cxx
@@ -25,7 +25,7 @@ using namespace ::com::sun::star::uno;
// OStringListItem
OStringListItem::OStringListItem(sal_Int16 _nWhich, const Sequence<OUString>& _rList)
- : SfxPoolItem(_nWhich)
+ : SfxPoolItem(_nWhich, SfxItemType::OStringListItemType)
, m_aList(_rList)
{
}
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
index 1fa17c06207c..2815c4696115 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
@@ -45,7 +45,7 @@ namespace dbaui
}
OUString SAL_CALL OConnectionLineAccess::getImplementationName()
{
- return "org.openoffice.comp.dbu.ConnectionLineAccessibility";
+ return u"org.openoffice.comp.dbu.ConnectionLineAccessibility"_ustr;
}
// XAccessibleContext
sal_Int64 SAL_CALL OConnectionLineAccess::getAccessibleChildCount( )
@@ -86,7 +86,7 @@ namespace dbaui
}
OUString SAL_CALL OConnectionLineAccess::getAccessibleDescription( )
{
- return "Relation";
+ return u"Relation"_ustr;
}
Reference< XAccessibleRelationSet > SAL_CALL OConnectionLineAccess::getAccessibleRelationSet( )
{
diff --git a/dbaccess/source/ui/querydesign/JAccess.cxx b/dbaccess/source/ui/querydesign/JAccess.cxx
index 13a18b918db7..7c6844f3afd7 100644
--- a/dbaccess/source/ui/querydesign/JAccess.cxx
+++ b/dbaccess/source/ui/querydesign/JAccess.cxx
@@ -38,7 +38,7 @@ namespace dbaui
}
OUString SAL_CALL OJoinDesignViewAccess::getImplementationName()
{
- return "org.openoffice.comp.dbu.JoinViewAccessibility";
+ return u"org.openoffice.comp.dbu.JoinViewAccessibility"_ustr;
}
void OJoinDesignViewAccess::clearTableView()
{
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index abfe67fd7288..cac9082a0903 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -280,13 +280,13 @@ void OJoinController::removeConnectionData(const TTableConnectionData::value_typ
void OJoinController::describeSupportedFeatures()
{
OJoinController_BASE::describeSupportedFeatures();
- implDescribeSupportedFeature( ".uno:Redo", ID_BROWSER_REDO, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:Save", ID_BROWSER_SAVEDOC, CommandGroup::DOCUMENT );
- implDescribeSupportedFeature( ".uno:Undo", ID_BROWSER_UNDO, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:AddTable", ID_BROWSER_ADDTABLE,CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:EditDoc", ID_BROWSER_EDITDOC, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:GetUndoStrings", SID_GETUNDOSTRINGS );
- implDescribeSupportedFeature( ".uno:GetRedoStrings", SID_GETREDOSTRINGS );
+ implDescribeSupportedFeature( u".uno:Redo"_ustr, ID_BROWSER_REDO, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:Save"_ustr, ID_BROWSER_SAVEDOC, CommandGroup::DOCUMENT );
+ implDescribeSupportedFeature( u".uno:Undo"_ustr, ID_BROWSER_UNDO, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:AddTable"_ustr, ID_BROWSER_ADDTABLE,CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:EditDoc"_ustr, ID_BROWSER_EDITDOC, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:GetUndoStrings"_ustr, SID_GETUNDOSTRINGS );
+ implDescribeSupportedFeature( u".uno:GetRedoStrings"_ustr, SID_GETREDOSTRINGS );
}
sal_Bool SAL_CALL OJoinController::suspend(sal_Bool _bSuspend)
@@ -314,7 +314,7 @@ void OJoinController::loadTableWindows( const ::comphelper::NamedValueCollection
m_aMinimumTableViewSize = Point();
- for (auto& table : i_rViewSettings.getOrDefault("Tables", Sequence<PropertyValue>()))
+ for (auto& table : i_rViewSettings.getOrDefault(u"Tables"_ustr, Sequence<PropertyValue>()))
{
::comphelper::NamedValueCollection aSingleTableData(table.Value);
loadTableWindow( aSingleTableData );
@@ -332,14 +332,14 @@ void OJoinController::loadTableWindow( const ::comphelper::NamedValueCollection&
OUString sComposedName,sTableName,sWindowName;
bool bShowAll = false;
- sComposedName = i_rTableWindowSettings.getOrDefault( "ComposedName", sComposedName );
- sTableName = i_rTableWindowSettings.getOrDefault( "TableName", sTableName );
- sWindowName = i_rTableWindowSettings.getOrDefault( "WindowName", sWindowName );
- nY = i_rTableWindowSettings.getOrDefault( "WindowTop", nY );
- nX = i_rTableWindowSettings.getOrDefault( "WindowLeft", nX );
- nWidth = i_rTableWindowSettings.getOrDefault( "WindowWidth", nWidth );
- nHeight = i_rTableWindowSettings.getOrDefault( "WindowHeight", nHeight );
- bShowAll = i_rTableWindowSettings.getOrDefault( "ShowAll", bShowAll );
+ sComposedName = i_rTableWindowSettings.getOrDefault( u"ComposedName"_ustr, sComposedName );
+ sTableName = i_rTableWindowSettings.getOrDefault( u"TableName"_ustr, sTableName );
+ sWindowName = i_rTableWindowSettings.getOrDefault( u"WindowName"_ustr, sWindowName );
+ nY = i_rTableWindowSettings.getOrDefault( u"WindowTop"_ustr, nY );
+ nX = i_rTableWindowSettings.getOrDefault( u"WindowLeft"_ustr, nX );
+ nWidth = i_rTableWindowSettings.getOrDefault( u"WindowWidth"_ustr, nWidth );
+ nHeight = i_rTableWindowSettings.getOrDefault( u"WindowHeight"_ustr, nHeight );
+ bShowAll = i_rTableWindowSettings.getOrDefault( u"ShowAll"_ustr, bShowAll );
TTableWindowData::value_type pData = createTableWindowData(sComposedName,sTableName,sWindowName);
if ( pData )
@@ -366,20 +366,20 @@ void OJoinController::saveTableWindows( ::comphelper::NamedValueCollection& o_rV
for (auto const& elem : m_vTableData)
{
::comphelper::NamedValueCollection aWindowData;
- aWindowData.put( "ComposedName", elem->GetComposedName() );
- aWindowData.put( "TableName", elem->GetTableName() );
- aWindowData.put( "WindowName", elem->GetWinName() );
- aWindowData.put( "WindowTop", static_cast<sal_Int32>(elem->GetPosition().Y()) );
- aWindowData.put( "WindowLeft", static_cast<sal_Int32>(elem->GetPosition().X()) );
- aWindowData.put( "WindowWidth", static_cast<sal_Int32>(elem->GetSize().Width()) );
- aWindowData.put( "WindowHeight", static_cast<sal_Int32>(elem->GetSize().Height()) );
- aWindowData.put( "ShowAll", elem->IsShowAll() );
+ aWindowData.put( u"ComposedName"_ustr, elem->GetComposedName() );
+ aWindowData.put( u"TableName"_ustr, elem->GetTableName() );
+ aWindowData.put( u"WindowName"_ustr, elem->GetWinName() );
+ aWindowData.put( u"WindowTop"_ustr, static_cast<sal_Int32>(elem->GetPosition().Y()) );
+ aWindowData.put( u"WindowLeft"_ustr, static_cast<sal_Int32>(elem->GetPosition().X()) );
+ aWindowData.put( u"WindowWidth"_ustr, static_cast<sal_Int32>(elem->GetSize().Width()) );
+ aWindowData.put( u"WindowHeight"_ustr, static_cast<sal_Int32>(elem->GetSize().Height()) );
+ aWindowData.put( u"ShowAll"_ustr, elem->IsShowAll() );
const OUString sTableName( "Table" + OUString::number( i++ ) );
aAllTablesData.put( sTableName, aWindowData.getPropertyValues() );
}
- o_rViewSettings.put( "Tables", aAllTablesData.getPropertyValues() );
+ o_rViewSettings.put( u"Tables"_ustr, aAllTablesData.getPropertyValues() );
}
TTableWindowData::value_type OJoinController::createTableWindowData(const OUString& _sComposedName,const OUString& _sTableName,const OUString& _sWindowName)
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index 88085c8eadd8..3bfa4d4bbf1c 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -1119,8 +1119,8 @@ void OJoinTableView::executePopup(const Point& rPos, VclPtr<OTableConnection>& r
{
::tools::Rectangle aRect(rPos, Size(1, 1));
weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect);
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "dbaccess/ui/joinviewmenu.ui"));
- std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, u"dbaccess/ui/joinviewmenu.ui"_ustr));
+ std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr));
OUString sIdent = xContextMenu->popup_at_rect(pPopupParent, aRect);
if (sIdent == "delete")
RemoveConnection(rSelConnection, true);
diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
index ce66828facb5..a42d65508008 100644
--- a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
+++ b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
@@ -87,8 +87,8 @@ void OQueryTableConnectionData::InitFromDrag(const OTableFieldDescRef& rDragLeft
// convert Information in rDrag into parameters for the base class init
OQueryTableWindow* pSourceWin = static_cast<OQueryTableWindow*>(rDragLeft->GetTabWindow());
OQueryTableWindow* pDestWin = static_cast<OQueryTableWindow*>(rDragRight->GetTabWindow());
- OSL_ENSURE(pSourceWin,"NO Source window found!");
- OSL_ENSURE(pDestWin,"NO Dest window found!");
+ assert(pSourceWin && "NO Source window found!");
+ assert(pDestWin && "NO Dest window found!");
m_pReferencingTable = pSourceWin->GetData();
m_pReferencedTable = pDestWin->GetData();
diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx
index 93cbf6026d4c..ed490860c3ea 100644
--- a/dbaccess/source/ui/querydesign/QTableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx
@@ -110,7 +110,7 @@ void OQueryTableWindow::OnEntryDoubleClicked(weld::TreeIter& rEntry)
weld::TreeView& rTreeView = m_xListBox->get_widget();
OTableFieldInfo* pInf = weld::fromId<OTableFieldInfo*>(rTreeView.get_id(rEntry));
- OSL_ENSURE(pInf != nullptr, "OQueryTableWindow::OnEntryDoubleClicked : field doesn't have FieldInfo !");
+ assert(pInf && "OQueryTableWindow::OnEntryDoubleClicked : field doesn't have FieldInfo !");
// build up DragInfo
OTableFieldDescRef aInfo = new OTableFieldDesc(GetTableName(), rTreeView.get_text(rEntry));
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 430748a25b0c..cd00da8dcf60 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -309,7 +309,7 @@ namespace
const OQueryTableWindow* _pEntryTabTo,
OUString& _rJoin )
{
- OSL_ENSURE(_pEntryConn,"TableConnection can not be null!");
+ assert(_pEntryConn && "TableConnection can not be null!");
OQueryTableConnectionData* pData = static_cast< OQueryTableConnectionData*>(_pEntryConn->GetData().get());
if ( !(pData->GetJoinType() != INNER_JOIN && _pEntryTabTo->ExistsAVisitedConn()) )
@@ -651,7 +651,7 @@ namespace
if ( field->isAggregateFunction() )
{
OSL_ENSURE(!field->GetFunction().isEmpty(),"Function name must not be empty! ;-(");
- aTmpStr = field->GetFunction() + "(" + aTmpStr + ")";
+ aTmpStr = field->GetFunction() + "(" + aTmpStr.makeStringAndClear() + ")";
}
if (!rFieldAlias.isEmpty() &&
@@ -1475,7 +1475,7 @@ namespace
for (auto const& table : rTabList)
{
OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(table.second.get());
- if (pTabWin->ExistsField( "*", aDragLeft ))
+ if (pTabWin->ExistsField( u"*"_ustr, aDragLeft ))
{
aDragLeft->SetAlias(OUString());
aDragLeft->SetTable(OUString());
@@ -2026,7 +2026,7 @@ namespace
{
OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(table.second.get());
OTableFieldDescRef aInfo = new OTableFieldDesc();
- if (pTabWin->ExistsField( "*", aInfo ))
+ if (pTabWin->ExistsField( u"*"_ustr, aInfo ))
{
eErrorCode = _pView->InsertField(aInfo, bFirstField);
bFirstField = false;
@@ -2122,7 +2122,7 @@ namespace
for (auto const& table : *pTabList)
{
OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(table.second.get());
- if (pTabWin->ExistsField( "*", aInfo ))
+ if (pTabWin->ExistsField( u"*"_ustr, aInfo ))
{
aInfo->SetAlias(OUString());
aInfo->SetTable(OUString());
@@ -2624,7 +2624,7 @@ SqlParseError OQueryDesignView::InsertField( const OTableFieldDescRef& rInfo, bo
sal_Int32 OQueryDesignView::getColWidth(sal_uInt16 _nColPos) const
{
- static sal_Int32 s_nDefaultWidth = GetTextWidth("0") * 15;
+ static sal_Int32 s_nDefaultWidth = GetTextWidth(u"0"_ustr) * 15;
sal_Int32 nWidth = static_cast<OQueryController&>(getController()).getColWidth(_nColPos);
if ( !nWidth )
nWidth = s_nDefaultWidth;
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 663d3a9e65a6..f48dc17c7a3a 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -496,7 +496,7 @@ void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString&
if ( pTabWinTmp->GetData()->isQuery() )
continue;
- OSL_ENSURE(pTabWinTmp,"TableWindow is null!");
+ assert(pTabWinTmp && "TableWindow is null!");
Reference< XPropertySet > xFKKey = getKeyReferencedTo( pTabWinTmp->GetData()->getKeys(), pNewTabWin->GetComposedName() );
if ( !xFKKey.is() )
continue;
@@ -751,7 +751,7 @@ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc
{
VclPtr<OTableConnection> xTmpEntry = *aIter2;
OQueryTableConnection* pTmpEntry = static_cast<OQueryTableConnection*>(xTmpEntry.get());
- OSL_ENSURE(pTmpEntry,"OQueryTableConnection is null!");
+ assert(pTmpEntry && "OQueryTableConnection is null!");
if( pTmpEntry->GetAliasName(JTCS_FROM) == pTabWin->GetAliasName() ||
pTmpEntry->GetAliasName(JTCS_TO) == pTabWin->GetAliasName() )
{
diff --git a/dbaccess/source/ui/querydesign/QueryTextView.cxx b/dbaccess/source/ui/querydesign/QueryTextView.cxx
index f8d8471e53e3..d08de914530d 100644
--- a/dbaccess/source/ui/querydesign/QueryTextView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTextView.cxx
@@ -29,10 +29,10 @@ using namespace dbaui;
// end of temp classes
OQueryTextView::OQueryTextView(OQueryContainerWindow* pParent, OQueryController& rController)
- : InterimItemWindow(pParent, "dbaccess/ui/queryview.ui", "QueryView")
+ : InterimItemWindow(pParent, u"dbaccess/ui/queryview.ui"_ustr, u"QueryView"_ustr)
, m_rController(rController)
- , m_xSQL(new SQLEditView(m_xBuilder->weld_scrolled_window("scrolledwindow", true)))
- , m_xSQLEd(new weld::CustomWeld(*m_xBuilder, "sql", *m_xSQL))
+ , m_xSQL(new SQLEditView(m_xBuilder->weld_scrolled_window(u"scrolledwindow"_ustr, true)))
+ , m_xSQLEd(new weld::CustomWeld(*m_xBuilder, u"sql"_ustr, *m_xSQL))
, m_timerUndoActionCreation("dbaccess OQueryTextView m_timerUndoActionCreation")
, m_timerInvalidate("dbaccess OQueryTextView m_timerInvalidate")
, m_bStopTimer(false)
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 4653c0e6174b..befb38b6812d 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -707,7 +707,7 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef co
bool bQuote = ( nPass <= 2 );
bool bInternational = ( nPass % 2 ) == 0;
- OUString sSql {"SELECT "};
+ OUString sSql {u"SELECT "_ustr};
if ( bQuote )
sSql += sQuotedFullFieldName;
else
@@ -811,7 +811,7 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef co
if ( nFunCount == 4 && SQL_ISRULE(pColumnRef->getChild(3),column_ref) )
bError = fillColumnRef( pColumnRef->getChild(3), xConnection, aSelEntry, _bListAction );
else if ( nFunCount == 3 ) // we have a COUNT(*) here, so take the first table
- bError = fillColumnRef( "*", std::u16string_view(), xMetaData, aSelEntry, _bListAction );
+ bError = fillColumnRef( u"*"_ustr, std::u16string_view(), xMetaData, aSelEntry, _bListAction );
else
{
nFunctionType |= FKT_NUMERIC;
@@ -1063,7 +1063,7 @@ bool OSelectionBrowseBox::SaveModified()
// we have to change the visible flag, so we must append also an undo action
pEntry->SetVisible();
m_pVisibleCell->GetBox().set_active(true);
- appendUndoAction("0",u"1",BROW_VIS_ROW,bListAction);
+ appendUndoAction(u"0"_ustr,u"1",BROW_VIS_ROW,bListAction);
RowModified(GetBrowseRow(BROW_VIS_ROW), GetCurColumnId());
}
@@ -1204,7 +1204,7 @@ bool OSelectionBrowseBox::SaveModified()
{
// Default to visible
pEntry->SetVisible();
- appendUndoAction("0",u"1",BROW_VIS_ROW,bListAction);
+ appendUndoAction(u"0"_ustr,u"1",BROW_VIS_ROW,bListAction);
RowModified(BROW_VIS_ROW, GetCurColumnId());
// if required add empty columns
@@ -1506,7 +1506,9 @@ void OSelectionBrowseBox::InsertColumn(const OTableFieldDescRef& pEntry, sal_uIn
getFields().size());
}
else
- ++_nColumnPosition; // within the list
+ {
+ _nColumnPosition = static_cast<sal_uInt16>(_nColumnPosition + 1); // within the list
+ }
nColumnId = GetColumnId(_nColumnPosition);
pEntry->SetColumnId( nColumnId );
getFields()[ _nColumnPosition - 1] = pEntry;
@@ -1949,8 +1951,8 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt)
{
::tools::Rectangle aRect(aMenuPos, Size(1, 1));
weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect);
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "dbaccess/ui/querycolmenu.ui"));
- std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, u"dbaccess/ui/querycolmenu.ui"_ustr));
+ std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr));
OUString sIdent = xContextMenu->popup_at_rect(pPopupParent, aRect);
if (sIdent == "delete")
RemoveField(nColId);
@@ -1964,12 +1966,12 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt)
{
::tools::Rectangle aRect(aMenuPos, Size(1, 1));
weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect);
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "dbaccess/ui/queryfuncmenu.ui"));
- std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu"));
- xContextMenu->set_active("functions", m_bVisibleRow[BROW_FUNCTION_ROW]);
- xContextMenu->set_active("tablename", m_bVisibleRow[BROW_TABLE_ROW]);
- xContextMenu->set_active("alias", m_bVisibleRow[BROW_COLUMNALIAS_ROW]);
- xContextMenu->set_active("distinct", static_cast<OQueryController&>(getDesignView()->getController()).isDistinct());
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, u"dbaccess/ui/queryfuncmenu.ui"_ustr));
+ std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr));
+ xContextMenu->set_active(u"functions"_ustr, m_bVisibleRow[BROW_FUNCTION_ROW]);
+ xContextMenu->set_active(u"tablename"_ustr, m_bVisibleRow[BROW_TABLE_ROW]);
+ xContextMenu->set_active(u"alias"_ustr, m_bVisibleRow[BROW_COLUMNALIAS_ROW]);
+ xContextMenu->set_active(u"distinct"_ustr, static_cast<OQueryController&>(getDesignView()->getController()).isDistinct());
OUString sIdent = xContextMenu->popup_at_rect(pPopupParent, aRect);
if (sIdent == "functions")
diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
index 4d556f94f203..b835f3b62aff 100644
--- a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
+++ b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
@@ -130,23 +130,23 @@ void OTableFieldDesc::Load( const css::beans::PropertyValue& i_rSettings, const
{
::comphelper::NamedValueCollection aFieldDesc( i_rSettings.Value );
- m_aAliasName = aFieldDesc.getOrDefault( "AliasName", m_aAliasName );
- m_aTableName = aFieldDesc.getOrDefault( "TableName", m_aTableName );
- m_aFieldName = aFieldDesc.getOrDefault( "FieldName", m_aFieldName );
- m_aFieldAlias = aFieldDesc.getOrDefault( "FieldAlias", m_aFieldAlias );
- m_aFunctionName = aFieldDesc.getOrDefault( "FunctionName", m_aFunctionName );
- m_eDataType = aFieldDesc.getOrDefault( "DataType", m_eDataType );
- m_eFunctionType = aFieldDesc.getOrDefault( "FunctionType", m_eFunctionType );
- m_nColWidth = aFieldDesc.getOrDefault( "ColWidth", m_nColWidth );
- m_bGroupBy = aFieldDesc.getOrDefault( "GroupBy", m_bGroupBy );
- m_bVisible = aFieldDesc.getOrDefault( "Visible", m_bVisible );
-
- m_eFieldType = static_cast< ETableFieldType >( aFieldDesc.getOrDefault( "FieldType", static_cast< sal_Int32 >( m_eFieldType ) ) );
- m_eOrderDir = static_cast< EOrderDir >( aFieldDesc.getOrDefault( "OrderDir", static_cast< sal_Int32 >( m_eOrderDir ) ) );
+ m_aAliasName = aFieldDesc.getOrDefault( u"AliasName"_ustr, m_aAliasName );
+ m_aTableName = aFieldDesc.getOrDefault( u"TableName"_ustr, m_aTableName );
+ m_aFieldName = aFieldDesc.getOrDefault( u"FieldName"_ustr, m_aFieldName );
+ m_aFieldAlias = aFieldDesc.getOrDefault( u"FieldAlias"_ustr, m_aFieldAlias );
+ m_aFunctionName = aFieldDesc.getOrDefault( u"FunctionName"_ustr, m_aFunctionName );
+ m_eDataType = aFieldDesc.getOrDefault( u"DataType"_ustr, m_eDataType );
+ m_eFunctionType = aFieldDesc.getOrDefault( u"FunctionType"_ustr, m_eFunctionType );
+ m_nColWidth = aFieldDesc.getOrDefault( u"ColWidth"_ustr, m_nColWidth );
+ m_bGroupBy = aFieldDesc.getOrDefault( u"GroupBy"_ustr, m_bGroupBy );
+ m_bVisible = aFieldDesc.getOrDefault( u"Visible"_ustr, m_bVisible );
+
+ m_eFieldType = static_cast< ETableFieldType >( aFieldDesc.getOrDefault( u"FieldType"_ustr, static_cast< sal_Int32 >( m_eFieldType ) ) );
+ m_eOrderDir = static_cast< EOrderDir >( aFieldDesc.getOrDefault( u"OrderDir"_ustr, static_cast< sal_Int32 >( m_eOrderDir ) ) );
if ( i_bIncludingCriteria )
{
- const Sequence< PropertyValue > aCriteria( aFieldDesc.getOrDefault( "Criteria", Sequence< PropertyValue >() ) );
+ const Sequence< PropertyValue > aCriteria( aFieldDesc.getOrDefault( u"Criteria"_ustr, Sequence< PropertyValue >() ) );
m_aCriteria.resize( aCriteria.getLength() );
std::transform(
aCriteria.begin(),
@@ -160,18 +160,18 @@ void OTableFieldDesc::Load( const css::beans::PropertyValue& i_rSettings, const
void OTableFieldDesc::Save( ::comphelper::NamedValueCollection& o_rSettings, const bool i_bIncludingCriteria )
{
- o_rSettings.put( "AliasName", m_aAliasName );
- o_rSettings.put( "TableName", m_aTableName );
- o_rSettings.put( "FieldName", m_aFieldName );
- o_rSettings.put( "FieldAlias", m_aFieldAlias );
- o_rSettings.put( "FunctionName", m_aFunctionName );
- o_rSettings.put( "DataType", m_eDataType );
- o_rSettings.put( "FunctionType", m_eFunctionType );
- o_rSettings.put( "FieldType", static_cast<sal_Int32>(m_eFieldType) );
- o_rSettings.put( "OrderDir", static_cast<sal_Int32>(m_eOrderDir) );
- o_rSettings.put( "ColWidth", m_nColWidth );
- o_rSettings.put( "GroupBy", m_bGroupBy );
- o_rSettings.put( "Visible", m_bVisible );
+ o_rSettings.put( u"AliasName"_ustr, m_aAliasName );
+ o_rSettings.put( u"TableName"_ustr, m_aTableName );
+ o_rSettings.put( u"FieldName"_ustr, m_aFieldName );
+ o_rSettings.put( u"FieldAlias"_ustr, m_aFieldAlias );
+ o_rSettings.put( u"FunctionName"_ustr, m_aFunctionName );
+ o_rSettings.put( u"DataType"_ustr, m_eDataType );
+ o_rSettings.put( u"FunctionType"_ustr, m_eFunctionType );
+ o_rSettings.put( u"FieldType"_ustr, static_cast<sal_Int32>(m_eFieldType) );
+ o_rSettings.put( u"OrderDir"_ustr, static_cast<sal_Int32>(m_eOrderDir) );
+ o_rSettings.put( u"ColWidth"_ustr, m_nColWidth );
+ o_rSettings.put( u"GroupBy"_ustr, m_bGroupBy );
+ o_rSettings.put( u"Visible"_ustr, m_bVisible );
if ( !i_bIncludingCriteria )
return;
@@ -189,7 +189,7 @@ void OTableFieldDesc::Save( ::comphelper::NamedValueCollection& o_rSettings, con
++c;
}
- o_rSettings.put( "Criteria", aCriteria );
+ o_rSettings.put( u"Criteria"_ustr, aCriteria );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index 8fee333fc3eb..ac48bab4bb34 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -189,7 +189,7 @@ void OTableWindow::FillListBox()
if (GetData()->IsShowAll())
{
- rTreeView.append(weld::toId(createUserData(nullptr,false)), OUString("*"));
+ rTreeView.append(weld::toId(createUserData(nullptr,false)), u"*"_ustr);
}
Reference<XNameAccess> xPKeyColumns;
@@ -539,8 +539,8 @@ void OTableWindow::Command(const CommandEvent& rEvt)
::tools::Rectangle aRect(ptWhere, Size(1, 1));
weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect);
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "dbaccess/ui/jointablemenu.ui"));
- std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, u"dbaccess/ui/jointablemenu.ui"_ustr));
+ std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr));
if (!xContextMenu->popup_at_rect(pPopupParent, aRect).isEmpty())
Remove();
}
diff --git a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
index 138850267c47..699c85a9e937 100644
--- a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
@@ -55,12 +55,12 @@ namespace dbaui
}
OUString SAL_CALL OTableWindowAccess::getImplementationName()
{
- return "org.openoffice.comp.dbu.TableWindowAccessibility";
+ return u"org.openoffice.comp.dbu.TableWindowAccessibility"_ustr;
}
Sequence< OUString > SAL_CALL OTableWindowAccess::getSupportedServiceNames()
{
- return { "com.sun.star.accessibility.Accessible",
- "com.sun.star.accessibility.AccessibleContext" };
+ return { u"com.sun.star.accessibility.Accessible"_ustr,
+ u"com.sun.star.accessibility.AccessibleContext"_ustr };
}
// XAccessibleContext
sal_Int64 SAL_CALL OTableWindowAccess::getAccessibleChildCount( )
diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
index 3066f8429f35..731aa9f0f0cb 100644
--- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
@@ -42,8 +42,8 @@ OJoinExchangeData::OJoinExchangeData(OTableWindowListBox* pBox)
}
OTableWindowListBox::OTableWindowListBox(OTableWindow* pParent)
- : InterimItemWindow(pParent, "dbaccess/ui/tablelistbox.ui", "TableListBox")
- , m_xTreeView(m_xBuilder->weld_tree_view("treeview"))
+ : InterimItemWindow(pParent, u"dbaccess/ui/tablelistbox.ui"_ustr, u"TableListBox"_ustr)
+ , m_xTreeView(m_xBuilder->weld_tree_view(u"treeview"_ustr))
, m_xDragDropTargetHelper(new TableWindowListBoxHelper(*this, m_xTreeView->get_drop_target()))
, m_pTabWin(pParent)
, m_nDropEvent(nullptr)
diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
index 0b0ebaa4c7e1..2990a010298b 100644
--- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
@@ -27,10 +27,10 @@
using namespace dbaui;
OTableWindowTitle::OTableWindowTitle(OTableWindow* pParent)
- : InterimItemWindow(pParent, "dbaccess/ui/tabletitle.ui", "TableTitle")
+ : InterimItemWindow(pParent, u"dbaccess/ui/tabletitle.ui"_ustr, u"TableTitle"_ustr)
, m_pTabWin( pParent )
- , m_xLabel(m_xBuilder->weld_label("label"))
- , m_xImage(m_xBuilder->weld_image("image"))
+ , m_xLabel(m_xBuilder->weld_label(u"label"_ustr))
+ , m_xImage(m_xBuilder->weld_image(u"image"_ustr))
{
m_xLabel->connect_mouse_press(LINK(this, OTableWindowTitle, MousePressHdl));
}
@@ -64,7 +64,7 @@ IMPL_LINK(OTableWindowTitle, MousePressHdl, const MouseEvent&, rEvt, bool)
m_pTabWin->SetSizePixel(aSize);
OJoinTableView* pView = m_pTabWin->getTableView();
- OSL_ENSURE(pView,"No OJoinTableView!");
+ assert(pView && "No OJoinTableView!");
for (auto& conn : pView->getTableConnections())
conn->RecalcLines();
diff --git a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
index 37624aceb419..59d563388fd5 100644
--- a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
+++ b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
@@ -52,9 +52,9 @@ class LimitBox final : public InterimItemWindow
{
public:
LimitBox(vcl::Window* pParent, LimitBoxController* pCtrl)
- : InterimItemWindow(pParent, "dbaccess/ui/limitbox.ui", "LimitBox")
+ : InterimItemWindow(pParent, u"dbaccess/ui/limitbox.ui"_ustr, u"LimitBox"_ustr)
, m_pControl( pCtrl )
- , m_xWidget(m_xBuilder->weld_combo_box("limit"))
+ , m_xWidget(m_xBuilder->weld_combo_box(u"limit"_ustr))
{
InitControlBase(m_xWidget.get());
@@ -117,7 +117,7 @@ private:
nLimit = -1;
}
set_value(nLimit);
- m_pControl->dispatchCommand({ comphelper::makePropertyValue("DBLimit.Value", nLimit) });
+ m_pControl->dispatchCommand({ comphelper::makePropertyValue(u"DBLimit.Value"_ustr, nLimit) });
}
///Initialize entries
@@ -188,7 +188,7 @@ LimitBoxController::~LimitBoxController()
/// XServiceInfo
OUString SAL_CALL LimitBoxController::getImplementationName()
{
- return "org.libreoffice.comp.dbu.LimitBoxController";
+ return u"org.libreoffice.comp.dbu.LimitBoxController"_ustr;
}
sal_Bool SAL_CALL LimitBoxController::supportsService(const OUString& _rServiceName)
@@ -203,7 +203,7 @@ sal_Bool SAL_CALL LimitBoxController::supportsService(const OUString& _rServiceN
css::uno::Sequence< OUString > SAL_CALL LimitBoxController::getSupportedServiceNames()
{
- return { "com.sun.star.frame.ToolbarController" };
+ return { u"com.sun.star.frame.ToolbarController"_ustr };
}
/// XComponent
diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
index 29c69856b41b..2c1788620a24 100644
--- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
+++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
@@ -183,7 +183,7 @@ namespace dbaui
Reference < XPropertySet > xLMPropSet(m_xBeamer->getLayoutManager(), UNO_QUERY);
if ( xLMPropSet.is() )
{
- xLMPropSet->setPropertyValue( "AutomaticToolbars", Any( false ));
+ xLMPropSet->setPropertyValue( u"AutomaticToolbars"_ustr, Any( false ));
}
}
catch( Exception& )
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index d963ca3c293d..b13986769bb4 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -94,11 +94,11 @@ namespace dbaui
{
virtual OUString SAL_CALL getImplementationName() override
{
- return "org.openoffice.comp.dbu.OViewDesign";
+ return u"org.openoffice.comp.dbu.OViewDesign"_ustr;
}
virtual Sequence< OUString> SAL_CALL getSupportedServiceNames() override
{
- return { "com.sun.star.sdb.ViewDesign" };
+ return { u"com.sun.star.sdb.ViewDesign"_ustr };
}
public:
@@ -173,7 +173,7 @@ namespace
void grabFocusFromLimitBox( OQueryController& _rController )
{
Reference< XLayoutManager > xLayoutManager = OGenericUnoController::getLayoutManager( _rController.getFrame() );
- Reference< XUIElement > xUIElement = xLayoutManager->getElement("private:resource/toolbar/designobjectbar");
+ Reference< XUIElement > xUIElement = xLayoutManager->getElement(u"private:resource/toolbar/designobjectbar"_ustr);
if (xUIElement.is())
{
Reference< XWindow > xWindow(xUIElement->getRealInterface(), css::uno::UNO_QUERY);
@@ -188,12 +188,12 @@ namespace
OUString SAL_CALL OQueryController::getImplementationName()
{
- return "org.openoffice.comp.dbu.OQueryDesign";
+ return u"org.openoffice.comp.dbu.OQueryDesign"_ustr;
}
Sequence< OUString> SAL_CALL OQueryController::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.QueryDesign" };
+ return { u"com.sun.star.sdb.QueryDesign"_ustr };
}
OQueryController::OQueryController(const Reference< XComponentContext >& _rM)
@@ -244,18 +244,18 @@ void SAL_CALL OQueryController::getFastPropertyValue( Any& o_rValue, sal_Int32 i
case PROPERTY_ID_CURRENT_QUERY_DESIGN:
{
::comphelper::NamedValueCollection aCurrentDesign;
- aCurrentDesign.put( "GraphicalDesign", isGraphicalDesign() );
+ aCurrentDesign.put( u"GraphicalDesign"_ustr, isGraphicalDesign() );
aCurrentDesign.put( PROPERTY_ESCAPE_PROCESSING, m_bEscapeProcessing );
if ( isGraphicalDesign() )
{
getContainer()->SaveUIConfig();
saveViewSettings( aCurrentDesign, true );
- aCurrentDesign.put( "Statement", m_sStatement );
+ aCurrentDesign.put( u"Statement"_ustr, m_sStatement );
}
else
{
- aCurrentDesign.put( "Statement", getContainer()->getStatement() );
+ aCurrentDesign.put( u"Statement"_ustr, getContainer()->getStatement() );
}
o_rValue <<= aCurrentDesign.getPropertyValues();
@@ -283,7 +283,7 @@ void SAL_CALL OQueryController::getFastPropertyValue( Any& o_rValue, sal_Int32 i
aProps.realloc( nLength + 1 );
auto pProps = aProps.getArray();
pProps[ nLength ] = Property(
- "CurrentQueryDesign",
+ u"CurrentQueryDesign"_ustr,
PROPERTY_ID_CURRENT_QUERY_DESIGN,
::cppu::UnoType< Sequence< PropertyValue > >::get(),
PropertyAttribute::READONLY
@@ -495,7 +495,7 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
aError = SQLException(
DBA_RES(STR_QRY_NOSELECT),
nullptr,
- "S1000",
+ u"S1000"_ustr,
1000,
Any()
);
@@ -518,7 +518,7 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
aError = SQLException(
DBA_RES(STR_QRY_SYNTAX),
nullptr,
- "S1000",
+ u"S1000"_ustr,
1000,
Any()
);
@@ -634,7 +634,7 @@ void OQueryController::impl_setViewMode( ::dbtools::SQLExceptionInfo* _pErrorInf
// don't pass &aError here, this would overwrite the error which the first switchView call
// returned in this location.
if ( _pErrorInfo )
- *_pErrorInfo = aError;
+ *_pErrorInfo = std::move(aError);
else
showError( aError );
}
@@ -657,7 +657,7 @@ void OQueryController::impl_initialize(const ::comphelper::NamedValueCollection&
// legacy parameters first (later overwritten by regular parameters)
OUString sIndependentSQLCommand;
- if ( rArguments.get_ensureType( "IndependentSQLCommand", sIndependentSQLCommand ) )
+ if ( rArguments.get_ensureType( u"IndependentSQLCommand"_ustr, sIndependentSQLCommand ) )
{
OSL_FAIL( "OQueryController::impl_initialize: IndependentSQLCommand is regognized for compatibility only!" );
sCommand = sIndependentSQLCommand;
@@ -665,7 +665,7 @@ void OQueryController::impl_initialize(const ::comphelper::NamedValueCollection&
}
OUString sCurrentQuery;
- if ( rArguments.get_ensureType( "CurrentQuery", sCurrentQuery ) )
+ if ( rArguments.get_ensureType( u"CurrentQuery"_ustr, sCurrentQuery ) )
{
OSL_FAIL( "OQueryController::impl_initialize: CurrentQuery is regognized for compatibility only!" );
sCommand = sCurrentQuery;
@@ -673,7 +673,7 @@ void OQueryController::impl_initialize(const ::comphelper::NamedValueCollection&
}
bool bCreateView( false );
- if ( rArguments.get_ensureType( "CreateView", bCreateView ) && bCreateView )
+ if ( rArguments.get_ensureType( u"CreateView"_ustr, bCreateView ) && bCreateView )
{
OSL_FAIL( "OQueryController::impl_initialize: CurrentQuery is regognized for compatibility only!" );
m_nCommandType = CommandType::TABLE;
@@ -727,7 +727,7 @@ void OQueryController::impl_initialize(const ::comphelper::NamedValueCollection&
// initial design
bool bForceInitialDesign = false;
Sequence< PropertyValue > aCurrentQueryDesignProps;
- aCurrentQueryDesignProps = rArguments.getOrDefault( "CurrentQueryDesign", aCurrentQueryDesignProps );
+ aCurrentQueryDesignProps = rArguments.getOrDefault( u"CurrentQueryDesign"_ustr, aCurrentQueryDesignProps );
if ( aCurrentQueryDesignProps.hasElements() )
{
@@ -740,11 +740,11 @@ void OQueryController::impl_initialize(const ::comphelper::NamedValueCollection&
{
aCurrentQueryDesign.get_ensureType( PROPERTY_ESCAPE_PROCESSING, m_bEscapeProcessing );
}
- if ( aCurrentQueryDesign.has( "Statement" ) )
+ if ( aCurrentQueryDesign.has( u"Statement"_ustr ) )
{
OUString sStatement;
- aCurrentQueryDesign.get_ensureType( "Statement", sStatement );
- aCurrentQueryDesign.remove( "Statement" );
+ aCurrentQueryDesign.get_ensureType( u"Statement"_ustr, sStatement );
+ aCurrentQueryDesign.remove( u"Statement"_ustr );
setStatement_fireEvent( sStatement );
}
@@ -919,23 +919,23 @@ OJoinDesignView* OQueryController::getJoinView()
void OQueryController::describeSupportedFeatures()
{
OJoinController::describeSupportedFeatures();
- implDescribeSupportedFeature( ".uno:SaveAs", ID_BROWSER_SAVEASDOC, CommandGroup::DOCUMENT );
- implDescribeSupportedFeature( ".uno:SbaNativeSql", ID_BROWSER_ESCAPEPROCESSING,CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:DBViewFunctions", SID_QUERY_VIEW_FUNCTIONS, CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:DBViewTableNames", SID_QUERY_VIEW_TABLES, CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:DBViewAliases", SID_QUERY_VIEW_ALIASES, CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:DBDistinctValues", SID_QUERY_DISTINCT_VALUES, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:DBChangeDesignMode",ID_BROWSER_SQL, CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:DBClearQuery", SID_BROWSER_CLEAR_QUERY, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:SbaExecuteSql", ID_BROWSER_QUERY_EXECUTE, CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:DBAddRelation", SID_RELATION_ADD_RELATION, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:DBQueryPreview", SID_DB_QUERY_PREVIEW, CommandGroup::VIEW );
- implDescribeSupportedFeature( ".uno:DBLimit", SID_QUERY_LIMIT, CommandGroup::FORMAT );
- implDescribeSupportedFeature( ".uno:DBQueryPropertiesDialog", SID_QUERY_PROP_DLG, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( u".uno:SaveAs"_ustr, ID_BROWSER_SAVEASDOC, CommandGroup::DOCUMENT );
+ implDescribeSupportedFeature( u".uno:SbaNativeSql"_ustr, ID_BROWSER_ESCAPEPROCESSING,CommandGroup::FORMAT );
+ implDescribeSupportedFeature( u".uno:DBViewFunctions"_ustr, SID_QUERY_VIEW_FUNCTIONS, CommandGroup::VIEW );
+ implDescribeSupportedFeature( u".uno:DBViewTableNames"_ustr, SID_QUERY_VIEW_TABLES, CommandGroup::VIEW );
+ implDescribeSupportedFeature( u".uno:DBViewAliases"_ustr, SID_QUERY_VIEW_ALIASES, CommandGroup::VIEW );
+ implDescribeSupportedFeature( u".uno:DBDistinctValues"_ustr, SID_QUERY_DISTINCT_VALUES, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( u".uno:DBChangeDesignMode"_ustr,ID_BROWSER_SQL, CommandGroup::VIEW );
+ implDescribeSupportedFeature( u".uno:DBClearQuery"_ustr, SID_BROWSER_CLEAR_QUERY, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:SbaExecuteSql"_ustr, ID_BROWSER_QUERY_EXECUTE, CommandGroup::VIEW );
+ implDescribeSupportedFeature( u".uno:DBAddRelation"_ustr, SID_RELATION_ADD_RELATION, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBQueryPreview"_ustr, SID_DB_QUERY_PREVIEW, CommandGroup::VIEW );
+ implDescribeSupportedFeature( u".uno:DBLimit"_ustr, SID_QUERY_LIMIT, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( u".uno:DBQueryPropertiesDialog"_ustr, SID_QUERY_PROP_DLG, CommandGroup::FORMAT );
#if OSL_DEBUG_LEVEL > 0
- implDescribeSupportedFeature( ".uno:DBShowParseTree", ID_EDIT_QUERY_SQL );
- implDescribeSupportedFeature( ".uno:DBMakeDisjunct", ID_EDIT_QUERY_DESIGN );
+ implDescribeSupportedFeature( u".uno:DBShowParseTree"_ustr, ID_EDIT_QUERY_SQL );
+ implDescribeSupportedFeature( u".uno:DBMakeDisjunct"_ustr, ID_EDIT_QUERY_DESIGN );
#endif
}
@@ -1010,18 +1010,18 @@ void OQueryController::saveViewSettings( ::comphelper::NamedValueCollection& o_r
++i;
}
- o_rViewSettings.put( "Fields", aAllFieldsData.getPropertyValues() );
- o_rViewSettings.put( "SplitterPosition", m_nSplitPos );
- o_rViewSettings.put( "VisibleRows", m_nVisibleRows );
+ o_rViewSettings.put( u"Fields"_ustr, aAllFieldsData.getPropertyValues() );
+ o_rViewSettings.put( u"SplitterPosition"_ustr, m_nSplitPos );
+ o_rViewSettings.put( u"VisibleRows"_ustr, m_nVisibleRows );
}
void OQueryController::loadViewSettings( const ::comphelper::NamedValueCollection& o_rViewSettings )
{
loadTableWindows( o_rViewSettings );
- m_nSplitPos = o_rViewSettings.getOrDefault( "SplitterPosition", m_nSplitPos );
- m_nVisibleRows = o_rViewSettings.getOrDefault( "VisibleRows", m_nVisibleRows );
- m_aFieldInformation = o_rViewSettings.getOrDefault( "Fields", m_aFieldInformation );
+ m_nSplitPos = o_rViewSettings.getOrDefault( u"SplitterPosition"_ustr, m_nSplitPos );
+ m_nVisibleRows = o_rViewSettings.getOrDefault( u"VisibleRows"_ustr, m_nVisibleRows );
+ m_aFieldInformation = o_rViewSettings.getOrDefault( u"Fields"_ustr, m_aFieldInformation );
}
void OQueryController::execute_QueryPropDlg()
@@ -1547,7 +1547,7 @@ OUString OQueryController::translateStatement( bool _bFireStatementChange )
}
else if(m_sStatement.isEmpty())
{
- showError(SQLException(DBA_RES(STR_QRY_NOSELECT), nullptr, "S1000", 1000, Any()));
+ showError(SQLException(DBA_RES(STR_QRY_NOSELECT), nullptr, u"S1000"_ustr, 1000, Any()));
}
else
sTranslatedStmt = m_sStatement;
diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx
index 1a00dd11576b..5eb7bc96319f 100644
--- a/dbaccess/source/ui/querydesign/querydlg.cxx
+++ b/dbaccess/source/ui/querydesign/querydlg.cxx
@@ -45,14 +45,14 @@ DlgQryJoin::DlgQryJoin(const OQueryTableView* pParent,
const OJoinTableView::OTableWindowMap* _pTableMap,
const Reference< XConnection >& _xConnection,
bool _bAllowTableSelect)
- : GenericDialogController(pParent->GetFrameWeld(), "dbaccess/ui/joindialog.ui", "JoinDialog")
+ : GenericDialogController(pParent->GetFrameWeld(), u"dbaccess/ui/joindialog.ui"_ustr, u"JoinDialog"_ustr)
, eJoinType(static_cast<OQueryTableConnectionData*>(_pData.get())->GetJoinType())
, m_pOrigConnData(_pData)
, m_xConnection(_xConnection)
- , m_xML_HelpText(m_xBuilder->weld_label("helptext"))
- , m_xPB_OK(m_xBuilder->weld_button("ok"))
- , m_xLB_JoinType(m_xBuilder->weld_combo_box("type"))
- , m_xCBNatural(m_xBuilder->weld_check_button("natural"))
+ , m_xML_HelpText(m_xBuilder->weld_label(u"helptext"_ustr))
+ , m_xPB_OK(m_xBuilder->weld_button(u"ok"_ustr))
+ , m_xLB_JoinType(m_xBuilder->weld_combo_box(u"type"_ustr))
+ , m_xCBNatural(m_xBuilder->weld_check_button(u"natural"_ustr))
{
Size aSize(m_xML_HelpText->get_approximate_digit_width() * 44,
m_xML_HelpText->get_text_height() * 6);
@@ -184,7 +184,7 @@ IMPL_LINK_NOARG( DlgQryJoin, LBChangeHdl, weld::ComboBox&, void )
m_xTableControl->lateInit();
m_xCBNatural->set_active(false);
m_xTableControl->enableRelation(false);
- m_pConnData->AppendConnLine("","");
+ m_pConnData->AppendConnLine(u""_ustr,u""_ustr);
m_xPB_OK->set_sensitive(true);
}
break;
diff --git a/dbaccess/source/ui/relationdesign/RTableConnection.cxx b/dbaccess/source/ui/relationdesign/RTableConnection.cxx
index ba60ae54661b..4b8086f5111f 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnection.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnection.cxx
@@ -51,7 +51,7 @@ void ORelationTableConnection::Draw(vcl::RenderContext& rRenderContext, const to
{
OTableConnection::Draw(rRenderContext, rRect);
ORelationTableConnectionData* pData = static_cast< ORelationTableConnectionData* >(GetData().get());
- if (pData && (pData->GetCardinality() == Cardinality::Undefined))
+ if (!pData || pData->GetCardinality() == Cardinality::Undefined)
return;
// search lines for top line
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
index 7cb7bb577c0a..c679e462c630 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
@@ -38,6 +38,7 @@ using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::lang;
ORelationTableConnectionData::ORelationTableConnectionData()
:m_nUpdateRules(KeyRule::NO_ACTION)
@@ -253,7 +254,8 @@ bool ORelationTableConnectionData::Update()
xKey->setPropertyValue(PROPERTY_NAME,Any(sKeyName));
xKey->setPropertyValue(PROPERTY_TYPE,Any(KeyType::FOREIGN));
- xKey->setPropertyValue(PROPERTY_REFERENCEDTABLE,Any(getReferencedTable()->GetTableName()));
+ // get the full name of the tables to ensure uniqueness across catalogs and schema
+ xKey->setPropertyValue(PROPERTY_REFERENCEDTABLE,Any(getReferencedTable()->GetComposedName()));
xKey->setPropertyValue(PROPERTY_UPDATERULE, Any(GetUpdateRules()));
xKey->setPropertyValue(PROPERTY_DELETERULE, Any(GetDeleteRules()));
}
@@ -298,7 +300,7 @@ bool ORelationTableConnectionData::Update()
{
OUString sReferencedTable;
xKey->getPropertyValue(PROPERTY_REFERENCEDTABLE) >>= sReferencedTable;
- if ( sReferencedTable == getReferencedTable()->GetTableName() )
+ if ( sReferencedTable == getReferencedTable()->GetComposedName() )
{
xColSup.set(xKey,UNO_QUERY_THROW);
try
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index ebeca9a64b24..7cab45c54d55 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -72,12 +72,12 @@ using namespace ::osl;
OUString SAL_CALL ORelationController::getImplementationName()
{
- return "org.openoffice.comp.dbu.ORelationDesign";
+ return u"org.openoffice.comp.dbu.ORelationDesign"_ustr;
}
Sequence< OUString> SAL_CALL ORelationController::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.RelationDesign" };
+ return { u"com.sun.star.sdb.RelationDesign"_ustr };
}
ORelationController::ORelationController(const Reference< XComponentContext >& _rM)
@@ -218,8 +218,8 @@ short ORelationController::saveModified()
short nSaved = RET_YES;
if(haveDataSource() && isModified())
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(getFrameWeld(), "dbaccess/ui/designsavemodifieddialog.ui"));
- std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog("DesignSaveModifiedDialog"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(getFrameWeld(), u"dbaccess/ui/designsavemodifieddialog.ui"_ustr));
+ std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog(u"DesignSaveModifiedDialog"_ustr));
nSaved = xQuery->run();
if(nSaved == RET_YES)
Execute(ID_BROWSER_SAVEDOC,Sequence<PropertyValue>());
@@ -230,7 +230,7 @@ short ORelationController::saveModified()
void ORelationController::describeSupportedFeatures()
{
OJoinController::describeSupportedFeatures();
- implDescribeSupportedFeature( ".uno:DBAddRelation", SID_RELATION_ADD_RELATION, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:DBAddRelation"_ustr, SID_RELATION_ADD_RELATION, CommandGroup::EDIT );
}
namespace
@@ -254,7 +254,7 @@ namespace
,const Sequence< OUString>& _aTableList
,const sal_Int32 _nStartIndex
,const sal_Int32 _nEndIndex)
- :m_aTableData(_xMetaData.is() && _xMetaData->supportsMixedCaseQuotedIdentifiers())
+ :m_aTableData(comphelper::UStringMixLess(_xMetaData.is() && _xMetaData->supportsMixedCaseQuotedIdentifiers()))
,m_aTableList(_aTableList)
,m_pParent(_pParent)
,m_xMetaData(_xMetaData)
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index 87a769ce83b3..c2c07ceb710c 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -51,6 +51,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdbcx;
+using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::accessibility;
@@ -107,7 +108,8 @@ void ORelationTableView::ReSync()
// it should be cleaned up, including its data in the document
pTabWin->clearListBox();
pTabWin.disposeAndClear();
- arrInvalidTables.push_back(pData->GetTableName());
+ // get the full name of the tables to ensure uniqueness across catalogs and schema
+ arrInvalidTables.push_back(pData->GetComposedName());
std::erase(rTabWinDataList, *aIter);
continue;
@@ -131,9 +133,9 @@ void ORelationTableView::ReSync()
if ( !arrInvalidTables.empty() )
{
// do the tables to the connection exist?
- OUString strTabExistenceTest = pTabConnData->getReferencingTable()->GetTableName();
+ OUString strTabExistenceTest = pTabConnData->getReferencingTable()->GetComposedName();
bool bInvalid = std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end();
- strTabExistenceTest = pTabConnData->getReferencedTable()->GetTableName();
+ strTabExistenceTest = pTabConnData->getReferencedTable()->GetComposedName();
bInvalid = bInvalid || std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end();
if (bInvalid)
@@ -190,7 +192,7 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const
pTabConnData->SetConnLine( 0, sSourceFieldName, sDestFieldName );
if ( bAskUser || m_pExistingConnection )
- m_pCurrentlyTabConnData = pTabConnData; // this implies that we ask the user what to do
+ m_pCurrentlyTabConnData = std::move(pTabConnData); // this implies that we ask the user what to do
else
{
try
@@ -289,7 +291,8 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin
}
// enter the new data structure into DocShell
- TTableWindowData::value_type pNewTabWinData(createTableWindowData( _rComposedName, rWinName,rWinName ));
+ // show the table's full name as window name to ensure uniqueness across catalogs and schema
+ TTableWindowData::value_type pNewTabWinData(createTableWindowData( _rComposedName, rWinName, _rComposedName ));
pNewTabWinData->ShowAll(false);
// link new window into the window list
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index b9328604b277..28839d7a9ffd 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -1058,7 +1058,7 @@ OUString OTableEditorCtrl::GetCellText( sal_Int32 nRow, sal_uInt16 nColId ) cons
sal_uInt32 OTableEditorCtrl::GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId)
{
- return GetTextWidth(GetCellText(nRow, nColId)) + 2 * GetTextWidth("0");
+ return GetTextWidth(GetCellText(nRow, nColId)) + 2 * GetTextWidth(u"0"_ustr);
}
OFieldDescription* OTableEditorCtrl::GetFieldDescr( sal_Int32 nRow )
@@ -1383,10 +1383,10 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt)
::tools::Rectangle aRect(aMenuPos, Size(1, 1));
weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect);
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "dbaccess/ui/querycolmenu.ui"));
- std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu"));
- xContextMenu->remove("delete");
- xContextMenu->remove("separator");
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, u"dbaccess/ui/querycolmenu.ui"_ustr));
+ std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr));
+ xContextMenu->remove(u"delete"_ustr);
+ xContextMenu->remove(u"separator"_ustr);
if (xContextMenu->popup_at_rect(pPopupParent, aRect) == "width")
adjustBrowseBoxColumnWidth( this, nColId );
}
@@ -1396,17 +1396,17 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt)
{
::tools::Rectangle aRect(aMenuPos, Size(1, 1));
weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect);
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "dbaccess/ui/tabledesignrowmenu.ui"));
- std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, u"dbaccess/ui/tabledesignrowmenu.ui"_ustr));
+ std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr));
if (!IsCutAllowed())
- xContextMenu->remove("cut");
+ xContextMenu->remove(u"cut"_ustr);
if (!IsCopyAllowed())
- xContextMenu->remove("copy");
+ xContextMenu->remove(u"copy"_ustr);
if (!IsPasteAllowed())
- xContextMenu->remove("paste");
+ xContextMenu->remove(u"paste"_ustr);
if (!IsDeleteAllowed())
- xContextMenu->remove("delete");
+ xContextMenu->remove(u"delete"_ustr);
// tdf#71224: WORKAROUND for the moment, we don't implement insert field at specific position
// It's not SQL standard and each database has made its choice (some use "BEFORE", other "FIRST" and "AFTER")
// and some, like Postgresql, don't allow this.
@@ -1416,15 +1416,15 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt)
// The real fix is to implement the insert for each database + error message for those which don't support this
//if (!IsInsertNewAllowed(nRow))
if ( GetView()->getController().getTable().is() )
- xContextMenu->remove("insert");
+ xContextMenu->remove(u"insert"_ustr);
if (IsPrimaryKeyAllowed())
{
- xContextMenu->set_active("primarykey", IsRowSelected(GetCurRow()) && IsPrimaryKey());
+ xContextMenu->set_active(u"primarykey"_ustr, IsRowSelected(GetCurRow()) && IsPrimaryKey());
}
else
{
- xContextMenu->remove("primarykey");
+ xContextMenu->remove(u"primarykey"_ustr);
}
if( SetDataPtr(m_nDataPos) )
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 924d9010b362..941b24914aac 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -99,12 +99,12 @@ namespace
OUString SAL_CALL OTableController::getImplementationName()
{
- return "org.openoffice.comp.dbu.OTableDesign";
+ return u"org.openoffice.comp.dbu.OTableDesign"_ustr;
}
Sequence< OUString> OTableController::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.TableDesign" };
+ return { u"com.sun.star.sdb.TableDesign"_ustr };
}
OTableController::OTableController(const Reference< XComponentContext >& _rM) : OTableController_BASE(_rM)
@@ -518,8 +518,8 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/)
if ( std::any_of(m_vRowList.begin(),m_vRowList.end(),
std::mem_fn(&OTableRow::isValid)) )
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(getFrameWeld(), "dbaccess/ui/tabledesignsavemodifieddialog.ui"));
- std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog("TableDesignSaveModifiedDialog"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(getFrameWeld(), u"dbaccess/ui/tabledesignsavemodifieddialog.ui"_ustr));
+ std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog(u"TableDesignSaveModifiedDialog"_ustr));
switch (xQuery->run())
{
case RET_YES:
@@ -536,8 +536,8 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/)
}
else if ( !m_bNew )
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(getFrameWeld(), "dbaccess/ui/deleteallrowsdialog.ui"));
- std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog("DeleteAllRowsDialog"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(getFrameWeld(), u"dbaccess/ui/deleteallrowsdialog.ui"_ustr));
+ std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog(u"DeleteAllRowsDialog"_ustr));
switch (xQuery->run())
{
case RET_YES:
@@ -571,15 +571,15 @@ void OTableController::describeSupportedFeatures()
{
OSingleDocumentController::describeSupportedFeatures();
- implDescribeSupportedFeature( ".uno:Redo", ID_BROWSER_REDO, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:Save", ID_BROWSER_SAVEDOC, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:Undo", ID_BROWSER_UNDO, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:NewDoc", SID_NEWDOC, CommandGroup::DOCUMENT );
- implDescribeSupportedFeature( ".uno:SaveAs", ID_BROWSER_SAVEASDOC, CommandGroup::DOCUMENT );
- implDescribeSupportedFeature( ".uno:DBIndexDesign", SID_INDEXDESIGN, CommandGroup::APPLICATION );
- implDescribeSupportedFeature( ".uno:EditDoc", ID_BROWSER_EDITDOC, CommandGroup::EDIT );
- implDescribeSupportedFeature( ".uno:GetUndoStrings", SID_GETUNDOSTRINGS );
- implDescribeSupportedFeature( ".uno:GetRedoStrings", SID_GETREDOSTRINGS );
+ implDescribeSupportedFeature( u".uno:Redo"_ustr, ID_BROWSER_REDO, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:Save"_ustr, ID_BROWSER_SAVEDOC, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:Undo"_ustr, ID_BROWSER_UNDO, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:NewDoc"_ustr, SID_NEWDOC, CommandGroup::DOCUMENT );
+ implDescribeSupportedFeature( u".uno:SaveAs"_ustr, ID_BROWSER_SAVEASDOC, CommandGroup::DOCUMENT );
+ implDescribeSupportedFeature( u".uno:DBIndexDesign"_ustr, SID_INDEXDESIGN, CommandGroup::APPLICATION );
+ implDescribeSupportedFeature( u".uno:EditDoc"_ustr, ID_BROWSER_EDITDOC, CommandGroup::EDIT );
+ implDescribeSupportedFeature( u".uno:GetUndoStrings"_ustr, SID_GETUNDOSTRINGS );
+ implDescribeSupportedFeature( u".uno:GetRedoStrings"_ustr, SID_GETREDOSTRINGS );
}
void OTableController::impl_onModifyChanged()
@@ -791,7 +791,7 @@ void OTableController::loadData()
pTabEdRow->SetReadOnly(!bIsAlterAllowed);
// search for type
bool bForce;
- TOTypeInfoSP pTypeInfo = ::dbaui::getTypeInfoFromType(m_aTypeInfo,nType,sTypeName,"x",nPrecision,nScale,bIsAutoIncrement,bForce);
+ TOTypeInfoSP pTypeInfo = ::dbaui::getTypeInfoFromType(m_aTypeInfo,nType,sTypeName,u"x"_ustr,nPrecision,nScale,bIsAutoIncrement,bForce);
if ( !pTypeInfo )
pTypeInfo = m_pTypeInfo;
pTabEdRow->SetFieldType( pTypeInfo, bForce );
@@ -910,7 +910,7 @@ bool OTableController::checkColumns(bool _bNew)
pActFieldDescr->SetAutoIncrement(pTypeInfo->bAutoIncrement);
pActFieldDescr->SetIsNullable(ColumnValue::NO_NULLS);
- pActFieldDescr->SetName( createUniqueName("ID" ));
+ pActFieldDescr->SetName( createUniqueName(u"ID"_ustr ));
pActFieldDescr->SetPrimaryKey( true );
m_vRowList.insert(m_vRowList.begin(),pNewRow);
@@ -1164,7 +1164,7 @@ void OTableController::alterColumns()
OUString sError( DBA_RES( STR_TABLEDESIGN_COULD_NOT_DROP_COL ) );
sError = sError.replaceFirst( "$column$", rColumnName );
- throw SQLException(sError, {}, "S1000", 0, caughtException);
+ throw SQLException(sError, {}, u"S1000"_ustr, 0, caughtException);
}
}
}
diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
index 18e24c3d5e12..317956ce734f 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
@@ -111,11 +111,11 @@ void OTableRowView::Command(const CommandEvent& rEvt)
{
::tools::Rectangle aRect(rEvt.GetMousePosPixel(), Size(1, 1));
weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect);
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "dbaccess/ui/tabledesignrowmenu.ui"));
- std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, u"dbaccess/ui/tabledesignrowmenu.ui"_ustr));
+ std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu(u"menu"_ustr));
sal_Int32 nSelectRowCount = GetSelectRowCount();
- xContextMenu->set_sensitive("cut", nSelectRowCount != 0);
- xContextMenu->set_sensitive("copy", nSelectRowCount != 0);
+ xContextMenu->set_sensitive(u"cut"_ustr, nSelectRowCount != 0);
+ xContextMenu->set_sensitive(u"copy"_ustr, nSelectRowCount != 0);
OUString sIdent = xContextMenu->popup_at_rect(pPopupParent, aRect);
if (sIdent == "cut")
cut();
diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
index e16bf2e546bf..4ae94dcf6e78 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
@@ -35,12 +35,12 @@ using namespace ::com::sun::star::datatransfer::clipboard;
using namespace ::com::sun::star::lang;
OTableBorderWindow::OTableBorderWindow(OTableDesignView* pParent)
- : InterimItemWindow(pParent, "dbaccess/ui/tableborderwindow.ui", "TableBorderWindow", false)
- , m_xHorzSplitter(m_xBuilder->weld_paned("splitter"))
- , m_xEditorParent(m_xBuilder->weld_container("editor"))
+ : InterimItemWindow(pParent, u"dbaccess/ui/tableborderwindow.ui"_ustr, u"TableBorderWindow"_ustr, false)
+ , m_xHorzSplitter(m_xBuilder->weld_paned(u"splitter"_ustr))
+ , m_xEditorParent(m_xBuilder->weld_container(u"editor"_ustr))
, m_xEditorParentWin(m_xEditorParent->CreateChildFrame())
, m_xEditorCtrl(VclPtr<OTableEditorCtrl>::Create(VCLUnoHelper::GetWindow(m_xEditorParentWin), pParent))
- , m_xFieldDescParent(m_xBuilder->weld_container("fielddesc"))
+ , m_xFieldDescParent(m_xBuilder->weld_container(u"fielddesc"_ustr))
, m_xFieldDescWin(new OTableFieldDescWin(m_xFieldDescParent.get(), pParent))
{
SetStyle(GetStyle() | WB_DIALOGCONTROL);
diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
index 9f110d472017..7aa12b498190 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
@@ -27,11 +27,11 @@
using namespace dbaui;
OTableFieldDescWin::OTableFieldDescWin(weld::Container* pParent, OTableDesignView* pView)
- : OChildWindow(pParent, "dbaccess/ui/fielddescpanel.ui", "FieldDescPanel")
- , m_aHelpBar(m_xBuilder->weld_text_view("textview"))
- , m_xBox(m_xBuilder->weld_container("box"))
+ : OChildWindow(pParent, u"dbaccess/ui/fielddescpanel.ui"_ustr, u"FieldDescPanel"_ustr)
+ , m_aHelpBar(m_xBuilder->weld_text_view(u"textview"_ustr))
+ , m_xBox(m_xBuilder->weld_container(u"box"_ustr))
, m_xFieldControl(new OTableFieldControl(m_xBox.get(), &m_aHelpBar, pView))
- , m_xHeader(m_xBuilder->weld_label("header"))
+ , m_xHeader(m_xBuilder->weld_label(u"header"_ustr))
, m_eChildFocus(NONE)
{
// Header
diff --git a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
index 50d2f92723d3..51c3d2e9872e 100644
--- a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
+++ b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
@@ -72,12 +72,12 @@ namespace dbaui
OUString SAL_CALL OAdvancedSettingsDialog::getImplementationName()
{
- return "org.openoffice.comp.dbu.OAdvancedSettingsDialog";
+ return u"org.openoffice.comp.dbu.OAdvancedSettingsDialog"_ustr;
}
css::uno::Sequence<OUString> SAL_CALL OAdvancedSettingsDialog::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.AdvancedDatabaseSettingsDialog" };
+ return { u"com.sun.star.sdb.AdvancedDatabaseSettingsDialog"_ustr };
}
Reference<XPropertySetInfo> SAL_CALL OAdvancedSettingsDialog::getPropertySetInfo()
diff --git a/dbaccess/source/ui/uno/ColumnControl.cxx b/dbaccess/source/ui/uno/ColumnControl.cxx
index 78b0f2fee53c..7e1fb6d8bdbc 100644
--- a/dbaccess/source/ui/uno/ColumnControl.cxx
+++ b/dbaccess/source/ui/uno/ColumnControl.cxx
@@ -57,12 +57,12 @@ sal_Bool SAL_CALL OColumnControl::supportsService(const OUString& _rServiceName)
}
css::uno::Sequence< OUString > SAL_CALL OColumnControl::getSupportedServiceNames()
{
- return { "com.sun.star.awt.UnoControl","com.sun.star.sdb.ColumnDescriptorControl" };
+ return { u"com.sun.star.awt.UnoControl"_ustr,u"com.sun.star.sdb.ColumnDescriptorControl"_ustr };
}
OUString OColumnControl::GetComponentServiceName() const
{
- return "com.sun.star.sdb.ColumnDescriptorControl";
+ return u"com.sun.star.sdb.ColumnDescriptorControl"_ustr;
}
void SAL_CALL OColumnControl::createPeer(const Reference< XToolkit >& /*rToolkit*/, const Reference< XWindowPeer >& rParentPeer)
diff --git a/dbaccess/source/ui/uno/ColumnModel.cxx b/dbaccess/source/ui/uno/ColumnModel.cxx
index de83b6176dd6..5ba3ce8a7e47 100644
--- a/dbaccess/source/ui/uno/ColumnModel.cxx
+++ b/dbaccess/source/ui/uno/ColumnModel.cxx
@@ -82,7 +82,7 @@ void OColumnControlModel::registerProperties()
registerProperty( PROPERTY_COLUMN, PROPERTY_ID_COLUMN, PropertyAttribute::TRANSIENT | PropertyAttribute::BOUND,
&m_xColumn, cppu::UnoType<decltype(m_xColumn)>::get() );
- registerMayBeVoidProperty( PROPERTY_TABSTOP, PROPERTY_ID_TABSTOP, PropertyAttribute::BOUND | PropertyAttribute::MAYBEVOID,
+ registerMayBeVoidProperty( PROPERTY_TABSTOP2, PROPERTY_ID_TABSTOP, PropertyAttribute::BOUND | PropertyAttribute::MAYBEVOID,
&m_aTabStop, ::cppu::UnoType<sal_Int16>::get() );
registerProperty( PROPERTY_DEFAULTCONTROL, PROPERTY_ID_DEFAULTCONTROL, PropertyAttribute::BOUND,
&m_sDefaultControl, cppu::UnoType<decltype(m_sDefaultControl)>::get() );
@@ -130,7 +130,7 @@ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL OColumnControlMode
OUString SAL_CALL OColumnControlModel::getImplementationName()
{
- return "com.sun.star.comp.dbu.OColumnControlModel";
+ return u"com.sun.star.comp.dbu.OColumnControlModel"_ustr;
}
sal_Bool SAL_CALL OColumnControlModel::supportsService(const OUString& _rServiceName)
{
@@ -143,7 +143,7 @@ sal_Bool SAL_CALL OColumnControlModel::supportsService(const OUString& _rService
}
css::uno::Sequence< OUString > SAL_CALL OColumnControlModel::getSupportedServiceNames()
{
- return { "com.sun.star.awt.UnoControlModel","com.sun.star.sdb.ColumnDescriptorControlModel" };
+ return { u"com.sun.star.awt.UnoControlModel"_ustr,u"com.sun.star.sdb.ColumnDescriptorControlModel"_ustr };
}
IMPLEMENT_FORWARD_REFCOUNT( OColumnControlModel, OColumnControlModel_BASE )
Any SAL_CALL OColumnControlModel::queryInterface( const Type& _rType )
diff --git a/dbaccess/source/ui/uno/ColumnPeer.cxx b/dbaccess/source/ui/uno/ColumnPeer.cxx
index 34c4a23da647..1e03cda49331 100644
--- a/dbaccess/source/ui/uno/ColumnPeer.cxx
+++ b/dbaccess/source/ui/uno/ColumnPeer.cxx
@@ -88,7 +88,7 @@ void OColumnPeer::setColumn(const Reference< XPropertySet>& _xColumn)
m_pActFieldDescr = new OFieldDescription(_xColumn,true);
// search for type
bool bForce;
- TOTypeInfoSP pTypeInfo = ::dbaui::getTypeInfoFromType(*rControl.getTypeInfo(),nType,sTypeName,"x",nPrecision,nScale,bAutoIncrement,bForce);
+ TOTypeInfoSP pTypeInfo = ::dbaui::getTypeInfoFromType(*rControl.getTypeInfo(),nType,sTypeName,u"x"_ustr,nPrecision,nScale,bAutoIncrement,bForce);
if ( !pTypeInfo )
pTypeInfo = rControl.getDefaultTyp();
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
index c7fbb5e1614d..dc7f25c96db6 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
@@ -48,12 +48,12 @@ Sequence<sal_Int8> SAL_CALL ODBTypeWizDialog::getImplementationId( )
OUString SAL_CALL ODBTypeWizDialog::getImplementationName()
{
- return "org.openoffice.comp.dbu.ODBTypeWizDialog";
+ return u"org.openoffice.comp.dbu.ODBTypeWizDialog"_ustr;
}
css::uno::Sequence<OUString> SAL_CALL ODBTypeWizDialog::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.DataSourceTypeChangeDialog" };
+ return { u"com.sun.star.sdb.DataSourceTypeChangeDialog"_ustr };
}
Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialog::getPropertySetInfo()
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
index 4942f2bcb89c..4ed229a3b9d7 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
@@ -43,10 +43,10 @@ ODBTypeWizDialogSetup::ODBTypeWizDialogSetup(const Reference< XComponentContext
,m_bOpenDatabase(true)
,m_bStartTableWizard(false)
{
- registerProperty("OpenDatabase", 3, PropertyAttribute::TRANSIENT,
+ registerProperty(u"OpenDatabase"_ustr, 3, PropertyAttribute::TRANSIENT,
&m_bOpenDatabase, cppu::UnoType<bool>::get());
- registerProperty("StartTableWizard", 4, PropertyAttribute::TRANSIENT,
+ registerProperty(u"StartTableWizard"_ustr, 4, PropertyAttribute::TRANSIENT,
&m_bStartTableWizard, cppu::UnoType<bool>::get());
}
@@ -57,12 +57,12 @@ Sequence<sal_Int8> SAL_CALL ODBTypeWizDialogSetup::getImplementationId( )
OUString SAL_CALL ODBTypeWizDialogSetup::getImplementationName()
{
- return "org.openoffice.comp.dbu.ODBTypeWizDialogSetup";
+ return u"org.openoffice.comp.dbu.ODBTypeWizDialogSetup"_ustr;
}
css::uno::Sequence<OUString> SAL_CALL ODBTypeWizDialogSetup::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.DatabaseWizardDialog" };
+ return { u"com.sun.star.sdb.DatabaseWizardDialog"_ustr };
}
Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialogSetup::getPropertySetInfo()
diff --git a/dbaccess/source/ui/uno/TableFilterDlg.cxx b/dbaccess/source/ui/uno/TableFilterDlg.cxx
index 01f9f9d0d7ba..740566aa3873 100644
--- a/dbaccess/source/ui/uno/TableFilterDlg.cxx
+++ b/dbaccess/source/ui/uno/TableFilterDlg.cxx
@@ -48,12 +48,12 @@ Sequence<sal_Int8> SAL_CALL OTableFilterDialog::getImplementationId( )
OUString SAL_CALL OTableFilterDialog::getImplementationName()
{
- return "org.openoffice.comp.dbu.OTableFilterDialog";
+ return u"org.openoffice.comp.dbu.OTableFilterDialog"_ustr;
}
css::uno::Sequence<OUString> SAL_CALL OTableFilterDialog::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.TableFilterDialog" };
+ return { u"com.sun.star.sdb.TableFilterDialog"_ustr };
}
Reference<XPropertySetInfo> SAL_CALL OTableFilterDialog::getPropertySetInfo()
diff --git a/dbaccess/source/ui/uno/UserSettingsDlg.cxx b/dbaccess/source/ui/uno/UserSettingsDlg.cxx
index 64903bedc812..a0467de67d68 100644
--- a/dbaccess/source/ui/uno/UserSettingsDlg.cxx
+++ b/dbaccess/source/ui/uno/UserSettingsDlg.cxx
@@ -48,12 +48,12 @@ Sequence<sal_Int8> SAL_CALL OUserSettingsDialog::getImplementationId( )
OUString SAL_CALL OUserSettingsDialog::getImplementationName()
{
- return "org.openoffice.comp.dbu.OUserSettingsDialog";
+ return u"org.openoffice.comp.dbu.OUserSettingsDialog"_ustr;
}
css::uno::Sequence<OUString> SAL_CALL OUserSettingsDialog::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.UserAdministrationDialog" };
+ return { u"com.sun.star.sdb.UserAdministrationDialog"_ustr };
}
Reference<XPropertySetInfo> SAL_CALL OUserSettingsDialog::getPropertySetInfo()
diff --git a/dbaccess/source/ui/uno/admindlg.cxx b/dbaccess/source/ui/uno/admindlg.cxx
index d27eb12901f6..1d396986c243 100644
--- a/dbaccess/source/ui/uno/admindlg.cxx
+++ b/dbaccess/source/ui/uno/admindlg.cxx
@@ -47,12 +47,12 @@ Sequence<sal_Int8> SAL_CALL ODataSourcePropertyDialog::getImplementationId()
OUString SAL_CALL ODataSourcePropertyDialog::getImplementationName()
{
- return "org.openoffice.comp.dbu.ODatasourceAdministrationDialog";
+ return u"org.openoffice.comp.dbu.ODatasourceAdministrationDialog"_ustr;
}
css::uno::Sequence<OUString> SAL_CALL ODataSourcePropertyDialog::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.DatasourceAdministrationDialog" };
+ return { u"com.sun.star.sdb.DatasourceAdministrationDialog"_ustr };
}
Reference<XPropertySetInfo> SAL_CALL ODataSourcePropertyDialog::getPropertySetInfo()
diff --git a/dbaccess/source/ui/uno/composerdialogs.cxx b/dbaccess/source/ui/uno/composerdialogs.cxx
index 9551f96f78b2..7af65ef8ebbe 100644
--- a/dbaccess/source/ui/uno/composerdialogs.cxx
+++ b/dbaccess/source/ui/uno/composerdialogs.cxx
@@ -153,7 +153,7 @@ constexpr OUStringLiteral PROPERTY_ROWSET = u"RowSet";
OUString SAL_CALL RowsetFilterDialog::getImplementationName()
{
- return "com.sun.star.uno.comp.sdb.RowsetFilterDialog";
+ return u"com.sun.star.uno.comp.sdb.RowsetFilterDialog"_ustr;
}
sal_Bool SAL_CALL RowsetFilterDialog::supportsService(const OUString& _rServiceName)
{
@@ -166,7 +166,7 @@ constexpr OUStringLiteral PROPERTY_ROWSET = u"RowSet";
}
css::uno::Sequence< OUString > SAL_CALL RowsetFilterDialog::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.FilterDialog" };
+ return { u"com.sun.star.sdb.FilterDialog"_ustr };
}
std::unique_ptr<weld::GenericDialogController> RowsetFilterDialog::createComposerDialog(weld::Window* _pParent, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxColumns )
@@ -185,9 +185,9 @@ constexpr OUStringLiteral PROPERTY_ROWSET = u"RowSet";
aArguments[1] >>= xRowSet;
Reference<css::awt::XWindow> xParentWindow;
aArguments[2] >>= xParentWindow;
- setPropertyValue( "QueryComposer", Any( xQueryComposer ) );
- setPropertyValue( "RowSet", Any( xRowSet ) );
- setPropertyValue( "ParentWindow", Any( xParentWindow ) );
+ setPropertyValue( u"QueryComposer"_ustr, Any( xQueryComposer ) );
+ setPropertyValue( u"RowSet"_ustr, Any( xRowSet ) );
+ setPropertyValue( u"ParentWindow"_ustr, Any( xParentWindow ) );
}
else
ComposerDialog::initialize(aArguments);
@@ -209,7 +209,7 @@ constexpr OUStringLiteral PROPERTY_ROWSET = u"RowSet";
OUString SAL_CALL RowsetOrderDialog::getImplementationName()
{
- return "com.sun.star.uno.comp.sdb.RowsetOrderDialog";
+ return u"com.sun.star.uno.comp.sdb.RowsetOrderDialog"_ustr;
}
sal_Bool SAL_CALL RowsetOrderDialog::supportsService(const OUString& _rServiceName)
{
@@ -222,7 +222,7 @@ constexpr OUStringLiteral PROPERTY_ROWSET = u"RowSet";
}
css::uno::Sequence< OUString > SAL_CALL RowsetOrderDialog::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.OrderDialog" };
+ return { u"com.sun.star.sdb.OrderDialog"_ustr };
}
std::unique_ptr<weld::GenericDialogController> RowsetOrderDialog::createComposerDialog(weld::Window* pParent, const Reference< XConnection >& rxConnection, const Reference< XNameAccess >& rxColumns)
@@ -238,13 +238,13 @@ constexpr OUStringLiteral PROPERTY_ROWSET = u"RowSet";
aArguments[0] >>= xQueryComposer;
Reference<css::beans::XPropertySet> xRowSet;
aArguments[1] >>= xRowSet;
- setPropertyValue( "QueryComposer", Any( xQueryComposer ) );
- setPropertyValue( "RowSet", Any( xRowSet ) );
+ setPropertyValue( u"QueryComposer"_ustr, Any( xQueryComposer ) );
+ setPropertyValue( u"RowSet"_ustr, Any( xRowSet ) );
if (aArguments.getLength() == 3)
{
Reference<css::awt::XWindow> xParentWindow;
aArguments[2] >>= xParentWindow;
- setPropertyValue("ParentWindow", Any(xParentWindow));
+ setPropertyValue(u"ParentWindow"_ustr, Any(xParentWindow));
}
}
else
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index b1e5832f049c..171cc70d20a3 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -370,7 +370,7 @@ CopyTableWizard::CopyTableWizard( const Reference< XComponentContext >& _rxORB )
:CopyTableWizard_Base( _rxORB )
,m_xContext( _rxORB )
,m_nOperation( CopyTableOperation::CopyDefinitionAndData )
- ,m_aPrimaryKeyName( false, "ID" )
+ ,m_aPrimaryKeyName( false, u"ID"_ustr )
,m_bUseHeaderLineAsColumnNames( true )
,m_nCommandType( CommandType::COMMAND )
,m_bSourceSelectionBookmarks( true )
@@ -398,12 +398,12 @@ CopyTableWizard::~CopyTableWizard()
OUString SAL_CALL CopyTableWizard::getImplementationName()
{
- return "org.openoffice.comp.dbu.CopyTableWizard";
+ return u"org.openoffice.comp.dbu.CopyTableWizard"_ustr;
}
css::uno::Sequence<OUString> SAL_CALL CopyTableWizard::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.application.CopyTableWizard" };
+ return { u"com.sun.star.sdb.application.CopyTableWizard"_ustr };
}
Reference< XPropertySetInfo > SAL_CALL CopyTableWizard::getPropertySetInfo()
@@ -616,7 +616,7 @@ Reference< XPropertySet > CopyTableWizard::impl_ensureDataAccessDescriptor_throw
{
Reference< XServiceInfo > xSI( xDescriptor, UNO_QUERY );
bIsValid = ( xSI.is()
- && xSI->supportsService( "com.sun.star.sdb.DataAccessDescriptor" ) );
+ && xSI->supportsService( u"com.sun.star.sdb.DataAccessDescriptor"_ustr ) );
}
// it must be able to provide a connection
@@ -692,7 +692,7 @@ std::unique_ptr< ICopyTableSourceObject > CopyTableWizard::impl_extractSourceObj
if ( !xPSI->hasPropertyByName( PROPERTY_COMMAND )
|| !xPSI->hasPropertyByName( PROPERTY_COMMAND_TYPE )
)
- throw IllegalArgumentException("Expecting a table or query specification.",
+ throw IllegalArgumentException(u"Expecting a table or query specification."_ustr,
// TODO: resource
*const_cast< CopyTableWizard* >( this ), 1);
@@ -768,7 +768,7 @@ void CopyTableWizard::impl_extractSourceResultSet_throw( const Reference< XPrope
const bool bHasResultSet = m_xSourceResultSet.is();
const bool bHasSelection = m_aSourceSelection.hasElements();
if ( bHasSelection && !bHasResultSet )
- throw IllegalArgumentException("A result set is needed when specifying a selection to copy.",
+ throw IllegalArgumentException(u"A result set is needed when specifying a selection to copy."_ustr,
// TODO: resource
*this, 1);
@@ -884,7 +884,7 @@ SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference<
{
OSL_PRECOND( m_xSourceConnection.is(), "CopyTableWizard::impl_createSourceStatement_throw: illegal call!" );
if ( !m_xSourceConnection.is() )
- throw RuntimeException( "CopyTableWizard::impl_createSourceStatement_throw: illegal call!", *const_cast< CopyTableWizard* >( this ));
+ throw RuntimeException( u"CopyTableWizard::impl_createSourceStatement_throw: illegal call!"_ustr, *const_cast< CopyTableWizard* >( this ));
::utl::SharedUNOComponent< XPreparedStatement > xStatement;
switch ( m_nCommandType )
@@ -930,7 +930,7 @@ SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference<
default:
// this should not have survived initialization phase
- throw RuntimeException("No case matched, this should not have survived the initialization phase", *const_cast< CopyTableWizard* >( this ));
+ throw RuntimeException(u"No case matched, this should not have survived the initialization phase"_ustr, *const_cast< CopyTableWizard* >( this ));
}
return xStatement;
@@ -1055,7 +1055,7 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
{
OSL_PRECOND( m_xDestConnection.is(), "CopyTableWizard::impl_copyRows_throw: illegal call!" );
if ( !m_xDestConnection.is() )
- throw RuntimeException( "m_xDestConnection is set to null, CopyTableWizard::impl_copyRows_throw: illegal call!", *this );
+ throw RuntimeException( u"m_xDestConnection is set to null, CopyTableWizard::impl_copyRows_throw: illegal call!"_ustr, *this );
Reference< XDatabaseMetaData > xDestMetaData( m_xDestConnection->getMetaData(), UNO_SET_THROW );
@@ -1160,7 +1160,7 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
if ( ( nSourceColumn < 1 ) || ( o3tl::make_unsigned(nSourceColumn) >= aSourceColTypes.size() ) )
{ // ( we have to check here against 1 because the parameters are 1 based)
- ::dbtools::throwSQLException("Internal error: invalid column type index.",
+ ::dbtools::throwSQLException(u"Internal error: invalid column type index."_ustr,
::dbtools::StandardSQLState::INVALID_DESCRIPTOR_INDEX, *this);
}
@@ -1362,9 +1362,9 @@ void CopyTableWizard::impl_doCopy_nothrow()
const OUString sComposedTableName = ::dbtools::composeTableName( xDestMetaData, xTable, ::dbtools::EComposeRule::InDataManipulation, true );
OUString aSchema,aTable;
- xTable->getPropertyValue("SchemaName") >>= aSchema;
- xTable->getPropertyValue("Name") >>= aTable;
- Any aCatalog = xTable->getPropertyValue("CatalogName");
+ xTable->getPropertyValue(u"SchemaName"_ustr) >>= aSchema;
+ xTable->getPropertyValue(u"Name"_ustr) >>= aTable;
+ Any aCatalog = xTable->getPropertyValue(u"CatalogName"_ustr);
const Reference< XResultSet > xResultPKCL(xDestMetaData->getPrimaryKeys(aCatalog,aSchema,aTable));
Reference< XRow > xRowPKCL(xResultPKCL, UNO_QUERY_THROW);
@@ -1504,7 +1504,7 @@ void SAL_CALL CopyTableWizard::initialize( const Sequence< Any >& _rArguments )
Reference< XPropertySet > xInteractionHandler(m_xInteractionHandler, UNO_QUERY);
if (xInteractionHandler.is())
{
- Any aParentWindow(xInteractionHandler->getPropertyValue("ParentWindow"));
+ Any aParentWindow(xInteractionHandler->getPropertyValue(u"ParentWindow"_ustr));
aParentWindow >>= m_xParent;
}
}
diff --git a/dbaccess/source/ui/uno/dbinteraction.cxx b/dbaccess/source/ui/uno/dbinteraction.cxx
index 2277f5c09386..f06e03572cc9 100644
--- a/dbaccess/source/ui/uno/dbinteraction.cxx
+++ b/dbaccess/source/ui/uno/dbinteraction.cxx
@@ -69,7 +69,7 @@ namespace dbaui
void SAL_CALL BasicInteractionHandler::initialize(const Sequence<Any>& rArgs)
{
comphelper::SequenceAsHashMap aMap(rArgs);
- m_xParentWindow.set(aMap.getValue("Parent"), UNO_QUERY);
+ m_xParentWindow.set(aMap.getValue(u"Parent"_ustr), UNO_QUERY);
}
sal_Bool SAL_CALL BasicInteractionHandler::handleInteractionRequest( const Reference< XInteractionRequest >& i_rRequest )
@@ -344,7 +344,7 @@ namespace dbaui
// SQLExceptionInteractionHandler
OUString SAL_CALL SQLExceptionInteractionHandler::getImplementationName()
{
- return "com.sun.star.comp.dbaccess.DatabaseInteractionHandler";
+ return u"com.sun.star.comp.dbaccess.DatabaseInteractionHandler"_ustr;
}
sal_Bool SAL_CALL SQLExceptionInteractionHandler::supportsService(const OUString& _rServiceName)
{
@@ -357,13 +357,13 @@ namespace dbaui
}
css::uno::Sequence< OUString > SAL_CALL SQLExceptionInteractionHandler::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.DatabaseInteractionHandler" };
+ return { u"com.sun.star.sdb.DatabaseInteractionHandler"_ustr };
}
// LegacyInteractionHandler
OUString SAL_CALL LegacyInteractionHandler::getImplementationName()
{
- return "com.sun.star.comp.dbaccess.LegacyInteractionHandler";
+ return u"com.sun.star.comp.dbaccess.LegacyInteractionHandler"_ustr;
}
sal_Bool SAL_CALL LegacyInteractionHandler::supportsService(const OUString& _rServiceName)
{
@@ -376,7 +376,7 @@ namespace dbaui
}
css::uno::Sequence< OUString > SAL_CALL LegacyInteractionHandler::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.InteractionHandler" };
+ return { u"com.sun.star.sdb.InteractionHandler"_ustr };
}
} // namespace dbaui
diff --git a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
index 5b1636f90bea..dbb56c9b6d95 100644
--- a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
+++ b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
@@ -122,7 +122,7 @@ namespace dbaui
OUString SAL_CALL OTextConnectionSettingsDialog::getImplementationName()
{
- return "com.sun.star.comp.dbaccess.OTextConnectionSettingsDialog";
+ return u"com.sun.star.comp.dbaccess.OTextConnectionSettingsDialog"_ustr;
}
sal_Bool SAL_CALL OTextConnectionSettingsDialog::supportsService(const OUString& _rServiceName)
{
@@ -135,7 +135,7 @@ namespace dbaui
}
css::uno::Sequence< OUString > SAL_CALL OTextConnectionSettingsDialog::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.TextConnectionSettings" };
+ return { u"com.sun.star.sdb.TextConnectionSettings"_ustr };
}
Reference< XPropertySetInfo > SAL_CALL OTextConnectionSettingsDialog::getPropertySetInfo()
@@ -161,42 +161,42 @@ namespace dbaui
auto pProps = aProps.getArray();
pProps[ nProp++ ] = Property(
- "HeaderLine",
+ u"HeaderLine"_ustr,
PROPERTY_ID_HEADER_LINE,
::cppu::UnoType< sal_Bool >::get(),
PropertyAttribute::TRANSIENT
);
pProps[ nProp++ ] = Property(
- "FieldDelimiter",
+ u"FieldDelimiter"_ustr,
PROPERTY_ID_FIELD_DELIMITER,
::cppu::UnoType< OUString >::get(),
PropertyAttribute::TRANSIENT
);
pProps[ nProp++ ] = Property(
- "StringDelimiter",
+ u"StringDelimiter"_ustr,
PROPERTY_ID_STRING_DELIMITER,
::cppu::UnoType< OUString >::get(),
PropertyAttribute::TRANSIENT
);
pProps[ nProp++ ] = Property(
- "DecimalDelimiter",
+ u"DecimalDelimiter"_ustr,
PROPERTY_ID_DECIMAL_DELIMITER,
::cppu::UnoType< OUString >::get(),
PropertyAttribute::TRANSIENT
);
pProps[ nProp++ ] = Property(
- "ThousandDelimiter",
+ u"ThousandDelimiter"_ustr,
PROPERTY_ID_THOUSAND_DELIMITER,
::cppu::UnoType< OUString >::get(),
PropertyAttribute::TRANSIENT
);
pProps[ nProp++ ] = Property(
- "CharSet",
+ u"CharSet"_ustr,
PROPERTY_ID_ENCODING,
::cppu::UnoType< OUString >::get(),
PropertyAttribute::TRANSIENT
diff --git a/dbaccess/source/ui/uno/unoDirectSql.cxx b/dbaccess/source/ui/uno/unoDirectSql.cxx
index 0a59588a3633..807589689d53 100644
--- a/dbaccess/source/ui/uno/unoDirectSql.cxx
+++ b/dbaccess/source/ui/uno/unoDirectSql.cxx
@@ -63,7 +63,7 @@ namespace dbaui
OUString SAL_CALL ODirectSQLDialog::getImplementationName()
{
- return "com.sun.star.comp.sdb.DirectSQLDialog";
+ return u"com.sun.star.comp.sdb.DirectSQLDialog"_ustr;
}
sal_Bool SAL_CALL ODirectSQLDialog::supportsService(const OUString& _rServiceName)
{
diff --git a/dbaccess/source/ui/uno/unosqlmessage.cxx b/dbaccess/source/ui/uno/unosqlmessage.cxx
index 39364ba254ca..09e08878b02b 100644
--- a/dbaccess/source/ui/uno/unosqlmessage.cxx
+++ b/dbaccess/source/ui/uno/unosqlmessage.cxx
@@ -64,12 +64,12 @@ Sequence<sal_Int8> SAL_CALL OSQLMessageDialog::getImplementationId( )
OUString SAL_CALL OSQLMessageDialog::getImplementationName()
{
- return "org.openoffice.comp.dbu.OSQLMessageDialog";
+ return u"org.openoffice.comp.dbu.OSQLMessageDialog"_ustr;
}
css::uno::Sequence<OUString> SAL_CALL OSQLMessageDialog::getSupportedServiceNames()
{
- return { "com.sun.star.sdb.ErrorMessageDialog" };
+ return { u"com.sun.star.sdb.ErrorMessageDialog"_ustr };
}
void OSQLMessageDialog::initialize(Sequence<Any> const & args)
diff --git a/dbaccess/uiconfig/ui/admindialog.ui b/dbaccess/uiconfig/ui/admindialog.ui
index bb02d9530ade..ecbb0525f5a2 100644
--- a/dbaccess/uiconfig/ui/admindialog.ui
+++ b/dbaccess/uiconfig/ui/admindialog.ui
@@ -1,34 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="dba">
<requires lib="gtk+" version="3.20"/>
<object class="GtkDialog" id="AdminDialog">
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="title" translatable="yes" context="admindialog|AdminDialog">Database Properties</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="default_width">0</property>
- <property name="default_height">0</property>
- <property name="type_hint">dialog</property>
- <child>
- <placeholder/>
- </child>
+ <property name="default-width">0</property>
+ <property name="default-height">0</property>
+ <property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
<child>
<object class="GtkButton" id="reset">
<property name="label" translatable="yes" context="stock">_Reset</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -41,10 +38,10 @@
<object class="GtkButton" id="ok">
<property name="label" translatable="yes" context="stock">_OK</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -57,8 +54,8 @@
<object class="GtkButton" id="cancel">
<property name="label" translatable="yes" context="stock">_Cancel</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -71,8 +68,8 @@
<object class="GtkButton" id="help">
<property name="label" translatable="yes" context="stock">_Help</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -86,47 +83,23 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="tabcontrol">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="scrollable">True</property>
- <property name="enable_popup">True</property>
+ <property name="enable-popup">True</property>
<child>
<!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
+ <property name="can-focus">False</property>
<child>
<placeholder/>
</child>
@@ -135,12 +108,12 @@
<child type="tab">
<object class="GtkLabel" id="advanced">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="admindialog|advanced">Advanced Properties</property>
<property name="xalign">0.5</property>
</object>
<packing>
- <property name="tab_fill">False</property>
+ <property name="tab-fill">False</property>
</packing>
</child>
</object>
diff --git a/dbaccess/uiconfig/ui/autocharsetpage.ui b/dbaccess/uiconfig/ui/autocharsetpage.ui
index 85a00baff32b..c52a83366590 100644
--- a/dbaccess/uiconfig/ui/autocharsetpage.ui
+++ b/dbaccess/uiconfig/ui/autocharsetpage.ui
@@ -1,37 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="dba">
<requires lib="gtk+" version="3.20"/>
<object class="GtkBox" id="AutoCharset">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="border_width">6</property>
+ <property name="border-width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="spacing">12</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="hexpand">True</property>
+ <property name="spacing">12</property>
<child>
<object class="GtkLabel" id="charsetlabel">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="autocharsetpage|charsetlabel">_Character set:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">charset</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">charset</property>
</object>
<packing>
<property name="expand">False</property>
@@ -42,7 +42,7 @@
<child>
<object class="GtkComboBoxText" id="charset">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
@@ -56,7 +56,7 @@
<child type="label">
<object class="GtkLabel" id="charsetheader">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="autocharsetpage|charsetheader">Data Conversion</property>
<attributes>
<attribute name="weight" value="bold"/>
diff --git a/dbaccess/uiconfig/ui/deleteallrowsdialog.ui b/dbaccess/uiconfig/ui/deleteallrowsdialog.ui
index 1c42f9926b8c..10183f8cefc3 100644
--- a/dbaccess/uiconfig/ui/deleteallrowsdialog.ui
+++ b/dbaccess/uiconfig/ui/deleteallrowsdialog.ui
@@ -1,29 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="dba">
<requires lib="gtk+" version="3.20"/>
<object class="GtkMessageDialog" id="DeleteAllRowsDialog">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="type_hint">dialog</property>
- <property name="skip_taskbar_hint">True</property>
- <property name="message_type">question</property>
+ <property name="type-hint">dialog</property>
+ <property name="skip-taskbar-hint">True</property>
+ <property name="message-type">question</property>
<property name="text" translatable="yes" context="deleteallrowsdialog|DeleteAllRowsDialog">You are trying to delete all the columns in the table. A table cannot exist without columns. Should the table be deleted from the database? If not, the table will remain unchanged.</property>
<child internal-child="vbox">
<object class="GtkBox" id="messagedialog-vbox">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="messagedialog-action_area">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<child>
<object class="GtkButton" id="no">
<property name="label" translatable="yes" context="stock">_No</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -36,10 +36,10 @@
<object class="GtkButton" id="yes">
<property name="label" translatable="yes" context="stock">_Yes</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -52,8 +52,8 @@
<object class="GtkButton" id="cancel">
<property name="label" translatable="yes" context="stock">_Cancel</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -66,7 +66,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
diff --git a/dbaccess/uiconfig/ui/designsavemodifieddialog.ui b/dbaccess/uiconfig/ui/designsavemodifieddialog.ui
index 57e781bb643d..446e31cc1a17 100644
--- a/dbaccess/uiconfig/ui/designsavemodifieddialog.ui
+++ b/dbaccess/uiconfig/ui/designsavemodifieddialog.ui
@@ -1,30 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="dba">
<requires lib="gtk+" version="3.20"/>
<object class="GtkMessageDialog" id="DesignSaveModifiedDialog">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="type_hint">dialog</property>
- <property name="skip_taskbar_hint">True</property>
- <property name="message_type">question</property>
+ <property name="type-hint">dialog</property>
+ <property name="skip-taskbar-hint">True</property>
+ <property name="message-type">question</property>
<property name="text" translatable="yes" context="designsavemodifieddialog|DesignSaveModifiedDialog">Do you want to save the changes?</property>
- <property name="secondary_text" translatable="yes" context="designsavemodifieddialog|DesignSaveModifiedDialog">The relation design has been changed.</property>
+ <property name="secondary-text" translatable="yes" context="designsavemodifieddialog|DesignSaveModifiedDialog">The relation design has been changed.</property>
<child internal-child="vbox">
<object class="GtkBox" id="messagedialog-vbox">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="messagedialog-action_area">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<child>
<object class="GtkButton" id="no">
<property name="label" translatable="yes" context="stock">_No</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -37,10 +37,10 @@
<object class="GtkButton" id="yes">
<property name="label" translatable="yes" context="stock">_Yes</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -53,8 +53,8 @@
<object class="GtkButton" id="cancel">
<property name="label" translatable="yes" context="stock">_Cancel</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -67,7 +67,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
diff --git a/dbaccess/uiconfig/ui/directsqldialog.ui b/dbaccess/uiconfig/ui/directsqldialog.ui
index c1c06f40a383..b3f62053d367 100644
--- a/dbaccess/uiconfig/ui/directsqldialog.ui
+++ b/dbaccess/uiconfig/ui/directsqldialog.ui
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.2 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="dba">
<requires lib="gtk+" version="3.20"/>
<object class="GtkDialog" id="DirectSQLDialog">
<property name="can-focus">False</property>
<property name="border-width">6</property>
<property name="title" translatable="yes" context="directsqldialog|DirectSQLDialog">Execute SQL Statement</property>
- <property name="resizable">False</property>
<property name="modal">True</property>
<property name="type-hint">dialog</property>
<child internal-child="vbox">
diff --git a/dbaccess/uiconfig/ui/generalpagedialog.ui b/dbaccess/uiconfig/ui/generalpagedialog.ui
index d40cd025b88c..8e785fad89aa 100644
--- a/dbaccess/uiconfig/ui/generalpagedialog.ui
+++ b/dbaccess/uiconfig/ui/generalpagedialog.ui
@@ -1,84 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="dba">
<requires lib="gtk+" version="3.20"/>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=4 -->
<object class="GtkGrid" id="PageGeneral">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">16</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">16</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkLabel" id="datasourceTypePre">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes" context="generalpagedialog|datasourceTypePre">Select the type of database to which you want to establish a connection.</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">datasourceTypePre</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes" context="generalpagedialog|datasourceTypePre">Select the type of database to which you want to establish a connection.</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">datasourceTypePre</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="datasourceTypeLabel">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="margin-start">48</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="generalpagedialog|datasourceTypeLabel">Database _type:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">datasourceType</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">datasourceType</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="datasourceType">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="datasourceTypeHelp">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_top">6</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
+ <property name="can-focus">False</property>
+ <property name="margin-top">6</property>
<property name="label" translatable="yes" context="generalpagedialog|datasourceTypeHelp">On the following pages, you can make detailed settings for the connection.
The new settings you make will overwrite your existing settings.</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">datasourceTypeHelp</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">datasourceTypeHelp</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="specialMessage">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
<property name="width">2</property>
</packing>
</child>
diff --git a/dbaccess/uiconfig/ui/savemodifieddialog.ui b/dbaccess/uiconfig/ui/savemodifieddialog.ui
index b90b4dd9a2d9..6152b8eb6f47 100644
--- a/dbaccess/uiconfig/ui/savemodifieddialog.ui
+++ b/dbaccess/uiconfig/ui/savemodifieddialog.ui
@@ -1,30 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="dba">
<requires lib="gtk+" version="3.20"/>
<object class="GtkMessageDialog" id="SaveModifiedDialog">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="type_hint">dialog</property>
- <property name="skip_taskbar_hint">True</property>
- <property name="message_type">question</property>
+ <property name="type-hint">dialog</property>
+ <property name="skip-taskbar-hint">True</property>
+ <property name="message-type">question</property>
<property name="text" translatable="yes" context="savemodifieddialog|SaveModifiedDialog">Do you want to save the changes?</property>
- <property name="secondary_text" translatable="yes" context="savemodifieddialog|SaveModifiedDialog">The current record has been changed.</property>
+ <property name="secondary-text" translatable="yes" context="savemodifieddialog|SaveModifiedDialog">The current record has been changed.</property>
<child internal-child="vbox">
<object class="GtkBox" id="messagedialog-vbox">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="messagedialog-action_area">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<child>
<object class="GtkButton" id="no">
<property name="label" translatable="yes" context="stock">_No</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -37,10 +37,10 @@
<object class="GtkButton" id="yes">
<property name="label" translatable="yes" context="stock">_Yes</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -53,8 +53,8 @@
<object class="GtkButton" id="cancel">
<property name="label" translatable="yes" context="stock">_Cancel</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -67,7 +67,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
diff --git a/dbaccess/uiconfig/ui/tabledesignsavemodifieddialog.ui b/dbaccess/uiconfig/ui/tabledesignsavemodifieddialog.ui
index ea0fdd5b01d5..240189bea5ba 100644
--- a/dbaccess/uiconfig/ui/tabledesignsavemodifieddialog.ui
+++ b/dbaccess/uiconfig/ui/tabledesignsavemodifieddialog.ui
@@ -1,30 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="dba">
<requires lib="gtk+" version="3.20"/>
<object class="GtkMessageDialog" id="TableDesignSaveModifiedDialog">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="type_hint">dialog</property>
- <property name="skip_taskbar_hint">True</property>
- <property name="message_type">question</property>
+ <property name="type-hint">dialog</property>
+ <property name="skip-taskbar-hint">True</property>
+ <property name="message-type">question</property>
<property name="text" translatable="yes" context="tabledesignsavemodifieddialog|TableDesignSaveModifiedDialog">Do you want to save the changes?</property>
- <property name="secondary_text" translatable="yes" context="tabledesignsavemodifieddialog|TableDesignSaveModifiedDialog">The table has been changed.</property>
+ <property name="secondary-text" translatable="yes" context="tabledesignsavemodifieddialog|TableDesignSaveModifiedDialog">The table has been changed.</property>
<child internal-child="vbox">
<object class="GtkBox" id="messagedialog-vbox">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="messagedialog-action_area">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<child>
<object class="GtkButton" id="no">
<property name="label" translatable="yes" context="stock">_No</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -37,10 +37,10 @@
<object class="GtkButton" id="yes">
<property name="label" translatable="yes" context="stock">_Yes</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -53,8 +53,8 @@
<object class="GtkButton" id="cancel">
<property name="label" translatable="yes" context="stock">_Cancel</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -67,7 +67,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>