[Libreoffice-commits] .: sal/inc
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Jun 20 03:12:43 PDT 2011
sal/inc/rtl/strbuf.hxx | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
New commits:
commit c033fb056371181c178f5b53d715c209436bfece
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jun 19 22:59:50 2011 +0100
add an extra ctor that takes char str+len
diff --git a/sal/inc/rtl/strbuf.hxx b/sal/inc/rtl/strbuf.hxx
index 21ff603..47f2c0b 100644
--- a/sal/inc/rtl/strbuf.hxx
+++ b/sal/inc/rtl/strbuf.hxx
@@ -135,6 +135,25 @@ public:
rtl_stringbuffer_newFromStr_WithLength( &pData, value.getStr(), value.getLength() );
}
+ /**
+ Constructs a string buffer so that it represents the same
+ sequence of characters as the string argument.
+
+ The initial
+ capacity of the string buffer is <code>16</code> plus length
+
+ @param value a character array.
+ @param length the number of character which should be copied.
+ The character array length must be greater or
+ equal than this value.
+ */
+ OStringBuffer(const sal_Char * value, sal_Int32 length)
+ : pData(NULL)
+ , nCapacity( length + 16 )
+ {
+ rtl_stringbuffer_newFromStr_WithLength( &pData, value, length );
+ }
+
/** Assign to this a copy of value.
*/
OStringBuffer& operator = ( const OStringBuffer& value )
More information about the Libreoffice-commits
mailing list