Index: /applications/editors/josm/plugins/cadastre-fr/build.xml
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/build.xml	(revision 28886)
+++ /applications/editors/josm/plugins/cadastre-fr/build.xml	(revision 28887)
@@ -32,5 +32,5 @@
     <property name="ant.build.javac.target" value="1.5"/>
     <property name="commit.message" value="Changed constructor for Plugin"/>
-    <property name="plugin.main.version" value="5035"/>
+    <property name="plugin.main.version" value="5553"/>
     <target name="init">
         <mkdir dir="${plugin.build.dir}"/>
Index: /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java	(revision 28886)
+++ /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java	(revision 28887)
@@ -21,6 +21,4 @@
 import javax.swing.JOptionPane;
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.data.projection.LambertCC9Zones;
-import org.openstreetmap.josm.data.projection.UTM_France_DOM;
 
 public class CacheControl implements Runnable {
@@ -217,7 +215,7 @@
     private String WMSFileExtension() {
         String ext = String.valueOf((wmsLayer.getLambertZone() + 1));
-        if (Main.getProjection() instanceof LambertCC9Zones)
+        if (CadastrePlugin.isLambert_cc9())
             ext = cLambertCC9Z + ext;
-        else if (Main.getProjection() instanceof UTM_France_DOM)
+        else if (CadastrePlugin.isUtm_france_dom())
             ext = cUTM20N + ext;
         return ext;
Index: /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java	(revision 28886)
+++ /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java	(revision 28887)
@@ -10,4 +10,7 @@
 import java.awt.event.KeyEvent;
 import java.io.File;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.swing.JCheckBoxMenuItem;
@@ -21,4 +24,6 @@
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.actions.UploadAction;
+import org.openstreetmap.josm.data.projection.AbstractProjection;
+import org.openstreetmap.josm.data.projection.Projection;
 import org.openstreetmap.josm.gui.MainMenu;
 import org.openstreetmap.josm.gui.MapFrame;
@@ -26,7 +31,7 @@
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
+import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference;
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
-import org.openstreetmap.josm.data.projection.*;
 
 /**
@@ -370,8 +375,47 @@
     }
 
+    public static boolean isLambert() {
+        String code = Main.getProjection().toCode();
+        return Arrays.asList(ProjectionPreference.lambert.allCodes()).contains(code);
+    }
+
+    public static boolean isUtm_france_dom() {
+        String code = Main.getProjection().toCode();
+        return Arrays.asList(ProjectionPreference.utm_france_dom.allCodes()).contains(code);
+    }
+
+    public static boolean isLambert_cc9() {
+        String code = Main.getProjection().toCode();
+        return Arrays.asList(ProjectionPreference.lambert_cc9.allCodes()).contains(code);
+    }
+
     public static boolean isCadastreProjection() {
-        return Main.getProjection().toString().equals(new Lambert().toString())
-            || Main.getProjection().toString().equals(new UTM_France_DOM().toString())
-            || Main.getProjection().toString().equals(new LambertCC9Zones().toString());
+        return isLambert() || isUtm_france_dom() || isLambert_cc9();
+    }
+
+    public static int getCadastreProjectionLayoutZone() {
+        int zone = -1;
+        Projection proj = Main.getProjection();
+        if (proj instanceof AbstractProjection) {
+            Integer code = ((AbstractProjection) proj).getEpsgCode();
+            if (code != null) {
+                if (code >= 3942 && code <= 3950) {                 // LambertCC9Zones
+                    zone = code - 3942;
+                } else if (code >= 27561 && 27564 <= code) {        // Lambert
+                    zone = code - 27561;
+                } else {                                            // UTM_France_DOM
+                    Map<Integer, Integer> utmfr = new HashMap<Integer, Integer>();
+                    utmfr.put(2969, 0);
+                    utmfr.put(2970, 1);
+                    utmfr.put(2973, 2);
+                    utmfr.put(2975, 3);
+                    utmfr.put(2972, 4);
+                    if (utmfr.containsKey(code)) {
+                        zone = utmfr.get(code);
+                    }
+                }
+            }
+        }
+        return zone;
     }
 
Index: /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java	(revision 28886)
+++ /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java	(revision 28887)
@@ -12,7 +12,4 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
-import org.openstreetmap.josm.data.projection.Lambert;
-import org.openstreetmap.josm.data.projection.LambertCC9Zones;
-import org.openstreetmap.josm.data.projection.UTM_France_DOM;
 import org.openstreetmap.josm.gui.layer.Layer;
 
@@ -32,5 +29,5 @@
 
         File[] files = fc.getSelectedFiles();
-        int layoutZone = getCurrentProjZone();
+        int layoutZone = CadastrePlugin.getCadastreProjectionLayoutZone();
         nextFile:
         for (File file : files) {
@@ -39,8 +36,8 @@
                 String ext = (filename.lastIndexOf(".")==-1)?"":filename.substring(filename.lastIndexOf(".")+1,filename.length());
                 if ((ext.length() == 3 && ext.substring(0, CacheControl.cLambertCC9Z.length()).equals(CacheControl.cLambertCC9Z) &&
-                    !(Main.getProjection() instanceof LambertCC9Zones))
+                    !(CadastrePlugin.isLambert_cc9()))
                     || (ext.length() == 4 && ext.substring(0, CacheControl.cUTM20N.length()).equals(CacheControl.cUTM20N) &&
-                            !(Main.getProjection() instanceof UTM_France_DOM))
-                    || (ext.length() == 1) && !(Main.getProjection() instanceof Lambert)) {
+                            !(CadastrePlugin.isUtm_france_dom()))
+                    || (ext.length() == 1) && !(CadastrePlugin.isLambert())) {
                         JOptionPane.showMessageDialog(Main.parent, tr("{0} not allowed with the current projection", filename), tr("Error"), JOptionPane.ERROR_MESSAGE);
                         continue;
@@ -88,11 +85,11 @@
         JFileChooser fc = new JFileChooser(new File(CadastrePlugin.cacheDir));
         fc.setMultiSelectionEnabled(true);
-        int layoutZone = new MenuActionLoadFromCache().getCurrentProjZone();
+        int layoutZone = CadastrePlugin.getCadastreProjectionLayoutZone();
         if (layoutZone != -1) {
-            if (Main.getProjection() instanceof Lambert)
+            if (CadastrePlugin.isLambert())
                 fc.addChoosableFileFilter(CacheFileLambert4ZoneFilter.filters[layoutZone]);
-            else if (Main.getProjection() instanceof LambertCC9Zones)
+            else if (CadastrePlugin.isLambert_cc9())
                 fc.addChoosableFileFilter(CacheFileLambert9ZoneFilter.filters[layoutZone]);
-            else if (Main.getProjection() instanceof UTM_France_DOM)
+            else if (CadastrePlugin.isUtm_france_dom())
                 fc.addChoosableFileFilter(CacheFileUTM20NFilter.filters[layoutZone]);
         }
@@ -106,13 +103,3 @@
     }
 
-    private int getCurrentProjZone() {
-        int zone = -1;
-        if (Main.getProjection() instanceof LambertCC9Zones)
-            zone = ((LambertCC9Zones)Main.getProjection()).getLayoutZone();
-        else if (Main.getProjection() instanceof Lambert)
-            zone = ((Lambert)Main.getProjection()).getLayoutZone();
-        else if (Main.getProjection() instanceof UTM_France_DOM)
-            zone = ((UTM_France_DOM)Main.getProjection()).getCurrentGeodesic();
-        return zone;
-    }
 }
Index: /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionNewLocation.java
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionNewLocation.java	(revision 28886)
+++ /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionNewLocation.java	(revision 28887)
@@ -16,7 +16,4 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
-import org.openstreetmap.josm.data.projection.Lambert;
-import org.openstreetmap.josm.data.projection.LambertCC9Zones;
-import org.openstreetmap.josm.data.projection.UTM_France_DOM;
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.tools.GBC;
@@ -115,11 +112,5 @@
             }
             // add the layer if it doesn't exist
-            int zone = -1;
-            if (Main.getProjection() instanceof LambertCC9Zones)
-                zone = ((LambertCC9Zones)Main.getProjection()).getLayoutZone();
-            else if (Main.getProjection() instanceof Lambert)
-                zone = ((Lambert)Main.getProjection()).getLayoutZone();
-            else if (Main.getProjection() instanceof UTM_France_DOM)
-                zone = ((UTM_France_DOM)Main.getProjection()).getCurrentGeodesic();
+            int zone = CadastrePlugin.getCadastreProjectionLayoutZone();
             wmsLayer = new WMSLayer(location, codeCommune, zone);
             wmsLayer.setDepartement(codeDepartement);
