mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
125603 rmunteanu: Merged 5.1.1 (5.1.1) to 5.1.N (5.1.2) 125484 slanglois: MNT-16155 Update source headers - remove old Copyrights from Java and JSP dource files git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@125781 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
46 lines
1.4 KiB
Java
46 lines
1.4 KiB
Java
package org.alfresco.util;
|
|
|
|
import java.io.File;
|
|
import java.io.IOException;
|
|
import java.util.AbstractMap;
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
|
|
import org.alfresco.error.AlfrescoRuntimeException;
|
|
import org.alfresco.util.OpenOfficeURI;
|
|
import org.alfresco.util.exec.RuntimeExec;
|
|
import org.apache.commons.logging.Log;
|
|
import org.apache.commons.logging.LogFactory;
|
|
|
|
/**
|
|
* A map giving the environment openoffice or libreoffice commands require to start.
|
|
*
|
|
* @author Alan Davis
|
|
*/
|
|
public class OpenOfficeCommandEnv extends AbstractMap<String, String>
|
|
{
|
|
private static final Log logger = LogFactory.getLog(OpenOfficeCommandLine.class);
|
|
private static final String DYLD_LIBRARY_PATH = "DYLD_LIBRARY_PATH";
|
|
|
|
private Map<String, String> map = new HashMap<String, String>(System.getenv());
|
|
private OpenOfficeVariant variant = new OpenOfficeVariant();
|
|
|
|
public OpenOfficeCommandEnv(String exe) throws IOException
|
|
{
|
|
if (variant.isMac())
|
|
{
|
|
map.remove(DYLD_LIBRARY_PATH);
|
|
logger.debug("Removing $DYLD_LIBRARY_PATH from the environment so that LibreOffice/OpenOffice will start on Mac.");
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public Set<java.util.Map.Entry<String, String>> entrySet()
|
|
{
|
|
return map.entrySet();
|
|
}
|
|
}
|