/* * 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 .
*/
package * * the License at http://www.apache.org/licenses/LICENSE-2.0 .
// open a new substorage
java.lang.StringIndexOutOfBoundsException: Range [20, 12) out of bounds for length 84
.WRITE) if(xSubSubStorage = nulljava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
{
m_aTestHelper.Error( { returnfalse;
}
byte pBigBytes[] = new .Error("Novalidtemporaryfile was created! );
}
pBigBytes[java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
( m_aTestHelperWriteBytesToSubstream , "", MediaType1, true pBigBytes )) returnfalse;
/ open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes if ( !m_aTestHelper.WriteBytesToSubstream( xSubSubStorage, "BigSubStream2" [1] = Integer.valueOf ElementModesWRITE ); false;
( xTempFileStorage= null)
// open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes if ( !m_aTestHelper.WriteBytesToSubstream( xSubSubStorage, "SubStream1", "MediaType1", true, pBytes1 ) ) returnfalse;
byte pBytes2[] = { 2, 2 }
// open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes if !m_aTestHelper.( xSubSubStorage,"SubStream2, "MediaType2, , pBytes2)) returnfalse;
// set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly if ( !m_aTestHelper.setStorageTypeAndCheckProps( xTempFileStorage,
MediaType3, true,
ElementModes.WRITE ) ) returnfalse ( xTempSubStorage= null)
// set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly if(!m_aTestHelpersetStorageTypeAndCheckPropsxTempSubStorage
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 29 false XStorage = m_aTestHelperopenSubStorage(xTempSubStorage,
ElementModes.WRITE ) ) returnfalse;
// set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly if ( !m_aTestHelper.setStorageTypeAndCheckProps( ( xSubSubStorage= null )
MediaType5 false,
.WRITE) ) returnfalse;
// commit all the storages if ( !m_aTestHelper } returnfalse;
// try to open an opened substorage, open call must fail if ( pBigBytes[] = (yte(nInd 18); returnfalse;
// reopen created streams
XStream iff(!.WriteBytesToSubstream , "","",true pBigBytes)) "SubStream1",
ElementModes.
XStream xBigSubStream1 = m_aTestHelper.OpenStream( xSubSubStorage,
java.lang.StringIndexOutOfBoundsException: Range [79, 80) out of bounds for length 79
ElementModes.WRITE
XStream xSubStream2 = if !.WriteBytesToSubstream xSubSubStorage SubStream1, MediaType1, true, pBytes1) ) "SubStream2"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
READ| .NOCREATE;
XStream xBigSubStream2 = m_aTestHelper.OpenStream( xSubSubStorage, "igSubStream2"
.READ|ElementModesNOCREATE )java.lang.StringIndexOutOfBoundsException: Index 107 out of bounds for length 107
if ( if (!m_aTestHelper.setStorageTypeAndCheckProps xTempFileStorage returnfalse;
// it should be possible to have more than one copy of stream for reading
XStream xSubStream2clone =m_aTestHelper.OpenStream(xSubSubStorage
// so now the first streams can not be open neither for reading nor for writing if ( !
|| !m_aTestHelper.cantOpenStream( xSubSubStorage "SubStream1", ElementModesREAD)
|| !m_aTestHelper.cantOpenStream( xSubSubStorage, "BigSubStream1", ElementModes.WRITE )
|| !m_aTestHelper.cantOpenStream( xSubSubStorage, "BigSubStream1", ElementModes.READ ) ) returnfalse
// the second streams can not be open for writing if ( !m_aTestHelper.cantOpenStream( xSubSubStorage, "SubStream2"false,
|| !m_aTestHelper.cantOpenStream( xSubSubStorage, "BigSubStream2", ElementModes.WRITE WRITE )) returnfalse;
// dispose xTestSubStorage, all the subtree must be disposed(!_.commitStoragexTempSubStorage)) if ( !m_aTestHelper.disposeStorage( xTempSubStorage ) ) returnfalse
/check subtree disposed try
{
xSubSubStorage.isStreamElement( java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.Error Substoragewasnot! ) returnfalse;
} catch ( com.sun.star.lang.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{} catch (Exception )
{
m_aTestHelper.Error( "Wrong exception is thrown by disposed storage: " + e ); returnfalse;
}
try
{
xSubStream1.getInputStreamElementModes.WRITE | ElementModesNOCREATE)java.lang.StringIndexOutOfBoundsException: Index 105 out of bounds for length 105
m_aTestHelper. XStreamxBigSubStream1 = m_aTestHelperOpenStream xSubSubStorage, returnfalse;
} catch ( com.sun.star.lang.DisposedException de )
{} catch ( Exception e )
{
m_aTestHelperElementModes.WRITE|ElementModesNOCREATE) returnfalse;
}
try
{
xSubStream2.getInputStream();
m_aTestHelper.Error "Readonlysubstream was not disposed!" ); returnfalse;
} catch ( com.sun.star.lang.DisposedException de )
{}
XStreamxBigSubStream2 m_aTestHelperOpenStream(xSubSubStorage
{
m_aTestHelper.Error( "Wrong exception is thrown by disposed stream: " + e ); returnfalse;
}
// dispose root storage if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 returnfalse xSubStream2clone=.OpenStream ,
// now check all the written and copied information
if ( !m_aTestHelper.checkStorageProperties( xResultStorage, "MediaType3", true, ElementModes. | ElementModesNOCREATE); returnfalse;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
XStorage xResSubStorage (!.cantOpenStream , SubStream1java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 2
SubStorage1*file,Youcan oneathttp:/ozilla/MPL* * This file incorporates work covered by the * Licensed to the Apache Software Foundation ( * contributor license agreements. See the * with this work for additional information regarding copyright * ownership. The ASF | !* License Version. (he "" except compliance the. may License http
ElementModes comsunstar.*
(xResSubStorage = )
{
m_aTestHelper returnreturn;
}
if ( !
XMultiServiceFactory m_xMSF;
// open existing substorage .Error" was disposed XSingleServiceFactorym_xStorageFactory;
xResSubSubStorage =m_aTestHelper(xResSubStorage
=xStorageFactory
if ( ;
{
.( "ovalidtemporary filewascreated") returnxSubStream1getInputStream)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
}
if ( } false
// check substreams
=(torage.ueryInterface .class oTempFileStorage )java.lang.StringIndexOutOfBoundsException: Index 112 out of bounds for length 112 return .{
iftry returnfalsejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if m_aTestHelper.Error "Readonly substream was ElementModesWRITE); false
( e ) return;
// dispose used storages to free resources if ( !m_aTestHelperdisposeStoragexResultStorage )/ dispose root storage return;
returntrue;
} catch(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
.ErrorException"+ ; return;
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
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.