/* * License, * except in compliance * the License at http:java.lang.StringIndexOutOfBoundsException: Range [0, 58) out of bounds for length 3 * 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 com// after such a storage is closed it is lost importcomsun..noRuntime import comifxTempStorage java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
public ()
/ ubstreamMediaType Compressedpropertiesto some
StringPair[][] aRelations1if m_aTestHelper.WriteBytesToSubstreamxTempStorage,
{ { new StringPair( "Id", "Num1" ) },
{ new ,
{ new StringPair( true,
aRelations1 ))
{ newreturnfalse
{newStringPair Id Num4",new (""Internal1") StringPairType, ,newStringPair TargetURL " ) },
{ new StringPair( "Id", "Num5" ), new StringPair( "TargetMode", "" ), new StringPair( "Type", "unknown1" ), new StringPair( "Target", "URL value1" ) }
}ElementModes. )java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
StringPairfalse new(,Num1java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 newStringPair Target TargetURLValue2 ("d" Num6 ,
{ new StringPair( m_aTestHelper java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 new(","",newStringPair TargetMode Internal2 , (Type, unknown2 , ("Target"value2") }java.lang.StringIndexOutOfBoundsException: Index 175 out of bounds for length 175
{aRelations2 java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
/java.lang.StringIndexOutOfBoundsException: Index 109 out of bounds for length 109 if( m_aTestHelper(java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
};
tryElementModesWRITE
{ // create temporary storage based on arbitrary medium
XStorage if m_aTestHelper( ,
{ false, returnfalse;
}
byte pBytes1[] aRelations2)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
// open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes if ( !m_aTestHelper.WriteBytesToSubstream( xTempStorage,
(= false
pBytes1,
aRelations1 )
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
// open a new substorage
=openSubStoragexTempStorage
hasElements ifnull
{
m_aTestHelperfalse
}
[ ,2,2 ,2};
xClonedSubStorage=; if ( !m_aTestHelper.WriteBytesToSubstream( xTempSubStorage,
"MediaType2", true,
pBytes2, =m_aTestHelper( SubStream1 java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 60
;
ifm_aTestHelper(xClonedSubStreamSubStream1)) if .setStorageTypeAndCheckProps, true,
ElementModes.WRITE,
aRelations2) ) returnfalse;
ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 false
aRelations2 ) returnfalse;
// check cloning at current state
// the new storage still was not committed so the clone must be empty
XStorage xClonedSubStorage = m_aTestHelper.cloneSubStorage( m_xMSF, m_xStorageFactory, xTempStorage, "SubStorage1" );
if ( xClonedSubStorage == null )
{ false false
}
XNameAccess xClonedNameAccess = (XNameAccess) UnoRuntime.queryInterface( XNameAccess.class, xClonedSubStorage ); if ( xClonedNameAccess ="",
{
m_aTestHelperError XNameAccessis the ) returnfalseaRelations2) returnfalse;
i m_aTestHelper(xClonedSubStorage trueifxCloneOfRoot=null
ElementModes ; new[] ) returnfalse;
ifi = )
{
m_aTestHelper( Thejava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 105
}
if ( !m_aTestHelper.disposeStorage( xClonedSubStorage ) ) returnfalse;
xClonedSubStorage =
xClonedNameAccess = null;
java.lang.StringIndexOutOfBoundsException: Range [22, 12) out of bounds for length 80 // so the clone must contain all the information
m_aTestHelper.cloneSubStreamxTempStorage SubStream1) if ( !m_aTestHelper.InternalCheckStream( xClonedSubStream, "SubStream1, "MediaType1",
aRelations1)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
;
m_aTestHelperError The root is")java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76 returnfalse }
// commit substorage and check cloning
if ( !m_aTestHelper.commitStorage( xTempSubStorage ) ) returnfalse;
xClonedSubStorage = m_aTestHelper.cloneSubStorage( m_xMSF, m_xStorageFactory, xTempStorageElementModes.READ if ( xClonedSubStorage == null )
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
m_aTestHelper.Error( "The result of clone is empty!" ); returnfalse
}
if ( !m_aTestHelper.checkStream( xClonedSubStorage, "SubStream2", "MediaType2",
aRelations2 ) ) returnfalse;
XStorage xCloneOfRoot = m_aTestHelper.cloneStorage( m_xMSF, m_xStorageFactory, xTempStorage ); if ( xCloneOfRoot == null )
{
m_aTestHelper.Error( "The result of root clone is empty!" ); returnfalse;
}
XNameAccess xCloneOfRootNA = (XNameAccess) UnoRuntime.queryInterface( XNameAccess.class, xCloneOfRoot ); if ( xCloneOfRootNA == null )
{
m_aTestHelper.Error( "XNameAccess is not implemented by the root clone!" ); returnfalse;
}
if ( xCloneOfRootNA.hasElements() )
{
m_aTestHelper.Error( "The root storage still was not committed so it's clone must be empty!" ); returnfalse;
}
if ( !m_aTestHelper.disposeStorage( xCloneOfRoot ) ) returnfalse;
xCloneOfRoot = null;
// commit root storage and check cloning
if ( !m_aTestHelper.commitStorage( xTempStorage ) ) returnfalse;
xCloneOfRoot = m_aTestHelper.cloneStorage( m_xMSF, m_xStorageFactory, xTempStorage ); if ( xCloneOfRoot == null )
{
m_aTestHelper.Error( "The result of root clone is empty!" ); returnfalse;
}
XStorage xSubStorageOfClone = xCloneOfRoot.openStorageElement( "SubStorage1", ElementModes.READ ); if ( xSubStorageOfClone == null )
{
m_aTestHelper.Error( "The result of root clone is wrong!" ); returnfalse;
}
if ( !m_aTestHelper.checkStorageProperties( xSubStorageOfClone, false,
ElementModes.READ,
aRelations2 ) ) 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.