diff options
author | Dirk Grobler <dg@openoffice.org> | 2001-07-05 07:04:36 +0000 |
---|---|---|
committer | Dirk Grobler <dg@openoffice.org> | 2001-07-05 07:04:36 +0000 |
commit | 4a21d784605ee7e4bcf14464d02833e79996f9db (patch) | |
tree | ef8249dec419dc7e6c284a57c1cf0232849006ce /officecfg | |
parent | c69cc2188f5fb34c212118952acb3b8885f69ec4 (diff) |
new category entry for schema:component and decode method for transformation
Diffstat (limited to 'officecfg')
4 files changed, 19 insertions, 11 deletions
diff --git a/officecfg/org/openoffice/configuration/Inspector.java b/officecfg/org/openoffice/configuration/Inspector.java index 11dc5ba41515..12b381fa95dd 100644 --- a/officecfg/org/openoffice/configuration/Inspector.java +++ b/officecfg/org/openoffice/configuration/Inspector.java @@ -2,9 +2,9 @@ * * $RCSfile: Inspector.java,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: dg $ $Date: 2001-06-19 16:43:08 $ + * last change: $Author: dg $ $Date: 2001-07-05 08:04:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -75,6 +75,7 @@ public class Inspector extends HandlerBase { public java.lang.String componentName; public java.lang.String packageName; + public java.lang.String categoryName; public java.lang.String transformationFile; public Inspector() @@ -116,6 +117,10 @@ public class Inspector extends HandlerBase { componentName = attributes.getValue("cfg:name"); packageName = attributes.getValue("cfg:package"); + categoryName = attributes.getValue("schema:category"); + + if (categoryName == null) + categoryName = new String("PrivateApplProfile"); } } diff --git a/officecfg/org/openoffice/configuration/Trim.java b/officecfg/org/openoffice/configuration/Trim.java index b2d13f677670..6eedd52f2d08 100644 --- a/officecfg/org/openoffice/configuration/Trim.java +++ b/officecfg/org/openoffice/configuration/Trim.java @@ -24,8 +24,7 @@ class Trim boolean hadLine = false; while ((line = reader.readLine()) != null) { - line = line.trim(); - if (line.length() > 0) + if (line.trim().length() > 0) { hadLine = true; out.write(line); diff --git a/officecfg/org/openoffice/configuration/XMLDefaultGenerator.java b/officecfg/org/openoffice/configuration/XMLDefaultGenerator.java index ca3b89d8c5fc..f17b6b4e5659 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.1 $ + * $Revision: 1.2 $ * - * last change: $Author: dg $ $Date: 2001-06-19 16:43:22 $ + * last change: $Author: dg $ $Date: 2001-07-05 08:04:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,6 +82,7 @@ public class XMLDefaultGenerator { protected String packageName = null; protected String componentName = null; + protected String categoryName = null; protected String transformationFile = null; /** @@ -96,6 +97,7 @@ public class XMLDefaultGenerator { public String getComponentName() {return componentName;} public String getPackageName() {return packageName;} + public String getCategoryName() {return categoryName;} /** * construct the generator by validation of the source file @@ -115,6 +117,7 @@ public class XMLDefaultGenerator { // get the necessary information for generation packageName = inspector.packageName; componentName = inspector.componentName; + categoryName = inspector.categoryName; transformationFile = inspector.transformationFile; } catch (SAXParseException spe) { @@ -239,7 +242,7 @@ public class XMLDefaultGenerator { try { - XMLDefaultGenerator XMLDefaultGenerator = new XMLDefaultGenerator(argv [0]); + XMLDefaultGenerator generator = new XMLDefaultGenerator(argv [0]); String[] args = new String[argv.length + 1]; for (int i = 0; i < argv.length; i++) @@ -250,10 +253,10 @@ public class XMLDefaultGenerator { args[argv.length] = "templateURL=" + url; // create the instance file - XMLDefaultGenerator.generateInstanceFile((String[])args.clone()); + generator.generateInstanceFile((String[])args.clone()); // create the template file - XMLDefaultGenerator.generateTemplateFile((String[])args.clone()); + generator.generateTemplateFile((String[])args.clone()); } catch (Exception pce) { // Parser with specified options can't be built diff --git a/officecfg/org/openoffice/configuration/makefile.mk b/officecfg/org/openoffice/configuration/makefile.mk index 65059cfd87c7..d597874222e3 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.2 $ +# $Revision: 1.3 $ # -# last change: $Author: dg $ $Date: 2001-06-19 16:44:29 $ +# last change: $Author: dg $ $Date: 2001-07-05 08:04:36 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -78,6 +78,7 @@ JAVACLASSFILES= \ $(CLASSDIR)$/$(PACKAGE)$/XMLDefaultGenerator.class \ $(CLASSDIR)$/$(PACKAGE)$/Generator.class \ $(CLASSDIR)$/$(PACKAGE)$/Trim.class \ + $(CLASSDIR)$/$(PACKAGE)$/Decoder.class \ $(CLASSDIR)$/$(PACKAGE)$/Inspector.class JAVAFILES= $(subst,$(CLASSDIR)$/$(PACKAGE)$/, $(subst,.class,.java $(JAVACLASSFILES))) |