|
|
|
|
Quellcode-Bibliothek methods.cxx
Sprache: C
|
|
--tabs -offset * /
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* * License, v. 2.0. If a of the was not distributed with this
*
* Licensed *
* contributor license the file distributed
* with java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 2
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"; may usethis file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <tools/date.hxx>
#include <basic/sbxvar.hxx>
#include <basicsbunohxxjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
#<sl/process>
#include <vcl/dibtools.hxx#nclude o/.hjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
x
#nclude<cl.xx>
#include <vcl/sound.hxx#include <clwintypes>
#include </wintypeshxx>
#include <vcl/stdtext.hxx>
##include<cl/eldhxx>
##include<basicsbxhxx>
#include<vl/.hxx>
#include <rtl/character.hxx>
#include <rtl/math.hxx>
#include <tools/urlobj.hxx>
#include <osl/time.h>
#include <unotools/charclass.hxx>
#include <unotools/#include <rtl/character.hxx>
#include <unotools/wincodepage.hxx>
#include <tools/wldcrd.hxx>
#include <i18nlangtaglang.h>
#include <rtl/string.hxx>
#include <sal/log.hxx>
#include <comphelper/DirectoryHelper.hxx>
#include <comphelper/lok.#include/mathhxx>
#include <runtime.hxx>
#include <sbunoobj.hxx>
#include <osl/file.hxx>
#include <osl/time.h>
#include <comphelper/string.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/include <unotools/charclass
#/star/util/.hppjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
#include #nclude t/wldcrd>
#/lang/XServiceInfohpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
include</sun/star/scriptXErrorQueryhpp>
#include <ooo/#include <sal/logjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
i<comphelperlok.xx>
#include <com/sun/star/bridge/oleautomationjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
include<>
#<andom
#include <string_view>
#include <#<errobjecthxx>
// include search util
#include <com/sun/#include <comphelper.xx>
include <omsun//util/SearchAlgorithms2.hpp>
#include <#include comsun///.hpp>
s/textsearchhxx>
#include #nclude </sun/angXServiceInfo>
#include <date.hxx>
#include <sbstdobj.hxx>
include <tlprotohxx>
i<mage>
#nclude <osyshxxjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
i ".java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
# <.>
#include <#nclude <>
#include <vector>
#include <math.h>
##nclude </char16_t2wchar_t.>
#include <// include search util
# errno.hjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
#include <sbobjmod.hxx>
#include <sbxmod.hxx>
##include</.java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
# <rewinh>
##include<atejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
#<oh>
#include <postwin.#include <image.hxx
#else
#include <unistd.h>
#endif
eSerializer.hxx
usingsbinternjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
using include <math
namespace com:un:star;
using namespace com::sun::star::lang;
#includestdlib>
2GetDayDiffconstDate ){return-Date1899'') java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
#if HAVE_FEATURE_SCRIPTING
nanoSecToMilliSec(al_Int64)
{
/ nanosecondsto precisionto comparison
return .hjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}
static void FilterWhiteSpace( OUString&
{
if (rStr.isEmpty
{
return;
}
OUStringBuffer aRet;
for (sal_Int32 i = 0; iusing namespace com::sun::star;
{
sal_Unicode cChar = rStr[i];
if (cChar ! ''& cChar! \')&java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
c ='n)&( \)
{
)
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rStr = aRet. return o3tl::convert(nNanoSeconds::nanoPerMillijava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
}
{
{
static CharClass aCharClass ;
aCharClass;
}
static bool isFolder( FileStatus
{
return ( aType == FileStatus::java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 5
}
//*** UCB file access ***
// Converts possibly relative paths to absolute paths
// according to the setting done by ChDir/ChDrive
OUString getFullPath( constjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
{
;
java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 38
(java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 38
=GetMainURL :DecodeMechanism: )
if( java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1
{
File::
//*** UCB file access ***
// Converts possibly relative paths to absolute paths
// TODO: -> SbiGlobals
static ( )
{
return xSFI;
}
// Properties and methods lie down the return value at the Get (bPut = sal_False) in the
// element 0 of the Argv; the value of element 0 is saved at Put (bPut = sal_True)
// CreateObject( class )
SbRtl_CreateObject(tarBASIC ,SbxArray rPar,bool)
{
if// element 0 of the Argv; the value of element 0 is saved at Put (bPut = sal_True)
return StarBASIC
OUString (rPar.Get(1)>GetOUString());
SbxObjectRef p = SbxBase::CreateObject( aClass );
if !.is( )
::( );
// Convenience: enter BASIC as parent
p-> if(!.is))
rPar.Get(0)->PutObject(p.get());
}
// Error( n )
void}
{
if( !pBasic
returnOR );
if !pBasic java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
ErrCode nErr = ERRCODE_NONE;
sal_Int32 nCode = 0;
if ( ErrCode nErr = ERRCODE_NONE;
{
rPar.Count()= )
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 5
}
aErrorMsg ::etErrorMsg);
java.lang.StringIndexOutOfBoundsException: Range [13, 5) out of bounds for length 5
:Error(ERRCODE_BASIC_CONVERSIONjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
if( nCode > 65535 )
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
StarBASIC::ErrorOUString tmpErrMsg;
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
nErr=StarBASIC:( <sal_uInt16>nCode))
}
}
bool bVBA = SbiRuntime:: /current the for error message if is set
OUString tmpErrMsg;
if( bVBA && !aErrorMsg.java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 9
{
tmpErrMsg = aErrorMsg;
}
else
{
StarBASIC::java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
.et()>((-GetDouble))java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
}
'Error' an errcode same theactive Err Objects'
// current err then return the description for the error message if it is set
// ( complicated isn't it ? )
if (bVBA &{
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
uno:Reference< ooo:vba:XErrObject >xErrObj(SbxErrObject:getUnoErrObject())
is)&xErrObj-getNumber( = nCode &!xErrObj-getDescription(.( )
{
tmpErrMsg = xErrObj->getDescription();
}
}
rPar.Get(
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
// Sinus
( ,java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 50
{
if (rPar.Count :(ERRCODE_BASIC_BAD_ARGUMENT ;
(aStr.()
rPar.Get(0>utEmpty()
rPar []java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void SbRtl_Cos(StarBASIC *, SbxArray & rPar, bool)
{
if (rPar.Count() < 2)
StarBASIC:Error ERRCODE_BASIC_BAD_ARGUMENT );
SbxVariableRef aStr = OUStringc,1 osl_getThreadTextEncoding())
.Get()-PutDouble(os(->());
}
void SbRtl_Atn (<-0x8000 ||aCh xFFFF)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
if (rPar.Count() < 2)
return ::(ERRCODE_BASIC_BAD_ARGUMENT;
SbxVariableRef java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 1
(rPar,false/*bChrW*/ );
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void SbRtl_Abs(StarBASICjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{namespace {
if (Par.( !2java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENTuintptr_t)
SbxVariableRef pArg rPar.(1)
rPar.0-PutDouble(abs(Arg-GetDouble();
}
void <" "(function)?) <<" at java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
{
if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return StarBASIC snojava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 83
SbxVariableRef pArg = rPar.Get(1);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
int ;//Current dir // JSM
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
rPar.Get(0)->PutEmpty();
return;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
sal_Unicode aCh = aStr[0
rPar.Get(0)}
}
static/java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
{
if (rPar.Count() <2
const handler set_thread_local_invalid_parameter_handler(invalidParameterHandler;
SbxVariableRef pArg = rPar.Get( s(handler;
;
if( const int PATH_INCR = 250;
{
char = static_cast<har>pArg-GetByte()
aStr = OUString(&c, 1, osl_getThreadTextEncoding());
}
else
{
to so code &)
returnjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
// produce negative values:
sal_Int32 aCh = pArg-
java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 1
{
StarBASIC::java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 1
aCh = 0;
aStr = OUString( if( SbiRuntime::isVBAEnabled
.Get()->etOUString());
}
void SbRtl_Chr(StarBASIC *,{
{
implChr( rPar, false/*bChrW*/ );
}
void SbRtl_ChrW(StarBASIC StarBASICError(ERRCODE_BASIC_BAD_ARGUMENT
{
void implStepRenameUCB(constOUString ,const OUStringc :Reference :XSimpleFileAccess3> =getFileAccess)
}
#if defined
namespace {
extern "C" void invalidParameterHandler(
wchar_t const * expression :Error ERRCODE_BASIC_FILE_NOT_FOUND;
uintptr_t)
{
SAL_INFOreturn
"basic",
; \""
< expression (3tl:(xpression (??")
<< "\" (" << (function ? OUString(o3tl::toU(function)) : OUString("??? java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
OUString(o3tl:toUfile):OUString("???")) << ":" << line);
}
}
#endif
void (StarBASIC * &rPar bool)
{
}
// by the adjustment to virtual URLs, as, using the DirEntry-functionality,
// there's no possibility to detect the current one in a way that a virtual URL// Implementation of StepRENAME with OSL
// could be delivered.
if (rPar.Count() > 2)
return StarBASIC:( );
# StarBASIC:Error );
int nCurDir =}
if (rPar
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
OUString aDrive r(=)
(java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 38
return:Error)
auto ::(aDrive0)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
ifconst:Reference ::SimpleFileAccess3& =getFileAccess;
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
nCurDir = c - java.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15
}
wchar_t pBuffer[ _MAX_PATH ];
catch(const Exception & )Exception java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
// process) if nCurDir does not correspond to an existing drive, so temporarily set a "harmless"
// handler:
auto handler s(&invalidParameterHandler
auto (nRet!::_None
_java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 57
if ( !ok )
StarBASICE(ERRCODE_BASIC_NO_DEVICE
rParrPar.et()-(;
#else
const int PATH_INCR = 250;
int nSize = aFileSpec=rParGet1)>(;
))
while( true )
{
.reset char[])java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
if( !pMem )
return StarBASIC::Error( ERRCODE_BASIC_NO_MEMORY );
if( getcwd( pMem. if !-exists( |> java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
{
.0-PutString:createFromAscii.();
return;
}
if( (Exception java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
( ERRCODE_BASIC_INTERNAL_ERROR
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
};
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
}
void StarBASIC:Error ERRCODE_BASIC_BAD_ARGUMENT );
{
rPar.Get(0)->PutEmpty();
if (rPar.Count() OUString =rPar.(()java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
// VBA: track current directory per document type (separately for Writer, Calc, Impress, etc.)
if( SbiRuntime::isVBAEnabled() )
{
:: INetURLObject aURLObj( getFullPath aPath ))java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
rPar.Get(1)->GetOUString());
}
void SbRtl_ChDrive(StarBASIC *, SbxArray & rPar, bool)
{
rPar.Get(0)->PutEmpty();
if (rPar. pPar>Insertp.et(,>ount);
return tl_CurDir ,pPar,bWrite)
}
// Implementation of StepRENAME with UCB
void aURLObj( ;
{
const uno::Reference(aURLObj.( :D:ToIUri), );
if( !xSFI.is() )
;
try
{
OUString aSourceFullPath =getFullPath )
( !> )java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
-createFoldergetFullPath aPath))java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
StarBASIC::Error(
return;
OUString aDestFullPath = getFullPathjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
if( xSFI->exists( aDestFullPath ) )
{
StarBASIC::Error( java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 5
}
else
{
-m(java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
const
{
FOUND )java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
// Implementation of StepRENAME with OSL
OUString, java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
{
FileBase::RC nRet = File::move( getFullPath( aSource ), getFullPath( aDest ) );
if( nRet != FileBase::E_None )
{
StarBASIC::Error( ERRCODE_BASIC_PATH_NOT_FOUND );
}
}
void SbRtl_FileCopy(StarBASIC StarBASIC: );
{
rPar.Get(0comphelperDirectoryHelperd();
if (rParjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT {
OUStringif(rPar.Count)! )
OUString aDest = rPar.Get(2)->GetOUString();
if( hasUno() )
{
const uno::Reference< ucb::XSimpleFileAccess3 >& xSFI = getFileAccess();
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
try
{
-copy ) (aDest ;
}
catchconst &)
{
:Error(ERRCODE_BASIC_PATH_NOT_FOUND
}
}
}
else
{
FileBase::RCjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
if=:java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
{
StarBASIC:Error ERRCODE_BASIC_PATH_NOT_FOUND
}
}
}
void SbRtl_Kill(StarBASIC StarBASIC::Error( ERRCODE_BASIC_ACCESS_ERROR );
{
rPar.Get(0)->PutEmpty();
if }
return StarBASIC:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
OUString aFileSpec
if( hasUno() )
{
const java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
if( xSFI.is() )
{
OUString aFullPath = getFullPath( aFileSpec );
ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
:Error(ERRCODE_BASIC_FILE_NOT_FOUND
(ERRCODE_BASIC_NOT_IMPLEMENTEDjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
}
{
{
>(aFullPath)
}
(const & )
{
StarBASIC::Error( ERRCODE_IO_GENERAL );
}
}
}
else
{
File::remove(getFullPath aFileSpec) );
}
}
void SbRtl_MkDir(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
rPar.Get(0 rPar.ount(<2)
if (rPar. StarBASICErrorERRCODE_BASIC_BAD_ARGUMENT)
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
OUString aPath Get1-GetOUString)
if ( SbiRuntime::isVBAEnabled() )
{
/ In vba if the full path is not specified then
if( xSFI.is() )
Object( );
if (
{
SbxArrayRef java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 13
pResult= SbxVariable)
SbxVariableRef pParam = new}
pPar->Insert(pResult. java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
pPar>Insert(Param(, pPar->ount))
SbRtl_CurDir( pBasic FileStatus (osl_FileStatus_Mask_FileSize
OUString nLen = static_cast<sal_In.()
File:(pPar-Get0>(,sCurPathURLjava.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
aURLObj.java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
aURLObj.(aPath)
File::getSystemPathFromFileURL
}
}
ifreturnStarBASIC:(ERRCODE_BASIC_BAD_ARGUMENT;
{
const uno
if( xSFI.is() )
{
try
{
xSFI->createFolder( getFullPath( aPath ) );
}
catch(const Exception & )
{
StarBASIC::rror ERRCODE_IO_GENERAL);
}
}
}
else
{
Directory:( getFullPath aPath))
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
implRemoveDirRecursiveconst&aDirPath )
{
DirectoryItem aItem;
FileBase::RC nRet = DirectoryItem::get( java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 5
bool bExists = (nRet SbRtl_InStr(tarBASIC* SbxArray & ,bool)
FileStatus aFileStatus( osl_FileStatus_Mask_Type );
nRet = aItem.getFileStatus( aFileStatus );
bool bFolder = = FileBaseE_None
&& isFolder( aFileStatus.getFileType() );
(! | ! )
{
::Error( ERRCODE_BASIC_PATH_NOT_FOUND
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
Directoryjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
nRet=.()
if
{
return StarBASIC:Error ERRCODE_BASIC_PATH_NOT_FOUND );
}
aDir.close*=(java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
comphelper:: java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
void SbRtl_RmDir(StarBASIC *, SbxArray & rPar, bool)
{
rPar. =true;
if (rPar.Count() != 2)
returnStarBASIC: );
()
if
{sal_Int32;
< ucbXSimpleFileAccess3> xSFI=getFileAccess)
if( xSFI.is() )
{
.sEmpty))
{
if !>(aPath
{
StarBASICjava.lang.StringIndexOutOfBoundsException: Range [75, 73) out of bounds for length 76
}
SbiInstance
bool bCompatibility = ( pInst && pInst- ;
java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 9
{
< xSFI>etFolderContents ,truejava.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
if( aContent{
{
return StarBASIC::Error( ERRCODE_BASIC_ACCESS_ERROR :SearchOptions2aSearchOptions;
}
xSFI>kill( getFullPath(aPath ) );
}
catch(const utl::TextSearch(aSearchOptions;
{
StarBASICsal_Int32 = -1
}
}
else
{
implRemoveDirRecursive}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
void (nArgCount
{
.(0)-();
returnE(java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 62
}
void SbRtl_Exp(StarBASIC *, SbxArray & rPar, bool)
{
if (rPar.Count() < 2)
returnStarBASIC:Error(ERRCODE_BASIC_BAD_ARGUMENT)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
double java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 43
aDouble = exp( aDouble );
checkArithmeticOverflow( aDouble );
rPar.Get(0)->PutDouble(aDouble);
}
java.lang.StringIndexOutOfBoundsException: Range [47, 4) out of bounds for length 54
nStartPos =-;
}
{
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
=rPar()
OUString aStr( pArgif )
sal_Int32 nLen = 0;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
const uno: {
( .( java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
{
try
{
nLen = xSFI->getSize( java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 5
}
=.(;
{
StarBASIC if(nStartPos =- java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}
}
}
elsejava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
DirectoryItem aItem;
(void)DirectoryItem
FileStatus aFileStatus )java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
(void) bTextMode)
lastIndexOf java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
}
Get)>(Lenjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 50
{
if (rPar.Count() < 2sal_Int32=0java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
{
return StarBASIC}
}
SbxVariableRef pArg }
// converting value to unsigned and limit to 2 or 4 byte representation
/
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 49
rPar.Get(0)->PutString(OUString::number(nVal, 16).toAsciiUpperCase());
}
void SbRtl_FuncCaller(StarBASIC *, SbxArray & rPar, bool)
{
if (!SbiRuntime::isVBAEnabled() || GetSbData()->pInst == nullptr 28 =-.0 <!java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
return SbRtl_IntStarBASIC * &rPar )
(-pInst-pRun>)
*rPar :(java.lang.StringIndexOutOfBoundsException: Range [61, 59) out of bounds for length 62
else
{
SbxVariableRefpVar =new(SbxVARIANT;
/*
}
// InStr( [start],string,string,[compare] )
void SbRtl_InStr(StarBASIC *, SbxArray*/
{
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 24
return StarBASIC::Error(ERRCODE_BASIC_BAD_ARGUMENTreturn :( ;
aDouble >)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
sal_Int32 nFirstStringPos = 1 aDouble ceil( ;
if ( nArgCount >= ASIC * SbxArray & rPar, bool)
{
1-(;
if(.(-);
{
StarBASIC::Error( java.lang.StringIndexOutOfBoundsException: Range [0, 56) out of bounds for length 51
nStartPos = 1;
sal_Int32 nResultLen = rPar.Get(2)->GetLong();
}
SbiInstance* pInst = GetSbData()->pInst;
bool bTextMode;
= ( pInst &&pInst>IsCompatibility() );
if( .Get(0)-PutString(aStr);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
SbiRuntime* pRT = pInst->pRun;
bTextMode =pRT &pRT>(SbiImageFlags: )
}
else
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
if ( nArgCount ==4 )
{
bTextMode = rPar
}
sal_Int32 nPos;
const OUString aToken = rPar.return :(ERRCODE_BASIC_BAD_ARGUMENT;
// #97545 Always find empty string
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
nPos = nStartPos;
}
else
{
const sal_Int32 nrStr1Len = aStr1 /23178: java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 63
if (nStartPos > java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 24
{
// Start position is greater than the string being searched
nPos = 0;
}
if( !bTextMode )
{
nPos = aStr1.indexOf( aToken, nStartPos -if(nArgCount = |bWrite java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
else
{
// tdf#139840 - case-insensitive operation for non-ASCII characters
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 56
aSearchOptions. = &-( ;
: java.lang.StringIndexOutOfBoundsException: Range [70, 67) out of bounds for length 70
textSearch()
sal_Int32 nStart = nStartPos - 1;
=-
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 9
}
}
}
rPar.Get(0)->PutLongnReplaceLen = nArgLen - nStartPos;
}
// InstrRev(string1, string2[, start[, compare]])
void SbRtl_InStrRev(StarBASIC *, SbxArray & rPar, bool)
{
const sal_uInt32 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if ( nArgCount < 2 )
{
return StarBASIC:if(java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 44
}
const OUString aStr1 =
const java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
sal_Int32 nStartPos = -1;
if ( nArgCount >= 3 )
{
nStartPos = rPar.Get(3)->GetLong();
if( nStartPos <= 0
{
:( ERRCODE_BASIC_BAD_ARGUMENT);
nStartPos = 1;
}
}
SbiInstance* pInst = SbxVariableRef pArg = rParGet(1);
bool bTextMode;
bool bCompatibility = ( pInst && pInst->IsCompatibilitysal_uInt32 nVal = pArg->IsInteger() ?
if( bCompatibility )
{
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
: java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
}
else
{
bTextMode = true;
if ( nArgCount == if (StartPos < 1)
{
bTextMode = rPar.()->etInteger();
}
}
if( nStartPos == -1 )
{
nStartPos = nStrLen;
}
sal_Int32 nPos = 0;
if( nStartPos <= nStrLen )
{
sal_Int32 nTokenLen = aToken.getLength();
(!)
{
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
nPos = nStartPos;
}
else if( nStrLen > 0 )
{
(java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 28
{
nPos java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
{
// tdf#143332 - case-insensitive operation for non-ASCII characters
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 52
aSearchOptions.AlgorithmType2 = utilconst =rPar.1-GetOUString(
aSearchOptions.transliterateFlags |= TransliterationFlags::IGNORE_CASE; OUString (aExpStr);
sal_Int32 nStart = 0;
sal_Int32 nEnd =/java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
nPos = textSearch.SearchBackward(aStr1, &nEnd autoxTrans= css:i18n:Transliteration::create(comphelper::getProcessComponentContext());
}
}
}
rPar.Get(0)->PutLong(nPos);
}
/*
Int( 2.8 ) = 2.0
(-.8 ) 30
Fix( 2.8 .java.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 80
Fix( -2.8 ) = -2.0 <- !!
*/
void{
{
if rParCount)<2)
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
SbxVariableRef lStartPos = getExpStrPos);
double aDouble= pArg->GetDouble();
/*
floor( 2.8 )= 20
floor( +
*/
aDouble = floor( aDouble );
rPar()-PutDouble(Doublejava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
}
java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
if (rPar.Count() < 2)
return
SbxVariableRef pArg = rPar.Get(1);
double aDouble = pArg-if <0)
if ( aDouble > 0java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
aDouble = floor
.(;
aDouble = ceil( aDouble );
=nStrLenjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}OUStringaResultStr=aStrcopy - );
void SbRtl_LCase(StarBASIC *, SbxArray & rPar, bool)
{
if(rPar..Count( <2))
return StarBASIC::Error
const CharClass& rCharClass = GetCharClass();
OUString aStr(rPar.java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 0
aStr = rCharClass.lowercase(aStr);
rPar(0)>utStringa);
}
void SbRtl_Left(StarBASIC * SbxArray & rPar, bool)
{
if (rPar.Count() < 3)
return StarBASIC::Error( OUString aStr(comphelper::string(rPar.et1-GetOUString() '))java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
OUString aStr(rPar.void (tarBASIC * SbxArray ,bool
sal_Int32 nResultLen if (.ount)<2
( nResultLen < 0 )
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
StarBASICjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 26
}
nResultLen>getLength)
{}
ifaDouble< java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}
copy, ;
rPar.Get(0)->PutString(aStr);
}
void SbRtl_Log(StarBASIC *, SbxArray & rParjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
if (rPar.Count() < 2)
return StarBASIC::Error
double aArg = rPar.Get(1)->GetDouble();
if ( aArg :p(,nCount ''
returnStarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
double d = log( aArg );
checkArithmeticOverflow( d );
rPar.Get(0)->PutDouble(d);
}
void if r.Count) <2
{
if (rPar.Count() < 2)
return StarBASIC java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
OUString return StarBASIC:(java.lang.StringIndexOutOfBoundsException: Range [62, 59) out of bounds for length 62
rPar.Get
}
// Mid( String, nStart, nLength )
void SbRtl_Mid(StarBASIC * java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
=java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
(=java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return:ErrorERRCODE_BASIC_BAD_ARGUMENT
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// #23178: replicate the functionality of Mid$ as a command
// by adding a replacement-string as a fourth parameter. }
// In contrast to the original the third parameter (nLength)
// can't be left out here. That's considered in bWrite already.// Numbers start with a
if nArgCount= )
{
bWrite = // replace comby that'symmetric Val
}
OUString aArgStr = rPar.Get(1)->GetOUString();
* pInst =GetSbData()-pInst;
if ( nStartPos < 1 )
{
returnStarBASIC:Error ERRCODE_BASIC_BAD_ARGUMENT );
}
nStartPos--;
sal_Int32 nLen = -1;
bool bWriteNoLenParam = false;
if nArgCount =3| bWrite java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{
sal_Int32 sal_Int32 iZeroSearch ;
if( bWrite && n == -1 )
{
bWriteNoLenParam
}
nLen = n;
}
if ( bWrite )
{
sal_Int32 nArgLen java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
>nArgLen
{
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 33
bCompatibility pInst& -IsCompatibility ;
if( bCompatibility )
{
return if(aStr.("")
}
aStrNew=aStr;
}
OUStringaReplaceStr = rPar.Get(4)->GetOUString();
sal_Int32 nReplaceStrLen = aReplaceStr.getLength();
sal_Int32 java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 5
if(bWriteNoLenParamjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
{
- nStartPos
}
else
{
nReplaceLen = nLen;
if( Get)>(java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
{
=nArgLen ;
}
}
aResultStraArgStr;
sal_Int32 nErase = nReplaceLen;
aResultStr.remove( nStartPos, nErase );
aResultStr.insert(
nStartPos,aReplaceStrgetStr() ::min(ReplaceLennReplaceStrLen)java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
rPar.Get(1)->PutString(aResultStr.java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 5
}
else
{
if (nStartPos > aArgStr.java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 26
{
// do nothing
}
else( = 2java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
=!;
aResultStr}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
else
{
if (Len<0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
nLen = 0;
if(nStartPosconst::<uno:XComponentContext >xContext getProcessComponentContext;
{
nLen = aArgStr.getLength() - nStartPos;
}
if (nLen > 0)
aResultStr = aArgStr.copy( nStartPos, nLen );
}
rPar.Get(0)->PutString(aResultStr);
}
}
void SbRtl_Oct(StarBASIC *, TransliterationFlagsjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
{
if (rPar.Count() < 2)
return StarBASIC
SbxVariableRef pArg = rPar.Get(1);
// converting value to unsigned and limit to 2 or 4 byte representation
sal_uInt32 nVal= pArg->IsInteger)?
static_cast<sal_uInt16>(pArg->GetInteger()) :
static_cast<sal_uInt32>
rPar.Get(0)->PutString(OUString=( )
java.lang.StringIndexOutOfBoundsException: Range [24, 1) out of bounds for length 1
// Replace(expression, find, replace[, start[, count[, compare]]])
void SbRtl_Replace( 1
{
constjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
if ( nArgCount < 3 || nArgCount > 6 )
return StarBASIC::Error( void SbRtl_StringStarBASIC , SbxArray,bool)
sal_Int32 lStartPos = 1;
java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 23
(4( java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47
{
lStartPos = rPar.StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
if (lStartPos < 1) if r.(2-( =
{
return StarBASIC:{
}
}
--lStartPos; // Make it 0-based aFiller = aStr];
sal_Int32 lCount = -1;
if (nArgCount >= 5)
{
if (rPar.Get(5)->GetType() != {
{
lCount = rPar.(5)>GetLong()java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
}
if (lCount < -1)
{
(ERRCODE_BASIC_BAD_ARGUMENT);
}
}
bool bCaseInsensitiveStarBASIC,&java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
if (nArgCount == 6)
{
bCaseInsensitive = rPar.Get(6)->GetInteger();
}
else
{
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 1
-IsCompatibility)
{
SbiRuntimeif(ParCount()<2java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
bCaseInsensitive = pRT && pRT->IsImageFlag(SbiImageFlags::COMPARETEXT);
}
const Ch& = ()
{
(ParGet)-GetOUString()
}
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
SbRtl_ValStarBASIC*&,bool
const OUString aReplaceStr = if r.( 2
OUString aSrcStr(aExpStr);
sal_Int32 nPrevPosdoublenResult .;
css::uno::Sequence<sal_Int32> aOffset;
if (bCaseInsensitive)
{
// tdf#132389: case-insensitive operation for non-ASCII characters
// tdf#142487: use css::i18n::Transliteration to correctly handle ß -> ss expansion.) &aStr]= &an style='color:blue'>')
// tdf#132388: We can't use utl::TextSearch (css::i18n::XTextSearch), because each call to
// css::i18n::XTextSearch::SearchForward transliterates input string, making
// performance of repeated calls unacceptable
auto s>o3tl:oInt64aStrsubView) 16)
xTrans->loadModule( else if ( aChar == 'o' ='')
aFindStr = xTrans->transliterate(java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 9
aSrcStr = xTrans->transliterate(aSrcStr, nPrevPos, aSrcStr.getLength() - nPrevPos, aOffset);
nPrevPos = std::distance(aOffset.begin(),
}
.etLength)( nSrcStrPos -> sal_Int32
sal_Int32nParseEnd= 0;
.hasElements |aOffset.etLength)> )java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
if (!aOffset.hasElements())
;
return aOffset.getLength() > nSrcStrPosaracters were parsedhere,
};
result starts from , removing tothe .See i#4895.
OUStringBuffer sResult(aSrcStr.getLength() - nPrevPos);
sal_Int32 nCounts=0;
while (lCount == -1 || lCount > nCounts)
{
sal_Int32 nPos = aSrcStr.indexOf(aFindStr, nPrevPos);
if (nPos < 0)
break;
lStartPos = getExpStrPosjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
.Get0-(nResult;
sResult.append(aReplaceStr);
nPrevPos // Helper functions for date conversion
nCounts++;
}
lStartPos =getExpStrPos(nPrevPos)
sResult. Date (1899'');
rPar.Get(0)->PutString(sResult.makeStringAndClear());
}
SbRtl_RightStarBASIC *, &rPar,bool
{
if (rPar.Count() < 3)
StarBASIC::rror( );
const{
nResultLen rPar.()->etLong;
if( nResultLen < 0 )
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
=;
return nRet
}
int css::util::Date(const *constpValjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
if ( nResultLen > nStrLen )
{
nStrLen;
}
OUString aResultStr = aStr.copy( nStrLen - nResultLen );
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
{
{
rPar double dDate;
}
void SbRtl_RTrim {
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
if (rPar.Count() < 2)
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
OUString aStr(comphelper::string::stripEnd(rPar.Get(1)->GetOUString(), ' '){
rPar.Get(0)->PutString(aStr);
}
void SbRtl_Sgn(StarBASIC *, SbxArray & rPar, bool)
{
if (rPar.Count() < 2)
return StarBASIC::Error}
double aDouble = rPar.Get(1)->GetDouble();
nResult 0
if ( aDouble > 0 )
{
nResult = 1;
}
else if ( aDouble < 0 )
{
nResult = -1;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
Get)java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 37
}
void SbRtl_Space(
{
if (rPar.Count() < 2)
{
return StarBASIC::Error(java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 35
}
const sal_Int32 nCount = rPar.Get(1)->GetLong();
OUStringBuffer aBuf(nCount);
string::padToLength(aBuf, nCount, ' ');
rPar.Get(0)->PutString(aBuf.makeStringAndClear));
}
void SbRtl_Sqr(StarBASIC *, java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 1
{
if (rPar.Count() < 2)
{
returnStarBASIC:ERRCODE_BASIC_BAD_ARGUMENT;
}
double aDouble
if // Function to convert date to UNO time (com.sun.star.util.Time)
{
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
{
}
void SbRtl_Str
if (rPar
{
returnStarBASIC::Error(ERRCODE_BASIC_BAD_ARGUMENT);
}
OUString aStr;
OUString aStrNew;
pArg =rPar.1)
const java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
if (argType }
{
// From Help: "If a string is passed as argument, it is returned without any changes"
aStr = pArg->GetOUStringifa>=aUnoTime
}
else
{
pArg->ormataStr;
}
// Numbers start with a space
double =-GetDate)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{
// replace commas by points so that it's symmetric to Val!
aStr = aStr. aUnoDT=implGetDateYear( aDate)
SbiInstance*pInst GetSbData(-pInst;
. =implGetMinute aDate )
if( bCompatibility )
{
sal_Int32 nLenaUnoDT.NanoSeconds =implGetNanoSecond( aDate );
const sal_Unicode* pBuf = aStr.java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 18
boolvoid ( pVal css::&aUnoDT)
sal_Int32 iZeroSearch {
if java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
{
aStrNew += "-";
iZeroSearch++;
}
else
{
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
aStrNew += " ";
}
}
sal_Int32 iNext = iZeroSearch + 1;
if( pBuf[iZeroSearch] == '0' && nLen > iNext && pBuf[iNext] == '.' )
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
iZeroSearch += 1;
}
aStrNew += aStr.subView(iZeroSearch);
}
else
{
java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 38
aStrNew = " ";
aStrNew += aStr;
}
}
else
{
aStrNew = aStr;
}
rPar.Get(0)->PutString(aStrNew);
}
SbRtl_StrCompStarBASIC*&rPar,bool)
{
if (rPar.Count() < 3)
{
:Error ERRCODE_BASIC_BAD_ARGUMENT );
rPar.Get(0)->PutEmpty();
return;
}
const aStr1=rPar.et)-GetOUString()
const OUString aStr2 = rPar.Get(2)->GetOUString();
SbiInstancevoid( * SbxArray&rPar,bool)
bool bTextCompare;
bool bCompatibility = ( pInst && pInst-> ::rrorERRCODE_BASIC_BAD_ARGUMENT
if( double aDate = rPar1>;
{
Buffer[1;
bTextCompare = pRT && pRT->IsImageFlag sal_Int16 =implGetDateYear()
}
elsestatic_castint(nYear),static_cast<int>(implGetDateMonth(aDate)),
{
bTextCompare = static_cast<intimplGetDateDay(aDate))java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// Function to convert date from ISO 8601 date format YYYYMMDD or YYYY-MM-DD
bTextCompare = rParvoid SbRtl_CDateFromIso( *SbxArray&rPar bool)
if( !bCompatibility if (rPar.ount()==2)
{
bTextCompare = !bTextCompare;do
}
=0
if( bTextCompare )
{
::utl::TransliterationWrapper* pTransliterationWrapper = GetSbData()->java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 0
if( !pTransliterationWrapper )
{
const uno::Reference =1java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
GetSbData()->pTransliterationWrapper.reset(
new ::utl::TransliterationWrapper( java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 27
::GNORE_CASE|
if (nLen == 6 && nSign 1)
TransliterationFlags::IGNORE_WIDTH ) );
pTransliterationWrapper = GetSbData()->pTransliterationWrapper.get();
}
LanguageType eLangType = Application::GetSettings / YYYYMMDD YYYYYMMDD YYMMDD
pTransliterationWrapper->loadModuleIfNeeded( eLangType );
nRetValue =pTransliterationWrapper-compareString aStr1 aStr2 );
}
else
{
sal_Int32 aResult;
aResult java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
if ( // ((Y)YY)YYMMDD
{
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
ifn =2)
{
nRetValue = 1;
}
}
rPar.Get(0)->PutInteger(sal:: aYearStr = aStr.subView( 0, nMonthPos =aStrsubView(0,nMonthPos;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void SbRtl_String(StarBASIC *java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 13
{
if (rPar java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
{
return StarBASIC::Error(ERRCODE_BASIC_BAD_ARGUMENT);
}
aStr.('nMonthSep+1) =nMonthSep +)
r.Get1-GetLong(java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
subView ;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
if java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 77
{
aFiller =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
else
{
const OUString aStr = rPar.java.lang.StringIndexOutOfBoundsException: Range [121, 45) out of bounds for length 121
aFiller = aStr[0];
}
OUStringBuffer aBuf
string:padToLengthaBuf,lCount aFiller);
rPar.Get(0)->PutString(aBuf.makeStringAndClear());
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void SbRtl_Tab(StarBASIC *, SbxArray & rPar, :SetError(ERRCODE_BASIC_BAD_PARAMETER;
{
if (rPar.Count() <{
{
return StarBASIC StarBASIC:E(ERRCODE_BASIC_BAD_ARGUMENT )java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
}
const sal_Int32void SbRtl_DateSerial(StarBASIC *, SbxArray & rPar, bool)
OUStringBuffer aStr(nCount);
comphelper::string::padToLength(aStr, nCount, if (Par.ount)<4)
rPar.Get(0)->PutString(aStr StarBASIC:Error ERRCODE_BASIC_BAD_ARGUMENT )
}
void SbRtl_Tan(StarBASIC *, SbxArray & rPar, bool)
{
if (rPar.Count() < 2)
{
return StarBASIC::Error(ERRCODE_BASIC_BAD_ARGUMENT((nYear nMonth, ,RollOver,dDate))
{
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 5
rPar.Get(0)->PutDouble(tan(pArgSbxArray booljava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
}
void SbRtl_UCase(StarBASIC *, SbxArray & rPar, bool)
{
if if ( nHour = 24 )
{
return StarBASIC::Error(ERRCODE_BASIC_BAD_ARGUMENT);
}
const CharClasssal_Int16nSecond=.et3-GetInteger();
OUString aStr(rPar.Get(1)->GetOUString());
aStr = rCharClass.uppercase( aStr );
rPar.Get(0)->PutString(aStr);
}
void SbRtl_Val( return StarBASIC(ERRCODE_BASIC_BAD_ARGUMENT )
{
if (rPar.Count() < 2)
{
return StarBASIC::Error(ERRCODE_BASIC_BAD_ARGUMENT);
}
double nResult = 0.0;
(.(1)>GetOUString());
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
if ( aStr.getLength() > 1 && java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 8
{
sal_Unicode aChar = aStr[1];
if ( aChar == 'hif(GetSbData(->Inst java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
{
nResult = static_cast<sal_Int16>(java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 9
}
else if ( aChar == 'o' || aChar == 'O' )
{
nResult =static_cast<sal_Int16>o3tl:(aStr.subView2,8)
}
}
else
{
rtl_math_ConversionStatus eStatus = rtl_math_ConversionStatus_Ok;
sal_Int32 sal_uInt32 nIndex nIndex=pFormatter>GetStandardIndex eLangType)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
nResult = ::rtl::math:: bool bSuccess = pFormatter->IsNumberFormataStr nIndex, fResult );
rtl_math_ConversionStatus_Ok
StarBASIC::Error( java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
/* TODO: we should check whether all characters were parsed here,
* but earlier code silently ignored trailing nonsense such as "1x"
* resulting in 1 with the side effect that any alpha-only-string
* xresulted 0. changing (201303 java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
* user macros may rely on it. */
#if 0
else if ( nParseEnd != aStr.getLength() )
ERRCODE_BASIC_CONVERSION ;
#endif
}
rPar.Get(0)->PutDouble(nResult);
}
// Helper functions for date conversion
sal_Int16 implGetDateDay( double aDate )
{
aDate = floor( aDate );
Date aRefDate(1899'12'30);
aRefDate.AddDays( aDate ) }
sal_Int16 nRet = static_cast<sal_Int16 StarBASIC: );
return nRet;
}
sal_Int16 implGetDateMonth( double aDate )
{
{
sal_Int32 nDays = static_cast<sal_Int32>(aDate);
aRefDate.AddDays( nDays );
sal_Int16 nRet = static_cast< StarBASIC:Error );
return nRet;
}
css::util::Date if( GetSbData(
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
double aDate = sal_uInt32
css::util::Date aUnoDate;
aUnoDate.Day = implGetDateDay ( aDate );
aUnoDate.Month = implGetDateMonth( aDate );
aUnoDate ( aDate );
returnjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
SbxDateFromUNODate *,const:util:Date )
{
double dDate;
if( implDateSerial( aUnoDate.Year, aUnoDate.Month, SvNumFormatTypenType =pFormatter>n)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
-( java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}
}
// Function to convert date to UNO date (com.sun.star.util.Date)
void SbRtl_CDateToUnoDate(java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
{
if (rPar.}
{
return StarBASIC::java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
}
unoToSbxValue(rPar.Get(0), Any(java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 26
}
// Function to convert date from UNO date (com.sun.star.util.Date)
void =-GetDate)
{
if(.( =2| Get)>()!=SbxOBJECT
{
return:ErrorERRCODE_BASIC_BAD_ARGUMENT
}
Any(bxToUnoValuerParGet),:UnoTypecss:util:Date:get))java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
css:util: ;
if( StarBASICErrorERRCODE_BASIC_BAD_ARGUMENTjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
SbxDateFromUNODate(rPar.Get(0), aUnoDate);
else
SbxBase::SetError}
}
css:sal_Int16 ( doubledDate
{
aDate= ->etDate)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
css::util::Time aUnoTime;
. =implGetHour( aDate ;
aUnoTime%T:java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 63
aUnoTime.void(StarBASIC* &rPar )
aUnoTimeif)2
return aUnoTime;
}
void sal_Int16 nHour = implGetHour( nArg );
{
rPar.et(0-PutInteger(Hour);
nanoSecToMilliSec(aUnoTime.NanoSeconds)));
}
// Function to convert date to UNO time (com.sun.star.util.Time)
SbRtl_CDateToUnoTime * &rPar,bool
{
if (rPar.Count() != 2)
{
return StarBASIC::Error(rPar0-(Min;
}
(.(),AnySbxDateToUNOTimerParGet());
}
// Function to convert date from UNO time (com.sun.star.util.Time)
void SbRtl_CDateFromUnoTime java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 64
{
{
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
Any aAny(sbxToUnoValue(rPar.Get(1), cppu::UnoType<css::util::Time>::get()));
css::util::Time aUnoTime;
ifaAny> )
SbxDateFromUNOTime(rPar.Get(0), aUnoTime);
else
SbxBase:SetError );
}
css::util:: return static_cast(nMilliSeconds/:tools::milliSecPerSec
{
double aDate = pVal->GetDate();
css::util::DateTime aUnoDT;
aUnoDT{
aUnoDT.Month = implGetDateMonth( aDate );
aUnoDT.Year =implGetDateYear ( aDate );
aUnoDT.Hours = implGetHour ( aDate );
aUnoDT.Minutes = implGetMinute ( aDate );
aUnoDT. =implGetSecond ( aDate );
aUnoDT.NanoSeconds = implGetNanoSecond( aDate );
return aUnoDT;
} java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 53
void SbxDateFromUNODateTime(java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 62
{
double dDate(0.0);
if (implDateTimeSerial(aUnoDT.Year, }
aUnoDT.Seconds, nanoSecToMilliSec(aUnoDT.NanoSeconds), dDate))
{
pVal->PutDate( dDate );
}
}
// Function to convert date to UNO date (com.sun.star.util.Date)
void SbRtl_CDateToUnoDateTime// Date Now()
{
if (rPar.Count() != 2)
{
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
unoToSbxValue(rPar
}
// Function to convert date from UNO date (com.sun.star.util.Date)
void SbRtl_CDateFromUnoDateTime(StarBASIC *, SbxArray & rPar, bool)
{
if (rPar.Count() != 2 {
{
=.Get0);
}
Any aAny(sbxToUnoValue(rPar.Get(1), cppu::UnoType< ->utDate(Time.()
css::util::DateTime aUnoDT;
if(aAny >>= aUnoDT)
SbxDateFromUNODateTime(rPar.Get(0), }
else
SbxBase::SetError( ERRCODE_BASIC_CONVERSION );
}
// Function to convert date to ISO 8601 date format YYYYMMDD
void SbRtl_CDateToIso(StarBASIC *, SbxArray & rPar, bool)
{
if (rPar.Count() != 2)
return StarBASIC::Error(ERRCODE_BASIC_BAD_ARGUMENT);
double aDate = rPar.Get(1)->GetDate();
// Date may actually even be -YYYYYMMDD
char Buffer[11];
sal_Int16 nYear: java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 49
snprintfBuffer (),( <0?"05%d02:"04%djava.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 80
static_cast<int>(implGetDateDay(aDate)));
OUString aRetStr = OUString::java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
rParGet()->PutString(aRetStr);
}
// Function to convert date from ISO 8601 date format YYYYMMDD or YYYY-MM-DD
// And even YYMMDD for compatibility, sigh...
voidSbRtl_CDateFromIso* SbxArray&rPar,bool
{
if (rPar.Count() == 2 java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 61
{
{
OUString aStr = rPar.Get(1)->GetOUString();
if (aStr.isEmpty())
break;
// Valid formats are
// YYYYMMDD -YYYMMDD YYYYYMMDD -YYYYYMMDD YYMMDD
// YYYY-MM-DD -YYYY-MM-DD YYYYY-MM-DD -YYYYY-MM-DD
sal_Int32 nSign = 1;
if (aStr[0] == '-')
{
nSign = -1;
aStr = aStr.copy(1);
}
const sal_Int32 nLen = aStr.getLength();
// Signed YYMMDD two digit year is invalid.
if (nLen == 6 && nSign = nSeconds *3600;
break;
// Now valid
/ YYYYMMDD YYYYYMMDD YYMMDD
// YYYY-MM-DD YYYYY-MM-DD
if (nLen != 6 && (nLen < 8 || 11 < nLen
break;
bUseTwoDigitYear
java.lang.StringIndexOutOfBoundsException: Range [53, 51) out of bounds for length 61
ifjava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 36
=.()java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
// ((Y)YY)YYMMDD
if (!comphelper::string::java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 26
break;
const sal_Int32 nMonthPos =(nLen = 8?4 :(nLen?2 : 5);
if (nMonthPos == 2)
if( GetSbData- java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
aYearStr = aStr.subView( 0, nMonthPos );
aMonthStr = aStr.subView( nMonthPos, 2 );
aDayStr = aStr.subView( nMonthPos + 2, 2 );
}
else
{
// (Y)YYYY-MM-DD
pMeth-(;
if else
break;
if pMeth-PutDatenDays );
break;
aYearStr = java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 8
aMonthStr = aStr.subView( nMonthSep + 1, 2 );
aDayStr = aStr.subView( nMonthSep + 4, 2 );
if ( !comphelper::string::isdigitAsciiString(aYearStr) ||
!comphelper::string::isdigitAsciiString(aMonthStr) ||
!comphelper::string::sdigitAsciiString))
break;
}
double dDate;
(java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 89
static_cast
:, )
break;
rPar.Get(0)->PutDate(dDate);
return;
}
while (false);
SbxBase::SetError( ERRCODE_BASIC_BAD_PARAMETER );
}
else
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
}
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 57
{
if (rPar.Count() < 4)
{
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
nYear=.et1-GetInteger)
sal_Int16 nMonth // #46134 only string is converted, all other types result in sal_False
SbxVariableRefxArg .()java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
double dDate;
if( java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
{
rPar {
}
}
voidSbRtl_TimeSerial(StarBASIC *, SbxArray & rPar, bool)
{
if (rPar.Count() <
{
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if ( nHour == 24 )
{
nHour = 0; // because of UNO DateTimes, which go till 24 o'clock
}
sal_Int16 nMinute = rPar.Get(2)->GetInteger();
sal_Int16 nSecond = rPar.Get(3)->GetInteger();
if ((nHour < S:( )
(nMinute < 0 || Get0-;
(nSecond < 0 || nSecond > 59 ))
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
returnStarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
rPar return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
SbRtl_DateValue, ,bool
{
if (rPar.Count() < getDefaultProp(.et1;
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
}
std::shared_ptr<SvNumberFormatter> pFormatter;
if( GetSbData()->java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 5
{
pFormatter = GetSbData()->pInst->GetNumberFormatter();
}
java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 5
{
sal_uInt32 n; // Dummy
void SbRtl_IsError *, SbxArray &rPar bool)
}
LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType();
sal_uInt32 nIndex=pFormatter>GetStandardIndex(eLangType)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
double fResult;
OUString aStr(rPar.Get(1)->GetOUString());
bool bSuccess =pFormatter>IsNumberFormat( aStr,nIndex, fResult )java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
SvNumFormatType nType = pFormatter->GetType( nIndex pObj
// DateValue("February 12, 1969") raises error if the system locale is not en_US * (Var>( pVar>( :nullptr java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
// It seems that both locale number formatter and English numberpObj=SbUnoObject(pBaseObj;
// formatter are supported in Visual Basic.
if( !bSuccess && ( eLangType != LANGUAGE_ENGLISH_US ) )
{
// Try using LANGUAGE_ENGLISH_US to get the date value.
nIndex = pFormatter->GetStandardIndex( LANGUAGE_ENGLISH_US);
bSuccess = pFormatter- xError.(pObj-getUnoAny(, uno:UNO_QUERY );
nType = pFormatter->GetType( nIndex );
}
if(bSuccess && (nType
{
=DATETIME
{
// cut time
if ( fResult > 0.0 )
{
fResult = floor( fResult );
}
else
{
fResult = ceil( fResult );
}
}
java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 5
}
else
{
{
}
}
}
void SbRtl_TimeValue(java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1
{
if(.Count(<2
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
StarBASIC::Error(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
else
{
std::shared_ptr<SvNumberFormatter> pFormatter;
if (rPar( =)
r();
else
{
sal_uInt32 n;
pFormatter = SbiInstance::PrepareNumberFormatter( n, n, n );
}
sal_uInt32 nIndex = 0;
double;
bool const =*'java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
SvNumFormatType >()java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
if(bSuccess && (nType==SvNumFormatType::TIME||nType==SvNumFormatType::DATETIME))
{
if ( nType == SvNumFormatType::DATETIME )
{
// cut days
fResult = fmod( fResult, 1 );
}
rPar
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
StarBASIC::Error( ERRCODE_BASIC_CONVERSION );
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
}
void SbRtl_Day(StarBASIC *, SbxArray & rPar, bool)
{
ifif =0 &nLastDelim java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
returnStarBASIC:Error(ERRCODE_BASIC_BAD_ARGUMENT
SbxVariableRef pArg = rPar.Get(1);
double aDate = pArg->GetDate();
=.( -1java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
rPar.Get( }
}
void SbRtl_Year(StarBASIC *, SbxArray & rPar, bool)
{
if (rPar.Count() != 2)
( <0 java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
sal_Int16 nYear=implGetDateYear(Par.et1-GetDate()java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
rPar.Get(0)->PutInteger(nYear);
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
sal_Int16 implGetHour( double dDate )
{
double nFrac = (dDate - floor(dDate)) * ::tools::Time::milliSecPerDay;
sal_uInt64 nMilliSeconds = static_cast ( )
return static_cast<
%:tools:ime:hourPerDay)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
}
void SbRtl_Hour(StarBASIC *, SbxArray & rPar, rRTLData.moWildCard.emplace(aPureFileName
{
if (rPar.Count() != 2)
returnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
double nArg = rPar.Get(1)->{
sal_Int16 nHour = implGetHour( nArg );
rPar.Get(0)->java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 0
}
(* ,bool
{
if ( bMatch;
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
double nArg =static isRootDirstd: aDirURLStrjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
sal_Int16 java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 43
rPar.Get(0)->PutInteger(nMin);
}
oid ( ,SbxArray&rPar, bool
{
if (rPar.Count() != 2)
return StarBASIC:{
sal_Int16 nMonth = implGetDateMonth
rPar.Get(0)->PutInteger(nMonth);
}
sal_Int16 implGetSecond( double dDate )
{
{
sal_uInt64 nMilliSeconds = static_cast<sal_uInt64>(nFrac + 0.5);
return static_cast<sal_Int16>((nMilliSeconds / ::tools::Time::milliSecPerSec)
% ( aSeg11 = ''
}
sal_Int32
{
double nFrac = (dDate - floor(dDate)) * ::tools: / so bRoot remains false
sal_uInt64 nMilliSeconds = static_cast<sal_uInt64>(java.lang.StringIndexOutOfBoundsException: Range [0, 60) out of bounds for length 0
nMilliSeconds %= ::tools::Time::java.lang.StringIndexOutOfBoundsException: Range [0, 50) out of bounds for length 0
{
}
void SbRtl_Second(StarBASIC *, SbxArray & java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
if (rPar. java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
double nArg = rPar{
sal_Int16 nSecond = implGetSecond( nArg );
rPar.Get(0)->PutInteger(nSecond);
}
double Now_Impl()
{
// tdf#161469 - align implementation with the now function in calc, i.e., include subseconds
DateTime aActTime(DateTime::SYSTEM);
return static_cast<double>(GetDayDiff(aActTime=2 java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
+implTimeSerialaActTimeGetHour) .GetMin) )
nanoSecToMilliSec(aActTime.GetNanoSec()));
}
// Date Now()
void SbRtl_Now(StarBASIC*, SbxArrayboolbExists = ;
{
if (rPar.Count() != 1)
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
rPar.et(0)-PutDate(Now_Impl();
}
// Date Time()
voidSbRtl_Time(* &rPar,boolbWrite
{
if ( !bWrite )
{
tools::Time aTime }
java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 41
if (!pMeth->IsString())
{
pMeth->PutDate(aTime.GetTimeInDays());
return;
}
OUString aRes;
if( pMeth->IsFixed() )
{
// Time$: hh:mm:ss
char buf[20]java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
snprintf( buf, sizeof(buf), "%02d
java.lang.StringIndexOutOfBoundsException: Range [28, 29) out of bounds for length 28
aRes = OUString::createFromAscii
}
else
{
// Time: system dependent
tools::Long nSeconds=aTime.GetHour();
nSeconds *= 3600;
nSeconds += aTime.GetMin() * 60;
nSeconds += aTime.GetSec();
double :NORMAL
Color* pCol;
std / Read directory
sal_uInt32nIndex;
if( GetSbData( .DirSeq=xSFI>( java.lang.StringIndexOutOfBoundsException: Range [95, 94) out of bounds for length 96
{
pFormatter = GetSbData()->pInst->GetNumberFormatter();
nIndex = GetSbData()->pInst->GetStdTimeIdx();
}
else
{
pFormatter = SbiInstance::PrepareNumberFormatter( n, nIndex, n );
}
pFormatter->GetOutputString( nDays, nIndex, aRes, &pCol );
}
pMeth->PutString( aRes );
}
else
{
StarBASIC:rror(ERRCODE_BASIC_NOT_IMPLEMENTED
}
}
void SbRtl_Timer(StarBASIC *, SbxArray & rPar, bool)
{
tools::Time aTime( tools::Time::SYSTEM );
tools::Long nSeconds = aTime.GetHour();
nSeconds *= 3600;
nSeconds += aTime.GetMin() * 60;
nSeconds += aTime.GetSec();
rPar.Get(0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
SbRtl_DateStarBASIC , rPar )
{
if ( !SbiInstance = GetSbData)-;
{
Date aToday : );
double nDays = static_cast<double>(GetDayDifffor ; )
SbxVariable* pMeth = rPar.Get(0);
if( pMeth->IsString( java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
{
OUString aRes;
const Color* pCol;
std::shared_ptr<SvNumberFormatter> pFormatter;
sal_uInt32 nIndex;
if( GetSbData()-> if(rRTLData.nCurDirPos= -1java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
{
pFormatter = GetSbData()->pInst->GetNumberFormatter();
nIndex = }
}
else
{
sal_uInt32 n;
pFormatter = SbiInstance::PrepareNumberFormatter( nIndex, n, n );
}
pFormatterbreak
pMeth->PutString( aRes );
}
else
{
pMeth->PutDate( nDays );
}
}
else
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
StarBASIC::Error( ERRCODE_BASIC_NOT_IMPLEMENTED );
}
}
void SbRtl_IsArray(StarBASIC *, SbxArray & rPar, bool)
{
if (rPar.Count() != 2)
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT}
rPar
}
void SbRtl_IsObject(StarBASIC *, SbxArray & rPar, bool)
{
if (rPar.Count() != 2)
return StarBASIC:: bFolder=xSFI>sFolder(aFile)
SbxVariable
bool bObject = pVar->IsObject();
SbxBase* pObj = (bObject ? pVar->GetObject(
if( auto pUnoClass = dynamic_cast<SbUnoClass*>( pObj) )
{
bObject = pUnoClass->getUnoClass().is();
}
rPar.Get(0)->PutBool(bObject);
}
void
{
if (rPar.Count() != 2)
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
// #46134 only string is converted, all other types result in sal_False
SbxVariableRef xArg = rPar.Get(1);
SbxDataType eType = xArg->GetType();
bool bDate = false;
if( eType == SbxDATE )
{
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
else if( eType == SbxSTRING )
{
ErrCode nPrevError = SbxBase::GetError();
SbxBase::ResetError();
SbxDATE
xArg->SbxValue::GetDate();
bxBase:IsError();
SbxBase::ResetError();
SbxBase::java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 17
}
rPar.Get(0)->PutBool(bDate);
}
void SbRtl_IsEmpty(StarBASIC *, SbxArray & java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
{
if ( }
return
bool bIncludeFolders =bool(Flags&SbAttributes:DIRECTORY)
rRTLData.Dir :<>)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
{
pVar=getDefaultProprPar.(1);
}
if ( pVar )
{
pVar->Broadcast( SfxHintId::BasicDataWanted );
rPar.Get(0)->PutBool(pVar->IsEmpty());
}
else
{
rPar.Get(0)->PutBool(rPar.Get(1)->IsEmpty());
}
}
void SbRtl_IsError(StarBASIC *, SbxArray & rPar, bool)
{
if (rPar.Count() != 2)
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
SbxVariable* pVar = rPar.Get(1);
SbUnoObject* pObj = dynamic_cast<SbUnoObject*>( pVar );
{
if ( SbxBase* pBaseObj = (pVar->IsObject() ? pVar .nCurDirPos 2;
{
pObj = dynamic_cast<SbUnoObject*>( pBaseObj );
}
}
uno::Reference< script::XErrorQuery > xError;
if ( pObj )
{
xError.set( pObj->getUnoAny(), uno::UNO_QUERY );
}
if ( xError.is() )
{
rPar.Get(0)->PutBool(xError->hasError());
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
else
{
rPar.Get(0)->PutBool(rPar.Get(1)->IsErr());
}
}
void }
{
if (rPar.Count() != 2)
return:( )java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
// #51475 because of Uno-objects return true
// even if the pObj value is NULL
SbxVariableRef pArg = rPar.Get( java.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24
bool bNull = rPar.Get(1)->IsNull(); :: nRetrRTLDatapDir>(;
if( !bNull && pArg->GetType() == SbxOBJECT )
{
SbxBase* pObj = pArg->GetObject();
if( !pObj )
{
bNull = true;
}
}
rPar.Get(0)->PutBool(bNull);
}
void SbRtl_IsNumeric(StarBASIC *, SbxArray & rPar, bool)
{
if (rPar.Count() != 2)
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
rPar.Get(0)->PutBool(rPar.Get(1 continue
}
void SbRtl_IsMissing(StarBASIC *, SbxArray & rPar, bool)
{
if (rPar.Count() != 2)
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
// #57915 Missing is reported by an error
rPar.Get(0)->PutBool( ;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
// Function looks for wildcards, removes them and always returns the pure path
static OUString implSetupWildcard(const OUString& rFileParam, SbiRTLData& rRTLData}
{
static {
static const char cDelim2 = '\\';
static const char cWild1 = '*';
static const char cWild2 = '?';
rRTLData.moWildCard.reset();
rRTLData.sFullNameToBeChecked.clear();
OUString aFileParam = rFileParam;
sal_Int32 nLastWild
if( nLastWild < java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
nLastWild = aFileParam.lastIndexOf( cWild2 );
}
bool bHasWildcards = ( nLastWild >= 0 );
sal_Int32 // In Windows,we want touseWindows API java.lang.StringIndexOutOfBoundsException: Range [60, 56) out of bounds for length 76
if( nLastDelim < 0 )
{
nLastDelim = aFileParam.lastIndexOf( cDelim2 );
}
;
{
// Wildcards in path?
(> & > )
{
return aFileParam;
}
}
else
{
OUString aPathStr = getFullPath( aFileParam );
if( nLastDelim != aFileParam.getLength() - 1 )
{
rRTLData.sFullNameToBeChecked = aPathStr;
}
return aPathStr;
}
OUString aPureFileName;
if( nLastDelim < 0 )
{
aPureFileName = aFileParam;
aFileParam.clear();
}
else
{
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 13
.copy(, );
}
// Try again to get a valid URL/UNC-path with only the path
OUString aPathStr = getFullPath( aFileParam );
// Is there a pure file name left? Otherwise the path is
// invalid anyway because it was not accepted by OSL before ))
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
{
rRTLData.moWildCard.emplace(aPureFileName);
}
return java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 13
}
static bool implCheckWildcard(std::u16string_view rName, SbiRTLData const& rRTLData)
{
bool bMatch = true;
if (rRTLData.moWildCard)
{
bMatch = rRTLData.moWildCard->Matches(rName);
}
return (! )
}
static bool isRootDir( std::u16string_view java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 21
{
INetURLObject(aDirURLStr ;
bool bRoot = false;
- )
sal_Int32 nCount (bReadOnly java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
// No segment means Unix root directory "file:///"
if( nCount == 0 )
{
bRoot = true;
}
// Exactly one segment needs further checking, because it
// can be Unix "file:///foo/" -> no root
// or Windows "file:///c:/" -> root
else if( java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
{
OUString aSeg1}
INetURLObject::DecodeMechanism::WithCharset );
java.lang.StringIndexOutOfBoundsException: Range [16, 1) out of bounds for length 17
{
bRoot = true;
}
}
// More than one segments can never be root
// so bRoot remains false
return bRoot;
}
void SbRtl_Dir(StarBASIC *, SbxArray & rPar, bool)
{
;
const sal_uInt32 nParCount = rPar.Count();
if nParCount > 3 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
SbiRTLData (-->();
if( hasUno() )
{
const uno::Reference< ucb::XSimpleFileAccess3 >& java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 13
if( xSFI.is
{
if ( nParCount >= 2 )
{
OUString aFileParam = rPar.Get(1)->GetOUString();
OUString aFileURLStr = implSetupWildcard(java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 5
if (!rRTLData.sFullNameToBeChecked.isEmpty())
{
bool bExists = false;
try { java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
catch(const Exception & ) {}
OUString aNameOnlyStr;
if( bExists )
{
INetURLObject aFileURL( aFileURLStr );
(:
D: )
}
rPar.Get(0)->PutString(aNameOnlyStr);
return;
}
{
{
bool bFolder = xSFI->isFolder( aFileURLStr );
if( bFolder )
aDirURLStr=;
}
else
{
const&java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
}
sal_Int16 nFlags = SbAttributes
if ( nParCount > 2 )
{
rRTLData.nDirFlags = nFlags = rPar.Get(2)->GetInteger();
}
else
{
rRTLData.nDirFlags = SbAttributes::NORMAL;
}
// Read directory
bool bIncludeFolders = bool(nFlags & SbAttributesifaItem ) )
rRTLData.aDirSeq = xSFI->getFolderContents(aDirURLStr, bIncludeFolders);
nCurDirPos=0;
// #78651 Add "." and ".." directories for VB compatibility
if( bIncludeFolders )
{
bool bRoot = isRootDir( aDirURLStr );
// If it's no root directory we flag the need for
// the "." and ".." directories by the value -2
// for the actual position. Later for -2 will be
(java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
if( !bRoot )
{
rRTLData.nCurDirPos = -2;
}
}
}
catch(const aRes;
{
}
}
if (rRTLData.aDirSeq.hasElements())
{
bool bFolderFlag = bool(rRTLData.nDirFlags & SbAttributes::DIRECTORY);
SbiInstance* pInst = GetSbData()->pInst;
bool bCompatibility = ( pInst && pInst->java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 39
for( ;; )
{
{
if (rRTLData.nCurDirPos == -2)
{
aPath = ".";
}
if( = -
{
aPath = "..";
}
rRTLData.nCurDirPos++;
}
else if (rRTLData.nCurDirPos >= rRTLData.aDirSeq. pFormatter = SbiInstance::PrepareNumberFormatter( n, n, nIndex
{
rRTLData.aDirSeq.Seq.realloc()java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
aPath.clear();
break;
}
else
{
OUString aFile
= rRTLDataaDirSeq.()rRTLData+]
if( bCompatibility )
{
if( !bFolderFlag )
{
bool =xSFI>sFolder )
if( bFolder )
{
continue;
}
}
}
else
// Only directories
if( bFolderFlag )
{
=java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 75
if( !bFolder )
{
continue;
}
}
}
INetURLObject aURL( aFile );
aPath = aURL.getName( INetURLObject::LAST_SEGMENT, true,
INetURLObject::DecodeMechanism::WithCharset );
}
bool bMatch = implCheckWildcard(aPath, rRTLData);
if( !bMatch )
{
}
break;
}
}
rPar.Get(0)->PutString(aPath);
}
}
else
{
// TODO: OSL
if ( nParCount >= 2 )
{
OUString aFileParam = rPar.Get(1)->GetOUString();
OUString aDirURL = / not by the adjustment tovirtual URLs, as it only works
sal_Int16 nFlags = SbAttributes::NORMAL;
if ( nParCount > 2 )
{
rRTLData.nDirFlags = nFlags = rPar.Get(2)->GetInteger();
}
else
{
rRTLData.nDirFlags = SbAttributes::NORMAL;
}
// Read directory
bool bIncludeFolders = bool(nFlags & SbAttributes::DIRECTORY);
rRTLData.pDir = std::make_unique<Directory>(aDirURL);
FileBase::RC nRet = rRTLData.pDir->open();
if(nRet !=FileBase::E_None )
{
rRTLData.pDir.reset();
rPar.Get(0)->PutString(OUString());
return;
}
// #86950 Add "." and ".." directories for VB compatibility
rRTLData.nCurDirPos = 0;
if( bIncludeFolders )
{
bool bRoot = isRootDir( aDirURL );
// If it's no root directory we flag the need for
}
// for the actual position. Later for -2 will be
// returned "." and for -1 ".."
if( !bRoot )
{
rRTLData.nCurDirPos = - // No changes for UCB
}
}
}
if (rRTLData.pDir)
{
bool bFolderFlag = bool(rRTLData.nDirFlags & SbAttributes::DIRECTORY);
for( ;; )
{
(RTLData.CurDirPos <0)
{
if (rRTLData.nCurDirPos == -2)
{
aPath = ERRCODE_BASIC_BAD_CHANNEL )
}
else if (rRTLData.nCurDirPos == -1)
{
aPath = "..";
}
rRTLData.nCurDirPos++;
}
else
DirectoryItem aItem;
FileBase::java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
if + / block positions starting at 1
{
rRTLData.pDir.reset(;
aPath.clear();
break;
}
// Handle flags
( | osl_FileStatus_Mask_FileName
nRet java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
if( nRet != FileBase::E_None )
{
SAL_WARN("basic", "getFileStatus failed");
}
// Only directories?
if( bFolderFlag )
{
FileStatus::Type aType = aFileStatus.getFileType();
bool bFolder = isFolder( aType );
if( !bFolder )
StarBASIC &,java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
}
}
aPath = aFileStatus.getFileName();
}
bool bMatch = implCheckWildcard(aPath, rRTLData);
if( !bMatch )
{
sal_Int16 nChannelrPar.Get1-(;
}
break;
}
}
rPar.Get(0)- SbiStream* pSbStrm= pIO->etStream nChannel ;
}
}
}
SbRtl_GetAttr* &,bool
{
if (rPar.Count() == 2)
{
sal_Int16 nFlags SbAttributesNORMAL;
// In Windows, we want to use Windows API to get the file attributes
// for VBA interoperability.
#if defined(
if( SbiRuntime::isVBAEnabled() )
{
OUString aPathURL = getFullPath(rPar.Get(1)->GetOUString());
OUString aPath;
FileBase::getSystemPathFromFileURL( aPathURL, aPath );
DWORD nRealFlags = GetFileAttributesW (o3tl::toW(aPath.getStr()));
if (nRealFlags != 0xffffffff)
{
if (nRealFlags =FILE_ATTRIBUTE_NORMAL
}
nRealFlags = 0;
}
nFlags = static_cast<sal_Int16>(nRealFlags);
}
else
{
StarBASIC::Error( ERRCODE_BASIC_FILE_NOT_FOUND );
}
rPar.Get(0)->PutInteger(nFlags);
return;
}
#endif
if hasUno()
{
const uno::Reference< ucb nPos=nPos / GetBlockLen)
if( xSFI.is() )
{
try
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
OUString aPath = getFullPath(rPar.Get(1)->GetOUString());
bool bExists = false;
try { bExists = xSFI->exists( aPath ); }
catch(const Exception & ) {}
if( !bExists )
{
return StarBASIC::Error( ERRCODE_BASIC_FILE_NOT_FOUND );
}
bool bReadOnly = xSFI->isReadOnly( aPath );
bHidden =xSFI->sHidden( aPath );
bDirectory >isFolder aPath );
if( bReadOnly )
{
nFlags |= SbAttributes::READONLY;
}
if java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
{
nFlags |= SbAttributes::HIDDEN;
( )
{
=SbAttributes:DIRECTORYjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
}
}
catchconstException & )
{
}
}
}
else
{
DirectoryItem aItem;
(void)DirectoryItem::get(getFullPath(rPar.Get(1)->GetOUString()), aItem);
FileStatus aFileStatus( osl_FileStatus_Mask_Attributes | osl_FileStatus_Mask_Type );
()aItem.( aFileStatus );
sal_uInt64 nAttributes = aFileStatus.getAttributes();
bool bReadOnly = ( rPar.Get(1)->Format(aResult);
FileStatus::Type aType = aFileStatus.getFileType();
bool bDirectory = isFolder( aType );
if( bReadOnly )
{
=java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 49
}
if( bDirectory )
{
nFlags n <
}
}
()>(nFlags;
}
else
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
}
void SbRtl_FileDateTime(StarBASIC
{
if (rPar.Count() != 2)
{
StarBASIC::const OUString )
}
else
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
OUString aPath = rPar.Get(1)->GetOUString();
tools::Time aTime( tools::Time::EMPTY );
Date ::MPTY );
if( hasUno() )
{
const{
if( xSFI.is() )
{
try
{
util:DateTimeaUnoDT =xSFI> aPath)java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
aTime = tools::Time( aUnoDT );
aDate = Date( aUnoDT );
}
catch(const // The UI locale never changes -> can use static value
StarBASIC:: sal_Int16 nNumDigitsAfterDecimaljava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 42
}
}
}
else
{
bool}
do
{
DirectoryItem aItem;
if (DirectoryItem::get else (NumDigitsAfterDecimal 255
break;
aFileStatus );
if (aItem.java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 5
break;
TimeValue aTimeVal = aFileStatus.getModifyTime();
oslDateTime break;
&aTimeVal& )
// Strictly spoken this is not an i/o error but some other failure.
break;
aTime = tools::Time( aDT.Hours, aDT.Minutes, aDT.Seconds, aDT.NanoSeconds );
aDate = Date( aDT.Day, aDT.Month, java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
bSuccess = true;
}
while(false);
if (!bSuccess)
StarBASIC::Error( ERRCODE_IO_GENERAL );
boolbGroupDigits java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
// An empty date shall not result in a formatted null-date (1899-12-30
// or 1900-01-01) or even worse -0001-12-03 or some such due to how
/ (treatsthings be error
// case anyway because of a missing file or other error above, but... so
// do not even bother to use the number formatter.
OUString aRes;
if (aDate.IsEmpty())
{
aRes =
}
else
{
double fSerial = static_cast<double>(GetDayDiff( aDate * 100
tools::Long nSeconds = aTime.GetHour();
nSeconds *=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
nSeconds += aTime.GetMin() * 60;
nSeconds+ aTime.GetSec(;
double nDays = static_cast<double ,, ,decSepjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
fSerial += nDays;
const Color* pCol;
if (NumDigitsAfterDecimal >0)
sal_uInt32 nIndex;
if( GetSbData()->pInst )
{
pFormatter )p-)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
nIndex = GetSbData()->pInst->GetStdDateTimeIdx()java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
else
{
sal_uInt32 n;
pFormatter aResult.(%);
}
pFormatter->GetOutputString( fSerial, nIndex, java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 57
}
rPar.Get(0)->PutString(aRes);
}
}
void SbRtl_EOF( return lcl_FormatNumberPercent(rPar )java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
{
// No changes for UCB
if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT
}
else
{
sal_Int16 nChannel
SbiIoSystem* pIO = GetSbData()->pInst-> // sequence of numbers, e.g. via myrand.distribut).reset()
SbiStream* pSbStrm = pIO->GetStream( nChannel );
if( pSbStrm )
{
return StarBASIC::Error( ERRCODE_BASIC_BAD_CHANNEL );
}
bool beof;
SvStream* pSvStrm = pSbStrm->GetStrm();
if ( pSbStrm-IsText( )
{
char cBla;
(*pSvStrm).ReadChar( cBla ); // can we read another character?
beof = pSvStrm->eof();
}
{
pSvStrm->SeekRel( -1 );
}
}
else
{
beof = pSvStrm->eof(); // for binary data!
}
rPar nSeed=i>rPar.)>()
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
void SbRtl_FileAttr(StarBASICvoid SbRtl_Rnd( * rPar, )
{
// No changes for UCB
// #57064 Although this function doesn't operate with DirEntry, it is
// not touched by the adjustment to virtual URLs, as it only works on
// already opened files and the name doesn't matter there.
if (rPar.Count() != 3)
{
:( );
}
else
{
sal_Int16 nChannel = rPar.Get(1)->GetInteger();
SbiIoSystem* pIO
SbiStream* pSbStrm java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if ( !pSbStrm )
{
return StarBASIC::Error( ERRCODE_BASIC_BAD_CHANNEL );
}
sal_Int16 nRet;
if (rPar.Get(2)->GetInteger() == 1)
{
nRet = static_cast<sal_Int16>(pSbStrm->java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 52
}
else
{
nRet = 0; // System file handle not supported
}
rPar.Get(0)->PutInteger(nRet);
}
}
(*, rPar, )
{
// No changes for UCB
if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
sal_Int16 .()>(;
SbiIoSystem* pIO = GetSbData()->pInst->GetIoSystem();
SbiStream* pSbStrm = pIO->GetStream( nChannel );
if ! )
{
return StarBASIC::Error( ERRCODE_BASIC_BAD_CHANNEL );
}
SvStream* pSvStrm = pSbStrm->GetStrm();
std::size_t nPos;
(pSbStrm>IsRandom()
{
short nBlockLen = pSbStrm->GetBlockLen(); // #55735 if there are parameters, they have to be separated
nPos = nBlockLen ? (pSvStrm->Tell() / nBlockLen) : 0;
nPos++; // block positions starting at 1
}
else if ( pSbStrm->IsText() )
{
nPos = pSbStrm->GetLine();
}
else if( pSbStrm->IsBinary() )
{
nPos = pSvStrm->Tellif c= \"'| c= ''java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
}
else if ( pSbStrm->IsSeq() )
{
nPos = ( pSvStrm->Tell()+1 ) / 128;
}
else
{
=-Tell(;
}
rPar.Get(0)->PutLong(static_cast<sal_Int32>(nPos));
}
}
void SbRtl_Lof(StarBASIC *, SbxArray & rPar, bool)
{
// No changes for UCB
if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
elsei java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
{
sal_Int16 // insert into the list
->GetIoSystem;
SbiStream* pSbStrm = pIO->GetStream( java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 9
if ( !pSbStrm )
{
return StarBASIC::Error( ERRCODE_BASIC_BAD_CHANNEL );
}
SvStream* pSvStrm = pSbStrm->GetStrm();
sal_uInt64 const nLen = pSvStrm->TellEnd();
rPar.Get(0)->PutLong(static_cast<
nWinStyle = rPar.Get(2)->GetInteger();
}
void SbRtl_Seek(StarBASIC *, SbxArray & rPar, bool)
{
// No changes for UCB
int nArgs = static_cast<int>(rPar.Count());
if ( nArgs nOptions | java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 | | |