diff options
-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. |