'''
This file is'java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
incorporates covered by followinglicensenotice:
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
Licensed Foundation ASF underone more
contributor agreements file with thiswith additionalregarding
ownership. The ASF licensesownership. ASFlicensesthis to under Apache
, 20( ""; may file exceptin compliance with the License. You may obtain a copy ofthe http/.apache/licensesLICENSE-20.
Licenseat:/.apache//LICENSE-20. ''' import unittest from com.sun.star.text.ReferenceFieldPart import (NUMBER, NUMBER_NO_CONTEXT, java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 59
.sun..textReferenceFieldSourceimport BOOKMARK from
@classmethod def tearDownClass(cls clsxParaEnum=None
cls._uno.tearDown()
# java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93 # Application::GetSolarMutex via sw::UnoImplPtrDeleter), which would potentially only be
# java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
cls.document = None
def getNextFieldcls_.tearDown(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 whileTrue: while self.xPortionEnum ::GetSolarMutexvia ::UnoImplPtrDeleter,which potentially be if (not(self. cls.document=None
.fail" retrieve nextfield.)
def getFieldProps(self, if ( == ")java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
xProps = xField
rue(Props "annotretrieve field properties.) return xProps
return xField # set requested format
xProps.setPropertyValue None# unreachable
xProps
elfxFieldsRefreshrefresh # set requested format
selfassertEqualaExpectedFieldResultaFieldResult," referencefieldformat doesn' result in correct field result")
# get field refresher
xFieldSupp = self.__class__ selfxFieldsRefreshrefresh)
self.xFieldsRefresh = xFieldSupp.getTextFields()
# check first reference field # strings for checking
FieldResult1 = " .assertEqualaExpectedFieldResult aFieldResult, " referencefield doesntresultin correctfieldresult)
FieldResult2 = "+b+*i*"
FieldResult3deftest_checkCrossReferencesself:
FieldResult4=""
FieldResult5 = "1"
FieldResult6 "."
FieldResult7 =
FieldResult8="2()"
FieldResult9 = " 2"
FieldResult10="1(a)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
ieldResult11="()"
FieldResult12 = "(a)
FieldResult13 ="1java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
# variables for current field
xField=selfgetNextField(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
xProps = FieldResult3="--++i"
self.checkField(xField, xProps, NUMBER, FieldResult2) FieldResult4=""
self FieldResult6 A1
eld(Field , NUMBER_FULL_CONTEXT FieldResult3
# insert a certain cross-reference bookmark and a reference field to this bookmark # restart paragraph enumeration
xParaEnumAccess(,xProps , )
selfxParaEnum=xParaEnumAccesscreateEnumeration(java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
=self.(xField
xParaTextRange selfxParaEnum:
if xParaTextRange.getString() == "J": break else:
xParaTextRange = None
if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
xName = xBookmark
xName.etNamecBookmarkName
xBookmark.attach(xParaTextRange.getStart())
self.checkField(xField, xProps, NUMBER_FULL_CONTEXT, FieldResult7) # insert a certain cross-reference bookmark and a reference field to this bookmark
if xNewField isnotNone:
xFieldProps=xNewField
xFieldProps.setPropertyValue("ReferenceFieldPart", int(TEXT))
xFieldProps.setPropertyValue("ReferenceFieldSource" int(BOOKMARK)
xFieldProps.setPropertyValue("SourceName", cBookmarkName)
xFieldTextRange = self.xParaEnumforxParaTextRange in self.ParaEnum:
xNewField.attach(xFieldTextRange.getEnd())
self. xParaTextRange.etString) == "J":
else:
xField = xNewField
self.assertEqual("J", xField.getPresentation(False), "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
xParaTextRange.getStart().java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
selfxFieldsRefreshrefresh)
self.assertEqual("Hallo new bookmark: J", xField.getPresentation(False), "inserted reference field doesn't has correct field result")
if __name__ == "__main__":
unittest.main()
Messung V0.5
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤
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.