From 93869e7bcb8c364023ffb26255c306f504ee638b Mon Sep 17 00:00:00 2001 From: Tony Roberts Date: Wed, 26 Jun 2019 16:54:18 +0100 Subject: [PATCH 1/4] Update for Jinx 2 release Jinx 2 has a new form for ExcelArgumentConverter methods that can register converters for any class using an upper bound type parameter constraint. This lets us convert the new Jinx IUnknown type to the Com4j wrapper types automatically via an argument converter. It also allows us to use the new safer form of ExcelAddIn.getApplication. --- examples/pom.xml | 7 ++-- jinx-com4j/pom.xml | 5 +-- .../java/com/exceljava/com4j/JinxBridge.java | 33 ++++++++++++------- .../src/main/resources/jinx-classes.txt | 5 +++ pom.xml | 2 +- 5 files changed, 35 insertions(+), 17 deletions(-) create mode 100644 jinx-com4j/src/main/resources/jinx-classes.txt diff --git a/examples/pom.xml b/examples/pom.xml index 896192d..ffc13a2 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -5,7 +5,7 @@ com.exceljava jinx-com4j-root - 1.0-SNAPSHOT + 1.1-SNAPSHOT .. 4.0.0 @@ -16,6 +16,7 @@ org.apache.maven.plugins maven-compiler-plugin + 3.8.1 1.8 1.8 @@ -27,12 +28,12 @@ com.exceljava jinx-com4j - 1.0-SNAPSHOT + 1.1-SNAPSHOT com.exceljava jinx - 1.6.0 + 2.0.0-beta1 diff --git a/jinx-com4j/pom.xml b/jinx-com4j/pom.xml index 2f8abab..7f85a9a 100644 --- a/jinx-com4j/pom.xml +++ b/jinx-com4j/pom.xml @@ -5,7 +5,7 @@ com.exceljava jinx-com4j-root - 1.0-SNAPSHOT + 1.1-SNAPSHOT .. 4.0.0 @@ -26,7 +26,7 @@ com.exceljava jinx - [1.0.0,) + 2.0.0-beta1 @@ -47,6 +47,7 @@ org.apache.maven.plugins maven-compiler-plugin + 3.8.1 1.8 1.8 diff --git a/jinx-com4j/src/main/java/com/exceljava/com4j/JinxBridge.java b/jinx-com4j/src/main/java/com/exceljava/com4j/JinxBridge.java index 08b6ed0..1541589 100644 --- a/jinx-com4j/src/main/java/com/exceljava/com4j/JinxBridge.java +++ b/jinx-com4j/src/main/java/com/exceljava/com4j/JinxBridge.java @@ -1,24 +1,18 @@ package com.exceljava.com4j; import com.exceljava.jinx.ExcelAddIn; +import com.exceljava.jinx.ExcelArgumentConverter; +import com.exceljava.jinx.IUnknown; import com.exceljava.com4j.excel._Application; import com4j.COM4J; import com4j.Com4jObject; -import com4j.ComThread; -import com4j.ROT; + /** * Bridge between the Jinx add-in and com4j. * Used for obtaining com4j COM wrappers from code running in Excel using Jinx. */ public class JinxBridge { - - private static final ThreadLocal<_Application> xlApp = new ThreadLocal<_Application>() { - public _Application initialValue() { - return null; - } - }; - /** * Gets the Excel Application object for the current Excel process. * @@ -34,7 +28,24 @@ public _Application initialValue() { * @return An Excel Application instance. */ public static _Application getApplication(ExcelAddIn xl) { - Com4jObject unk = COM4J.wrapSta(Com4jObject.class, xl.getExcelApplication()); - return unk.queryInterface(_Application.class); + return xl.getExcelApplication(_Application.class); + } + + /** + * Converts IUnknown to any Com4jObject type. + * + * This allows Com4jObjects to be used as method arguments where + * an IUnknown would be passed by Jinx. For example, in the + * ribbon actions. + * + * @param unk IUnknown instance. + * @param cls Class of type to cast to. + * @param Type to cast to. + * @return IUnknown instance cast to a Com4jObject instance. + */ + @ExcelArgumentConverter + public static T convertIUnknown(IUnknown unk, Class cls) { + Com4jObject obj = COM4J.wrapSta(Com4jObject.class, unk.getPointer(true)); + return obj.queryInterface(cls); } } diff --git a/jinx-com4j/src/main/resources/jinx-classes.txt b/jinx-com4j/src/main/resources/jinx-classes.txt new file mode 100644 index 0000000..18322ab --- /dev/null +++ b/jinx-com4j/src/main/resources/jinx-classes.txt @@ -0,0 +1,5 @@ +# +# Classes to be loaded by the Jinx Add-In +# +com.exceljava.com4j.JinxBridge + diff --git a/pom.xml b/pom.xml index ed6c2e7..d821455 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.exceljava jinx-com4j-root pom - 1.0-SNAPSHOT + 1.1-SNAPSHOT examples jinx-com4j From 4eb1454b7a25ed0731e3f01272006ac81fcb0ce7 Mon Sep 17 00:00:00 2001 From: Tony Roberts Date: Thu, 15 Aug 2019 18:14:47 +0100 Subject: [PATCH 2/4] Add way to get back from a Com4jObject to an IUknown And add example showing how to use that the get the cached object at a specific cell. --- examples/jinx-com4j-examples.xlsx | Bin 13860 -> 15009 bytes examples/pom.xml | 2 +- .../com4j/examples/MacroFunctions.java | 34 ++++++++++++- jinx-com4j/pom.xml | 2 +- .../com/exceljava/com4j/IUnknownAdaptor.java | 48 ++++++++++++++++++ .../java/com/exceljava/com4j/JinxBridge.java | 13 +++++ 6 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 jinx-com4j/src/main/java/com/exceljava/com4j/IUnknownAdaptor.java diff --git a/examples/jinx-com4j-examples.xlsx b/examples/jinx-com4j-examples.xlsx index 63f02eee4427b4f2f79e1c24c7106cec3801fcb8..d50c64a23998a43c4eb6da633300624b75fa0670 100644 GIT binary patch delta 8787 zcmZvC1ymh7*Y?5P-Q8Ua6xV}8vEuITP-JlTLy@+)OK~Yqad&qw(Be>_*vGxU-1mFe z&03jcR`$-yOtPQs>?ef|d7gx7iZHOaAb1cW2n3=60Yx!^El?oPTZCFdYG~l2vhxln zX2jXY-(u38RoJuS+7)=gQep|~3MbE?Me?X{bNy_laG(nZr@WjE7CF5yTIB3%;?7>! zu(9gBq$G(y8+%1EWA{&!%ACcW%~`{HeO&Me$$m(rUL{n&$K|fsV?#m^oSa{!j1=w* zIJz}h+Z2!5=QJ~Xj(KO2Hyuzv3jY+^P8=U7PbM5(k|Ko0MYP$i)FHs^r1R*vySMy7 z-N1RkvsAB?Fl#<$snp=Z71XiLM4#LsO+(RDRH0D>MCQ-!-E27eeHFI-cO( z-P{0eJUJ`#rKKn_!5gwLy4x=)c!Qg?HzR_-KpuzdK^sfP*=H7LxEKKQbcbEbH@E#g zdvNRzO#J!4WOMtRAGvlPZ&rJLZU6Yrc=hvgOt$s0?mP%%M+TK!Otm@557QQ2jcLA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)q$*wFNHpfw z7PjrsnlO=@0C;+OcxEX0BYr#q(rcu^2oxqJ8p`e-3 zn;uo;{tU*Y3x+qxLu@sY!j(=T$gzSbuo>k;uuE`zpWju>z%k zP;F|mh)MwoB26YNb$NTY)+8LAz)+E~v@tockO*u`6~+qh_1d1h3Xa@6xgl(i z;wWbd!D`5prY!D{novdW7i1@6}zRQ*iu_VNhX?XtbDlnIfGijR<+t-O98? z5FdsBO5!MtLFF`kE*SS}Ecjifu)>znkr*XRV<86 zCeyE5B81no&cU?}619oe85C?Ws1DQ=gyQELTdG$Y-v>Cets5L+pU63{xZjh(Q+Th3 zCgt~O`>0eq|0ZO!b*)4BbIu(%bdy}<&TIU`V+_bX3Be+U;lO|%2FAgh98U>fk^%xed#TcL&Px2AnHOm|Gyfi5hjHDNdu9l zBLn~6_5JtW_n*@gF~01C94{e81_!W08brVp|3(-H#QdM8AV)TcHkcJ6Ey4!p%nosU zvHc(KeUVG;U$8#zf7xn)A)=xZY{Q%{l*8Fd%gx!voy)?- com.exceljava jinx - 2.0.0-beta1 + 2.0.0-beta2 diff --git a/examples/src/main/java/com/exceljava/com4j/examples/MacroFunctions.java b/examples/src/main/java/com/exceljava/com4j/examples/MacroFunctions.java index 0c88d4e..a22477f 100644 --- a/examples/src/main/java/com/exceljava/com4j/examples/MacroFunctions.java +++ b/examples/src/main/java/com/exceljava/com4j/examples/MacroFunctions.java @@ -5,7 +5,11 @@ import com.exceljava.com4j.JinxBridge; import com.exceljava.com4j.excel.*; -import com4j.Com4jObject; +import com.exceljava.jinx.ExcelReference; +import com.exceljava.jinx.IUnknown; + +import javax.swing.*; +import java.awt.*; /** * Example macros that use com4j to call back into Excel @@ -76,4 +80,32 @@ public void scrollbarExample() { // Set the cell value from the scrollbar value range.setValue(scrollbar.getValue()); } + + @ExcelMacro( + value = "jinx.show_object_example", + shortcut = "Ctrl+Shift+I" + ) + public void showObject() throws HeadlessException { + // Get the current selection + _Application app = JinxBridge.getApplication(xl); + Range selection = app.getSelection().queryInterface(Range.class); + + // Ensure the cell is calculated + selection.setFormula(selection.getFormula()); + selection.calculate(); + + // Get an ExcelReference corresponding to the selection + IUnknown unk = JinxBridge.getIUnknown(selection); + ExcelReference cell = xl.getReference(unk); + + // Find the cached object for this cell + Object cachedObject = xl.getCachedObject(cell); + + // Popup a non-modal dialog with the string representation of the object + String message = cachedObject != null ? cachedObject.toString() : "NULL"; + JOptionPane pane = new JOptionPane(message, JOptionPane.INFORMATION_MESSAGE); + JDialog dialog = pane.createDialog("Java Object"); + dialog.setModal(false); + dialog.setVisible(true); + } } diff --git a/jinx-com4j/pom.xml b/jinx-com4j/pom.xml index 7f85a9a..3fa640c 100644 --- a/jinx-com4j/pom.xml +++ b/jinx-com4j/pom.xml @@ -26,7 +26,7 @@ com.exceljava jinx - 2.0.0-beta1 + 2.0.0-beta2 diff --git a/jinx-com4j/src/main/java/com/exceljava/com4j/IUnknownAdaptor.java b/jinx-com4j/src/main/java/com/exceljava/com4j/IUnknownAdaptor.java new file mode 100644 index 0000000..5f194de --- /dev/null +++ b/jinx-com4j/src/main/java/com/exceljava/com4j/IUnknownAdaptor.java @@ -0,0 +1,48 @@ +package com.exceljava.com4j; + +import com.exceljava.jinx.IUnknown; +import com4j.Com4jObject; + +/** + * Adaptor class that implements the IUnknown interface + * wrapping a Com4jObject instance. + */ +class IUnknownAdaptor implements IUnknown { + private Com4jObject obj; + + public IUnknownAdaptor(Com4jObject obj) { + this.obj = obj; + } + + private static Class adaptClass(Class cls) { + return (Class)cls; + } + + @Override + public T queryInterface(Class cls) { + Com4jObject obj = this.obj; + if (null != obj && cls.isAssignableFrom(Com4jObject.class)) { + return obj.queryInterface(adaptClass(cls)); + } + return null; + } + + @Override + public long getPointer(boolean addRef) { + if (addRef) { + throw new UnsupportedOperationException(); + } + + Com4jObject obj = this.obj; + if (null != obj) { + return obj.getIUnknownPointer(); + } + + return 0; + } + + @Override + public void close() { + this.obj = null; + } +} diff --git a/jinx-com4j/src/main/java/com/exceljava/com4j/JinxBridge.java b/jinx-com4j/src/main/java/com/exceljava/com4j/JinxBridge.java index 1541589..3e08761 100644 --- a/jinx-com4j/src/main/java/com/exceljava/com4j/JinxBridge.java +++ b/jinx-com4j/src/main/java/com/exceljava/com4j/JinxBridge.java @@ -31,6 +31,19 @@ public static _Application getApplication(ExcelAddIn xl) { return xl.getExcelApplication(_Application.class); } + /** + * Return an IUnknown instance that wraps a Com4jObject. + * + * This can be used for passing Com4jObjects back to Jinx + * methods requiring an IUnknown instance. + * + * @param object COM object to be wrapped as an IUnknown. + * @return Instance implementing IUnknown. + */ + public static IUnknown getIUnknown(Com4jObject object) { + return new IUnknownAdaptor(object); + } + /** * Converts IUnknown to any Com4jObject type. * From 4d3d556f5605ab180fe15aeb00ad3a26808184a5 Mon Sep 17 00:00:00 2001 From: Tony Roberts Date: Wed, 13 Nov 2019 13:55:01 +0000 Subject: [PATCH 3/4] Add more Excel and Office wrapper classes --- .../com/exceljava/com4j/excel/Author.java | 75 ++++ .../com4j/excel/CommentThreaded.java | 211 +++++++++++ .../com4j/excel/CommentsThreaded.java | 86 +++++ .../com/exceljava/com4j/excel/IAuthor.java | 76 ++++ .../com4j/excel/ICommentThreaded.java | 221 +++++++++++ .../com4j/excel/ICommentsThreaded.java | 87 +++++ .../exceljava/com4j/excel/Model3DFormat.java | 356 ++++++++++++++++++ .../com4j/excel/XlLinkedDataTypeState.java | 38 ++ .../exceljava/com4j/office/Model3DFormat.java | 356 ++++++++++++++++++ .../com4j/office/MsoPictureType.java | 49 +++ .../office/MsoTextRangeInsertPosition.java | 20 + 11 files changed, 1575 insertions(+) create mode 100644 jinx-com4j/src/main/java/com/exceljava/com4j/excel/Author.java create mode 100644 jinx-com4j/src/main/java/com/exceljava/com4j/excel/CommentThreaded.java create mode 100644 jinx-com4j/src/main/java/com/exceljava/com4j/excel/CommentsThreaded.java create mode 100644 jinx-com4j/src/main/java/com/exceljava/com4j/excel/IAuthor.java create mode 100644 jinx-com4j/src/main/java/com/exceljava/com4j/excel/ICommentThreaded.java create mode 100644 jinx-com4j/src/main/java/com/exceljava/com4j/excel/ICommentsThreaded.java create mode 100644 jinx-com4j/src/main/java/com/exceljava/com4j/excel/Model3DFormat.java create mode 100644 jinx-com4j/src/main/java/com/exceljava/com4j/excel/XlLinkedDataTypeState.java create mode 100644 jinx-com4j/src/main/java/com/exceljava/com4j/office/Model3DFormat.java create mode 100644 jinx-com4j/src/main/java/com/exceljava/com4j/office/MsoPictureType.java create mode 100644 jinx-com4j/src/main/java/com/exceljava/com4j/office/MsoTextRangeInsertPosition.java diff --git a/jinx-com4j/src/main/java/com/exceljava/com4j/excel/Author.java b/jinx-com4j/src/main/java/com/exceljava/com4j/excel/Author.java new file mode 100644 index 0000000..06755e1 --- /dev/null +++ b/jinx-com4j/src/main/java/com/exceljava/com4j/excel/Author.java @@ -0,0 +1,75 @@ +package com.exceljava.com4j.excel ; + +import com4j.*; + +@IID("{00020400-0000-0000-C000-000000000046}") +public interface Author extends Com4jObject { + // Methods: + /** + *

