GUI working
This commit is contained in:
parent
51983943cb
commit
f9a9aefc72
8 changed files with 514 additions and 10 deletions
|
@ -1,11 +1,29 @@
|
|||
package org.libreoffice.example.comp;
|
||||
|
||||
import com.sun.star.uno.UnoRuntime;
|
||||
import com.sun.star.uno.XComponentContext;
|
||||
|
||||
import pro.litvinovg.libreoffice.metadata.Document;
|
||||
import pro.litvinovg.libreoffice.metadata.views.EditorGUI;
|
||||
|
||||
import com.sun.star.lib.uno.helper.Factory;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
|
||||
import org.libreoffice.example.dialog.ActionOneDialog;
|
||||
import org.libreoffice.example.helper.DialogHelper;
|
||||
|
||||
import com.sun.star.beans.Property;
|
||||
import com.sun.star.beans.XPropertyContainer;
|
||||
import com.sun.star.beans.XPropertySet;
|
||||
import com.sun.star.beans.XPropertySetInfo;
|
||||
import com.sun.star.document.XDocumentProperties;
|
||||
import com.sun.star.document.XDocumentPropertiesSupplier;
|
||||
import com.sun.star.frame.XDesktop;
|
||||
import com.sun.star.lang.XComponent;
|
||||
import com.sun.star.lang.XMultiComponentFactory;
|
||||
import com.sun.star.lang.XMultiServiceFactory;
|
||||
import com.sun.star.lang.XSingleComponentFactory;
|
||||
import com.sun.star.registry.XRegistryKey;
|
||||
import com.sun.star.lib.uno.helper.WeakBase;
|
||||
|
@ -15,16 +33,20 @@ public final class StarterProjectImpl extends WeakBase
|
|||
implements com.sun.star.lang.XServiceInfo,
|
||||
com.sun.star.task.XJobExecutor
|
||||
{
|
||||
private final XComponentContext m_xContext;
|
||||
private final XComponentContext context;
|
||||
private XDesktop xDesktop;
|
||||
private XMultiComponentFactory multiComponentFactory;
|
||||
private XComponent currentDocument;
|
||||
private XDocumentProperties documentProperties;
|
||||
private XDocumentPropertiesSupplier documentPropertiesSupplier;
|
||||
private static final String m_implementationName = StarterProjectImpl.class.getName();
|
||||
private static final String[] m_serviceNames = {
|
||||
"org.libreoffice.example.StarterProject" };
|
||||
private static final String[] m_serviceNames = { "org.libreoffice.example.StarterProject" };
|
||||
|
||||
|
||||
public StarterProjectImpl( XComponentContext context )
|
||||
{
|
||||
m_xContext = context;
|
||||
};
|
||||
public StarterProjectImpl(XComponentContext componentContext) {
|
||||
context = componentContext;
|
||||
|
||||
};
|
||||
|
||||
public static XSingleComponentFactory __getComponentFactory( String sImplementationName ) {
|
||||
XSingleComponentFactory xFactory = null;
|
||||
|
@ -64,13 +86,21 @@ public final class StarterProjectImpl extends WeakBase
|
|||
{
|
||||
switch (action) {
|
||||
case "actionOne":
|
||||
ActionOneDialog actionOneDialog = new ActionOneDialog(m_xContext);
|
||||
actionOneDialog.show();
|
||||
//ActionOneDialog actionOneDialog = new ActionOneDialog(m_xContext);
|
||||
//actionOneDialog.show();
|
||||
|
||||
Document doc = new Document(context);
|
||||
EditorGUI.runGUI(doc);
|
||||
break;
|
||||
default:
|
||||
DialogHelper.showErrorMessage(m_xContext, null, "Unknown action: " + action);
|
||||
DialogHelper.showErrorMessage(context, null, "Unknown action: " + action);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue