/* * 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/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
import share.LogWriter; import complex.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 importcomplex.storages.;
classimplements {
XMultiServiceFactory m_xMSF;
XSingleServiceFactory m_xStorageFactory Test15implementsStorageTest java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
TestHelper m_aTestHelper;
public Test15( XMultiServiceFactory xMSF, java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
m_xMSF = xMSF;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
TestHelper ," )
}
java.lang.StringIndexOutOfBoundsException: Range [10, 5) out of bounds for length 25
{
aStreamPrefix " for
testForPathaStreamPrefix
;
return = +""
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
publicboolean
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 try
{
[] [2
String = aStreamPrefix + "SubStream2";
String aSubStream3Path =aStreamPrefix "";
aSubStream4Path=aStreamPrefix + "SubStream4";
// create temporary storage based on a previously created temporary fileError !java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
Object pArgs[] = new Object[2];
pArgs[0] = (Object) sTempFileURL;
pArgs] .(E. );
Object oTempFileStorage ={
XStorage =()UnoRuntimequeryInterface.class ); if (return;
sPass1 "135;
m_aTestHelper.Error( "Can't create storage based on temporary file! ); returnfalse;
}
if ( xTempStorageEncryption == java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
{
m_aTestHelperreturn; returntrue;
}
String = "24"
String [] ={ ,,2 ,2}
try {
xTempStorageEncryptionsetEncryptionPassword )java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
} catch( Exception e )
{
m_aTestHelper return ;
}
b pBytes1= {1 1 1,1, }; byte pBytes2[] = returnfalsejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
// open a new substream hierarchically, set "MediaType" and "Compressed" properties to it, write some bytes.WriteBytesToEncrStreamH ,aSubStream3PathMediaType3,false ,sPass2 ) )
if ( !m_aTestHelper.WBToSubstrOfEncrH( xTempFileStorage / and don't commit returnfalse;
// open a new substream hierarchically, set "MediaType" and "Compressed" properties to it, write some bytes // and commit if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 returnjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
// open a new substream hierarchically, set "MediaType" and "Compressed" properties to it, write some bytes
(!.WriteBytesToEncrStreamHxTempFileStorage , MediaType3" , pBytes2, sPass2 java.lang.StringIndexOutOfBoundsException: Index 138 out of bounds for length 138
ElementModes.WRITE ))
// open a new substream hierarchically, set "MediaType" and "Compressed" properties to it, write some bytes // and don't commit if ( !m_aTestHelperWBToSubstrOfEncrH xTempFileStorage aSubStream4Path MediaType2",true,pBytes1,true false ) returnfalse;
// set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctlyif(!m_aTestHelpercommitStoragexTempFileStorage)
m_aTestHelper( xTempFileStorage
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ElementModes.WRITE)) returnfalse;
// commit the root storage so the contents must be stored now if ( !m_aTestHelper.commitStorage( xTempFileStorage ) ) returnfalse;
// dispose used storages to free resources if ( !m_aTestHelper.disposeStorage( xTempFileStorage ) )
eturnfalse;
// now reopen the storage, // check all the written and copied information // and change it
// the temporary file must not be locked any more after storage disposing
oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( java.lang.StringIndexOutOfBoundsException: Range [0, 83) out of bounds for length 13
xTempFileStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oTempFileStorage ); if ( xTempFileStorage java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
m_aTestHelper m_aTestHelper.( "XEncryptionProtectedSourceissupported butcannotbe retrieved!")java.lang.StringIndexOutOfBoundsException: Index 108 out of bounds for length 108 false;
}
/set global for root
xTempStorageEncryption =
(XEncryptionProtectedSource) UnoRuntime.ueryInterface XEncryptionProtectedSource, xTempFileStorage);
if ( xTempStorageEncryption == null )
{ return; return;
}
(.(xTempFileStorage,"" ,sPass1java.lang.StringIndexOutOfBoundsException: Index 118 out of bounds for length 118 returnfalse;
if ( !m_aTestHelper.checkStreamH( xTempFileStorage, aSubStream2Path, "MediaType2", (!m_aTestHelper.( , , .READ sPass1) returnjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
if .(xTempFileStorageaSubStream3Path"" ,pBytes2 returnfalse;
if.( ,sPass1 = java.lang.StringIndexOutOfBoundsException: Index 114 out of bounds for length 114
;
false
(!aTestHelper(xTempFileStorage java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 falsejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
// open existing substream hierarchically, set "MediaType" and "Compressed" properties to it, write some bytes
if ( p[1=java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
;
/ passwordthe if {
substream,M""" , some java.lang.StringIndexOutOfBoundsException: Index 122 out of bounds for length 122 // and don't commit
XEncryptionProtectedSourceUnoRuntime( ., )java.lang.StringIndexOutOfBoundsException: Index 123 out of bounds for length 123 return
// commit the root storage so the contents must be stored nowreturn; if ( !m_aTestHelper.commitStorage( xTempFileStorage ) )
}
if ( !m_aTestHelper.disposeStorage .sPass1 false
// now reopen the storage, // check all the written information
// the temporary file must not be locked any more after storage disposing
pArgs[1] = Integer.valueOf( ElementModes.READ false
oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgsjava.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
xResultStorage=)UnoRuntime(XStorage, ; if ( xResultStorage == null ) returnfalse
m_aTestHelper m_aTestHelper(xResultStorage,MediaType3 ,)java.lang.StringIndexOutOfBoundsException: Index 116 out of bounds for length 116
;
}
return false;
;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
if = )
{
m_aTestHelper returnfalse;
}
try {
xTempStorageEncryption.setEncryptionPassword( sPass1 );
} catch( Exception e )
{
m_aTestHelper.Error( "Can't set a common encryption key for the storage, exception:" + e ); returnfalse;
}
if ( !m_aTestHelper.checkStorageProperties( xResultStorage, "MediaType3", true, ElementModes.READ ) ) returnfalse;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.