+ * Getter method for the COM property "Application" + *

+ */ + + @DISPID(148) + @PropGet + com.exceljava.com4j.excel._Application getApplication(); + + + /** + *

+ * Getter method for the COM property "Creator" + *

+ */ + + @DISPID(149) + @PropGet + com.exceljava.com4j.excel.XlCreator getCreator(); + + + /** + *

+ * Getter method for the COM property "Parent" + *

+ */ + + @DISPID(150) + @PropGet + com4j.Com4jObject getParent(); + + + /** + *

+ * Getter method for the COM property "Name" + *

+ */ + + @DISPID(110) + @PropGet + java.lang.String getName(); + + + /** + *

+ * Getter method for the COM property "ProviderID" + *

+ */ + + @DISPID(3286) + @PropGet + java.lang.String getProviderID(); + + + /** + *

+ * Getter method for the COM property "UserID" + *

+ */ + + @DISPID(3287) + @PropGet + java.lang.String getUserID(); + + + // Properties: +} diff --git a/jinx-com4j/src/main/java/com/exceljava/com4j/excel/CommentThreaded.java b/jinx-com4j/src/main/java/com/exceljava/com4j/excel/CommentThreaded.java new file mode 100644 index 0000000..5a2f1fa --- /dev/null +++ b/jinx-com4j/src/main/java/com/exceljava/com4j/excel/CommentThreaded.java @@ -0,0 +1,211 @@ +package com.exceljava.com4j.excel ; + +import com4j.*; + +@IID("{00020400-0000-0000-C000-000000000046}") +public interface CommentThreaded extends Com4jObject { + // Methods: + /** + *

