Permalink
Browse files

More name changing

  • Loading branch information...
1 parent 82b389d commit 01542940e329a5d7a078b779d14217e70a0b0f97 @enebo committed Oct 19, 2010
Showing with 67 additions and 742 deletions.
  1. +2 −1 .gitignore
  2. +6 −14 build.xml
  3. +0 −14 jni/util.cpp
  4. +1 −2 src/org/racob/activeX/ActiveXInvocationProxy.java
  5. +1 −1 src/org/racob/com/ComException.java
  6. +0 −39 src/org/racob/com/Dispatch.java
  7. +0 −49 src/org/racob/com/JacobException.java
  8. +0 −96 src/org/racob/com/JacobReleaseInfo.java
  9. +0 −41 src/org/racob/com/NotImplementedException.java
  10. +42 −0 src/org/racob/com/ReleaseInfo.java
  11. +2 −2 src/org/racob/com/Variant.java
  12. +7 −7 src/org/racob/com/VariantUtilities.java
  13. +0 −47 src/org/racob/com/WrongThreadException.java
  14. +0 −3 unittest/org/racob/com/ActiveXComponentFactoryTest.java
  15. +0 −1 unittest/org/racob/com/DateUtilitiesTest.java
  16. +1 −3 unittest/org/racob/com/{JacobDeadlockTest.java → DeadlockTest.java}
  17. +0 −1 unittest/org/racob/com/DispatchNullProgramId.java
  18. +0 −1 unittest/org/racob/com/DispatchValidDispatchTest.java
  19. +3 −3 unittest/org/racob/com/JacobObjectTest.java
  20. +0 −1 unittest/org/racob/com/README.txt
  21. +0 −2 unittest/org/racob/com/ROT2Test.java
  22. +0 −2 unittest/org/racob/com/ROT3Test.java
  23. +0 −5 unittest/org/racob/com/ROTTest.java
  24. +0 −1 unittest/org/racob/com/VariantDateTest.java
  25. +0 −3 unittest/org/racob/com/VariantTest.java
  26. +0 −4 unittest/org/racob/com/VariantUtilitiesTest.java
  27. +0 −236 unittest/org/racob/test/excel/ControllerTest.java
  28. BIN unittest/org/racob/test/excel/teste.xls
  29. +0 −161 unittest/org/racob/test/powerpoint/PowerpointTest.java
  30. BIN unittest/org/racob/test/powerpoint/test1.ppt
  31. BIN unittest/org/racob/test/powerpoint/test2.ppt
  32. BIN unittest/org/racob/test/powerpoint/test3.ppt
  33. BIN unittest/org/racob/test/powerpoint/test4.ppt
  34. BIN unittest/org/racob/test/powerpoint/test5.ppt
  35. +2 −2 unittest/org/racob/test/safearray/SafeArrayLeak.java
