summaryrefslogtreecommitdiff
path: root/include/svl
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-10-02 12:19:19 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-10-04 19:15:22 -0400
commitb3674c9291a09c4e278a0875b691fc7aaf3f38cd (patch)
tree3f78b48f1e00366f1228f83b136bed8eedff1aaf /include/svl
parent4d076d4ceeb05061b6b0699c19af9ba5ed0fcd00 (diff)
Let's not expose the internal pointer. Define different ID type.
To prevent the string ID's from being used to instantiate string objects, which can mess up shared string object's life cycles. Change-Id: Ibcd9a4fa9f591d5c27a9e1b50bc9f83ae230e86a
Diffstat (limited to 'include/svl')
-rw-r--r--include/svl/stringpool.hxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/svl/stringpool.hxx b/include/svl/stringpool.hxx
index 26785e3d31aa..4436efeb2d81 100644
--- a/include/svl/stringpool.hxx
+++ b/include/svl/stringpool.hxx
@@ -37,6 +37,8 @@ class SVL_DLLPUBLIC StringPool
const CharClass* mpCharClass;
public:
+ typedef sal_uIntPtr StrIdType;
+
StringPool();
StringPool( const CharClass* pCharClass );
@@ -58,9 +60,9 @@ public:
*
* @return unique ID of the string object.
*/
- const rtl_uString* getIdentifier( const OUString& rStr ) const;
+ StrIdType getIdentifier( const OUString& rStr ) const;
- const rtl_uString* getIdentifierIgnoreCase( const OUString& rStr ) const;
+ StrIdType getIdentifierIgnoreCase( const OUString& rStr ) const;
private:
InsertResultType findOrInsert( StrHashType& rPool, const OUString& rStr ) const;