diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2022-01-05 22:22:52 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2022-01-06 10:27:31 +0100 |
commit | 470d1be4ec5a3a5a0aba8febda06600ea39852c5 (patch) | |
tree | dfe450a212bb1327f09accc071ff9b77c69821de /dbaccess/source/ui/dlg/adminpages.cxx | |
parent | d84c06577f3198d6c6bd05176429724897d918e6 (diff) |
tdf#68341: trim some variables passed on Base wizard
Here is a git grep -n fillString:
dbaccess/source/ui/dlg/ConnectionPage.cxx:232: fillString(*_rSet,m_xJavaDriver.get(), DSID_JDBCDRIVERCLASS, bChangedSomething);
dbaccess/source/ui/dlg/ConnectionPage.cxx:235: fillString(*_rSet,m_xConnectionURL.get(), DSID_CONNECTURL, bChangedSomething);
dbaccess/source/ui/dlg/ConnectionPageSetup.cxx:134: fillString(*_rSet,m_xConnectionURL.get(), DSID_CONNECTURL, bChangedSomething);
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:144: fillString(*_rSet,m_xETBaseDN.get(),DSID_CONN_LDAP_BASEDN, bChangedSomething);
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:416: fillString(*_rSet,m_xETDriverClass.get(),DSID_JDBCDRIVERCLASS,bChangedSomething);
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:417: fillString(*_rSet,m_xETHostname.get(),DSID_CONN_HOSTNAME,bChangedSomething);
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:418: fillString(*_rSet,m_xETDatabasename.get(),DSID_DATABASENAME,bChangedSomething);
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:531: fillString(*_rSet,m_xETDriverClass.get(),DSID_JDBCDRIVERCLASS,bChangedSomething);
dbaccess/source/ui/dlg/admincontrols.cxx:117: OGenericAdministrationPage::fillString( *_rSet, m_xHostName.get(), DSID_CONN_HOSTNAME, bChangedSomething );
dbaccess/source/ui/dlg/admincontrols.cxx:118: OGenericAdministrationPage::fillString( *_rSet, m_xDatabaseName.get(), DSID_DATABASENAME, bChangedSomething );
dbaccess/source/ui/dlg/admincontrols.cxx:121: OGenericAdministrationPage::fillString( *_rSet, m_xSocket.get(), DSID_CONN_SOCKET, bChangedSomething );
dbaccess/source/ui/dlg/admincontrols.cxx:123: OGenericAdministrationPage::fillString( *_rSet, m_xNamedPipe.get(), DSID_NAMED_PIPE, bChangedSomething );
dbaccess/source/ui/dlg/adminpages.cxx:219: void OGenericAdministrationPage::fillString(SfxItemSet& _rSet, const weld::Entry* pEdit, sal_uInt16 _nID, bool& _bChangedSomething)
dbaccess/source/ui/dlg/adminpages.cxx:227: void OGenericAdministrationPage::fillString(SfxItemSet& _rSet, const dbaui::OConnectionURLEdit* pEdit, sal_uInt16 _nID, bool& _bChangedSomething)
dbaccess/source/ui/dlg/adminpages.hxx:218: static void fillString(SfxItemSet& _rSet,const weld::Entry* pEdit,sal_uInt16 _nID, bool& _bChangedSomething);
dbaccess/source/ui/dlg/adminpages.hxx:219: static void fillString(SfxItemSet& _rSet,const dbaui::OConnectionURLEdit* pEdit,sal_uInt16 _nID, bool& _bChangedSomething);
dbaccess/source/ui/dlg/advancedsettings.cxx:351: fillString( *_rSet, m_xAutoIncrement.get(), DSID_AUTOINCREMENTVALUE, bChangedSomething );
dbaccess/source/ui/dlg/advancedsettings.cxx:353: fillString( *_rSet, m_xAutoRetrieving.get(), DSID_AUTORETRIEVEVALUE, bChangedSomething );
dbaccess/source/ui/dlg/detailpages.cxx:146: fillString(*_rSet,m_xOptions.get(),DSID_ADDITIONALOPTIONS,bChangedSomething);
dbaccess/source/ui/dlg/detailpages.cxx:303: fillString(*_rSet,m_xEDHostname.get(),DSID_CONN_HOSTNAME,bChangedSomething);
dbaccess/source/ui/dlg/detailpages.cxx:406: fillString(*_rSet,m_xEDDriverClass.get(),DSID_JDBCDRIVERCLASS,bChangedSomething);
dbaccess/source/ui/dlg/detailpages.cxx:407: fillString(*_rSet,m_xEDHostname.get(),DSID_CONN_HOSTNAME,bChangedSomething);
dbaccess/source/ui/dlg/detailpages.cxx:408: fillString(*_rSet,m_xEDSocket.get(),DSID_CONN_SOCKET,bChangedSomething);
dbaccess/source/ui/dlg/detailpages.cxx:608: fillString(*_rSet,m_xETBaseDN.get(),DSID_CONN_LDAP_BASEDN,bChangedSomething);
So I don't think that trimming these may be harmful.
Now we could also add a boolean fillString to indicated if a trim is needed
but does it worth it?
Change-Id: I6fa841a0c062d4b81a09549cbe865fd627d070cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128029
Tested-by: Jenkins
Reviewed-by: Lionel Mamane <lionel@mamane.lu>
Diffstat (limited to 'dbaccess/source/ui/dlg/adminpages.cxx')
-rw-r--r-- | dbaccess/source/ui/dlg/adminpages.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 9806c3d7199a..5f0eedbb0496 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -220,7 +220,7 @@ namespace dbaui { if (pEdit && pEdit->get_value_changed_from_saved()) { - _rSet.Put(SfxStringItem(_nID, pEdit->get_text())); + _rSet.Put(SfxStringItem(_nID, pEdit->get_text().trim())); _bChangedSomething = true; } } @@ -228,7 +228,7 @@ namespace dbaui { if (pEdit && pEdit->get_value_changed_from_saved()) { - _rSet.Put(SfxStringItem(_nID, pEdit->GetText())); + _rSet.Put(SfxStringItem(_nID, pEdit->GetText().trim())); _bChangedSomething = true; } } |