diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-01 23:44:10 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-02 09:54:17 +0100 |
commit | 088e175776fe0fa37c859b68278f5d4304d7ddd6 (patch) | |
tree | 98e0f63c29d1711c567985856deac2e5becad518 /sal | |
parent | cd9038dd398db0710273e4be5fb5310ec2f2c642 (diff) |
add a public __sal_NoAcquire to OString to match OUString's
Diffstat (limited to 'sal')
-rw-r--r-- | sal/inc/rtl/string.hxx | 10 | ||||
-rw-r--r-- | sal/inc/rtl/ustring.hxx | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx index 9183d0d892d0..96ca40682bbb 100644 --- a/sal/inc/rtl/string.hxx +++ b/sal/inc/rtl/string.hxx @@ -117,6 +117,16 @@ public: rtl_string_acquire( pData ); } + /** New string from OString data without acquiring it. Takeover of ownership. + + @param str a OString data. + @param dummy SAL_NO_ACQUIRE to distinguish from other ctors + */ + inline OString( rtl_String * str, __sal_NoAcquire ) SAL_THROW(()) + { + pData = str; + } + /** New string from a single character. diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx index 3cdf121f1526..ed268d9633ae 100644 --- a/sal/inc/rtl/ustring.hxx +++ b/sal/inc/rtl/ustring.hxx @@ -117,6 +117,7 @@ public: pData = str; rtl_uString_acquire( pData ); } + /** New OUString from OUString data without acquiring it. Takeover of ownership. @param str @@ -127,7 +128,6 @@ public: inline OUString( rtl_uString * str, __sal_NoAcquire ) SAL_THROW( () ) { pData = str; } - /** New string from a single Unicode character. |