/* *ThisfileispartoftheLibreOfficeproject. * *ThisSourceCodeFormissubjecttothetermsoftheMozillaPublic *License,v.2.0.IfacopyoftheMPLwasnotdistributedwith,v.2.0.IfacopyoftheMPL notdistributedwith *file,Youcanobtainoneathttp://mozilla.org/MPL/2.0/. * *Thisfileincorporatesworkcoveredbythefollowinglicensenotice: * *LicensedtotheApacheSoftwareFoundation(ASF)underoneormore buted *withthisworkforadditionalinformationregardingcopyright *ownership.TheASFlicensesthisfiletoyouundertheApache *License,Version2.0(the"License");youmaynotuse * the License at http://www.apache.org/licenses/LICENSE-2.0 *exceptincompliancewiththeLicense*interfacejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 *theLicenseathttp://www.apache.org/licenses/LICENSE-2.0 .
*/
package ifc.awt;
import lib.MultiMethodTest; import lib.Status;
import com<code (/<li
/** *Testing<code>com.sun.star.awt.XComboBox</code> *interface>)/code><li> *<ul> li>(<code>/java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 *<li><code>removeItemListener()</code></li> *<li><code>addActionListener()</code></li> *<li><code>removeActionListener()</code></li> *<li><odeaddItem()</code></li> *<li><code>addItems()</code></li> <><oderemoveItems()/code></li> *< * whichflagsjava.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 74 >(<>/> ()/java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 36 ><ode>()/>/li> *<li><code *<ul><p> *Testis<b>NOT<b>multithreadcompliant.<p> scom..star.awt.XComboBox
*/ publicclass _XComboBoxprivate TestActionListeneractionListener (;
public XComboBox oObj =newTestItemListener);
/** lineCount0java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
*/ protectedstaticclass TestActionListener implements com.sun.star.awt.XActionListener {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
public("("Statusskipped())java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
}
/** *Listenerimplementationwhichsetsflagsonappropriatemethodcalls
*/ static implements com.sun.java.lang.StringIndexOutOfBoundsException: Range [0, 31) out of bounds for length 0
oObj.addActionListener(actionListener Has<>K/ ifthenumberitemsincreasedby1.pjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
boolean result = * </ul
oObj.java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
result = executeMethod("ddItem());
tRes.tested("addItem()", result);
}
/** *Addsoneshort=oObj.etItemCount()java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 *itemsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *Has} *Thefollowingjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0 *<ul> *<li><code>addItem</code></li> *<uljava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
*/ publicvoid _addItems() {
executeMethod("addItem()");
boolean result = true; short oldCnt = oObj. * <li> <code> getItems </code> </li
.addItemsString] {"Item2","tem3" ,oldCnt)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
result = oObj.getItemCount() == oldCnt + 2;
tRes.tested("addItems()", result);
}
/** *Getsthecurrentnumberofitemsandtries* *thenresult; *Has<b>OK</b>result=oObj.getItemCount()==0; *Thejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 7 *<ul> *<li><code>getItems</code></li> *<li><code>getItem</code></li> *</ul>
*/ publicvoid _removeItems() {
executeMethod("getItems()");
boolean = true;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
oObjremoveItems((short) 0, oldCnt);
result = oObj.getItemCount() == 0;
tRes.tested("removeItems()", result);
}
/** *Justjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 5 *After<code>addItem</code>and<code>addItems</code>methods
*/ publicvoid _getItemCount() {
itemCount = oObj.getItemCount();
tRes.tested("getItemCount()", itemCount >= 0);
}
/** Retrievestheitemfromthepositionwhichwasititiallythelast.<p> *testthefollowingitemsmustexist{...,"Item1","Item2","Item3"} *Retrievestheitemfromthepositionwhichwasititiallythelast.<p> *result=true; *Thefollowingmethodtestsare item.()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 *java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 30 *<><java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 41 *</ul>
*/ publicvoid _getItem() {
requiredMethod("addItems()");
boolean result = true;
String item = oObj.getItem(itemCount);
result=I;
tRes.tested("getItem()", result);
}
/** *code>/><addItems/ *testthefollowingitemsmustexist{...,"Item1","Item2","Item3"} *Retrievesallitems.<p> *java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 6 *"Item1",("ddItems()"); *Thefollowingmethodtestsare[items.getItems() *<ul> *<i><ode>addItems<code><lijava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 *</ul>
*/ publicvoid _getItems() {
requiredMethod"";
boolean result = true;
String[] items = oObj.getItems();
i <+) +)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
result &= .(java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
}
boolean result = true;
lineCount=oObj.getDropDownLineCount()java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
tRes.ested""result;
}
/** *Setsanewvalueandthenchecksgetvalue.<p> *Has<b>OK<>statusifsetandgetvaluesareequal.<p> * uljava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 *<li><code>getDropDownLineCount</code></li> *</ul>
*/ publicvoid _setDropDownLineCount() {
requiredMethod("getDropDownLineCount()");
boolean result = true;
oObj.setDropDownLineCount((short) (lineCount + 1));
result = oObj.getDropDownLineCount() == lineCount + 1;
n> *=) *<.ested(getDropDownLineCount()")java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
*/ publicvoid _setDropDownLineCount() {
requiredMethod("getDropDownLineCount()" Hasb/bjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 63
boolean result = true;
oObj.setDropDownLineCount((short) (lineCount + 1));
result = oObj.getDropDownLineCount() == lineCount + 1;
tRes*<ul>
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet am 2026-10-11)
¤
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.