<commit_before>
/*
 * Last changes made by $Author: andreas $, $Date: 2006-11-22 09:31:27 +0100 (Mi, 22 Nov 2006) $
 */
import ooo.connector.BootstrapSocketConnector;

import com.sun.star.beans.PropertyValue;
import com.sun.star.document.EventObject;
import com.sun.star.document.XEventBroadcaster;
import com.sun.star.document.XEventListener;
import com.sun.star.lang.XComponent;
import com.sun.star.uno.UnoRuntime;

/**
 * @author <NAME>
 * @version $Revision: 11063 $
 */
public class Lo4ConnectionTest {

	public static void main(String[] args) {
		com.sun.star.uno.XComponentContext xContext = null;

		try {
               // host and port
        String hostAndPort = "host=localhost,port=8100";

        // accept option
        String oooAcceptOption = "-accept=socket,"+hostAndPort+";urp;";

        // connection string,
        String unoConnectString = "uno:socket;host=localhost,port=8100;urp;StarOffice.ComponentContext";
			// get the remote office component context
			xContext = BootstrapSocketConnector
					.bootstrap("C:\\Program Files (x86)\\LibreOffice 4\\program");
			if (xContext != null)
				System.out.println("Connected to a running office ...");
			com.sun.star.lang.XMultiComponentFactory xMCF = xContext
					.getServiceManager();
			Object oDesktop = xMCF.createInstanceWithContext(
					"com.sun.star.frame.Desktop", xContext);
			com.sun.star.frame.XComponentLoader xCompLoader = (com.sun.star.frame.XComponentLoader) UnoRuntime
					.queryInterface(com.sun.star.frame.XComponentLoader.class,
							oDesktop);
			XComponent xComponent = xCompLoader.loadComponentFromURL(
					"private:factory/swriter", "_blank", 0,
					new PropertyValue[0]);

			XEventBroadcaster xEventBroadcaster = (XEventBroadcaster) UnoRuntime<commit_msg>Those variables are never used<commit_after>
/*
 * Last changes made by $Author: andreas $, $Date: 2006-11-22 09:31:27 +0100 (Mi, 22 Nov 2006) $
 */
import ooo.connector.BootstrapSocketConnector;

import com.sun.star.beans.PropertyValue;
import com.sun.star.document.EventObject;
import com.sun.star.document.XEventBroadcaster;
import com.sun.star.document.XEventListener;
import com.sun.star.lang.XComponent;
import com.sun.star.uno.UnoRuntime;

/**
 * @author <NAME>
 * @version $Revision: 11063 $
 */
public class Lo4ConnectionTest {

	public static void main(String[] args) {
		com.sun.star.uno.XComponentContext xContext = null;

		try {
			// get the remote office component context
			xContext = BootstrapSocketConnector
					.bootstrap("C:\\Program Files (x86)\\LibreOffice 4\\program");
			if (xContext != null)
				System.out.println("Connected to a running office ...");
			com.sun.star.lang.XMultiComponentFactory xMCF = xContext
					.getServiceManager();
			Object oDesktop = xMCF.createInstanceWithContext(
					"com.sun.star.frame.Desktop", xContext);
			com.sun.star.frame.XComponentLoader xCompLoader = (com.sun.star.frame.XComponentLoader) UnoRuntime
					.queryInterface(com.sun.star.frame.XComponentLoader.class,
							oDesktop);
			XComponent xComponent = xCompLoader.loadComponentFromURL(
					"private:factory/swriter", "_blank", 0,
					new PropertyValue[0]);

			XEventBroadcaster xEventBroadcaster = (XEventBroadcaster) UnoRuntime
{'fraction_non_alphanumeric': 0.12135319677219118, 'fraction_numerical': 0.024208566108007448, 'mean_word_length': 4.083596214511041, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6582410', 'n_tokens_mistral': 1172, 'n_tokens_neox': 983, 'n_words': 205}