diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-02 13:31:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-03 18:32:17 +0200 |
commit | cc6e54736f489ec44840276e2a88b343f76352a4 (patch) | |
tree | ee50262372b32bb7dbf30677383f2aea7de16035 /svtools | |
parent | da86bfd89e529e787da0bbb3e3150c1f5d4e0dfd (diff) |
replace createFromAscii with OUString literals in svtools
Change-Id: I51eb85b7beb850044d9e092989b7d34994588551
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167046
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/dialogs/addresstemplate.cxx | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 8c5b781cf2cb..1da175a6452f 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -249,10 +249,9 @@ namespace svt protected: css::uno::Any getProperty(const OUString& _rLocalName) const; - OUString getStringProperty(const char* _pLocalName) const; OUString getStringProperty(const OUString& _rLocalName) const; - void setStringProperty(const char* _pLocalName, const OUString& _rValue); + void setStringProperty(const OUString& _pLocalName, const OUString& _rValue); public: AssignmentPersistentData(); @@ -328,17 +327,9 @@ void AssignmentPersistentData::ImplCommit() } - OUString AssignmentPersistentData::getStringProperty(const char* _pLocalName) const + void AssignmentPersistentData::setStringProperty(const OUString& _pLocalName, const OUString& _rValue) { - OUString sReturn; - getProperty(OUString::createFromAscii(_pLocalName)) >>= sReturn; - return sReturn; - } - - - void AssignmentPersistentData::setStringProperty(const char* _pLocalName, const OUString& _rValue) - { - Sequence< OUString > aNames { OUString::createFromAscii(_pLocalName) }; + Sequence< OUString > aNames { _pLocalName }; Sequence< Any > aValues{ Any(_rValue) }; PutProperties(aNames, aValues); } @@ -391,25 +382,25 @@ void AssignmentPersistentData::ImplCommit() OUString AssignmentPersistentData::getDatasourceName() const { - return getStringProperty( "DataSourceName" ); + return getStringProperty( u"DataSourceName"_ustr ); } OUString AssignmentPersistentData::getCommand() const { - return getStringProperty( "Command" ); + return getStringProperty( u"Command"_ustr ); } void AssignmentPersistentData::setDatasourceName(const OUString& _rName) { - setStringProperty( "DataSourceName", _rName ); + setStringProperty( u"DataSourceName"_ustr, _rName ); } void AssignmentPersistentData::setCommand(const OUString& _rCommand) { - setStringProperty( "Command", _rCommand ); + setStringProperty( u"Command"_ustr, _rCommand ); } |