From 0c128e8f1ce1dd42d4375b0f91e4e93f02214ccf Mon Sep 17 00:00:00 2001 From: Antti Villberg Date: Mon, 6 Apr 2020 16:53:28 +0300 Subject: [PATCH] SimanticsExcel interface refresh gitlab #514 Change-Id: I9c205730f0cbfb8d75f88c69483155dd8cafd4b2 --- .../org.simantics.excel/SimanticsExcel_64.dll | Bin 0 -> 51712 bytes bundles/org.simantics.excel/build.properties | 3 +- .../org.simantics.excel/native/Interface.cpp | 82 +++++------ .../native/SimanticsExcel.sln | 12 +- .../native/SimanticsExcel.vcxproj | 130 +++++++++++++++--- bundles/org.simantics.excel/native/jni2.h | 5 +- bundles/org.simantics.excel/scl/Excel.scl | 19 +++ .../src/org/simantics/excel/Excel.java | 82 ++++++----- 8 files changed, 230 insertions(+), 103 deletions(-) create mode 100644 bundles/org.simantics.excel/SimanticsExcel_64.dll create mode 100644 bundles/org.simantics.excel/scl/Excel.scl diff --git a/bundles/org.simantics.excel/SimanticsExcel_64.dll b/bundles/org.simantics.excel/SimanticsExcel_64.dll new file mode 100644 index 0000000000000000000000000000000000000000..9be7f04fee6a3078faac612030839d6b095c4291 GIT binary patch literal 51712 zcmeEvdwf*Y)%M9{lHn3&f(#@mGDy&96r({K4B8o(fip0XaMP%u!4M3u2xBrMprXMf z%5WG>t!-^O}#MUiAwBk6iV%fP1dm30U*mfvcVZeE!0Mt2zOl zk9{u6J0E*V)OSACDd56Ywe`ep_oOPQX)Eq_XxCk|ld07pA}iV8__$1I>(I2rD80E$)7H!C@-LVg$W2ek z&>llH@{%{{O@Odk*N$9~PVI7HFED$m_WiAny3eZvmS3 z6!(^|63JIJXeF>+Y?Lu#x-;h7o&h|i*R)@ll+Z@^s$MY{*@5Yqv8?SG z$R21(76D~Dzp81eWIevL$ay7bE-ic4Z*=L#XGri`p4In(+RixzE)B3XsmHH#>j}@@ zsH(ey-J2(tkB{c*&3i4~YHyk`UW*+Lqie=~^Yhv4<rySH+Fy{~zU*&V zQa9d-2a3G@<|7%gbM(%cvf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~l% z5~uwE6nmXH4PJ(>!AtB=Vt7-Gsi4H+M311v;Di^Hn40i{5;qfG@O+JzIN3~%7u<7L z`$YXO{}k~p_P0!|o@kv|H_(ujx5+cS4lnA(ya6xi<-DR-@}|7gUfG-WE_qkHig(SM@ospk zw5-%xT32c-Z7Lb1j#9KV{bN<(vq1Z*XcRk&(c(aHyjUqNJJxnAdF=49>0>R&lgAGq QFCSM}C1Q7e{<|LdCl0P1ZvX%Q literal 0 HcmV?d00001 diff --git a/bundles/org.simantics.excel/build.properties b/bundles/org.simantics.excel/build.properties index 9a56e9b7e..4f7390681 100644 --- a/bundles/org.simantics.excel/build.properties +++ b/bundles/org.simantics.excel/build.properties @@ -13,4 +13,5 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ .,\ - SimanticsExcel.dll + SimanticsExcel.dll,\ + scl/ diff --git a/bundles/org.simantics.excel/native/Interface.cpp b/bundles/org.simantics.excel/native/Interface.cpp index 46f894c63..9e67f4aa8 100644 --- a/bundles/org.simantics.excel/native/Interface.cpp +++ b/bundles/org.simantics.excel/native/Interface.cpp @@ -1,31 +1,21 @@ -//#include "stdafx.h" - -//#ifndef _UNICODE -//#define _UNICODE -//#endif - #include #include -//#include -//#include +#include +#include +#include +#include using namespace std; -#import "c:/program files (x86)/common files/microsoft shared/office12/mso.dll" \ - rename( "RGB", "MSORGB" ) - -using namespace Office; - -#import "c:/program files (x86)/common files/microsoft shared/vba/vba6/vbe6ext.olb" \ - -using namespace VBIDE; +// mso.dll +#import "libid:{2df8d04c-5bfa-101b-bde5-00aa0044de52}" auto_rename +// vb6ext.olb +#import "libid:{0002e157-0000-0000-c000-000000000046}" auto_rename +// excel.exe +#import "libid:{00020813-0000-0000-c000-000000000046}" auto_rename -#import "c:/program files (x86)/microsoft office/office12/excel.exe" \ - rename( "DialogBox", "ExcelDialogBox" ) \ - rename( "RGB", "ExcelRGB" ) \ - rename( "CopyFile", "ExcelCopyFile" ) \ - rename( "ReplaceText", "ExcelReplaceText" ) +using namespace Excel; #include "jni2.h" @@ -34,10 +24,10 @@ using namespace VBIDE; #define SIMANTICS_DEBUG(...) -using namespace std; -using namespace Excel; +//using namespace std; +//using namespace Office; -map handles; +map handles; static int handleCounter = 1; void replace(std::string &s, const std::string &s1, const std::string &s2) { @@ -464,7 +454,7 @@ JNIEXPORT jint JNICALL Java_org_simantics_excel_Excel_close(JNIEnv *env, jobject } -/** + JNIEXPORT jdouble JNICALL Java_org_simantics_excel_Excel_getDouble(JNIEnv *env, jobject, jint handle, jint row, jint column) { SIMANTICS_DEBUG("getDouble(%d, %d)\r\n", row, column); @@ -489,7 +479,7 @@ JNIEXPORT jdouble JNICALL Java_org_simantics_excel_Excel_getDouble(JNIEnv *env, } JNIEXPORT jstring JNICALL Java_org_simantics_excel_Excel_getString(JNIEnv *env, jobject, jint handle, jint row, jint column) { - + USES_CONVERSION; //string val = getString(env, value); SIMANTICS_DEBUG("getString(%d, %d)\r\n", row, column); @@ -499,30 +489,30 @@ JNIEXPORT jstring JNICALL Java_org_simantics_excel_Excel_getString(JNIEnv *env, Excel::RangePtr range = sheet->Cells; if(!range) return NULL; - variant_t val = range->Item[row+1][column+1]; - if (val.vt != VT_NULL) { // val.vt seems to be always VT_DISPATCH. - try { + _bstr_t val = _bstr_t(range->Item[row + 1][column + 1]); + //if (val.vt != VT_NULL) { // val.vt seems to be always VT_DISPATCH. + //try { //this call will crash the application, if the cell is empty! - _bstr_t bstrt = val; - TCHAR text[1024]; + //_bstr_t bstrt = val; + //std::string text(val); + //CString text(val); + //text. + //TCHAR text[1024]; // TODO: this uses wide character (16-bit) while NewStringUTF expext regular character (8-bit), hence Java gets only the fisrt charater of the whole string. - _stprintf(text, _T("%s"), (LPCTSTR)bstrt); + //_stprintf(text, _T("%s"), (LPCTSTR)bstrt); //const char *text = bstrt; SIMANTICS_DEBUG("%s\r\n",text); - - // this code returns "??" for all cells. - //BSTR bstr = val.bstrVal; - //const char *text = _com_util::ConvertBSTRToString(bstr); - jstring ret = env->NewStringUTF((const char*)text); - delete[] text; - return ret; - } catch (...) { - return NULL; - } - } - SIMANTICS_DEBUG("%d\r\n",val.vt); - return NULL; + string text(val); + + + return env->NewStringUTF(text.c_str()); + + //} catch (...) { + // return NULL; + //} + //} + //SIMANTICS_DEBUG("%d\r\n",val.vt); + //return NULL; } -*/ \ No newline at end of file diff --git a/bundles/org.simantics.excel/native/SimanticsExcel.sln b/bundles/org.simantics.excel/native/SimanticsExcel.sln index 59c24ad34..bb04a663d 100644 --- a/bundles/org.simantics.excel/native/SimanticsExcel.sln +++ b/bundles/org.simantics.excel/native/SimanticsExcel.sln @@ -1,7 +1,9 @@  -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimanticsExcel", "SimanticsExcel.vcproj", "{E106958A-412F-4782-81CD-DF380D66BA6B}" +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.40629.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimanticsExcel", "SimanticsExcel.vcxproj", "{E106958A-412F-4782-81CD-DF380D66BA6B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,8 +13,8 @@ Global GlobalSection(ProjectConfigurationPlatforms) = postSolution {E106958A-412F-4782-81CD-DF380D66BA6B}.Debug|Win32.ActiveCfg = Debug|Win32 {E106958A-412F-4782-81CD-DF380D66BA6B}.Debug|Win32.Build.0 = Debug|Win32 - {E106958A-412F-4782-81CD-DF380D66BA6B}.Release|Win32.ActiveCfg = Release|Win32 - {E106958A-412F-4782-81CD-DF380D66BA6B}.Release|Win32.Build.0 = Release|Win32 + {E106958A-412F-4782-81CD-DF380D66BA6B}.Release|Win32.ActiveCfg = Release|x64 + {E106958A-412F-4782-81CD-DF380D66BA6B}.Release|Win32.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/bundles/org.simantics.excel/native/SimanticsExcel.vcxproj b/bundles/org.simantics.excel/native/SimanticsExcel.vcxproj index 77b342183..67c676b43 100644 --- a/bundles/org.simantics.excel/native/SimanticsExcel.vcxproj +++ b/bundles/org.simantics.excel/native/SimanticsExcel.vcxproj @@ -1,14 +1,22 @@  - + Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {E106958A-412F-4782-81CD-DF380D66BA6B} @@ -18,12 +26,27 @@ DynamicLibrary + v120 + false + Unicode + true + + + DynamicLibrary + v120 false Unicode true DynamicLibrary + v120 + false + Unicode + + + DynamicLibrary + v120 false Unicode @@ -33,20 +56,38 @@ + + + + + + - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - false - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false + <_ProjectFileVersion>12.0.30501.0 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + false + + + true + false + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + false + + + false + false @@ -60,8 +101,7 @@ EnableFastChecks MultiThreadedDebugDLL true - - + Level3 EditAndContinue @@ -78,7 +118,64 @@ MachineX86 + + + _DEBUG;%(PreprocessorDefinitions) + false + + + Disabled + WIN32;_WINDOWS;_DEBUG;_USRDLL;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + true + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + $(IntDir);%(AdditionalIncludeDirectories) + + + LinkVerboseLib + .\SimanticsExcel.def + true + Windows + + + + NDEBUG;%(PreprocessorDefinitions) + false + + + MaxSpeed + true + WIN32;_WINDOWS;NDEBUG;_USRDLL;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + Level3 + ProgramDatabase + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + $(IntDir);%(AdditionalIncludeDirectories) + + + .\SimanticsExcel.def + true + Windows + true + true + MachineX86 + + + NDEBUG;%(PreprocessorDefinitions) false @@ -105,7 +202,6 @@ Windows true true - MachineX86 @@ -113,12 +209,11 @@ - - - + + @@ -127,6 +222,9 @@ + + + diff --git a/bundles/org.simantics.excel/native/jni2.h b/bundles/org.simantics.excel/native/jni2.h index d2c7715f0..ba3eeec8b 100644 --- a/bundles/org.simantics.excel/native/jni2.h +++ b/bundles/org.simantics.excel/native/jni2.h @@ -14,9 +14,8 @@ JNIEXPORT jint JNICALL Java_org_simantics_excel_Excel_setString(JNIEnv *env, job JNIEXPORT jint JNICALL Java_org_simantics_excel_Excel_setName(JNIEnv *env, jobject, jint handle, jint row, jint column, jstring value); JNIEXPORT jint JNICALL Java_org_simantics_excel_Excel_setVisible(JNIEnv *env, jobject, jint handle, jboolean value); JNIEXPORT jint JNICALL Java_org_simantics_excel_Excel_close(JNIEnv *env, jobject, jint handle); - -//JNIEXPORT jstring JNICALL Java_org_simantics_excel_Excel_getString(JNIEnv *env, jobject, jint handle, jint row, jint column); -//JNIEXPORT jdouble JNICALL Java_org_simantics_excel_Excel_getDouble(JNIEnv *env, jobject, jint handle, jint row, jint column); +JNIEXPORT jstring JNICALL Java_org_simantics_excel_Excel_getString(JNIEnv *env, jobject, jint handle, jint row, jint column); +JNIEXPORT jdouble JNICALL Java_org_simantics_excel_Excel_getDouble(JNIEnv *env, jobject, jint handle, jint row, jint column); #ifdef __cplusplus } diff --git a/bundles/org.simantics.excel/scl/Excel.scl b/bundles/org.simantics.excel/scl/Excel.scl new file mode 100644 index 000000000..4314025ed --- /dev/null +++ b/bundles/org.simantics.excel/scl/Excel.scl @@ -0,0 +1,19 @@ +importJava "org.simantics.excel.Excel" where + + data Excel + + @JavaName "getInstance" + excelInstance :: () -> Excel + + @JavaName "open2_" + openExcelSheet :: Excel -> String -> String -> Integer + @JavaName "close_" + closeExcelSheet :: Excel -> Integer -> () + @JavaName "setString_" + setExcelString :: Excel -> Integer -> Integer -> Integer -> String -> Integer + @JavaName "getString_" + getExcelString :: Excel -> Integer -> Integer -> Integer -> String + @JavaName "setDouble_" + setExcelDouble :: Excel -> Integer -> Integer -> Integer -> Double -> Integer + @JavaName "getDouble_" + getExcelDouble :: Excel -> Integer -> Integer -> Integer -> Double diff --git a/bundles/org.simantics.excel/src/org/simantics/excel/Excel.java b/bundles/org.simantics.excel/src/org/simantics/excel/Excel.java index bf7ddb5d5..d692206bd 100644 --- a/bundles/org.simantics.excel/src/org/simantics/excel/Excel.java +++ b/bundles/org.simantics.excel/src/org/simantics/excel/Excel.java @@ -45,6 +45,10 @@ public class Excel { private static Excel instance; + public static Excel getInstance() throws ExcelException { + return getInstance(System.out); + } + public static Excel getInstance(PrintStream out) throws ExcelException { if(instance == null) { @@ -89,11 +93,11 @@ public class Excel { File extractDir = context.getDataFile(""); if (extractDir == null) - throw new IOException("Bundle '" + Activator.PLUGIN_ID + " context has no file system support. Cannot extract server executables."); + throw new IOException("Bundle '" + Activator.PLUGIN_ID + " context has no file system support. Cannot extract DLLs."); if (!extractDir.exists()) if (!extractDir.mkdir()) - throw new IOException("Could not create directory '" + extractDir.getCanonicalPath() + "' for storing Balas solver data."); + throw new IOException("Could not create directory '" + extractDir.getCanonicalPath() + "' for communicating with Excel."); return extractDir; @@ -266,7 +270,7 @@ public class Excel { if (!extractDir.exists()) if (!extractDir.mkdir()) - throw new IOException("Could not create directory '" + extractDir.getCanonicalPath() + "' for storing Balas solver data."); + throw new IOException("Could not create directory '" + extractDir.getCanonicalPath() + "' for communicating with Excel."); String asd = ""; ExecEnvironment env = ExecEnvironment.calculate(); @@ -306,8 +310,8 @@ public class Excel { private native int setVisible(int handle, boolean value); private native int close(int handle); -// private native double getDouble(int handle, int row, int column); -// private native String getString(int handle, int row, int column); + private native double getDouble(int handle, int row, int column); + private native String getString(int handle, int row, int column); final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor(); @@ -331,6 +335,20 @@ public class Excel { }); } + public int open2_(final String fileName, final String sheetName) { + try { + return scheduler.submit(new Callable() { + @Override + public Integer call() throws Exception { + return Integer.parseInt(open(fileName, sheetName)); + } + }).get(); + } catch (Exception e) { + e.printStackTrace(); + return -1; + } + } + public String open_(final String fileName, final String sheetName) { try { return scheduler.submit(new Callable() { @@ -437,32 +455,32 @@ public class Excel { } } -// public double getDouble_(final int handle, final int row, final int column) { -// try { -// return scheduler.submit(new Callable() { -// @Override -// public Double call() throws Exception { -// return getDouble(handle, row, column); -// } -// }).get(); -// } catch (Exception e) { -// e.printStackTrace(); -// return Double.NaN; -// } -// } -// -// public String getString_(final int handle, final int row, final int column) { -// try { -// return scheduler.submit(new Callable() { -// @Override -// public String call() throws Exception { -// return getString(handle, row, column); -// } -// }).get(); -// } catch (Exception e) { -// e.printStackTrace(); -// return null; -// } -// } + public double getDouble_(final int handle, final int row, final int column) { + try { + return scheduler.submit(new Callable() { + @Override + public Double call() throws Exception { + return getDouble(handle, row, column); + } + }).get(); + } catch (Exception e) { + e.printStackTrace(); + return Double.NaN; + } + } + + public String getString_(final int handle, final int row, final int column) { + try { + return scheduler.submit(new Callable() { + @Override + public String call() throws Exception { + return getString(handle, row, column); + } + }).get(); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } } -- 2.47.1