View
3 .gitignore 100644 → 100755
@@ -1,4 +1,6 @@
*~
+build/*
+dist/*
jacob.dll
jacob.jar
jacobdll.jar
@@ -14,6 +16,5 @@ release
.cdtproject
foo.foo
foo.ser
-JacobVersion.properties
.settings
View
@@ -24,7 +24,7 @@
DO NOT check compilation_tools.properties into source control as the
values are specific to YOUR environment.
- The JacobVersion.properties file is now completely autogenerated
+ The version.properties file is now completely autogenerated
====================================================================== -->
<project name="racob" default="default" basedir=".">
@@ -55,12 +55,11 @@
<property name="generated.filename.dll.x64" value="racob-x64.dll" />
<property name="generated.filename.jar" value="racob.jar" />
<property name="generated.filename.zip" value="racob-${version}" />
- <property name="generated.filename.version" value="JacobVersion.properties" />
+ <property name="generated.filename.version" value="version.properties" />
<property name="junit.jar" value="${basedir}\lib\junit3.8.1\junit.jar" />
<property name="src.java.mainroot" value="${basedir}/src" />
- <property name="src.java.samples" value="${basedir}/samples" />
<property name="src.java.unittest" value="${basedir}/unittest" />
<property name="src.cpp" value="${basedir}/jni" />
@@ -203,7 +202,7 @@
<echo message="javaJarCheck says jarUpToDate= ${jarUpToDate}" />
</target>
<!-- ======================================================================
- Compile the java files and copy JacobVersion.properties to be jar'd up
+ Compile the java files and copy version.properties to be jar'd up
Relies on ant recognizing when a file needs to be compiled
Unit tests compiled seperately because of junit dependency
@@ -213,11 +212,6 @@
<javac srcdir="${src.java.mainroot}"
destdir="${release.dir.java}"
listfiles="true" debug="on" source="1.5" />
- <echo>Building sample classes in ${release.dir.java}</echo>
- <javac srcdir="${src.java.samples}"
- destdir="${release.dir.java}"
- classpath="${release.dir.java}"
- listfiles="true" debug="on" source="1.5" />
<echo>Building Racob test classes in ${release.dir.java} using junit jar ${junit.jar}</echo>
<javac srcdir="${src.java.unittest}"
destdir="${release.dir.java}"
@@ -227,7 +221,7 @@
</target>
<!-- ======================================================================
Package the classes into a JAR.
- Put JacobVersion.properties into the jar file so version retrieval method can find it
+ Put version.properties into the jar file so version retrieval method can find it
================================================================== -->
<target name="javaJarBin"
depends="javaCompile,javaJarCheck"
@@ -239,10 +233,9 @@
<jar destfile="${release.file.jar}" basedir="${release.dir.java}" update="false">
<exclude name="**/CVS" />
<!-- exclude all unit tests (ending in Test)
- and everything in the samples and test packages -->
+ and everything in the test packages -->
<exclude name="com/**/*Test*.class"/>
- <exclude name="com/jacob/samples/**"/>
- <exclude name="com/jacob/test/**"/>
+ <exclude name="org/racob/test/**"/>
<include name="org/**/*.class" />
<include name="META-INF/${generated.filename.version}" />
<manifest>
@@ -440,7 +433,6 @@
<zipfileset dir="${basedir}" prefix="${generated.filename.zip}" includes="src/**" />
<zipfileset dir="${basedir}" prefix="${generated.filename.zip}" includes="docs/**" />
<zipfileset dir="${basedir}" prefix="${generated.filename.zip}" includes="jni/**" />
- <zipfileset dir="${basedir}" prefix="${generated.filename.zip}" includes="samples/**" />
<zipfileset dir="${basedir}" prefix="${generated.filename.zip}" includes="unittest/**" />
<zipfileset dir="${basedir}" prefix="${generated.filename.zip}" includes="vstudio/jacob.vcproj" />
<zipfileset dir="${basedir}" prefix="${generated.filename.zip}" includes="lib/**" />
View
@@ -58,20 +58,6 @@ void ThrowComFailUnicode(JNIEnv *env, const wchar_t* desc, jint hr)
env->Throw(fail);
}
-// if env's are different throw on the 1st env
-int CheckEnv(JNIEnv *env1, JNIEnv *env2)
-{
- if (env1 != env2) {
- jclass failClass = env1->FindClass("org/racob/com/WrongThreadException");
- // call the constructor that takes hr and message
- jmethodID failCons =
- env1->GetMethodID(failClass, "<init>", "()V");
- env1->ThrowNew(failClass, "Wrong Thread");
- return 0;
- }
- return 1;
-}
-
void freeDocumentationStrings(BSTR name, BSTR docString, BSTR helpFile)
{
if (name != NULL) SysFreeString(name);
@@ -23,7 +23,6 @@
import java.lang.reflect.Method;
import org.racob.com.InvocationProxy;
-import org.racob.com.NotImplementedException;
import org.racob.com.Variant;
import org.racob.com.VariantUtilities;
@@ -170,7 +169,7 @@ public Variant invoke(String methodName, Variant targetParameters[]) {
try {
parametersAsJavaObjects[parameterIndex] = oneParameterObject
.toJavaObject();
- } catch (NotImplementedException nie) {
+ } catch (RuntimeException nie) {
throw new IllegalArgumentException(
"Can't convert parameter " + parameterIndex
+ " type " + oneParameterObject.getvt()
@@ -22,7 +22,7 @@
/**
* Standard exception thrown by com jni code when there is a problem
*/
-public abstract class ComException extends JacobException {
+public abstract class ComException extends RuntimeException {
/**
* COM code initializes this filed with an appropriate return code that was
@@ -247,19 +247,6 @@ private static void throwIfUnattachedDispatch(Dispatch theOneInQuestion) {
}
- /**
- * not implemented yet
- *
- * @param dispatchTarget
- * @param name
- * @param val
- * @throws com.jacob.com.NotImplementedException
- */
- public static void put_Casesensitive(Dispatch dispatchTarget, String name,
- Object val) {
- throw new NotImplementedException("not implemented yet");
- }
-
/*
* ============================================================ start of the
* invokev section
@@ -309,20 +296,6 @@ public static void invokeSubv(Dispatch dispatchTarget, int dispID,
wFlags, vArg, uArgErr);
}
- /**
- * not implemented yet
- *
- * @param dispatchTarget
- * @param name
- * @param values
- * @return never returns anything because
- * @throws com.jacob.com.NotImplementedException
- */
- public static Variant callN_CaseSensitive(Dispatch dispatchTarget,
- String name, Object[] values) {
- throw new NotImplementedException("not implemented yet");
- }
-
/**
* @param dispatchTarget
* @param name
@@ -1273,16 +1246,4 @@ public static void putRef(Dispatch dispatchTarget, int dispid, Object val) {
invoke(dispatchTarget, dispid, Dispatch.PutRef, new Object[]{val},
new int[1]);
}
-
- /**
- * not implemented yet
- *
- * @param dispatchTarget
- * @param name
- * @return Variant never returned
- * @throws com.jacob.com.NotImplementedException
- */
- public static Variant get_CaseSensitive(Dispatch dispatchTarget, String name) {
- throw new NotImplementedException("not implemented yet");
- }
}
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1999-2004 Sourceforge JACOB Project.
- * All rights reserved. Originator: Dan Adler (http://danadler.com).
- * Get more information about JACOB at http://sourceforge.net/projects/jacob-project
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-package org.racob.com;
-
-/**
- * The parent class of all Jacob exceptions. They all used to be based off of
- * RuntimeException or ComException but it was decided to base them all off of
- * one owned by this project.
- */
-public class JacobException extends RuntimeException {
-
- /**
- *
- */
- private static final long serialVersionUID = -1637125318746002715L;
-
- /**
- * Default constructor. Calls super with a "No Message Provided" string
- */
- public JacobException() {
- super("No Message Provided");
- }
-
- /**
- * standard constructor
- *
- * @param message
- */
- public JacobException(String message) {
- super(message);
- }
-}
@@ -1,96 +0,0 @@
-package org.racob.com;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-/**
- * An interface to the version properties file. This code was removed from
- * JacobObject because it doesn't belong there.
- *
- */
-public class JacobReleaseInfo {
-
- /**
- * holds the build version as retrieved from the version properties file
- * that exists in the JAR. This can be retrieved by calling the static
- * method getBuildVersion()
- *
- * @see #getBuildVersion()
- */
- private static String buildVersion = "";
- /**
- * holds the build date as retrieved from the version properties file that
- * exists in the JAR This can be retrieved by calling the static method
- * getBuildDate()
- *
- * @see #getBuildDate()
- */
- private static String buildDate = "";
- /** the name of the jacob version properties file */
- private static final String PROPERTY_FILE_NAME = "META-INF/JacobVersion.properties";
-
- /**
- * Loads version information from PROPERTY_FILE_NAME that was built as part
- * of this release.
- *
- * @throws IllegalStateException
- * when it can't find the version properties file
- */
- private static void loadVersionProperties() {
- Properties versionProps = new Properties();
- // can't use system class loader cause won't work in JavaWebStart
- InputStream stream = JacobReleaseInfo.class.getClassLoader()
- .getResourceAsStream(PROPERTY_FILE_NAME);
- // This should never happen. This is an attempt to make something work
- // for WebSphere. They may be using some kind of Servlet loader that
- // needs an absolute path based search
- if (stream == null) {
- stream = JacobReleaseInfo.class.getClassLoader()
- .getResourceAsStream("/" + PROPERTY_FILE_NAME);
- }
- // A report came in that WebSphere had trouble finding the file
- // so lets trap it. Plus, it's a good idea anyway.
- if (stream == null) {
- throw new IllegalStateException(
- "Can't find "
- + PROPERTY_FILE_NAME
- + " using JacobReleaseInfo.class.getClassLoader().getResourceAsStream()");
- } else {
- try {
- versionProps.load(stream);
- stream.close();
- buildVersion = (String) versionProps.get("version");
- buildDate = (String) versionProps.get("build.date");
- } catch (IOException ioe) {
- ioe.printStackTrace();
- System.err.println("Warning! Couldn't load props " + ioe);
- }
- }
- }
-
- /**
- * loads PROPERT_FILE_NAME and returns the value of version in it
- *
- * @return String value of version in PROPERT_FILE_NAME or "" if none
- */
- public static String getBuildDate() {
- if (buildDate.equals("")) {
- loadVersionProperties();
- }
- return buildDate;
- }
-
- /**
- * loads PROPERT_FILE_NAME and returns the value of version in it
- *
- * @return String value of version in PROPERT_FILE_NAME or "" if none
- */
- public static String getBuildVersion() {
- if (buildVersion.equals("")) {
- loadVersionProperties();
- }
- return buildVersion;
- }
-
-}
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 1999-2004 Sourceforge JACOB Project.
- * All rights reserved. Originator: Dan Adler (http://danadler.com).
- * Get more information about JACOB at http://sourceforge.net/projects/jacob-project
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-package org.racob.com;
-
-/**
- * Thrown by java APIs that are not implemented either because they were never
- * implemented or because they are being deprecated This is a subclass of
- * ComException so callers can still just catch ComException.
- */
-public class NotImplementedException extends JacobException {
-
- /**
- *
- */
- private static final long serialVersionUID = -9169900832852356445L;
-
- /**
- * @param description
- */
- public NotImplementedException(String description) {
- super(description);
- }
-
-}
Oops, something went wrong.

0 comments on commit 0154294

Please sign in to comment.