summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@collabora.com>2014-02-17 16:12:57 +0530
committerMuthu Subramanian <sumuthu@collabora.com>2014-02-17 19:17:20 +0530
commit4cf0d8edaf1581c42949ad2cbb40183a2f657ddd (patch)
tree497eac4fbeef1d9cd96627a528813d1a636109f1
parentMore components needed by finalPaper.docx (diff)
downloadcore-4cf0d8edaf1581c42949ad2cbb40183a2f657ddd.tar.gz
core-4cf0d8edaf1581c42949ad2cbb40183a2f657ddd.zip
String cleanups.
Change-Id: Ibebf394d69ed4845d91176727f291187ba35ed34
-rw-r--r--include/rtl/string.hxx2
-rw-r--r--include/rtl/ustring.hxx15
-rw-r--r--sal/util/sal.map7
3 files changed, 23 insertions, 1 deletions
diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index 24bb98052e40..5eb4fcf6ee1e 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -898,6 +898,8 @@ public:
@return a hash code value of the string data
@see hashCode() for simple hashes
+
+ @since LibreOffice 4.3
*/
sal_uInt64 hashCode64() const SAL_THROW(())
{
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index f1a5f4aeb296..9f9a9565f18f 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -1227,6 +1227,21 @@ public:
}
/**
+ Returns a 64bit hash of the string data.
+ This hashes the entire data, while hashCode would do sampling for larger string sizes.
+
+ @return a hash code value of the string data
+
+ @see hashCode() for simple hashes
+
+ @since LibreOffice 4.3
+ */
+ sal_uInt64 hashCode64() const SAL_THROW(())
+ {
+ return rtl_ustr_hashCode64_WithLength( pData->buffer, pData->length );
+ }
+
+ /**
Returns a hashcode for this string.
@return a hash code value for this object.
diff --git a/sal/util/sal.map b/sal/util/sal.map
index 470da31adf78..074eb7b96063 100644
--- a/sal/util/sal.map
+++ b/sal/util/sal.map
@@ -221,7 +221,6 @@ UDK_3_0_0 {
rtl_str_shortenedCompareIgnoreAsciiCase_WithLength;
rtl_str_hashCode;
rtl_str_hashCode_WithLength;
- rtl_str_hashCode64_WithLength;
rtl_str_indexOfChar;
rtl_str_indexOfChar_WithLength;
rtl_str_indexOfStr;
@@ -671,6 +670,12 @@ LIBO_UDK_4.2 { # symbols available in >= LibO 4.2
rtl_ustr_toUInt32;
} LIBO_UDK_4.1;
+LIBO_UDK_4.3 { #symbols available in >= LibO 4.3
+ global:
+ rtl_str_hashCode64_WithLength;
+ rtl_ustr_hashCode64_WithLength;
+} LIBO_UDK_4.2;
+
PRIVATE_1.0 {
global:
osl_detail_ObjectRegistry_storeAddresses;