diff options
author | Dirk Grobler <dg@openoffice.org> | 2002-05-06 17:37:20 +0000 |
---|---|---|
committer | Dirk Grobler <dg@openoffice.org> | 2002-05-06 17:37:20 +0000 |
commit | 58acbc365fff8aff0fa73f648d903cc36964511b (patch) | |
tree | 412feda2631d9f9276ad0f38b4b0e05cfe442f42 /officecfg/org | |
parent | 4b29338543e428edf418f07f641a4eda15b4d93b (diff) |
#99152# transition to new cfg format
Diffstat (limited to 'officecfg/org')
3 files changed, 106 insertions, 8 deletions
diff --git a/officecfg/org/openoffice/configuration/FileHelper.java b/officecfg/org/openoffice/configuration/FileHelper.java new file mode 100644 index 000000000000..e90811a2769c --- /dev/null +++ b/officecfg/org/openoffice/configuration/FileHelper.java @@ -0,0 +1,100 @@ +/************************************************************************* + * + * $RCSfile: FileHelper.java,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: dg $ $Date: 2002-05-06 18:37:20 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * 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., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +package org.openoffice.configuration; +import java.io.*; + + +/** + * Title: File + * Description: decoding of set element names given encoded (base64) + */ +public class FileHelper extends Object +{ + // returns true if a file exists, otherwise false + public static boolean exists(String sSource) + { + File aFile = new File(sSource); + + try { + System.out.println("Path: " + aFile.getAbsoluteFile().toURL().toString()); + } catch (Exception e) + { + e.printStackTrace(); + } + return aFile.exists(); + } + + public static String makeAbs(String sSource) + { + String absPath = new String(); + File aFile = new File(sSource); + + try { + absPath = aFile.getAbsoluteFile().toURL().toString(); + } catch (Exception e) + { + e.printStackTrace(); + } + return absPath; + } +} + + diff --git a/officecfg/org/openoffice/configuration/XMLDefaultGenerator.java b/officecfg/org/openoffice/configuration/XMLDefaultGenerator.java index f17b6b4e5659..fea4a3644342 100644 --- a/officecfg/org/openoffice/configuration/XMLDefaultGenerator.java +++ b/officecfg/org/openoffice/configuration/XMLDefaultGenerator.java @@ -2,9 +2,9 @@ * * $RCSfile: XMLDefaultGenerator.java,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dg $ $Date: 2001-07-05 08:04:36 $ + * last change: $Author: dg $ $Date: 2002-05-06 18:37:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -107,7 +107,7 @@ public class XMLDefaultGenerator { try { SAXParserFactory factory = SAXParserFactory.newInstance(); - factory.setValidating(true); + // factory.setValidating(true); // Parse the input SAXParser saxParser = factory.newSAXParser(); diff --git a/officecfg/org/openoffice/configuration/makefile.mk b/officecfg/org/openoffice/configuration/makefile.mk index 2d5bb62b8a48..358354b75120 100644 --- a/officecfg/org/openoffice/configuration/makefile.mk +++ b/officecfg/org/openoffice/configuration/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.4 $ +# $Revision: 1.5 $ # -# last change: $Author: jb $ $Date: 2002-03-28 14:24:14 $ +# last change: $Author: dg $ $Date: 2002-05-06 18:37:20 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -66,9 +66,6 @@ PRJNAME=officecfg TARGET =cfgimport PACKAGE=org$/openoffice$/configuration -# Our jar build rules don't like -P# -MAXPROCESS=1 - # --- Settings ----------------------------------------------------- .INCLUDE : svpre.mk @@ -82,6 +79,7 @@ JAVACLASSFILES= \ $(CLASSDIR)$/$(PACKAGE)$/Generator.class \ $(CLASSDIR)$/$(PACKAGE)$/Trim.class \ $(CLASSDIR)$/$(PACKAGE)$/Decoder.class \ + $(CLASSDIR)$/$(PACKAGE)$/FileHelper.class \ $(CLASSDIR)$/$(PACKAGE)$/Inspector.class JAVAFILES= $(subst,$(CLASSDIR)$/$(PACKAGE)$/, $(subst,.class,.java $(JAVACLASSFILES))) |