Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/impl/DefaultSymbologyManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/impl/DefaultSymbologyManager.java	(revision 43598)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/impl/DefaultSymbologyManager.java	(revision 43599)
@@ -25,22 +25,22 @@
 *
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
 * of the Valencian Government (CIT)
-* 
+*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 3
 * of the License, or (at your option) any later version.
-* 
+*
 * This program 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 General Public License for more details.
-* 
+*
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA  02110-1301, USA.
-* 
+*
 */
 
 package org.gvsig.symbology.impl;
@@ -52,9 +52,11 @@
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
+
 import org.apache.batik.ext.awt.geom.DefaultPathLength;
 
 import org.gvsig.fmap.mapcontext.rendering.legend.IInterval;
+import org.gvsig.fmap.mapcontext.rendering.legend.driver.ILegendWriter;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClassFactory;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod;
@@ -65,6 +67,7 @@
 import org.gvsig.symbology.PathLength;
 import org.gvsig.symbology.SymbologyLocator;
 import org.gvsig.symbology.SymbologyManager;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.driver.impl.PersistenceBasedLegendWriter;
 import org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.FInterval;
 import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.AttrInTableLabelingStrategy;
 import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.DefaultLabelingMethod;
@@ -102,14 +105,14 @@
 
 /**
  * Default {@link SymbologyManager} implementation.
- * 
+ *
  * @author 2009- <a href="cordinyana@gvsig.org">César Ordiñana</a> - gvSIG team
  */
 public class DefaultSymbologyManager implements SymbologyManager {
 
         private Map labelClassFactories = new HashMap();
     private ILabelClassFactory defaultLabelClassFactory;
-        
+
 	public IInterval createInterval(double min, double max) {
 		return new FInterval(min, max);
 	}
@@ -119,16 +122,16 @@
 		public Object call() throws Exception {
 
 			SymbologyLocator.registerSymbologyManager(DefaultSymbologyManager.class);
-	        
+
 			return Boolean.TRUE;
 		}
-		
+
 	}
 
 	public IArrowDecoratorStyle createArrowDecoratorStyle() {
 		return new ArrowDecoratorStyle();
 	}
-	
+
 //	public IMarkerSymbol createMarkerSymbol(){
 //		return new SimpleMarkerSymbol();
 //	}
@@ -156,7 +159,7 @@
 	public ISimpleLineStyle createSimpleLineStyle() {
 		return new SimpleLineStyle();
 	}
-	
+
 	public IBackgroundFileStyle createBackgroundFileStyle(URL imgURL)
 			throws IOException {
 		return BackgroundFileStyle.createStyleByURL(imgURL);
@@ -197,11 +200,11 @@
 	public ILabelingStrategy createDefaultLabelingStrategy() {
 		return new AttrInTableLabelingStrategy();
 	}
-	
+
 	public ILabelingMethod createDefaultLabelingMethod() {
 		return new DefaultLabelingMethod();
 	}
-	
+
 	public IZoomConstraints createDefaultZoomConstraints() {
 		return new ZoomConstraintsImpl();
 	}
@@ -216,18 +219,18 @@
                 this.defaultLabelClassFactory = factory;
             }
         }
-        
+
         public Collection<ILabelClassFactory> getLabelClassFactories() {
             return Collections.unmodifiableCollection(this.labelClassFactories.values());
         }
-        
+
         public ILabelClassFactory getLabelClassFactory(String id) {
             if( id==null ) {
                 return null;
             }
             return (ILabelClassFactory) this.labelClassFactories.get(id.toLowerCase());
         }
-        
+
 	public ILabelClass createDefaultLabel() {
             ILabelClassFactory f = this.getDefaultLabelFactory();
             if( f==null ) {
@@ -235,11 +238,11 @@
             }
             return f.create();
 	}
-	
+
         public ILabelClassFactory getDefaultLabelFactory() {
             return this.defaultLabelClassFactory;
         }
-        
+
         public void setDefaultLabelFactory(String id) {
             ILabelClassFactory f = this.getLabelClassFactory(id);
             if( f==null ) {
@@ -247,7 +250,7 @@
             }
             this.setDefaultLabelFactory(f);
         }
-        
+
         public void setDefaultLabelFactory(ILabelClassFactory factory) {
             if( !this.labelClassFactories.containsValue(factory) ) {
                 this.labelClassFactories.put(factory.getID().toLowerCase(), factory);
@@ -259,7 +262,11 @@
     public PathLength createPathLength(Shape path) {
         return new DefaultPathLength(path);
     }
-        
- 
-        
+
+    public ILegendWriter getDefaultLegendWriter() {
+        return new PersistenceBasedLegendWriter();
+    }
+
+
+
 }
\ No newline at end of file
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/SymbologyManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/SymbologyManager.java	(revision 43598)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/SymbologyManager.java	(revision 43599)
@@ -29,6 +29,7 @@
 import java.util.Collection;
 
 import org.gvsig.fmap.mapcontext.rendering.legend.IInterval;
+import org.gvsig.fmap.mapcontext.rendering.legend.driver.ILegendReader;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClassFactory;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod;
@@ -50,6 +51,7 @@
 import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IMask;
 import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.ISimpleLineStyle;
 import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.text.ISimpleTextSymbol;
+import org.gvsig.fmap.mapcontext.rendering.legend.driver.ILegendWriter;
 
 /**
  * Basic symbology manager.
@@ -116,15 +118,20 @@
      * Creates an instance of a class (provided by this manager) which
      * implements ILabelClass.
      *
-     * @return 
+     * @return
      */
     ILabelClass createDefaultLabel();
-    
+
     public ILabelClassFactory getDefaultLabelFactory();
 
     public void setDefaultLabelFactory(String id);
 
     public void setDefaultLabelFactory(ILabelClassFactory factory);
-    
+
     public PathLength createPathLength(Shape path);
+
+    /**
+     * @return
+     */
+    ILegendWriter getDefaultLegendWriter();
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/legend/gui/legendactions/SaveLegendAction.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/legend/gui/legendactions/SaveLegendAction.java	(revision 43598)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/legend/gui/legendactions/SaveLegendAction.java	(revision 43599)
@@ -3,9 +3,14 @@
 import java.awt.event.ActionEvent;
 import java.io.File;
 import java.util.List;
+
 import javax.swing.Action;
 import javax.swing.JFileChooser;
 import javax.swing.JOptionPane;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import org.gvsig.andami.PluginServices;
 import org.gvsig.app.ApplicationLocator;
 import org.gvsig.app.project.documents.view.legend.gui.LegendFileFilter;
@@ -20,12 +25,13 @@
 public class SaveLegendAction extends AbstractLoadSaveLegendAction {
 
     private static final long serialVersionUID = -382469306285635077L;
+    private static final Logger logger = LoggerFactory.getLogger(SaveLegendAction.class);
 
     public SaveLegendAction() {
        super();
         this.putValue(Action.NAME, PluginServices.getText(this, "Guardar_leyenda") + "...");
     }
-    
+
     @Override
     public void actionPerformed(ActionEvent e) {
         if( ! (e.getSource() instanceof LegendsPanel) ) {
@@ -34,6 +40,7 @@
         try {
             saveLegend((LegendsPanel) e.getSource());
         } catch (Exception exc) {
+            logger.warn("_Unable_to_save_legend", exc);
             JOptionPane.showMessageDialog(
                 ApplicationLocator.getManager().getRootComponent(),
                 Messages.getText("_Unable_to_save_legend")