+ * Getter method for the COM property "Application" + *

+ */ + + @DISPID(148) + @PropGet + com.exceljava.com4j.excel._Application getApplication(); + + + /** + *

+ * Getter method for the COM property "Creator" + *

+ */ + + @DISPID(149) + @PropGet + com.exceljava.com4j.excel.XlCreator getCreator(); + + + /** + *

+ * Getter method for the COM property "Parent" + *

+ */ + + @DISPID(150) + @PropGet + com4j.Com4jObject getParent(); + + + /** + *

+ * This method uses predefined default values for the following parameters: + *

+ *
    + *
  • java.lang.Object parameter text is set to com4j.Variant.getMissing()
+ *

+ * Therefore, using this method is equivalent to + * + * addReply(com4j.Variant.getMissing()); + * + *

+ */ + + @DISPID(3283) + @UseDefaultValues(paramIndexMapping = {}, optParamIndex = {0}, javaType = {java.lang.Object.class}, nativeType = {NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR}, literal = {"80020004"}) + @ReturnValue(index=-1) + com.exceljava.com4j.excel.CommentThreaded addReply(); + + /** + * @param text Optional parameter. Default value is com4j.Variant.getMissing() + */ + + @DISPID(3283) + com.exceljava.com4j.excel.CommentThreaded addReply( + @Optional java.lang.Object text); + + + /** + */ + + @DISPID(117) + void delete(); + + + /** + *

+ * This method uses predefined default values for the following parameters: + *

+ *
    + *
  • java.lang.Object parameter text is set to com4j.Variant.getMissing()
  • java.lang.Object parameter start is set to com4j.Variant.getMissing()
  • java.lang.Object parameter overwrite is set to com4j.Variant.getMissing()
+ *

+ * Therefore, using this method is equivalent to + * + * text(com4j.Variant.getMissing(), com4j.Variant.getMissing(), com4j.Variant.getMissing()); + * + *

+ */ + + @DISPID(138) + @UseDefaultValues(paramIndexMapping = {}, optParamIndex = {0, 1, 2}, javaType = {java.lang.Object.class, java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {"80020004", "80020004", "80020004"}) + @ReturnValue(index=-1) + java.lang.String text(); + + /** + *

+ * This method uses predefined default values for the following parameters: + *

+ *
    + *
  • java.lang.Object parameter start is set to com4j.Variant.getMissing()
  • java.lang.Object parameter overwrite is set to com4j.Variant.getMissing()
+ *

+ * Therefore, using this method is equivalent to + * + * text(text, com4j.Variant.getMissing(), com4j.Variant.getMissing()); + * + *

+ * @param text Optional parameter. Default value is com4j.Variant.getMissing() + */ + + @DISPID(138) + @UseDefaultValues(paramIndexMapping = {0}, optParamIndex = {1, 2}, javaType = {java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {"80020004", "80020004"}) + @ReturnValue(index=-1) + java.lang.String text( + @Optional java.lang.Object text); + + /** + *

+ * This method uses predefined default values for the following parameters: + *

+ *
    + *
  • java.lang.Object parameter overwrite is set to com4j.Variant.getMissing()
+ *

+ * Therefore, using this method is equivalent to + * + * text(text, start, com4j.Variant.getMissing()); + * + *

+ * @param text Optional parameter. Default value is com4j.Variant.getMissing() + * @param start Optional parameter. Default value is com4j.Variant.getMissing() + */ + + @DISPID(138) + @UseDefaultValues(paramIndexMapping = {0, 1}, optParamIndex = {2}, javaType = {java.lang.Object.class}, nativeType = {NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR}, literal = {"80020004"}) + @ReturnValue(index=-1) + java.lang.String text( + @Optional java.lang.Object text, + @Optional java.lang.Object start); + + /** + * @param text Optional parameter. Default value is com4j.Variant.getMissing() + * @param start Optional parameter. Default value is com4j.Variant.getMissing() + * @param overwrite Optional parameter. Default value is com4j.Variant.getMissing() + */ + + @DISPID(138) + java.lang.String text( + @Optional java.lang.Object text, + @Optional java.lang.Object start, + @Optional java.lang.Object overwrite); + + + /** + *

+ * Getter method for the COM property "SupportsReplies" + *

+ */ + + @DISPID(3284) + @PropGet + boolean getSupportsReplies(); + + + /** + *

+ * Getter method for the COM property "Replies" + *

+ */ + + @DISPID(3285) + @PropGet + com.exceljava.com4j.excel.CommentsThreaded getReplies(); + + + /** + *

+ * Getter method for the COM property "Author" + *

+ */ + + @DISPID(574) + @PropGet + com.exceljava.com4j.excel.Author getAuthor(); + + + /** + *

+ * Getter method for the COM property "Date" + *

+ */ + + @DISPID(465) + @PropGet + java.lang.Object getDate(); + + + /** + */ + + @DISPID(502) + com.exceljava.com4j.excel.CommentThreaded next(); + + + /** + */ + + @DISPID(503) + com.exceljava.com4j.excel.CommentThreaded previous(); + + + // Properties: +} diff --git a/jinx-com4j/src/main/java/com/exceljava/com4j/excel/CommentsThreaded.java b/jinx-com4j/src/main/java/com/exceljava/com4j/excel/CommentsThreaded.java new file mode 100644 index 0000000..b574c79 --- /dev/null +++ b/jinx-com4j/src/main/java/com/exceljava/com4j/excel/CommentsThreaded.java @@ -0,0 +1,86 @@ +package com.exceljava.com4j.excel ; + +import com4j.*; + +@IID("{00020400-0000-0000-C000-000000000046}") +public interface CommentsThreaded extends Com4jObject,Iterable { + // Methods: + /** + *

+ * Getter method for the COM property "Application" + *

+ */ + + @DISPID(148) + @PropGet + com.exceljava.com4j.excel._Application getApplication(); + + + /** + *

+ * Getter method for the COM property "Creator" + *

+ */ + + @DISPID(149) + @PropGet + com.exceljava.com4j.excel.XlCreator getCreator(); + + + /** + *

+ * Getter method for the COM property "Parent" + *

+ */ + + @DISPID(150) + @PropGet + com4j.Com4jObject getParent(); + + + /** + *

+ * Getter method for the COM property "Count" + *

+ */ + + @DISPID(118) + @PropGet + int getCount(); + + + /** + * @param index Mandatory int parameter. + */ + + @DISPID(170) + com.exceljava.com4j.excel.CommentThreaded item( + int index); + + + /** + *

+ * Getter method for the COM property "_Default" + *

+ * @param index Mandatory int parameter. + */ + + @DISPID(0) + @PropGet + @DefaultMethod + com.exceljava.com4j.excel.CommentThreaded get_Default( + int index); + + + /** + *

+ * Getter method for the COM property "_NewEnum" + *

+ */ + + @DISPID(-4) + @PropGet + java.util.Iterator iterator(); + + // Properties: +} diff --git a/jinx-com4j/src/main/java/com/exceljava/com4j/excel/IAuthor.java b/jinx-com4j/src/main/java/com/exceljava/com4j/excel/IAuthor.java new file mode 100644 index 0000000..fb8c564 --- /dev/null +++ b/jinx-com4j/src/main/java/com/exceljava/com4j/excel/IAuthor.java @@ -0,0 +1,76 @@ +package com.exceljava.com4j.excel ; + +import com4j.*; + +@IID("{000244FE-0001-0000-C000-000000000046}") +public interface IAuthor extends Com4jObject { + // Methods: + /** + *

+ * Getter method for the COM property "Application" + *

+ * @return Returns a value of type com.exceljava.com4j.excel._Application + */ + + @VTID(7) + com.exceljava.com4j.excel._Application getApplication(); + + + /** + *

+ * Getter method for the COM property "Creator" + *

+ * @return Returns a value of type com.exceljava.com4j.excel.XlCreator + */ + + @VTID(8) + com.exceljava.com4j.excel.XlCreator getCreator(); + + + /** + *

+ * Getter method for the COM property "Parent" + *

+ * @return Returns a value of type com4j.Com4jObject + */ + + @VTID(9) + @ReturnValue(type=NativeType.Dispatch) + com4j.Com4jObject getParent(); + + + /** + *

+ * Getter method for the COM property "Name" + *

+ * @return Returns a value of type java.lang.String + */ + + @VTID(10) + java.lang.String getName(); + + + /** + *

+ * Getter method for the COM property "ProviderID" + *

+ * @return Returns a value of type java.lang.String + */ + + @VTID(11) + java.lang.String getProviderID(); + + + /** + *

+ * Getter method for the COM property "UserID" + *

+ * @return Returns a value of type java.lang.String + */ + + @VTID(12) + java.lang.String getUserID(); + + + // Properties: +} diff --git a/jinx-com4j/src/main/java/com/exceljava/com4j/excel/ICommentThreaded.java b/jinx-com4j/src/main/java/com/exceljava/com4j/excel/ICommentThreaded.java new file mode 100644 index 0000000..610bdf2 --- /dev/null +++ b/jinx-com4j/src/main/java/com/exceljava/com4j/excel/ICommentThreaded.java @@ -0,0 +1,221 @@ +package com.exceljava.com4j.excel ; + +import com4j.*; + +@IID("{000244FD-0001-0000-C000-000000000046}") +public interface ICommentThreaded extends Com4jObject { + // Methods: + /** + *

+ * Getter method for the COM property "Application" + *

+ * @return Returns a value of type com.exceljava.com4j.excel._Application + */ + + @VTID(7) + com.exceljava.com4j.excel._Application getApplication(); + + + /** + *

+ * Getter method for the COM property "Creator" + *

+ * @return Returns a value of type com.exceljava.com4j.excel.XlCreator + */ + + @VTID(8) + com.exceljava.com4j.excel.XlCreator getCreator(); + + + /** + *

+ * Getter method for the COM property "Parent" + *

+ * @return Returns a value of type com4j.Com4jObject + */ + + @VTID(9) + @ReturnValue(type=NativeType.Dispatch) + com4j.Com4jObject getParent(); + + + /** + *

+ * This method uses predefined default values for the following parameters: + *

+ *
    + *
  • java.lang.Object parameter text is set to com4j.Variant.getMissing()
+ *

+ * Therefore, using this method is equivalent to + * + * addReply(com4j.Variant.getMissing()); + * + *

+ * @return Returns a value of type com.exceljava.com4j.excel.CommentThreaded + */ + + @VTID(10) + @UseDefaultValues(paramIndexMapping = {1}, optParamIndex = {0}, javaType = {java.lang.Object.class}, nativeType = {NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR}, literal = {"80020004"}) + @ReturnValue(index=1) + com.exceljava.com4j.excel.CommentThreaded addReply(); + + /** + * @param text Optional parameter. Default value is com4j.Variant.getMissing() + * @return Returns a value of type com.exceljava.com4j.excel.CommentThreaded + */ + + @VTID(10) + com.exceljava.com4j.excel.CommentThreaded addReply( + @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object text); + + + /** + */ + + @VTID(11) + void delete(); + + + /** + *

+ * This method uses predefined default values for the following parameters: + *

+ *
    + *
  • java.lang.Object parameter text is set to com4j.Variant.getMissing()
  • java.lang.Object parameter start is set to com4j.Variant.getMissing()
  • java.lang.Object parameter overwrite is set to com4j.Variant.getMissing()
+ *

+ * Therefore, using this method is equivalent to + * + * text(com4j.Variant.getMissing(), com4j.Variant.getMissing(), com4j.Variant.getMissing()); + * + *

+ * @return Returns a value of type java.lang.String + */ + + @VTID(12) + @UseDefaultValues(paramIndexMapping = {3}, optParamIndex = {0, 1, 2}, javaType = {java.lang.Object.class, java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {"80020004", "80020004", "80020004"}) + @ReturnValue(index=3) + java.lang.String text(); + + /** + *

+ * This method uses predefined default values for the following parameters: + *

+ *
    + *
  • java.lang.Object parameter start is set to com4j.Variant.getMissing()
  • java.lang.Object parameter overwrite is set to com4j.Variant.getMissing()
+ *

+ * Therefore, using this method is equivalent to + * + * text(text, com4j.Variant.getMissing(), com4j.Variant.getMissing()); + * + *

+ * @param text Optional parameter. Default value is com4j.Variant.getMissing() + * @return Returns a value of type java.lang.String + */ + + @VTID(12) + @UseDefaultValues(paramIndexMapping = {0, 3}, optParamIndex = {1, 2}, javaType = {java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {"80020004", "80020004"}) + @ReturnValue(index=3) + java.lang.String text( + @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object text); + + /** + *

+ * This method uses predefined default values for the following parameters: + *

+ *
    + *
  • java.lang.Object parameter overwrite is set to com4j.Variant.getMissing()
+ *

+ * Therefore, using this method is equivalent to + * + * text(text, start, com4j.Variant.getMissing()); + * + *

+ * @param text Optional parameter. Default value is com4j.Variant.getMissing() + * @param start Optional parameter. Default value is com4j.Variant.getMissing() + * @return Returns a value of type java.lang.String + */ + + @VTID(12) + @UseDefaultValues(paramIndexMapping = {0, 1, 3}, optParamIndex = {2}, javaType = {java.lang.Object.class}, nativeType = {NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR}, literal = {"80020004"}) + @ReturnValue(index=3) + java.lang.String text( + @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object text, + @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object start); + + /** + * @param text Optional parameter. Default value is com4j.Variant.getMissing() + * @param start Optional parameter. Default value is com4j.Variant.getMissing() + * @param overwrite Optional parameter. Default value is com4j.Variant.getMissing() + * @return Returns a value of type java.lang.String + */ + + @VTID(12) + java.lang.String text( + @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object text, + @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object start, + @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object overwrite); + + + /** + *

+ * Getter method for the COM property "SupportsReplies" + *

+ * @return Returns a value of type boolean + */ + + @VTID(13) + boolean getSupportsReplies(); + + + /** + *

+ * Getter method for the COM property "Replies" + *

+ * @return Returns a value of type com.exceljava.com4j.excel.CommentsThreaded + */ + + @VTID(14) + com.exceljava.com4j.excel.CommentsThreaded getReplies(); + + + /** + *

+ * Getter method for the COM property "Author" + *

+ * @return Returns a value of type com.exceljava.com4j.excel.Author + */ + + @VTID(15) + com.exceljava.com4j.excel.Author getAuthor(); + + + /** + *

+ * Getter method for the COM property "Date" + *

+ * @return Returns a value of type java.lang.Object + */ + + @VTID(16) + @ReturnValue(type=NativeType.VARIANT) + java.lang.Object getDate(); + + + /** + * @return Returns a value of type com.exceljava.com4j.excel.CommentThreaded + */ + + @VTID(17) + com.exceljava.com4j.excel.CommentThreaded next(); + + + /** + * @return Returns a value of type com.exceljava.com4j.excel.CommentThreaded + */ + + @VTID(18) + com.exceljava.com4j.excel.CommentThreaded previous(); + + + // Properties: +} diff --git a/jinx-com4j/src/main/java/com/exceljava/com4j/excel/ICommentsThreaded.java b/jinx-com4j/src/main/java/com/exceljava/com4j/excel/ICommentsThreaded.java new file mode 100644 index 0000000..ee0741b --- /dev/null +++ b/jinx-com4j/src/main/java/com/exceljava/com4j/excel/ICommentsThreaded.java @@ -0,0 +1,87 @@ +package com.exceljava.com4j.excel ; + +import com4j.*; + +@IID("{000244FC-0001-0000-C000-000000000046}") +public interface ICommentsThreaded extends Com4jObject,Iterable { + // Methods: + /** + *

+ * Getter method for the COM property "Application" + *

+ * @return Returns a value of type com.exceljava.com4j.excel._Application + */ + + @VTID(7) + com.exceljava.com4j.excel._Application getApplication(); + + + /** + *

+ * Getter method for the COM property "Creator" + *

+ * @return Returns a value of type com.exceljava.com4j.excel.XlCreator + */ + + @VTID(8) + com.exceljava.com4j.excel.XlCreator getCreator(); + + + /** + *

+ * Getter method for the COM property "Parent" + *

+ * @return Returns a value of type com4j.Com4jObject + */ + + @VTID(9) + @ReturnValue(type=NativeType.Dispatch) + com4j.Com4jObject getParent(); + + + /** + *

+ * Getter method for the COM property "Count" + *

+ * @return Returns a value of type int + */ + + @VTID(10) + int getCount(); + + + /** + * @param index Mandatory int parameter. + * @return Returns a value of type com.exceljava.com4j.excel.CommentThreaded + */ + + @VTID(11) + com.exceljava.com4j.excel.CommentThreaded item( + int index); + + + /** + *

+ * Getter method for the COM property "_Default" + *

+ * @param index Mandatory int parameter. + * @return Returns a value of type com.exceljava.com4j.excel.CommentThreaded + */ + + @VTID(12) + @DefaultMethod + com.exceljava.com4j.excel.CommentThreaded get_Default( + int index); + + + /** + *

+ * Getter method for the COM property "_NewEnum" + *

+ */ + + @VTID(13) + java.util.Iterator iterator(); + + // Properties: +} diff --git a/jinx-com4j/src/main/java/com/exceljava/com4j/excel/Model3DFormat.java b/jinx-com4j/src/main/java/com/exceljava/com4j/excel/Model3DFormat.java new file mode 100644 index 0000000..a1b2313 --- /dev/null +++ b/jinx-com4j/src/main/java/com/exceljava/com4j/excel/Model3DFormat.java @@ -0,0 +1,356 @@ +package com.exceljava.com4j.excel ; + +import com4j.*; + +@IID("{000C03D8-0000-0000-C000-000000000046}") +public interface Model3DFormat extends com.exceljava.com4j.office._IMsoDispObj { + // Methods: + /** + *

+ * Getter method for the COM property "Parent" + *

+ * @return Returns a value of type com4j.Com4jObject + */ + + @DISPID(1) //= 0x1. The runtime will prefer the VTID if present + @VTID(9) + @ReturnValue(type=NativeType.Dispatch) + com4j.Com4jObject getParent(); + + + /** + *

+ * Getter method for the COM property "AutoFit" + *

+ * @return Returns a value of type com.exceljava.com4j.office.MsoTriState + */ + + @DISPID(100) //= 0x64. The runtime will prefer the VTID if present + @VTID(10) + com.exceljava.com4j.office.MsoTriState getAutoFit(); + + + /** + *

+ * Setter method for the COM property "AutoFit" + *

+ * @param autoFit Mandatory com.exceljava.com4j.office.MsoTriState parameter. + */ + + @DISPID(100) //= 0x64. The runtime will prefer the VTID if present + @VTID(11) + void setAutoFit( + com.exceljava.com4j.office.MsoTriState autoFit); + + + /** + *

+ * Getter method for the COM property "RotationX" + *

+ * @return Returns a value of type float + */ + + @DISPID(101) //= 0x65. The runtime will prefer the VTID if present + @VTID(12) + float getRotationX(); + + + /** + *

+ * Setter method for the COM property "RotationX" + *

+ * @param rotationX Mandatory float parameter. + */ + + @DISPID(101) //= 0x65. The runtime will prefer the VTID if present + @VTID(13) + void setRotationX( + float rotationX); + + + /** + *

+ * Getter method for the COM property "RotationY" + *

+ * @return Returns a value of type float + */ + + @DISPID(102) //= 0x66. The runtime will prefer the VTID if present + @VTID(14) + float getRotationY(); + + + /** + *

+ * Setter method for the COM property "RotationY" + *

+ * @param rotationY Mandatory float parameter. + */ + + @DISPID(102) //= 0x66. The runtime will prefer the VTID if present + @VTID(15) + void setRotationY( + float rotationY); + + + /** + *

+ * Getter method for the COM property "RotationZ" + *

+ * @return Returns a value of type float + */ + + @DISPID(103) //= 0x67. The runtime will prefer the VTID if present + @VTID(16) + float getRotationZ(); + + + /** + *

+ * Setter method for the COM property "RotationZ" + *

+ * @param rotationZ Mandatory float parameter. + */ + + @DISPID(103) //= 0x67. The runtime will prefer the VTID if present + @VTID(17) + void setRotationZ( + float rotationZ); + + + /** + *

+ * Getter method for the COM property "FieldOfView" + *

+ * @return Returns a value of type float + */ + + @DISPID(104) //= 0x68. The runtime will prefer the VTID if present + @VTID(18) + float getFieldOfView(); + + + /** + *

+ * Setter method for the COM property "FieldOfView" + *

+ * @param fov Mandatory float parameter. + */ + + @DISPID(104) //= 0x68. The runtime will prefer the VTID if present + @VTID(19) + void setFieldOfView( + float fov); + + + /** + *

+ * Getter method for the COM property "CameraPositionX" + *

+ * @return Returns a value of type float + */ + + @DISPID(105) //= 0x69. The runtime will prefer the VTID if present + @VTID(20) + float getCameraPositionX(); + + + /** + *

+ * Setter method for the COM property "CameraPositionX" + *

+ * @param cameraPositionX Mandatory float parameter. + */ + + @DISPID(105) //= 0x69. The runtime will prefer the VTID if present + @VTID(21) + void setCameraPositionX( + float cameraPositionX); + + + /** + *

+ * Getter method for the COM property "CameraPositionY" + *

+ * @return Returns a value of type float + */ + + @DISPID(106) //= 0x6a. The runtime will prefer the VTID if present + @VTID(22) + float getCameraPositionY(); + + + /** + *

+ * Setter method for the COM property "CameraPositionY" + *

+ * @param cameraPositionY Mandatory float parameter. + */ + + @DISPID(106) //= 0x6a. The runtime will prefer the VTID if present + @VTID(23) + void setCameraPositionY( + float cameraPositionY); + + + /** + *

+ * Getter method for the COM property "CameraPositionZ" + *

+ * @return Returns a value of type float + */ + + @DISPID(107) //= 0x6b. The runtime will prefer the VTID if present + @VTID(24) + float getCameraPositionZ(); + + + /** + *

+ * Setter method for the COM property "CameraPositionZ" + *

+ * @param cameraPositionZ Mandatory float parameter. + */ + + @DISPID(107) //= 0x6b. The runtime will prefer the VTID if present + @VTID(25) + void setCameraPositionZ( + float cameraPositionZ); + + + /** + *

+ * Getter method for the COM property "LookAtPointX" + *

+ * @return Returns a value of type float + */ + + @DISPID(108) //= 0x6c. The runtime will prefer the VTID if present + @VTID(26) + float getLookAtPointX(); + + + /** + *

+ * Setter method for the COM property "LookAtPointX" + *

+ * @param lookAtPointX Mandatory float parameter. + */ + + @DISPID(108) //= 0x6c. The runtime will prefer the VTID if present + @VTID(27) + void setLookAtPointX( + float lookAtPointX); + + + /** + *

+ * Getter method for the COM property "LookAtPointY" + *

+ * @return Returns a value of type float + */ + + @DISPID(109) //= 0x6d. The runtime will prefer the VTID if present + @VTID(28) + float getLookAtPointY(); + + + /** + *

+ * Setter method for the COM property "LookAtPointY" + *

+ * @param lookAtPointY Mandatory float parameter. + */ + + @DISPID(109) //= 0x6d. The runtime will prefer the VTID if present + @VTID(29) + void setLookAtPointY( + float lookAtPointY); + + + /** + *

+ * Getter method for the COM property "LookAtPointZ" + *

+ * @return Returns a value of type float + */ + + @DISPID(110) //= 0x6e. The runtime will prefer the VTID if present + @VTID(30) + float getLookAtPointZ(); + + + /** + *

+ * Setter method for the COM property "LookAtPointZ" + *

+ * @param lookAtPointZ Mandatory float parameter. + */ + + @DISPID(110) //= 0x6e. The runtime will prefer the VTID if present + @VTID(31) + void setLookAtPointZ( + float lookAtPointZ); + + + /** + *

+ * This method uses predefined default values for the following parameters: + *

+ *
    + *
  • boolean parameter resetSize is set to false
+ *

+ * Therefore, using this method is equivalent to + * + * resetModel(false); + * + *

+ */ + + @DISPID(111) //= 0x6f. The runtime will prefer the VTID if present + @VTID(32) + @UseDefaultValues(paramIndexMapping = {}, optParamIndex = {0}, javaType = {boolean.class}, nativeType = {NativeType.VariantBool}, variantType = {Variant.Type.VT_BOOL}, literal = {"false"}) + void resetModel(); + + /** + * @param resetSize Optional parameter. Default value is false + */ + + @DISPID(111) //= 0x6f. The runtime will prefer the VTID if present + @VTID(32) + void resetModel( + @Optional @DefaultValue("0") boolean resetSize); + + + /** + * @param increment Mandatory float parameter. + */ + + @DISPID(112) //= 0x70. The runtime will prefer the VTID if present + @VTID(33) + void incrementRotationX( + float increment); + + + /** + * @param increment Mandatory float parameter. + */ + + @DISPID(113) //= 0x71. The runtime will prefer the VTID if present + @VTID(34) + void incrementRotationY( + float increment); + + + /** + * @param increment Mandatory float parameter. + */ + + @DISPID(114) //= 0x72. The runtime will prefer the VTID if present + @VTID(35) + void incrementRotationZ( + float increment); + + + // Properties: +} diff --git a/jinx-com4j/src/main/java/com/exceljava/com4j/excel/XlLinkedDataTypeState.java b/jinx-com4j/src/main/java/com/exceljava/com4j/excel/XlLinkedDataTypeState.java new file mode 100644 index 0000000..3c3292f --- /dev/null +++ b/jinx-com4j/src/main/java/com/exceljava/com4j/excel/XlLinkedDataTypeState.java @@ -0,0 +1,38 @@ +package com.exceljava.com4j.excel ; + +import com4j.*; + +/** + */ +public enum XlLinkedDataTypeState { + /** + *

+ * The value of this constant is 0 + *

+ */ + xlLinkedDataTypeStateNone, // 0 + /** + *

+ * The value of this constant is 1 + *

+ */ + xlLinkedDataTypeStateValidLinkedData, // 1 + /** + *

+ * The value of this constant is 2 + *

+ */ + xlLinkedDataTypeStateDisambiguationNeeded, // 2 + /** + *

+ * The value of this constant is 3 + *

+ */ + xlLinkedDataTypeStateBrokenLinkedData, // 3 + /** + *

+ * The value of this constant is 4 + *

+ */ + xlLinkedDataTypeStateFetchingData, // 4 +} diff --git a/jinx-com4j/src/main/java/com/exceljava/com4j/office/Model3DFormat.java b/jinx-com4j/src/main/java/com/exceljava/com4j/office/Model3DFormat.java new file mode 100644 index 0000000..f778b0f --- /dev/null +++ b/jinx-com4j/src/main/java/com/exceljava/com4j/office/Model3DFormat.java @@ -0,0 +1,356 @@ +package com.exceljava.com4j.office ; + +import com4j.*; + +@IID("{000C03D8-0000-0000-C000-000000000046}") +public interface Model3DFormat extends com.exceljava.com4j.office._IMsoDispObj { + // Methods: + /** + *

+ * Getter method for the COM property "Parent" + *

+ * @return Returns a value of type com4j.Com4jObject + */ + + @DISPID(1) //= 0x1. The runtime will prefer the VTID if present + @VTID(9) + @ReturnValue(type=NativeType.Dispatch) + com4j.Com4jObject getParent(); + + + /** + *

+ * Getter method for the COM property "AutoFit" + *

+ * @return Returns a value of type com.exceljava.com4j.office.MsoTriState + */ + + @DISPID(100) //= 0x64. The runtime will prefer the VTID if present + @VTID(10) + com.exceljava.com4j.office.MsoTriState getAutoFit(); + + + /** + *

+ * Setter method for the COM property "AutoFit" + *

+ * @param autoFit Mandatory com.exceljava.com4j.office.MsoTriState parameter. + */ + + @DISPID(100) //= 0x64. The runtime will prefer the VTID if present + @VTID(11) + void setAutoFit( + com.exceljava.com4j.office.MsoTriState autoFit); + + + /** + *

+ * Getter method for the COM property "RotationX" + *

+ * @return Returns a value of type float + */ + + @DISPID(101) //= 0x65. The runtime will prefer the VTID if present + @VTID(12) + float getRotationX(); + + + /** + *

+ * Setter method for the COM property "RotationX" + *

+ * @param rotationX Mandatory float parameter. + */ + + @DISPID(101) //= 0x65. The runtime will prefer the VTID if present + @VTID(13) + void setRotationX( + float rotationX); + + + /** + *

+ * Getter method for the COM property "RotationY" + *

+ * @return Returns a value of type float + */ + + @DISPID(102) //= 0x66. The runtime will prefer the VTID if present + @VTID(14) + float getRotationY(); + + + /** + *

+ * Setter method for the COM property "RotationY" + *

+ * @param rotationY Mandatory float parameter. + */ + + @DISPID(102) //= 0x66. The runtime will prefer the VTID if present + @VTID(15) + void setRotationY( + float rotationY); + + + /** + *

+ * Getter method for the COM property "RotationZ" + *

+ * @return Returns a value of type float + */ + + @DISPID(103) //= 0x67. The runtime will prefer the VTID if present + @VTID(16) + float getRotationZ(); + + + /** + *

+ * Setter method for the COM property "RotationZ" + *

+ * @param rotationZ Mandatory float parameter. + */ + + @DISPID(103) //= 0x67. The runtime will prefer the VTID if present + @VTID(17) + void setRotationZ( + float rotationZ); + + + /** + *

+ * Getter method for the COM property "FieldOfView" + *

+ * @return Returns a value of type float + */ + + @DISPID(104) //= 0x68. The runtime will prefer the VTID if present + @VTID(18) + float getFieldOfView(); + + + /** + *

+ * Setter method for the COM property "FieldOfView" + *

+ * @param fov Mandatory float parameter. + */ + + @DISPID(104) //= 0x68. The runtime will prefer the VTID if present + @VTID(19) + void setFieldOfView( + float fov); + + + /** + *

+ * Getter method for the COM property "CameraPositionX" + *

+ * @return Returns a value of type float + */ + + @DISPID(105) //= 0x69. The runtime will prefer the VTID if present + @VTID(20) + float getCameraPositionX(); + + + /** + *

+ * Setter method for the COM property "CameraPositionX" + *

+ * @param positionX Mandatory float parameter. + */ + + @DISPID(105) //= 0x69. The runtime will prefer the VTID if present + @VTID(21) + void setCameraPositionX( + float positionX); + + + /** + *

+ * Getter method for the COM property "CameraPositionY" + *

+ * @return Returns a value of type float + */ + + @DISPID(106) //= 0x6a. The runtime will prefer the VTID if present + @VTID(22) + float getCameraPositionY(); + + + /** + *

+ * Setter method for the COM property "CameraPositionY" + *

+ * @param positionY Mandatory float parameter. + */ + + @DISPID(106) //= 0x6a. The runtime will prefer the VTID if present + @VTID(23) + void setCameraPositionY( + float positionY); + + + /** + *

+ * Getter method for the COM property "CameraPositionZ" + *

+ * @return Returns a value of type float + */ + + @DISPID(107) //= 0x6b. The runtime will prefer the VTID if present + @VTID(24) + float getCameraPositionZ(); + + + /** + *

+ * Setter method for the COM property "CameraPositionZ" + *

+ * @param positionZ Mandatory float parameter. + */ + + @DISPID(107) //= 0x6b. The runtime will prefer the VTID if present + @VTID(25) + void setCameraPositionZ( + float positionZ); + + + /** + *

+ * Getter method for the COM property "LookAtPointX" + *

+ * @return Returns a value of type float + */ + + @DISPID(108) //= 0x6c. The runtime will prefer the VTID if present + @VTID(26) + float getLookAtPointX(); + + + /** + *

+ * Setter method for the COM property "LookAtPointX" + *

+ * @param lookAtPointX Mandatory float parameter. + */ + + @DISPID(108) //= 0x6c. The runtime will prefer the VTID if present + @VTID(27) + void setLookAtPointX( + float lookAtPointX); + + + /** + *

+ * Getter method for the COM property "LookAtPointY" + *

+ * @return Returns a value of type float + */ + + @DISPID(109) //= 0x6d. The runtime will prefer the VTID if present + @VTID(28) + float getLookAtPointY(); + + + /** + *

+ * Setter method for the COM property "LookAtPointY" + *

+ * @param lookAtPointY Mandatory float parameter. + */ + + @DISPID(109) //= 0x6d. The runtime will prefer the VTID if present + @VTID(29) + void setLookAtPointY( + float lookAtPointY); + + + /** + *

+ * Getter method for the COM property "LookAtPointZ" + *

+ * @return Returns a value of type float + */ + + @DISPID(110) //= 0x6e. The runtime will prefer the VTID if present + @VTID(30) + float getLookAtPointZ(); + + + /** + *

+ * Setter method for the COM property "LookAtPointZ" + *

+ * @param lookAtPointZ Mandatory float parameter. + */ + + @DISPID(110) //= 0x6e. The runtime will prefer the VTID if present + @VTID(31) + void setLookAtPointZ( + float lookAtPointZ); + + + /** + *

+ * This method uses predefined default values for the following parameters: + *

+ *
    + *
  • boolean parameter resetSize is set to false
+ *

+ * Therefore, using this method is equivalent to + * + * resetModel(false); + * + *

+ */ + + @DISPID(111) //= 0x6f. The runtime will prefer the VTID if present + @VTID(32) + @UseDefaultValues(paramIndexMapping = {}, optParamIndex = {0}, javaType = {boolean.class}, nativeType = {NativeType.VariantBool}, variantType = {Variant.Type.VT_BOOL}, literal = {"false"}) + void resetModel(); + + /** + * @param resetSize Optional parameter. Default value is false + */ + + @DISPID(111) //= 0x6f. The runtime will prefer the VTID if present + @VTID(32) + void resetModel( + @Optional @DefaultValue("0") boolean resetSize); + + + /** + * @param increment Mandatory float parameter. + */ + + @DISPID(112) //= 0x70. The runtime will prefer the VTID if present + @VTID(33) + void incrementRotationX( + float increment); + + + /** + * @param increment Mandatory float parameter. + */ + + @DISPID(113) //= 0x71. The runtime will prefer the VTID if present + @VTID(34) + void incrementRotationY( + float increment); + + + /** + * @param increment Mandatory float parameter. + */ + + @DISPID(114) //= 0x72. The runtime will prefer the VTID if present + @VTID(35) + void incrementRotationZ( + float increment); + + + // Properties: +} diff --git a/jinx-com4j/src/main/java/com/exceljava/com4j/office/MsoPictureType.java b/jinx-com4j/src/main/java/com/exceljava/com4j/office/MsoPictureType.java new file mode 100644 index 0000000..3e83aa8 --- /dev/null +++ b/jinx-com4j/src/main/java/com/exceljava/com4j/office/MsoPictureType.java @@ -0,0 +1,49 @@ +package com.exceljava.com4j.office ; + +import com4j.*; + +/** + */ +public enum MsoPictureType implements ComEnum { + /** + *

+ * The value of this constant is -2 + *

+ */ + msoPictureTypeDefault(-2), + /** + *

+ * The value of this constant is 0 + *

+ */ + msoPictureTypePNG(0), + /** + *

+ * The value of this constant is 1 + *

+ */ + msoPictureTypeBMP(1), + /** + *

+ * The value of this constant is 2 + *

+ */ + msoPictureTypeGIF(2), + /** + *

+ * The value of this constant is 3 + *

+ */ + msoPictureTypeJPG(3), + /** + *

+ * The value of this constant is 4 + *

+ */ + msoPictureTypePDF(4), + ; + + private final int value; + MsoPictureType(int value) { this.value=value; } + public int comEnumValue() { return value; } +} diff --git a/jinx-com4j/src/main/java/com/exceljava/com4j/office/MsoTextRangeInsertPosition.java b/jinx-com4j/src/main/java/com/exceljava/com4j/office/MsoTextRangeInsertPosition.java new file mode 100644 index 0000000..41a661b --- /dev/null +++ b/jinx-com4j/src/main/java/com/exceljava/com4j/office/MsoTextRangeInsertPosition.java @@ -0,0 +1,20 @@ +package com.exceljava.com4j.office ; + +import com4j.*; + +/** + */ +public enum MsoTextRangeInsertPosition { + /** + *

+ * The value of this constant is 0 + *

+ */ + msoMsoTextRangeInsertBefore, // 0 + /** + *

+ * The value of this constant is 1 + *

+ */ + msoMsoTextRangeInsertAfter, // 1 +} From 8b23e82e566f90a5054b2d0aa280a81abb91ca32 Mon Sep 17 00:00:00 2001 From: Tony Roberts Date: Wed, 13 Nov 2019 13:55:21 +0000 Subject: [PATCH 4/4] Update Jinx dependency version to 2.0.0 and update version to 1.1.0 --- examples/pom.xml | 6 +++--- jinx-com4j/pom.xml | 4 ++-- pom.xml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/pom.xml b/examples/pom.xml index bce439f..d9d04c8 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -5,7 +5,7 @@ com.exceljava jinx-com4j-root - 1.1-SNAPSHOT + 1.1.0 .. 4.0.0 @@ -28,12 +28,12 @@ com.exceljava jinx-com4j - 1.1-SNAPSHOT + 1.1.0 com.exceljava jinx - 2.0.0-beta2 + [2.0.0,) diff --git a/jinx-com4j/pom.xml b/jinx-com4j/pom.xml index 3fa640c..d56ae5d 100644 --- a/jinx-com4j/pom.xml +++ b/jinx-com4j/pom.xml @@ -5,7 +5,7 @@ com.exceljava jinx-com4j-root - 1.1-SNAPSHOT + 1.1.0 .. 4.0.0 @@ -26,7 +26,7 @@ com.exceljava jinx - 2.0.0-beta2 + [2.0.0,) diff --git a/pom.xml b/pom.xml index d821455..d26e092 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.exceljava jinx-com4j-root pom - 1.1-SNAPSHOT + 1.1.0 examples jinx-com4j