summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/dlg
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-04-02 01:18:42 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-04-02 18:46:47 +0200
commit116b9d6ddf2b61186b29f0370234eec9c1bbe306 (patch)
tree7f90a12333274086e33c4e0fabfd96a8e54e6b6c /dbaccess/source/ui/dlg
parentd7ba78e9c7be835a1e2ecdacd25995663e96862f (diff)
Avoid conversions between OUString and OString in VCL
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'dbaccess/source/ui/dlg')
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx2
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.hxx2
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.cxx2
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.cxx2
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.hxx2
-rw-r--r--dbaccess/source/ui/dlg/UserAdmin.cxx2
-rw-r--r--dbaccess/source/ui/dlg/UserAdmin.hxx2
-rw-r--r--dbaccess/source/ui/dlg/UserAdminDlg.cxx2
-rw-r--r--dbaccess/source/ui/dlg/adminpages.cxx2
-rw-r--r--dbaccess/source/ui/dlg/adminpages.hxx2
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.cxx4
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.cxx8
-rw-r--r--dbaccess/source/ui/dlg/dbwiz.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx2
-rw-r--r--dbaccess/source/ui/dlg/detailpages.cxx2
-rw-r--r--dbaccess/source/ui/dlg/detailpages.hxx2
-rw-r--r--dbaccess/source/ui/dlg/dlgattr.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dlgsize.cxx2
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.cxx2
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx2
20 files changed, 24 insertions, 24 deletions
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 0a7364fe60b4..81922a88beec 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -72,7 +72,7 @@ namespace dbaui
using namespace ::dbtools;
using namespace ::svt;
- OConnectionHelper::OConnectionHelper(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs)
+ OConnectionHelper::OConnectionHelper(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OUString& _rId, const SfxItemSet& _rCoreAttrs)
: OGenericAdministrationPage(pPage, pController, _rUIXMLDescription, _rId, _rCoreAttrs)
, m_bUserGrabFocus(false)
, m_pCollection(nullptr)
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.hxx b/dbaccess/source/ui/dlg/ConnectionHelper.hxx
index b4c00548f682..bbcf24783355 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.hxx
@@ -38,7 +38,7 @@ namespace dbaui
bool m_bUserGrabFocus;
public:
- OConnectionHelper(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs);
+ OConnectionHelper(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OUString& _rId, const SfxItemSet& _rCoreAttrs);
virtual ~OConnectionHelper() override;
OUString m_eType; // the type can't be changed in this class, so we hold it as member.
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index 7ff32140e933..e867ba266688 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -128,7 +128,7 @@ namespace dbaui
case ::dbaccess::DST_MYSQL_ODBC:
case ::dbaccess::DST_ODBC:
m_xFT_Connection->set_label(DBA_RES(STR_NAME_OF_ODBC_DATASOURCE));
- m_xConnectionURL->set_help_id( eType == ::dbaccess::DST_MYSQL_ODBC ? OString(HID_DSADMIN_MYSQL_ODBC_DATASOURCE) : OString(HID_DSADMIN_ODBC_DATASOURCE));
+ m_xConnectionURL->set_help_id( eType == ::dbaccess::DST_MYSQL_ODBC ? OUString(HID_DSADMIN_MYSQL_ODBC_DATASOURCE) : OUString(HID_DSADMIN_ODBC_DATASOURCE));
break;
case ::dbaccess::DST_LDAP:
m_xFT_Connection->set_label(DBA_RES(STR_HOSTNAME));
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
index 8f57c24f99eb..33ea535a1dd8 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
@@ -61,7 +61,7 @@ namespace dbaui
return std::make_unique<OConnectionTabPageSetup>(pPage, pController, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, TranslateId(), TranslateId(), STR_COMMONURL);
}
- OConnectionTabPageSetup::OConnectionTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, TranslateId pHelpTextResId, TranslateId pHeaderResId, TranslateId pUrlResId)
+ 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"))
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
index 0039a7160a6e..27b8eab284ae 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
@@ -39,7 +39,7 @@ namespace dbaui
DECL_LINK(OnEditModified, weld::Entry&, void);
public:
- OConnectionTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, TranslateId pHelpTextResId, TranslateId pHeaderResId, TranslateId pUrlResId);
+ OConnectionTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OUString& _rId, const SfxItemSet& _rCoreAttrs, TranslateId pHelpTextResId, TranslateId pHeaderResId, TranslateId pUrlResId);
virtual ~OConnectionTabPageSetup() override;
static std::unique_ptr<OGenericAdministrationPage> CreateDbaseTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet);
diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx
index d7396dc4970f..da6ec80c2763 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.cxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.cxx
@@ -131,7 +131,7 @@ OUserAdmin::OUserAdmin(weld::Container* pPage, weld::DialogController* pControll
m_xUSER->connect_changed(LINK(this, OUserAdmin, ListDblClickHdl));
}
-IMPL_LINK(OUserAdmin, MenuSelectHdl, const OString&, rIdent, void)
+IMPL_LINK(OUserAdmin, MenuSelectHdl, const OUString&, rIdent, void)
{
try
{
diff --git a/dbaccess/source/ui/dlg/UserAdmin.hxx b/dbaccess/source/ui/dlg/UserAdmin.hxx
index 045d8c39806f..76460a8468e7 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.hxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.hxx
@@ -46,7 +46,7 @@ class OUserAdmin final : public OGenericAdministrationPage
// methods
DECL_LINK(ListDblClickHdl, weld::ComboBox&, void);
- DECL_LINK(MenuSelectHdl, const OString&, void);
+ DECL_LINK(MenuSelectHdl, const OUString&, void);
void FillUserNames();
diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.cxx b/dbaccess/source/ui/dlg/UserAdminDlg.cxx
index e623f9945424..b4cf62f3be22 100644
--- a/dbaccess/source/ui/dlg/UserAdminDlg.cxx
+++ b/dbaccess/source/ui/dlg/UserAdminDlg.cxx
@@ -108,7 +108,7 @@ namespace dbaui
m_pImpl->saveChanges(*GetOutputItemSet());
return nRet;
}
- void OUserAdminDlg::PageCreated(const OString& rId, SfxTabPage& _rPage)
+ void OUserAdminDlg::PageCreated(const OUString& rId, SfxTabPage& _rPage)
{
// register ourself as modified listener
static_cast<OGenericAdministrationPage&>(_rPage).SetServiceFactory( m_pImpl->getORB() );
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index 5f0eedbb0496..def0e05fcc87 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -48,7 +48,7 @@ namespace dbaui
{
}
- OGenericAdministrationPage::OGenericAdministrationPage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OString& rId, const SfxItemSet& rAttrSet)
+ OGenericAdministrationPage::OGenericAdministrationPage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OUString& rId, const SfxItemSet& rAttrSet)
: SfxTabPage(pPage, pController, rUIXMLDescription, rId, &rAttrSet)
, m_abEnableRoadmap(false)
, m_pAdminDialog(nullptr)
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx
index de8265751992..63d4a1cbadab 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -94,7 +94,7 @@ namespace dbaui
css::uno::Reference< css::uno::XComponentContext >
m_xORB;
public:
- OGenericAdministrationPage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OString& rId, const SfxItemSet& rAttrSet);
+ OGenericAdministrationPage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OUString& rId, const SfxItemSet& rAttrSet);
/// set a handler which gets called every time something on the page has been modified
void SetModifiedHandler(const Link<OGenericAdministrationPage const *, void>& _rHandler) { m_aModifiedHandler = _rHandler; }
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index 1cf713ce3d23..0770970d1b7e 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -46,7 +46,7 @@ namespace dbaui
struct BooleanSettingDesc
{
std::unique_ptr<weld::CheckButton>& xControl; // the dialog's control which displays this setting
- OString sControlId; // the widget name of the control in the .ui
+ OUString sControlId; // the widget name of the control in the .ui
sal_uInt16 nItemId; // the ID of the item (in an SfxItemSet) which corresponds to this setting
bool bInvertedDisplay; // true if and only if the checkbox is checked when the item is sal_False, and vice versa
bool bOptionalBool; // type is OptionalBool
@@ -410,7 +410,7 @@ namespace dbaui
return nRet;
}
- void AdvancedSettingsDialog::PageCreated(const OString& rId, SfxTabPage& _rPage)
+ void AdvancedSettingsDialog::PageCreated(const OUString& rId, SfxTabPage& _rPage)
{
// register ourself as modified listener
static_cast<OGenericAdministrationPage&>(_rPage).SetServiceFactory( getORB() );
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index 3f8ddcfa3996..a8a1ce1e51bd 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -71,7 +71,7 @@ short ODbAdminDialog::Ok()
// TODO : AR_ERROR is not handled correctly, we always close the dialog here
}
-void ODbAdminDialog::PageCreated(const OString& rId, SfxTabPage& _rPage)
+void ODbAdminDialog::PageCreated(const OUString& rId, SfxTabPage& _rPage)
{
// register ourself as modified listener
static_cast<OGenericAdministrationPage&>(_rPage).SetServiceFactory( getORB() );
@@ -80,7 +80,7 @@ void ODbAdminDialog::PageCreated(const OString& rId, SfxTabPage& _rPage)
SfxTabDialogController::PageCreated(rId, _rPage);
}
-void ODbAdminDialog::addDetailPage(const OString& rPageId, TranslateId pTextId, CreateTabPage pCreateFunc)
+void ODbAdminDialog::addDetailPage(const OUString& rPageId, TranslateId pTextId, CreateTabPage pCreateFunc)
{
AddTabPage(rPageId, DBA_RES(pTextId), pCreateFunc);
}
@@ -142,7 +142,7 @@ void ODbAdminDialog::impl_selectDataSource(const css::uno::Any& _aDataSourceName
case ::dbaccess::DST_USERDEFINE10:
{
OUString aTitle(DBA_RES(STR_PAGETITLE_ADVANCED));
- AddTabPage("user" + OString::number(eType - dbaccess::DST_USERDEFINE1 + 1), aTitle, ODriversSettings::CreateUser);
+ AddTabPage("user" + OUString::number(eType - dbaccess::DST_USERDEFINE1 + 1), aTitle, ODriversSettings::CreateUser);
}
break;
default:
@@ -183,7 +183,7 @@ void ODbAdminDialog::impl_resetPages(const Reference< XPropertySet >& _rxDatasou
::dbaccess::ODsnTypeCollection* pCollection = pCollectionItem->getCollection();
if ( pCollection->determineType(getDatasourceType( *m_xExampleSet )) == ::dbaccess::DST_MYSQL_NATIVE )
{
- OString sMySqlNative("mysqlnative");
+ OUString sMySqlNative("mysqlnative");
AddTabPage(sMySqlNative, DBA_RES(STR_PAGETITLE_CONNECTION), ODriversSettings::CreateMySQLNATIVE);
RemoveTabPage("advanced");
m_sMainPageID = sMySqlNative;
diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx
index fa06535022e0..8d1f737c52c5 100644
--- a/dbaccess/source/ui/dlg/dbwiz.cxx
+++ b/dbaccess/source/ui/dlg/dbwiz.cxx
@@ -218,7 +218,7 @@ std::unique_ptr<BuilderPage> ODbTypeWizDialog::createPage(WizardState _nState)
TranslateId pStringId = STR_PAGETITLE_ADVANCED;
std::unique_ptr<BuilderPage> xPage;
- OString sIdent(OString::number(_nState));
+ OUString sIdent(OUString::number(_nState));
weld::Container* pPageContainer = m_xAssistant->append_page(sIdent);
switch(_nState)
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index d3d4c1dbde16..8bee3588952e 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -460,7 +460,7 @@ std::unique_ptr<BuilderPage> ODbTypeWizDialogSetup::createPage(WizardState _nSta
{
std::unique_ptr<OGenericAdministrationPage> xPage;
- OString sIdent(OString::number(_nState));
+ OUString sIdent(OUString::number(_nState));
weld::Container* pPageContainer = m_xAssistant->append_page(sIdent);
switch(_nState)
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index 8a06d7de1c18..57ae3bd59fd7 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -52,7 +52,7 @@ namespace dbaui
using namespace ::dbtools;
OCommonBehaviourTabPage::OCommonBehaviourTabPage(weld::Container* pPage, weld::DialogController* pController,
- const OUString& rUIXMLDescription, const OString& rId, const SfxItemSet& rCoreAttrs,
+ const OUString& rUIXMLDescription, const OUString& rId, const SfxItemSet& rCoreAttrs,
OCommonBehaviourTabPageFlags nControlFlags)
: OGenericAdministrationPage(pPage, pController, rUIXMLDescription, rId, rCoreAttrs)
, m_nControlFlags(nControlFlags)
diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx
index cd570594afdb..3ebfcff1ef26 100644
--- a/dbaccess/source/ui/dlg/detailpages.hxx
+++ b/dbaccess/source/ui/dlg/detailpages.hxx
@@ -57,7 +57,7 @@ namespace dbaui
public:
virtual bool FillItemSet (SfxItemSet* _rCoreAttrs) override;
- OCommonBehaviourTabPage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OString& rId, const SfxItemSet& _rCoreAttrs, OCommonBehaviourTabPageFlags nControlFlags);
+ OCommonBehaviourTabPage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OUString& rId, const SfxItemSet& _rCoreAttrs, OCommonBehaviourTabPageFlags nControlFlags);
protected:
virtual ~OCommonBehaviourTabPage() override;
diff --git a/dbaccess/source/ui/dlg/dlgattr.cxx b/dbaccess/source/ui/dlg/dlgattr.cxx
index 1df2acc20a77..24a1c4e81c2d 100644
--- a/dbaccess/source/ui/dlg/dlgattr.cxx
+++ b/dbaccess/source/ui/dlg/dlgattr.cxx
@@ -47,7 +47,7 @@ SbaSbAttrDlg::~SbaSbAttrDlg()
{
}
-void SbaSbAttrDlg::PageCreated(const OString& rPageId, SfxTabPage& rTabPage)
+void SbaSbAttrDlg::PageCreated(const OUString& rPageId, SfxTabPage& rTabPage)
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
if (rPageId == "format")
diff --git a/dbaccess/source/ui/dlg/dlgsize.cxx b/dbaccess/source/ui/dlg/dlgsize.cxx
index 544d9577fdd9..be9e96612a83 100644
--- a/dbaccess/source/ui/dlg/dlgsize.cxx
+++ b/dbaccess/source/ui/dlg/dlgsize.cxx
@@ -27,7 +27,7 @@ namespace dbaui
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 ? OString("RowHeightDialog") : OString("ColWidthDialog"))
+ bRow ? OUString("RowHeightDialog") : OUString("ColWidthDialog"))
, m_nPrevValue(nVal)
, m_xMF_VALUE(m_xBuilder->weld_metric_spin_button("value", FieldUnit::CM))
, m_xCB_STANDARD(m_xBuilder->weld_check_button("automatic"))
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index 4c93128482d5..d12602ce2eec 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -409,7 +409,7 @@ namespace dbaui
updateToolbox();
}
- IMPL_LINK(DbaIndexDialog, OnIndexAction, const OString&, rClicked, void)
+ IMPL_LINK(DbaIndexDialog, OnIndexAction, const OUString&, rClicked, void)
{
if (rClicked == "ID_INDEX_NEW")
OnNewIndex();
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 81fa5100d0ef..b54bc8280839 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -482,7 +482,7 @@ void OSQLMessageBox::impl_createStandardButtons( MessBoxStyle _nStyle )
else
aTmp = m_sHelpURL;
- m_xDialog->set_help_id(OUStringToOString(aTmp, RTL_TEXTENCODING_UTF8));
+ m_xDialog->set_help_id(aTmp);
}
void OSQLMessageBox::impl_addDetailsButton()