diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-08-28 21:46:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-08-29 09:45:16 +0000 |
commit | 9ae319f938de37a9de1e8a8853af106b413a4bc7 (patch) | |
tree | a0f339f0deb8cfc8fd13793d94396c2934fc28f1 /include/svtools/collatorres.hxx | |
parent | 01c41fa9113272644ea81f2d51bfea07eb0954ed (diff) |
coverity#1371317 avoid unnecessary copies
and coverity#1371211
Change-Id: I65e277c4af70a86f1513749de4eb116d929e858f
Reviewed-on: https://gerrit.libreoffice.org/28448
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/svtools/collatorres.hxx')
-rw-r--r-- | include/svtools/collatorres.hxx | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/include/svtools/collatorres.hxx b/include/svtools/collatorres.hxx index 762ea7b439fe..5b41b61cc9ad 100644 --- a/include/svtools/collatorres.hxx +++ b/include/svtools/collatorres.hxx @@ -22,19 +22,33 @@ #include <svtools/svtdllapi.h> #include <rtl/ustring.hxx> +#include <vector> class CollatorResourceData; class SVT_DLLPUBLIC CollatorResource { +private: + // wrapper for locale specific translations data of collator algorithm + class CollatorResourceData + { + friend class CollatorResource; private: - - CollatorResourceData *mp_Data; - + OUString m_aName; + OUString m_aTranslation; public: - CollatorResource(); - ~CollatorResource(); - const OUString& GetTranslation (const OUString& r_Algorithm); + CollatorResourceData(const OUString& rAlgorithm, const OUString& rTranslation) + : m_aName(rAlgorithm) + , m_aTranslation(rTranslation) + { + } + const OUString& GetAlgorithm() const { return m_aName; } + const OUString& GetTranslation() const { return m_aTranslation; } + }; + std::vector<CollatorResourceData> m_aData; +public: + CollatorResource(); + const OUString& GetTranslation(const OUString& rAlgorithm); }; #endif // INCLUDED_SVTOOLS_COLLATORRES_HXX |