diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-07-01 10:33:48 -0500 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-07-02 07:31:30 +0000 |
commit | 6a08067902ddc0ec61a7c7b4b0035b303f643a50 (patch) | |
tree | cd49d1824cd169d9d224925b836eaa70de27414e /forms | |
parent | 82a1d75ee59c46e6bb361b98c520cc4eff2e770c (diff) |
OUString convertion for unotools
Change-Id: Ifae7f344e3827875e32afa3cda23c771f5735707
Reviewed-on: https://gerrit.libreoffice.org/4659
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/xforms/computedexpression.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/forms/source/xforms/computedexpression.cxx b/forms/source/xforms/computedexpression.cxx index 184d91c61d96..306dbd98bb12 100644 --- a/forms/source/xforms/computedexpression.cxx +++ b/forms/source/xforms/computedexpression.cxx @@ -92,14 +92,13 @@ bool ComputedExpression::_checkExpression( const sal_Char* pExpression ) const // call RegExp engine SearchOptions aSearchOptions; aSearchOptions.algorithmType = SearchAlgorithms_REGEXP; - aSearchOptions.searchString = String( pExpression, RTL_TEXTENCODING_ASCII_US ); + aSearchOptions.searchString = OUString( pExpression, strlen(pExpression), RTL_TEXTENCODING_ASCII_US ); utl::TextSearch aTextSearch( aSearchOptions ); - xub_StrLen nLength = - static_cast<xub_StrLen>( msExpression.getLength() ); - xub_StrLen nStart = 0; - xub_StrLen nEnd = nLength; - int nSearch = aTextSearch.SearchFrwrd( msExpression, &nStart, &nEnd ); + sal_Int32 nLength = msExpression.getLength(); + sal_Int32 nStart = 0; + sal_Int32 nEnd = nLength; + int nSearch = aTextSearch.SearchForward( msExpression, &nStart, &nEnd ); // our expression is static only if 1) we found our regexp, and 2) // the regexp goes from beginning to end. |