diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-19 13:18:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-05 09:39:11 +0200 |
commit | 14cfff500e93f0d6cbf8412065feea85c01ea81d (patch) | |
tree | 76e3fb8fbf2b0d8a12c8406d8cf994ea6a37aaff /connectivity/source/inc | |
parent | d924ce30e0ca260682bd2aed192b8b1b2ca3e7c0 (diff) |
Pass context and resource string down to boost::locale separately
because this is often on a hot path, and we can avoid the splitting and
joining of strings like this.
Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/inc')
-rw-r--r-- | connectivity/source/inc/TConnection.hxx | 2 | ||||
-rw-r--r-- | connectivity/source/inc/dbase/DIndex.hxx | 2 | ||||
-rw-r--r-- | connectivity/source/inc/dbase/DTable.hxx | 2 | ||||
-rw-r--r-- | connectivity/source/inc/resource/sharedresources.hxx | 12 |
4 files changed, 9 insertions, 9 deletions
diff --git a/connectivity/source/inc/TConnection.hxx b/connectivity/source/inc/TConnection.hxx index 0e9c4c22e750..246e968b8a32 100644 --- a/connectivity/source/inc/TConnection.hxx +++ b/connectivity/source/inc/TConnection.hxx @@ -61,7 +61,7 @@ namespace connectivity rtl_TextEncoding getTextEncoding() const { return m_nTextEncoding; } const OUString& getURL() const { return m_sURL; } void setURL(const OUString& _rsUrl) { m_sURL = _rsUrl; } - void throwGenericSQLException(const char* pErrorResourceId, const css::uno::Reference< css::uno::XInterface>& _xContext); + void throwGenericSQLException(TranslateId pErrorResourceId, const css::uno::Reference< css::uno::XInterface>& _xContext); const SharedResources& getResources() const { return m_aResources;} void setConnectionInfo(const css::uno::Sequence< css::beans::PropertyValue >& _aInfo) { m_aConnectionInfo = _aInfo; } diff --git a/connectivity/source/inc/dbase/DIndex.hxx b/connectivity/source/inc/dbase/DIndex.hxx index 3c5374f298e2..12d7574e4b28 100644 --- a/connectivity/source/inc/dbase/DIndex.hxx +++ b/connectivity/source/inc/dbase/DIndex.hxx @@ -81,7 +81,7 @@ namespace connectivity::dbase OUString getCompletePath() const; void closeImpl(); // Closes and kills the index file and throws an error - void impl_killFileAndthrowError_throw(const char* pErrorId, const OUString& _sFile); + void impl_killFileAndthrowError_throw(TranslateId pErrorId, const OUString& _sFile); protected: virtual ~ODbaseIndex() override; public: diff --git a/connectivity/source/inc/dbase/DTable.hxx b/connectivity/source/inc/dbase/DTable.hxx index c41ee9f7e9e1..79048b56d96f 100644 --- a/connectivity/source/inc/dbase/DTable.hxx +++ b/connectivity/source/inc/dbase/DTable.hxx @@ -130,7 +130,7 @@ namespace connectivity::dbase /// @throws css::container::ElementExistException /// @throws css::uno::RuntimeException void renameImpl( const OUString& newName ); - void throwInvalidColumnType(const char* pErrorId, const OUString& _sColumnName); + void throwInvalidColumnType(TranslateId pErrorId, const OUString& _sColumnName); protected: virtual void FileClose() override; diff --git a/connectivity/source/inc/resource/sharedresources.hxx b/connectivity/source/inc/resource/sharedresources.hxx index 8b4f3f98899d..0c439cdf24e3 100644 --- a/connectivity/source/inc/resource/sharedresources.hxx +++ b/connectivity/source/inc/resource/sharedresources.hxx @@ -22,7 +22,7 @@ #include <rtl/ustring.hxx> #include <vector> #include <connectivity/dbtoolsdllapi.hxx> - +#include <unotools/resmgr.hxx> namespace connectivity { @@ -47,7 +47,7 @@ namespace connectivity */ OUString getResourceString( - const char* pResId + TranslateId pResId ) const; /** loads a string from the shared resource file, and replaces @@ -65,7 +65,7 @@ namespace connectivity */ OUString getResourceStringWithSubstitution( - const char* pResId, + TranslateId pResId, const char* _pAsciiPatternToReplace, const OUString& _rStringToSubstitute ) const; @@ -89,7 +89,7 @@ namespace connectivity */ OUString getResourceStringWithSubstitution( - const char* pResId, + TranslateId pResId, const char* _pAsciiPatternToReplace1, const OUString& _rStringToSubstitute1, const char* _pAsciiPatternToReplace2, @@ -119,7 +119,7 @@ namespace connectivity */ OUString getResourceStringWithSubstitution( - const char* pResId, + TranslateId pResId, const char* _pAsciiPatternToReplace1, const OUString& _rStringToSubstitute1, const char* _pAsciiPatternToReplace2, @@ -138,7 +138,7 @@ namespace connectivity @return the string from the resource file, with applied string substitution */ - OUString getResourceStringWithSubstitution( const char* pResId, + OUString getResourceStringWithSubstitution( TranslateId pResId, const std::vector< std::pair<const char* , OUString > >& _rStringToSubstitutes) const; }; |