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 /basic | |
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 'basic')
-rw-r--r-- | basic/source/basmgr/basmgr.cxx | 2 | ||||
-rw-r--r-- | basic/source/classes/errobject.cxx | 2 | ||||
-rw-r--r-- | basic/source/classes/image.cxx | 31 | ||||
-rw-r--r-- | basic/source/comp/buffer.cxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/runtime.cxx | 4 |
5 files changed, 8 insertions, 33 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 8f52b1fce43b..d4bcac2afbb5 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -883,7 +883,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase { // Search lib in path OUString aSearchFile = pInfo->GetRelStorageName(); - String aSearchFileOldFormat(aSearchFile); + OUString aSearchFileOldFormat(aSearchFile); SvtPathOptions aPathCFG; if( aPathCFG.SearchFile( aSearchFileOldFormat, SvtPathOptions::PATH_BASIC ) ) { diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx index 139939d984ab..4043549be109 100644 --- a/basic/source/classes/errobject.cxx +++ b/basic/source/classes/errobject.cxx @@ -81,7 +81,7 @@ ErrObject::getNumber() throw (uno::RuntimeException) void SAL_CALL ErrObject::setNumber( ::sal_Int32 _number ) throw (uno::RuntimeException) { - GetSbData()->pInst->setErrorVB( _number, String() ); + GetSbData()->pInst->setErrorVB( _number, OUString() ); OUString _description = GetSbData()->pInst->GetErrorMsg(); setData( uno::makeAny( _number ), uno::Any(), uno::makeAny( _description ), uno::Any(), uno::Any() ); } diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index 8a4412d1b5c5..162fcd470dfb 100644 --- a/basic/source/classes/image.cxx +++ b/basic/source/classes/image.cxx @@ -19,6 +19,7 @@ #include <tools/stream.hxx> #include <tools/tenccvt.hxx> +#include <osl/thread.h> #include <basic/sbx.hxx> #include "sb.hxx" #include <string.h> // memset() etc @@ -120,7 +121,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion ) { r >> nVersion >> nCharSet >> lDimBase >> nFlags >> nReserved1 >> nReserved2 >> nReserved3; - eCharSet = (CharSet) nCharSet; + eCharSet = nCharSet; eCharSet = GetSOLoadTextEncoding( eCharSet ); bBadVer = ( nVersion > B_CURVERSION ); nDimBase = (sal_uInt16) lDimBase; @@ -286,34 +287,8 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer ) if( !aOUSource.isEmpty() && SbiGood( r ) ) { nPos = SbiOpenRecord( r, B_SOURCE, 1 ); - OUString aTmp; - sal_Int32 nLen = aOUSource.getLength(); - const sal_Int32 nMaxUnitSize = STRING_MAXLEN - 1; - if( nLen > STRING_MAXLEN ) - { - aTmp = aOUSource.copy( 0, nMaxUnitSize ); - } - else - { - aTmp = aOUSource; - } - r.WriteUniOrByteString( aTmp, eCharSet ); + r.WriteUniOrByteString( aOUSource, eCharSet ); SbiCloseRecord( r, nPos ); - - if( nLen > STRING_MAXLEN ) - { - sal_Int32 nRemainingLen = nLen - nMaxUnitSize; - sal_uInt16 nUnitCount = sal_uInt16( (nRemainingLen + nMaxUnitSize - 1) / nMaxUnitSize ); - nPos = SbiOpenRecord( r, B_EXTSOURCE, nUnitCount ); - for( sal_uInt16 i = 0 ; i < nUnitCount ; i++ ) - { - sal_Int32 nCopyLen = (nRemainingLen > nMaxUnitSize) ? nMaxUnitSize : nRemainingLen; - OUString aTmp2 = aOUSource.copy( (i+1) * nMaxUnitSize, nCopyLen ); - nRemainingLen -= nCopyLen; - r.WriteUniOrByteString( aTmp2, eCharSet ); - } - SbiCloseRecord( r, nPos ); - } } // Binary data? if( pCode && SbiGood( r ) ) diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx index b08d352eb318..fa09ef9c144b 100644 --- a/basic/source/comp/buffer.cxx +++ b/basic/source/comp/buffer.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - +#include <osl/thread.h> #include "buffer.hxx" #include "sbcomp.hxx" diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 4c2ffa97e661..ed731f1c29f0 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -1583,8 +1583,8 @@ void SbiRuntime::StepLIKE() } SbxVariable* pRes = new SbxVariable; utl::TextSearch aSearch(aSearchOpt); - sal_uInt16 nStart=0, nEnd=value.getLength(); - int bRes = aSearch.SearchFrwrd(value, &nStart, &nEnd); + sal_Int32 nStart=0, nEnd=value.getLength(); + int bRes = aSearch.SearchForward(value, &nStart, &nEnd); pRes->PutBool( bRes != 0 ); PushVar( pRes ); |