-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from exceljava/jinx-2
Updates for Jinx 2.0
- Loading branch information
Showing
19 changed files
with
1,704 additions
and
18 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
jinx-com4j/src/main/java/com/exceljava/com4j/IUnknownAdaptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <T extends Com4jObject> Class<T> adaptClass(Class<?> cls) { | ||
return (Class<T>)cls; | ||
} | ||
|
||
@Override | ||
public <T> T queryInterface(Class<T> 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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
jinx-com4j/src/main/java/com/exceljava/com4j/excel/Author.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package com.exceljava.com4j.excel ; | ||
|
||
import com4j.*; | ||
|
||
@IID("{00020400-0000-0000-C000-000000000046}") | ||
public interface Author extends Com4jObject { | ||
// Methods: | ||
/** | ||
* <p> | ||
* Getter method for the COM property "Application" | ||
* </p> | ||
*/ | ||
|
||
@DISPID(148) | ||
@PropGet | ||
com.exceljava.com4j.excel._Application getApplication(); | ||
|
||
|
||
/** | ||
* <p> | ||
* Getter method for the COM property "Creator" | ||
* </p> | ||
*/ | ||
|
||
@DISPID(149) | ||
@PropGet | ||
com.exceljava.com4j.excel.XlCreator getCreator(); | ||
|
||
|
||
/** | ||
* <p> | ||
* Getter method for the COM property "Parent" | ||
* </p> | ||
*/ | ||
|
||
@DISPID(150) | ||
@PropGet | ||
com4j.Com4jObject getParent(); | ||
|
||
|
||
/** | ||
* <p> | ||
* Getter method for the COM property "Name" | ||
* </p> | ||
*/ | ||
|
||
@DISPID(110) | ||
@PropGet | ||
java.lang.String getName(); | ||
|
||
|
||
/** | ||
* <p> | ||
* Getter method for the COM property "ProviderID" | ||
* </p> | ||
*/ | ||
|
||
@DISPID(3286) | ||
@PropGet | ||
java.lang.String getProviderID(); | ||
|
||
|
||
/** | ||
* <p> | ||
* Getter method for the COM property "UserID" | ||
* </p> | ||
*/ | ||
|
||
@DISPID(3287) | ||
@PropGet | ||
java.lang.String getUserID(); | ||
|
||
|
||
// Properties: | ||
} |
Oops, something went wrong.