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

Commit e1b9aff

Browse files
author
Emmanuel Hugonnet
committed
Fxing bug #273 : Support for Windows 7 64 bits
git-svn-id: https://www.silverpeas.org/svn/silverpeas/services/office-online/trunk@1050 a8e77078-a1c7-4fa5-b8fc-53c5178a176c
1 parent 1bd5042 commit e1b9aff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+187
-134
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.silverpeas</groupId>
77
<artifactId>parent</artifactId>
8-
<version>1.0-SNAPSHOT</version>
8+
<version>4.0</version>
99
<relativePath>../../parent/pom.xml</relativePath>
1010
</parent>
1111

@@ -35,7 +35,7 @@
3535
<groupId>org.slf4j</groupId>
3636
<artifactId>slf4j-api</artifactId>
3737
</dependency>
38-
<dependency>
38+
<dependency>
3939
<groupId>org.slf4j</groupId>
4040
<artifactId>jcl-over-slf4j</artifactId>
4141
</dependency>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* As a special exception to the terms and conditions of version 3.0 of
1010
* the GPL, you may redistribute this Program in connection with Free/Libre
1111
* Open Source Software ("FLOSS") applications as described in Silverpeas's
12-
* FLOSS exception. You should have recieved a copy of the text describing
12+
* FLOSS exception. You should have received a copy of the text describing
1313
* the FLOSS exception, and it is also available here:
1414
* "http://repository.silverpeas.com/legal/licensing"
1515
*
@@ -21,6 +21,7 @@
2121
* You should have received a copy of the GNU Affero General Public License
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*/
24+
2425
package com.silverpeas.openoffice;
2526

2627
/**

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

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* As a special exception to the terms and conditions of version 3.0 of
1010
* the GPL, you may redistribute this Program in connection with Free/Libre
1111
* Open Source Software ("FLOSS") applications as described in Silverpeas's
12-
* FLOSS exception. You should have recieved a copy of the text describing
12+
* FLOSS exception. You should have received a copy of the text describing
1313
* the FLOSS exception, and it is also available here:
1414
* "http://repository.silverpeas.com/legal/licensing"
1515
*
@@ -21,6 +21,7 @@
2121
* You should have received a copy of the GNU Affero General Public License
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*/
24+
2425
package com.silverpeas.openoffice;
2526

