Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Commit da595fb

Browse files
author
Emmanuel Hugonnet
committed
Adding support for Windows 7
git-svn-id: https://www.silverpeas.org/svn/silverpeas/services/office-online/trunk@750 a8e77078-a1c7-4fa5-b8fc-53c5178a176c
1 parent 37f8bf8 commit da595fb

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

src/main/java/com/silverpeas/openoffice/OfficeLauncher.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ public static int launch(MsOfficeType type, String url, AuthenticationInfo authI
5151
throws IOException, InterruptedException, OfficeNotFoundException {
5252
OfficeFinder finder = FinderFactory.getFinder(type);
5353
boolean modeDisconnected = (OsEnum.getOS() == OsEnum.WINDOWS_VISTA ||
54-
OsEnum.getOS() == OsEnum.MAC_OSX) && (finder.isMicrosoftOffice2007());
54+
OsEnum.getOS() == OsEnum.WINDOWS_SEVEN ||OsEnum.getOS() == OsEnum.MAC_OSX)
55+
&& (finder.isMicrosoftOffice2007());
5556
switch (type) {
5657
case EXCEL:
5758
return launch(finder.findSpreadsheet(), url, modeDisconnected, authInfo);

src/main/java/com/silverpeas/openoffice/util/OsEnum.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
public enum OsEnum {
3636

3737
WINDOWS_XP("Application Data\\Mozilla\\Firefox\\Profiles"), WINDOWS_VISTA(
38-
"Appdata\\Roaming\\Mozilla\\Firefox"), LINUX(".mozilla/firefox"), MAC_OSX(".mozilla/firefox");
38+
"Appdata\\Roaming\\Mozilla\\Firefox"), WINDOWS_SEVEN(
39+
"Appdata\\Roaming\\Mozilla\\Firefox"),LINUX(".mozilla/firefox"), MAC_OSX(".mozilla/firefox");
3940
protected String profilesDir;
4041

4142
OsEnum(String profilesDir) {
@@ -46,6 +47,9 @@ public static OsEnum getOS(String value) {
4647
if ("Windows Vista".equalsIgnoreCase(value)) {
4748
return WINDOWS_VISTA;
4849
}
50+
if ("Windows 7".equalsIgnoreCase(value)) {
51+
return WINDOWS_SEVEN;
52+
}
4953
if ("Windows XP".equalsIgnoreCase(value) || value.startsWith("Windows ")) {
5054
return WINDOWS_XP;
5155
}

src/main/java/com/silverpeas/openoffice/windows/WindowsOpenOfficeFinder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
*/
4141
public class WindowsOpenOfficeFinder extends OpenOfficeFinder {
4242

43-
Logger logger = Logger.getLogger(WindowsOpenOfficeFinder.class.getName());
44-
private static final String[] VERSIONS = new String[] { "3.1", "3.0", "2.4",
43+
static final Logger logger = Logger.getLogger(WindowsOpenOfficeFinder.class.getName());
44+
private static final String[] VERSIONS = new String[] { "3.2", "3.1", "3.0", "2.4",
4545
"2.3" };
4646
private static final String GLOBAL_OPEN_OFFICE_FOLDER =
4747
"\"HKEY_LOCAL_MACHINE\\SOFTWARE\\OpenOffice.org\\OpenOffice.org\\";

src/test/java/com/silverpeas/openoffice/windows/RegistryHelperTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
*/
3737
public class RegistryHelperTest extends TestCase {
3838

39-
public static final String INSTALLED_VERSION = "3.1";
39+
public static final String INSTALLED_VERSION = "3.2";
4040
public static final String NOT_INSTALLED_VERSION = "2.0";
4141

4242
public RegistryHelperTest(String testName) {

0 commit comments

Comments
 (0)