procedure TOpenOffice.ooPasteFromClip; var oDispatcher,oArgs:variant; CoreReflection,propertyValue0,propertyValue1,propertyValue2:variant; oFrame:variant; begin oDispatcher:=StarOffice.createInstance('com.sun.star.frame.DispatchHelper'); CoreReflection:=StarOffice.createInstance('com.sun.star.reflection.CoreReflection'); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue0); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue1); oArgs:=VarArrayCreate([0,0],varVariant); propertyValue0.Name:=''; propertyValue0.Value:=0; oArgs[0]:=propertyValue0; oFrame:=Document.getCurrentController.getFrame; oDispatcher.executeDispatch(oFrame,'.uno:Paste','',0,oArgs); end; |