2627
import com.silverpeas.openoffice.util.MessageDisplayer;
@@ -54,34 +55,39 @@ public class Launcher {
5455
* @param args the command line arguments
5556
*/
5657
public static void main(final String[] args) throws OfficeNotFoundException {
57-
logger.log(Level.INFO, "{0} version {1}", new Object[]{MessageUtil.getMessage("app.title"), LAUNCHER_VERSION});
58-
logger.log(Level.INFO, "{0}{1}", new Object[]{MessageUtil.getMessage("info.url.encoded"), args[0]});
58+
logger.log(Level.INFO, "{0} version {1}", new Object[] { MessageUtil.getMessage("app.title"),
59+
LAUNCHER_VERSION });
60+
logger.log(Level.INFO, "{0}{1}", new Object[] { MessageUtil.getMessage("info.url.encoded"),
61+
args[0] });
5962
try {
6063
String url = UrlExtractor.extractUrl(args[0]);
61-
logger.log(Level.INFO, "{0}{1}", new Object[]{MessageUtil.getMessage("info.url.decoded"), url});
64+
logger.log(Level.INFO, "{0}{1}", new Object[] { MessageUtil.getMessage("info.url.decoded"),
65+
url });
6266
if (args[1] != null && !"".equals(args[1].trim())) {
63-
logger.log(Level.INFO, "{0} {2}", new Object[]{MessageUtil.getMessage("info.default.path"), UrlExtractor.decodePath(args[1])});
67+
logger.log(Level.INFO, "{0} {2}", new Object[] {
68+
MessageUtil.getMessage("info.default.path"), UrlExtractor.decodePath(args[1]) });
6469
MsOfficePathFinder.basePath = UrlExtractor.decodePath(args[1]);
6570
}
6671
AuthenticationInfo authInfo = null;
6772
if (args.length >= 4) {
6873
authInfo = PasswordManager.extractAuthenticationInfo(args[2], args[3]);
6974
}
7075
MsOfficeType contentType = getContentType(UrlExtractor.decodeUrl(args[0]));
71-
logger.log(Level.FINE, "{0}{1}", new Object[]{MessageUtil.getMessage("info.document.type"), contentType});
76+
logger.log(Level.FINE, "{0}{1}", new Object[] { MessageUtil.getMessage("info.document.type"),
77+
contentType });
7278
defineLookAndFeel();
7379
System.exit(OfficeLauncher.launch(contentType, url, authInfo));
7480
} catch (IOException ex) {
7581
logger.log(Level.SEVERE, MessageUtil.getMessage("error.message.general"),
76-
ex);
82+
ex);
7783
MessageDisplayer.displayError(ex);
7884
} catch (InterruptedException ex) {
7985
logger.log(Level.SEVERE, MessageUtil.getMessage("error.message.general"),
80-
ex);
86+
ex);
8187
MessageDisplayer.displayError(ex);
8288
} catch (Throwable ex) {
8389
logger.log(Level.SEVERE, MessageUtil.getMessage("error.message.general"),
84-
ex);
90+
ex);
8591
MessageDisplayer.displayError(ex);
8692
} finally {
8793
System.exit(0);
@@ -92,7 +98,7 @@ protected static void defineLookAndFeel() {
9298
try {
9399
try {
94100
if (OsEnum.getOS() == OsEnum.WINDOWS_VISTA || OsEnum.getOS() == OsEnum.WINDOWS_XP
95-
|| OsEnum.getOS() == OsEnum.WINDOWS_SEVEN) {
101+
|| OsEnum.getOS() == OsEnum.WINDOWS_SEVEN) {
96102
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
97103
}
98104
} catch (ClassNotFoundException ex) {
@@ -108,7 +114,7 @@ protected static void defineLookAndFeel() {
108114
}
109115

110116
protected static MsOfficeType getContentType(String url)
111-
throws MalformedURLException {
117+
throws MalformedURLException {
112118
String fileName = new URL(url).getFile();
113119
String contentType = mimeTypes.getContentType(fileName.toLowerCase());
114120
return MsOfficeType.valueOfMimeType(contentType);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* As a special exception to the terms and conditions of version 3.0 of
1010
* the GPL, you may redistribute this Program in connection with Free/Libre
1111
* Open Source Software ("FLOSS") applications as described in Silverpeas's
12-
* FLOSS exception. You should have recieved a copy of the text describing
12+
* FLOSS exception. You should have received a copy of the text describing
1313
* the FLOSS exception, and it is also available here:
1414
* "http://repository.silverpeas.com/legal/licensing"
1515
*
@@ -21,6 +21,7 @@
2121
* You should have received a copy of the GNU Affero General Public License
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*/
24+
2425
/*
2526
* To change this template, choose Tools | Templates
2627
* and open the template in the editor.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* As a special exception to the terms and conditions of version 3.0 of
1010
* the GPL, you may redistribute this Program in connection with Free/Libre
1111
* Open Source Software ("FLOSS") applications as described in Silverpeas's
12-
* FLOSS exception. You should have recieved a copy of the text describing
12+
* FLOSS exception. You should have received a copy of the text describing
1313
* the FLOSS exception, and it is also available here:
1414
* "http://repository.silverpeas.com/legal/licensing"
1515
*
@@ -21,6 +21,7 @@
2121
* You should have received a copy of the GNU Affero General Public License
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*/
24+
2425
/*
2526
* To change this template, choose Tools | Templates
2627
* and open the template in the editor.

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* As a special exception to the terms and conditions of version 3.0 of
1010
* the GPL, you may redistribute this Program in connection with Free/Libre
1111
* Open Source Software ("FLOSS") applications as described in Silverpeas's
12-
* FLOSS exception. You should have recieved a copy of the text describing
12+
* FLOSS exception. You should have received a copy of the text describing
1313
* the FLOSS exception, and it is also available here:
1414
* "http://repository.silverpeas.com/legal/licensing"
1515
*
@@ -21,6 +21,7 @@
2121
* You should have received a copy of the GNU Affero General Public License
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*/
24+
2425
package com.silverpeas.openoffice;
2526

2627
import com.silverpeas.openoffice.windows.FileWebDavAccessManager;
@@ -51,9 +52,9 @@ public static int launch(MsOfficeType type, String url, AuthenticationInfo authI
5152
throws IOException, InterruptedException, OfficeNotFoundException {
5253
OfficeFinder finder = FinderFactory.getFinder(type);
5354
logger.log(Level.INFO, "Are we using Office 2007 : {0}", finder.isMicrosoftOffice2007());
54-
logger.log(Level.INFO, "We are on {0} OS", OsEnum.getOS());
55+
logger.log(Level.INFO, "We are on {0} OS", OsEnum.getOS());
5556
boolean modeDisconnected = (OsEnum.getOS() == OsEnum.WINDOWS_VISTA ||
56-
OsEnum.getOS() == OsEnum.WINDOWS_SEVEN ||OsEnum.getOS() == OsEnum.MAC_OSX)
57+
OsEnum.getOS() == OsEnum.WINDOWS_SEVEN || OsEnum.getOS() == OsEnum.MAC_OSX)
5758
&& finder.isMicrosoftOffice2007();
5859
switch (type) {
5960
case EXCEL:
@@ -82,7 +83,7 @@ public static int launch(String path, String url, boolean modeDisconnected,
8283
AuthenticationInfo auth) throws IOException, InterruptedException {
8384
logger.log(Level.INFO, "The path: {0}", path);
8485
logger.log(Level.INFO, "The url: {0}", url);
85-
logger.log(Level.INFO, "The command line: {0} {1}", new Object[]{path, url});
86+
logger.log(Level.INFO, "The command line: {0} {1}", new Object[] { path, url });
8687
if (modeDisconnected) {
8788
try {
8889
String webdavUrl = url;
@@ -91,7 +92,7 @@ public static int launch(String path, String url, boolean modeDisconnected,
9192
webdavUrl = url.substring(1, url.length() - 1);
9293
}
9394
String tmpFilePath = webdavAccessManager.retrieveFile(webdavUrl);
94-
logger.log(Level.INFO, "The exact exec line: {0} {1}", new Object[]{path, tmpFilePath});
95+
logger.log(Level.INFO, "The exact exec line: {0} {1}", new Object[] { path, tmpFilePath });
9596
Process process = Runtime.getRuntime().exec(path + ' ' + tmpFilePath);
9697
process.waitFor();
9798
webdavAccessManager.pushFile(tmpFilePath, url);
@@ -106,7 +107,7 @@ public static int launch(String path, String url, boolean modeDisconnected,
106107
}
107108
} else {
108109
// Standard mode : just open it
109-
logger.log(Level.INFO, "The exact exec line: {0} {2}", new Object[]{path, url});
110+
logger.log(Level.INFO, "The exact exec line: {0} {2}", new Object[] { path, url });
110111
Process process = Runtime.getRuntime().exec(path + ' ' + url);
111112
return process.waitFor();
112113
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* As a special exception to the terms and conditions of version 3.0 of
1010
* the GPL, you may redistribute this Program in connection with Free/Libre
1111
* Open Source Software ("FLOSS") applications as described in Silverpeas's
12-
* FLOSS exception. You should have recieved a copy of the text describing
12+
* FLOSS exception. You should have received a copy of the text describing
1313
* the FLOSS exception, and it is also available here:
1414
* "http://repository.silverpeas.com/legal/licensing"
1515
*
@@ -21,6 +21,7 @@
2121
* You should have received a copy of the GNU Affero General Public License
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*/
24+
2425
/*
2526
* To change this template, choose Tools | Templates
2627
* and open the template in the editor.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* As a special exception to the terms and conditions of version 3.0 of
1010
* the GPL, you may redistribute this Program in connection with Free/Libre
1111
* Open Source Software ("FLOSS") applications as described in Silverpeas's
12-
* FLOSS exception. You should have recieved a copy of the text describing
12+
* FLOSS exception. You should have received a copy of the text describing
1313
* the FLOSS exception, and it is also available here:
1414
* "http://repository.silverpeas.com/legal/licensing"
1515
*
@@ -21,6 +21,7 @@
2121
* You should have received a copy of the GNU Affero General Public License
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*/
24+
2425
/*
2526
* To change this template, choose Tools | Templates
2627
* and open the template in the editor.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* As a special exception to the terms and conditions of version 3.0 of
1010
* the GPL, you may redistribute this Program in connection with Free/Libre
1111
* Open Source Software ("FLOSS") applications as described in Silverpeas's
12-
* FLOSS exception. You should have recieved a copy of the text describing
12+
* FLOSS exception. You should have received a copy of the text describing
1313
* the FLOSS exception, and it is also available here:
1414
* "http://repository.silverpeas.com/legal/licensing"
1515
*
@@ -21,6 +21,7 @@
2121
* You should have received a copy of the GNU Affero General Public License
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*/
24+
2425
/*
2526
* To change this template, choose Tools | Templates
2627
* and open the template in the editor.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* As a special exception to the terms and conditions of version 3.0 of
1010
* the GPL, you may redistribute this Program in connection with Free/Libre
1111
* Open Source Software ("FLOSS") applications as described in Silverpeas's
12-
* FLOSS exception. You should have recieved a copy of the text describing
12+
* FLOSS exception. You should have received a copy of the text describing
1313
* the FLOSS exception, and it is also available here:
1414
* "http://repository.silverpeas.com/legal/licensing"
1515
*
@@ -21,6 +21,7 @@
2121
* You should have received a copy of the GNU Affero General Public License
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*/
24+
2425
/*
2526
* To change this template, choose Tools | Templates
2627
* and open the template in the editor.

src/main/java/com/silverpeas/openoffice/linux/WhereisHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* As a special exception to the terms and conditions of version 3.0 of
1010
* the GPL, you may redistribute this Program in connection with Free/Libre
1111
* Open Source Software ("FLOSS") applications as described in Silverpeas's
12-
* FLOSS exception. You should have recieved a copy of the text describing
12+
* FLOSS exception. You should have received a copy of the text describing
1313
* the FLOSS exception, and it is also available here:
1414
* "http://repository.silverpeas.com/legal/licensing"
1515
*
@@ -21,6 +21,7 @@
2121
* You should have received a copy of the GNU Affero General Public License
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*/
24+
2425
/*
2526
* To change this template, choose Tools | Templates
2627
* and open the template in the editor.

src/main/java/com/silverpeas/openoffice/macosx/MacOsOfficeFinder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* As a special exception to the terms and conditions of version 3.0 of
1010
* the GPL, you may redistribute this Program in connection with Free/Libre
1111
* Open Source Software ("FLOSS") applications as described in Silverpeas's
12-
* FLOSS exception. You should have recieved a copy of the text describing
12+
* FLOSS exception. You should have received a copy of the text describing
1313
* the FLOSS exception, and it is also available here:
1414
* "http://repository.silverpeas.com/legal/licensing"
1515
*
@@ -21,6 +21,7 @@
2121
* You should have received a copy of the GNU Affero General Public License
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*/
24+
2425
/*
2526
* To change this template, choose Tools | Templates
2627
* and open the template in the editor.

src/main/java/com/silverpeas/openoffice/macosx/PlistHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* As a special exception to the terms and conditions of version 3.0 of
1010
* the GPL, you may redistribute this Program in connection with Free/Libre
1111
* Open Source Software ("FLOSS") applications as described in Silverpeas's
12-
* FLOSS exception. You should have recieved a copy of the text describing
12+
* FLOSS exception. You should have received a copy of the text describing
1313
* the FLOSS exception, and it is also available here:
1414
* "http://repository.silverpeas.com/legal/licensing"
1515
*
@@ -21,6 +21,7 @@
2121
* You should have received a copy of the GNU Affero General Public License
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*/
24+
2425
/*
2526
* To change this template, choose Tools | Templates
2627
* and open the template in the editor.

src/main/java/com/silverpeas/openoffice/macosx/WhereisMacHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* As a special exception to the terms and conditions of version 3.0 of
1010
* the GPL, you may redistribute this Program in connection with Free/Libre
1111
* Open Source Software ("FLOSS") applications as described in Silverpeas's
12-
* FLOSS exception. You should have recieved a copy of the text describing
12+
* FLOSS exception. You should have received a copy of the text describing
1313
* the FLOSS exception, and it is also available here:
1414
* "http://repository.silverpeas.com/legal/licensing"
1515
*
@@ -21,6 +21,7 @@
2121
* You should have received a copy of the GNU Affero General Public License
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*/
24+
2425
/*
2526
* To change this template, choose Tools | Templates
2627
* and open the template in the editor.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* As a special exception to the terms and conditions of version 3.0 of
1010
* the GPL, you may redistribute this Program in connection with Free/Libre
1111
* Open Source Software ("FLOSS") applications as described in Silverpeas's
12-
* FLOSS exception. You should have recieved a copy of the text describing
12+
* FLOSS exception. You should have received a copy of the text describing
1313
* the FLOSS exception, and it is also available here:
1414
* "http://repository.silverpeas.com/legal/licensing"
1515
*
@@ -21,6 +21,7 @@
2121
* You should have received a copy of the GNU Affero General Public License
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*/
24+
2425
/*
2526
* To change this template, choose Tools | Templates
2627
* and open the template in the editor.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* As a special exception to the terms and conditions of version 3.0 of
1010
* the GPL, you may redistribute this Program in connection with Free/Libre
1111
* Open Source Software ("FLOSS") applications as described in Silverpeas's
12-
* FLOSS exception. You should have recieved a copy of the text describing
12+
* FLOSS exception. You should have received a copy of the text describing
1313
* the FLOSS exception, and it is also available here:
1414
* "http://repository.silverpeas.com/legal/licensing"
1515
*
@@ -21,6 +21,7 @@
2121
* You should have received a copy of the GNU Affero General Public License
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*/
24+
2425
/*
2526
* To change this template, choose Tools | Templates
2627
* and open the template in the editor.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* As a special exception to the terms and conditions of version 3.0 of
1010
* the GPL, you may redistribute this Program in connection with Free/Libre
1111
* Open Source Software ("FLOSS") applications as described in Silverpeas's
12-
* FLOSS exception. You should have recieved a copy of the text describing
12+
* FLOSS exception. You should have received a copy of the text describing
1313
* the FLOSS exception, and it is also available here:
1414
* "http://repository.silverpeas.com/legal/licensing"
1515
*
@@ -21,6 +21,7 @@
2121
* You should have received a copy of the GNU Affero General Public License
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*/
24+
2425
package com.silverpeas.openoffice.util;
2526

2627
import javax.swing.JOptionPane;

0 commit comments

Comments
 (0)