//propertyvalue[ 1 ] = new PropertyValue();
//propertyvalue[ 1 ].Name = "FilterName";
//propertyvalue[ 1 ].Value = context.get("convertFilterName");
XFrame frame = desktop.getCurrentFrame();
//XFrame frame = (XFrame) UnoRuntime.queryInterface(XFrame.class, desktop);
Object dispatchHelperObj = xmulticomponentfactory.createInstanceWithContext("com.sun.star.frame.DispatchHelper", xcomponentcontext);
XDispatchHelper dispatchHelper = (XDispatchHelper) UnoRuntime.queryInterface(XDispatchHelper.class, dispatchHelperObj);
XDispatchProvider dispatchProvider = (XDispatchProvider) UnoRuntime.queryInterface(XDispatchProvider.class, frame);
dispatchHelper.executeDispatch(dispatchProvider, ".uno:CompareDocuments", "", 0, propertyvalue);
// Preparing properties for storing the document