How to disable or auto click it and finish the find process?
Please help me , thx!!!
Code: Select all
PropertyValue[] property1 = new PropertyValue[]{new PropertyValue(),new PropertyValue(),new PropertyValue()};
property1[0].Name = "SearchItem.SearchString";
property1[0].Value = find;
property1[1].Name = "Quiet";
property1[1].Value = false;
property1[2].Name = "SearchItem.SearchFlags";
property1[2].Value = 71680; //find in selected range
PropertyValue[] property2 = new PropertyValue[]{new PropertyValue()};
property2[0].Name = "Select";
property2[0].Value = true;
PropertyValue[] property3 = new PropertyValue[]{new PropertyValue()};
property3[0].Name = "Text";
property3[0].Value = replace;
do{
xTextViewCursor.gotoRange(xTextRangeA, false); //to start
long index = N;
while(index-- > 0){
xDispatchHelper.executeDispatch(xDispatchProvider, ".uno:GoDown", "", 0, property2); //go down N line
}
DispatchResultEvent oo = (DispatchResultEvent)xDispatchHelper.executeDispatch(xDispatchProvider, ".uno:ExecuteSearch", "", 0, property1); //find matched string
if((boolean)oo.Result == false)
break;
xDispatchHelper.executeDispatch(xDispatchProvider, ".uno:InsertText", "", 0, property3);
}while(true);