diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-10-08 15:18:16 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-10-08 15:48:12 -0400 |
commit | 3786609a153b7fa38393eb646557d241af2d3060 (patch) | |
tree | d2d33086cf318229a7893dc0958630834fc1ec16 /include | |
parent | a7ff6e0a3fc5fccad33f06ae9d4ec7019f9ae156 (diff) |
No more getIdentifier*() calls because they are not efficient.
They shall never be used.
Change-Id: I019c88b1511a67175d782777cd41e0ec0434f497
Diffstat (limited to 'include')
-rw-r--r-- | include/editeng/editobj.hxx | 4 | ||||
-rw-r--r-- | include/svl/sharedstring.hxx | 3 | ||||
-rw-r--r-- | include/svl/sharedstringpool.hxx | 22 |
3 files changed, 5 insertions, 24 deletions
diff --git a/include/editeng/editobj.hxx b/include/editeng/editobj.hxx index 3d1cccaed7b0..3f78126a75e3 100644 --- a/include/editeng/editobj.hxx +++ b/include/editeng/editobj.hxx @@ -51,6 +51,7 @@ struct Section; namespace svl { +class SharedString; class SharedStringPool; } @@ -85,8 +86,7 @@ public: */ void NormalizeString( svl::SharedStringPool& rPool ); - bool GetStringIDs( const svl::SharedStringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const; - bool GetStringIDsIgnoreCase( const svl::SharedStringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const; + std::vector<svl::SharedString> GetSharedStrings() const; const SfxItemPool* GetPool() const; sal_uInt16 GetUserType() const; // For OutlinerMode, it can however not save in compatible format diff --git a/include/svl/sharedstring.hxx b/include/svl/sharedstring.hxx index b2879a8aa463..1e16c5373de2 100644 --- a/include/svl/sharedstring.hxx +++ b/include/svl/sharedstring.hxx @@ -29,6 +29,7 @@ public: SharedString& operator= ( const SharedString& r ); bool operator== ( const SharedString& r ) const; + bool operator!= ( const SharedString& r ) const; OUString getString() const; @@ -37,6 +38,8 @@ public: rtl_uString* getDataIgnoreCase(); const rtl_uString* getDataIgnoreCase() const; + + bool isValid() const; }; } diff --git a/include/svl/sharedstringpool.hxx b/include/svl/sharedstringpool.hxx index 35ce28e6a6ee..c1b76981f229 100644 --- a/include/svl/sharedstringpool.hxx +++ b/include/svl/sharedstringpool.hxx @@ -51,28 +51,6 @@ public: SharedString intern( const OUString& rStr ); /** - * Get a unique ID of string object that's expected to be in the shared - * string pool. If the string is not in the pool, NULL is returned. The - * ID obtained by this method can be used for case sensitive comparison. - * - * @param rStr string object to get the ID of. - * - * @return unique ID of the string object. - */ - sal_uIntPtr getIdentifier( const OUString& rStr ) const; - - /** - * Get a unique ID of string object for case insensitive comparison. The - * string object is expected to be in the pool. - * - * @param rStr string object to get the ID of. - * - * @return unique ID of the string object usable for case insensitive - * comparison. - */ - sal_uIntPtr getIdentifierIgnoreCase( const OUString& rStr ) const; - - /** * Go through all string objects in the pool, and clear those that are no * longer used outside of the pool. */ |