Index: applications/editors/josm/plugins/pdfimport/.classpath
===================================================================
--- applications/editors/josm/plugins/pdfimport/.classpath	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/.classpath	(revision 34541)
@@ -3,5 +3,9 @@
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" path="resources"/>
-	<classpathentry kind="src" path="test/unit"/>
+	<classpathentry kind="src" output="bintest" path="test/unit">
+		<attributes>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
Index: applications/editors/josm/plugins/pdfimport/build.xml
===================================================================
--- applications/editors/josm/plugins/pdfimport/build.xml	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/build.xml	(revision 34541)
@@ -4,5 +4,5 @@
     <property name="commit.message" value="bug fix"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="12678"/>
+    <property name="plugin.main.version" value="14153"/>
 	<property name="plugin.canloadatruntime" value="true"/>   
     <!-- Configure these properties (replace "..." accordingly).
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/FilePlacement.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/FilePlacement.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/FilePlacement.java	(revision 34541)
@@ -14,8 +14,8 @@
 
 public class FilePlacement {
-	/*
-	 * provide data and services to place a PDF-File to world coordinates
-	 * enhanced by FilePlacement18 but kept for compatibilty to existing code
-	 */
+    /*
+     * provide data and services to place a PDF-File to world coordinates
+     * enhanced by FilePlacement18 but kept for compatibilty to existing code
+     */
     protected Projection projection = null;
     protected double minX = 0;
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/FilePlacement18.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/FilePlacement18.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/FilePlacement18.java	(revision 34541)
@@ -34,369 +34,369 @@
 
 public class FilePlacement18 extends FilePlacement {
-	/*
-	 * Handle plasement of a pdf File
-	 * provide transformation, load & save, GUI-componennt
-	 * superseeds (legacy) class FilePlacement
-	 */
-
-	public class PlacementPanel {
-		private class CoorFields {
-			/*
-			 * Coordinte Fields
-			 * keep Fields representing a Coordinate together
-			 * functionality: allow entering coordinate in the first field and transfer Y-Part to the second field
-			 * TODO: encapsulate to Componente
-			 */
-			private GuiFieldDouble x;
-			private GuiFieldDouble y;
-
-			private void checkCoords( GuiFieldDouble x, GuiFieldDouble y) {
-				int splitpos = 0;
-				String val2 = x.getText().trim();
-				if ((splitpos = val2.indexOf(';')) >= 0) {
-					// Split a coordinate into its parts for ease of data entry
-					y.setText(val2.substring(splitpos + 1).trim());
-					x.setText(val2.substring(0, splitpos).trim());
-				}
-				y.checker.check(y);
-				x.checker.check(x);
-			}
-
-			@SuppressWarnings("unused")
-			private CoorFields() {
-			}
-
-			public CoorFields(GuiFieldDouble X, GuiFieldDouble Y) {
-				x = X;
-				y = Y;
-				x.addFocusListener(new FocusListener() {
-					@Override
-					public void focusLost(FocusEvent e) {
-						checkCoords(x, y);
-					}
-
-					@Override
-					public void focusGained(FocusEvent e) {
-					}
-				});
-			}
-			public void SetCoor(EastNorth en) {
-				x.requestFocusInWindow();		// make shure focus-lost events will be triggered later
-				x.setValue(en.getX());
-				y.requestFocusInWindow();
-				y.setValue(en.getY());
-			}
-			public EastNorth getCorr() {
-				return new EastNorth(x.getValue(),y.getValue());
-			}
-		}
-
-		private GuiFieldDouble minXField;
-		private GuiFieldDouble minYField;
-		private GuiFieldDouble minEastField;
-		private GuiFieldDouble minNorthField;
-		private JButton getMinButton;
-		private JButton getMaxButton;
-		private GuiFieldDouble maxNorthField;
-		private GuiFieldDouble maxEastField;
-		private GuiFieldDouble maxYField;
-		private GuiFieldDouble maxXField;
-		private GuiPanel panel;
-		private JLabel hintField;
-		private CoorFields pdfMin;
-		private CoorFields pdfMax;
-		private CoorFields worldMin;
-		private CoorFields worldMax;
-		private GuiProjections projectionChooser;
-		private FilePlacement18 fc = null;		// reference to enclosing FilePlacement
-		private JComponent dependsOnValid = null;
-
-		public PlacementPanel(FilePlacement18 parrent) {
-			if (parrent==null) throw new IllegalArgumentException();
-			fc=parrent;
-		}
-
-		private PlacementPanel () {
-
-		}
-
-		private class Monitor implements FocusListener {
-
-			private PlacementPanel target=null;
-
-			public Monitor(PlacementPanel home) {
-				target=home;
-			}
-
-			@Override
-			public void focusGained(FocusEvent e) {
-			}
-
-			@Override
-			public void focusLost(FocusEvent e) {
-				try {
-					target.Verify();
-				} catch (Exception ee) {
-				}
-			}
-		}
-
-		void load() {
-			/*
-			 * load GUI from setting
-			 */
-			try {
-				minXField.setValue(fc.minX);
-				maxXField.setValue(fc.maxX);
-				minYField.setValue(fc.minY);
-				maxYField.setValue(fc.maxY);
-				minEastField.setValue(fc.minEast);
-				maxEastField.setValue(fc.maxEast);
-				minNorthField.setValue(fc.minNorth);
-				maxNorthField.setValue(fc.maxNorth);
-				projectionChooser.setProjection(fc.projection);
-			} finally {
-				Verify();
-			}
-		}
-
-		void build() {
+    /*
+     * Handle plasement of a pdf File
+     * provide transformation, load & save, GUI-componennt
+     * superseeds (legacy) class FilePlacement
+     */
+
+    public class PlacementPanel {
+        private class CoorFields {
+            /*
+             * Coordinte Fields
+             * keep Fields representing a Coordinate together
+             * functionality: allow entering coordinate in the first field and transfer Y-Part to the second field
+             * TODO: encapsulate to Componente
+             */
+            private GuiFieldDouble x;
+            private GuiFieldDouble y;
+
+            private void checkCoords(GuiFieldDouble x, GuiFieldDouble y) {
+                int splitpos = 0;
+                String val2 = x.getText().trim();
+                if ((splitpos = val2.indexOf(';')) >= 0) {
+                    // Split a coordinate into its parts for ease of data entry
+                    y.setText(val2.substring(splitpos + 1).trim());
+                    x.setText(val2.substring(0, splitpos).trim());
+                }
+                y.checker.check(y);
+                x.checker.check(x);
+            }
+
+            @SuppressWarnings("unused")
+            private CoorFields() {
+            }
+
+            CoorFields(GuiFieldDouble x, GuiFieldDouble y) {
+                this.x = x;
+                this.y = y;
+                x.addFocusListener(new FocusListener() {
+                    @Override
+                    public void focusLost(FocusEvent e) {
+                        checkCoords(x, y);
+                    }
+
+                    @Override
+                    public void focusGained(FocusEvent e) {
+                    }
+                });
+            }
+            public void SetCoor(EastNorth en) {
+                x.requestFocusInWindow();        // make shure focus-lost events will be triggered later
+                x.setValue(en.getX());
+                y.requestFocusInWindow();
+                y.setValue(en.getY());
+            }
+            public EastNorth getCorr() {
+                return new EastNorth(x.getValue(),y.getValue());
+            }
+        }
+
+        private GuiFieldDouble minXField;
+        private GuiFieldDouble minYField;
+        private GuiFieldDouble minEastField;
+        private GuiFieldDouble minNorthField;
+        private JButton getMinButton;
+        private JButton getMaxButton;
+        private GuiFieldDouble maxNorthField;
+        private GuiFieldDouble maxEastField;
+        private GuiFieldDouble maxYField;
+        private GuiFieldDouble maxXField;
+        private GuiPanel panel;
+        private JLabel hintField;
+        private CoorFields pdfMin;
+        private CoorFields pdfMax;
+        private CoorFields worldMin;
+        private CoorFields worldMax;
+        private GuiProjections projectionChooser;
+        private FilePlacement18 fc = null;        // reference to enclosing FilePlacement
+        private JComponent dependsOnValid = null;
+
+        public PlacementPanel(FilePlacement18 parrent) {
+            if (parrent==null) throw new IllegalArgumentException();
+            fc=parrent;
+        }
+
+        private PlacementPanel () {
+
+        }
+
+        private class Monitor implements FocusListener {
+
+            private PlacementPanel target=null;
+
+            public Monitor(PlacementPanel home) {
+                target=home;
+            }
+
+            @Override
+            public void focusGained(FocusEvent e) {
+            }
+
+            @Override
+            public void focusLost(FocusEvent e) {
+                try {
+                    target.Verify();
+                } catch (Exception ee) {
+                }
+            }
+        }
+
+        void load() {
+            /*
+             * load GUI from setting
+             */
+            try {
+                minXField.setValue(fc.minX);
+                maxXField.setValue(fc.maxX);
+                minYField.setValue(fc.minY);
+                maxYField.setValue(fc.maxY);
+                minEastField.setValue(fc.minEast);
+                maxEastField.setValue(fc.maxEast);
+                minNorthField.setValue(fc.minNorth);
+                maxNorthField.setValue(fc.maxNorth);
+                projectionChooser.setProjection(fc.projection);
+            } finally {
+                Verify();
+            }
+        }
+
+        void build() {
 /*
  * Construct Objects
  *
  */
-			Monitor monitor = new Monitor(this);
-			projectionChooser = new GuiProjections();
-
-			pdfMin = new CoorFields(minXField = new GuiFieldDouble(0), minYField = new GuiFieldDouble(0));
-			minXField.setToolTipText(tr("X-value of bottom left reference point"));
-			minXField.addFocusListener(monitor);
-			minYField.setToolTipText(tr("Y-value of bottom left reference point"));
-			minYField.addFocusListener(monitor);
-
-//
-			worldMin = new CoorFields(minEastField = new GuiFieldDouble(0), minNorthField = new GuiFieldDouble(0));
-			minEastField.setToolTipText(tr("East-value of bottom left reference point"));
-			minEastField.addFocusListener(monitor);
-			minNorthField.setToolTipText(tr("North-value of bottom left reference point"));
-			minNorthField.addFocusListener(monitor);
-//
-			getMinButton = new JButton(tr("Get from Preview"));
-			getMinButton.setToolTipText(tr("Select a single node from preview"));
-			getMinButton.addActionListener(new ActionListener() {
-				@Override
-				public void actionPerformed(ActionEvent e) {
-					setFromCoor(pdfMin);
-				}
-			});
-//
-			pdfMax = new CoorFields(maxXField = new GuiFieldDouble(1000), maxYField = new GuiFieldDouble(1000));
-			maxXField.setToolTipText(tr("X-value of top right reference point"));
-			maxXField.addFocusListener(monitor);
-			maxYField.setToolTipText(tr("Y-value of top right  reference point"));
-			maxYField.addFocusListener(monitor);
-//
-			worldMax = new CoorFields(maxEastField = new GuiFieldDouble(1),	maxNorthField = new GuiFieldDouble(1));
-			maxEastField.setToolTipText(tr("East-value of top right reference point"));
-			maxEastField.addFocusListener(monitor);
-			maxNorthField.setToolTipText(tr("North-value of top right reference point"));
-			maxNorthField.addFocusListener(monitor);
-//
-			getMaxButton = new JButton(tr("Get from Preview"));
-			getMaxButton.setToolTipText(tr("Select a single node from preview"));
-			getMaxButton.addActionListener(new ActionListener() {
-				@Override
-				public void actionPerformed(ActionEvent e) {
-					setFromCoor(pdfMax);
-				}
-			});
-
-//
-			hintField = new JLabel(tr("Check Placement"),SwingConstants.CENTER);
-			hintField.setForeground(Color.RED);
-//
-			panel = new GuiPanel(new GridBagLayout());
-			panel.setBorder(BorderFactory.createTitledBorder(tr("Bind to coordinates")));
-
-			GridBagConstraints cBasic = new GridBagConstraints(GridBagConstraints.RELATIVE, GridBagConstraints.RELATIVE,
-					1, 1, 0.0, 0.0, GridBagConstraints.HORIZONTAL, GridBagConstraints.LINE_START,
-					new Insets(1, 0, 0, 4), 0, 0);
-			cBasic.gridx = GridBagConstraints.RELATIVE;
-			cBasic.gridy = GridBagConstraints.RELATIVE;
-			cBasic.insets = new Insets(1, 0, 0, 4);
-			cBasic.anchor = GridBagConstraints.LINE_START;
-			cBasic.fill = GridBagConstraints.HORIZONTAL;
-			cBasic.gridheight = 1;
-			cBasic.gridwidth = 1;
-			cBasic.ipadx = 0;
-			cBasic.ipady = 0;
-			cBasic.weightx = 0.0;
-			cBasic.weighty = 0.0;
-			GridBagConstraints cCornerHeading = (GridBagConstraints) cBasic.clone();
-			cCornerHeading.gridwidth = GridBagConstraints.REMAINDER;
-			cCornerHeading.gridx = 0;
-			cCornerHeading.insets = new Insets(3, 0, 0, 0);
-
-			GridBagConstraints cLine = (GridBagConstraints) cBasic.clone();
-
-			GridBagConstraints cGetButton = (GridBagConstraints) cBasic.clone();
-			cGetButton.gridx = 1;
-			cGetButton.gridwidth = GridBagConstraints.REMAINDER;
-			cGetButton.fill = GridBagConstraints.NONE;
-
-			GridBagConstraints c = new GridBagConstraints();
-			/*
-			 * Projection
-			 */
-			panel.add(projectionChooser.getPanel(), cCornerHeading);
-			/*
-			 * Max Corner
-			 */
-			panel.add(new JLabel(tr("Top right (max) corner:"),SwingConstants.CENTER), cCornerHeading);
-			c = (GridBagConstraints) cLine.clone();
-			c.weightx = 0.0; panel.add(new JLabel(tr("X:"),SwingConstants.RIGHT),c);
-			c.weightx = 1.0; panel.add(maxXField, c);
-			c.weightx = 0.0; panel.add(new JLabel(tr("East:"),SwingConstants.RIGHT),c);
-			c.weightx = 1.0; panel.add(maxEastField, c);
-
-			c.gridy = 4;
-			c.weightx = 0.0; panel.add(new JLabel(tr("Y:"),SwingConstants.RIGHT),c);
-			c.weightx = 1.0; panel.add(maxYField, c);
-			c.weightx = 0.0; panel.add(new JLabel(tr("North:"),SwingConstants.RIGHT),c);
-			c.weightx = 1.0; panel.add(maxNorthField, c);
-			panel.add(getMaxButton, cGetButton);
-			/*
-			 * Min Corner
-			 */
-			panel.add(new JLabel(tr("Bottom left (min) corner:"),SwingConstants.CENTER), cCornerHeading);
-			c = (GridBagConstraints) cLine.clone();
-			c.weightx = 0.0; panel.add(new JLabel(tr("X:"),SwingConstants.RIGHT),c);
-			c.weightx = 1.0; panel.add(minXField, c);
-			c.weightx = 0.0; panel.add(new JLabel(tr("East:"),SwingConstants.RIGHT),c);
-			c.weightx = 1.0; panel.add(minEastField, c);
-
-			c.gridy = 8;
-			c.weightx = 0.0; panel.add(new JLabel(tr("Y:"),SwingConstants.RIGHT),c);
-			c.weightx = 1.0; panel.add(minYField, c);
-			c.weightx = 0.0; panel.add(new JLabel(tr("North:"),SwingConstants.RIGHT),c);
-			c.weightx = 1.0; panel.add(minNorthField, c);
-
-			panel.add(getMinButton, cGetButton);
-			/*
-			 * Hints
-			 */
-			c.gridx = 0;c.gridy = 11;c.gridwidth = GridBagConstraints.REMAINDER; c.fill = GridBagConstraints.HORIZONTAL;
-			panel.add(hintField, cGetButton);
-		}
-
-		private EastNorth getSelectedCoor() {
-			/*
-			 * Assumtions:
-			 *    selection is from preview,
-			 *    preview has been create without any projection / transformation
-			 *    TODO: enshure this
-			 */
-			hintField.setText("");
-			Collection<OsmPrimitive> selected = MainApplication.getLayerManager().getEditDataSet().getSelected();
-
-			if (selected.size() != 1 || !(selected.iterator().next() instanceof Node)) {
-				hintField.setText(tr("Please select exactly one node."));
-				return null;
-			}
-
-			LatLon ll = ((Node) selected.iterator().next()).getCoor();
-//			FilePlacement pl = new FilePlacement();
-//			return pl.reverseTransform(ll);
-			return new EastNorth(ll.lon() * 1000, ll.lat() * 1000);
-		}
-
-		private void Verify() {
-			hintField.setText("");
-			String Hint = "";
-			fc.valid = false;
-			FilePlacement placement = fc;
-			try {
-				placement.projection = projectionChooser.getProjection();
-				try {
-					placement.setPdfBounds(minXField.getValue(), minYField.getValue(), maxXField.getValue(),
-							maxYField.getValue());
-					placement.setEastNorthBounds(minEastField.getValue(), minNorthField.getValue(),
-							maxEastField.getValue(), maxNorthField.getValue());
-				} catch (Exception e) {
-					Hint=(tr("Check numbers"));
-					return;
-				}
-				String transformError = placement.prepareTransform();
-				if (transformError != null) {
-					Hint=(transformError);
-					return;
-				}
-				fc.valid = true;
-			} finally {
-				hintField.setText(Hint);
-				if (dependsOnValid!=null) dependsOnValid.setEnabled(fc.valid && panel.isEnabled());
-			}
-
-			return;
-		}
-
-		public void setDependsOnValid(JComponent c) {
-			dependsOnValid=c;
-		}
-
-		void setFromCoor(CoorFields f) {
-			EastNorth en = getSelectedCoor();
-
-			if (en != null) {
-				f.SetCoor(en);
-			}
-
-		}
-
-	}
+            Monitor monitor = new Monitor(this);
+            projectionChooser = new GuiProjections();
+
+            pdfMin = new CoorFields(minXField = new GuiFieldDouble(0), minYField = new GuiFieldDouble(0));
+            minXField.setToolTipText(tr("X-value of bottom left reference point"));
+            minXField.addFocusListener(monitor);
+            minYField.setToolTipText(tr("Y-value of bottom left reference point"));
+            minYField.addFocusListener(monitor);
+
+//
+            worldMin = new CoorFields(minEastField = new GuiFieldDouble(0), minNorthField = new GuiFieldDouble(0));
+            minEastField.setToolTipText(tr("East-value of bottom left reference point"));
+            minEastField.addFocusListener(monitor);
+            minNorthField.setToolTipText(tr("North-value of bottom left reference point"));
+            minNorthField.addFocusListener(monitor);
+//
+            getMinButton = new JButton(tr("Get from Preview"));
+            getMinButton.setToolTipText(tr("Select a single node from preview"));
+            getMinButton.addActionListener(new ActionListener() {
+                @Override
+                public void actionPerformed(ActionEvent e) {
+                    setFromCoor(pdfMin);
+                }
+            });
+//
+            pdfMax = new CoorFields(maxXField = new GuiFieldDouble(1000), maxYField = new GuiFieldDouble(1000));
+            maxXField.setToolTipText(tr("X-value of top right reference point"));
+            maxXField.addFocusListener(monitor);
+            maxYField.setToolTipText(tr("Y-value of top right  reference point"));
+            maxYField.addFocusListener(monitor);
+//
+            worldMax = new CoorFields(maxEastField = new GuiFieldDouble(1),    maxNorthField = new GuiFieldDouble(1));
+            maxEastField.setToolTipText(tr("East-value of top right reference point"));
+            maxEastField.addFocusListener(monitor);
+            maxNorthField.setToolTipText(tr("North-value of top right reference point"));
+            maxNorthField.addFocusListener(monitor);
+//
+            getMaxButton = new JButton(tr("Get from Preview"));
+            getMaxButton.setToolTipText(tr("Select a single node from preview"));
+            getMaxButton.addActionListener(new ActionListener() {
+                @Override
+                public void actionPerformed(ActionEvent e) {
+                    setFromCoor(pdfMax);
+                }
+            });
+
+//
+            hintField = new JLabel(tr("Check Placement"),SwingConstants.CENTER);
+            hintField.setForeground(Color.RED);
+//
+            panel = new GuiPanel(new GridBagLayout());
+            panel.setBorder(BorderFactory.createTitledBorder(tr("Bind to coordinates")));
+
+            GridBagConstraints cBasic = new GridBagConstraints(GridBagConstraints.RELATIVE, GridBagConstraints.RELATIVE,
+                    1, 1, 0.0, 0.0, GridBagConstraints.HORIZONTAL, GridBagConstraints.LINE_START,
+                    new Insets(1, 0, 0, 4), 0, 0);
+            cBasic.gridx = GridBagConstraints.RELATIVE;
+            cBasic.gridy = GridBagConstraints.RELATIVE;
+            cBasic.insets = new Insets(1, 0, 0, 4);
+            cBasic.anchor = GridBagConstraints.LINE_START;
+            cBasic.fill = GridBagConstraints.HORIZONTAL;
+            cBasic.gridheight = 1;
+            cBasic.gridwidth = 1;
+            cBasic.ipadx = 0;
+            cBasic.ipady = 0;
+            cBasic.weightx = 0.0;
+            cBasic.weighty = 0.0;
+            GridBagConstraints cCornerHeading = (GridBagConstraints) cBasic.clone();
+            cCornerHeading.gridwidth = GridBagConstraints.REMAINDER;
+            cCornerHeading.gridx = 0;
+            cCornerHeading.insets = new Insets(3, 0, 0, 0);
+
+            GridBagConstraints cLine = (GridBagConstraints) cBasic.clone();
+
+            GridBagConstraints cGetButton = (GridBagConstraints) cBasic.clone();
+            cGetButton.gridx = 1;
+            cGetButton.gridwidth = GridBagConstraints.REMAINDER;
+            cGetButton.fill = GridBagConstraints.NONE;
+
+            GridBagConstraints c = new GridBagConstraints();
+            /*
+             * Projection
+             */
+            panel.add(projectionChooser.getPanel(), cCornerHeading);
+            /*
+             * Max Corner
+             */
+            panel.add(new JLabel(tr("Top right (max) corner:"),SwingConstants.CENTER), cCornerHeading);
+            c = (GridBagConstraints) cLine.clone();
+            c.weightx = 0.0; panel.add(new JLabel(tr("X:"),SwingConstants.RIGHT),c);
+            c.weightx = 1.0; panel.add(maxXField, c);
+            c.weightx = 0.0; panel.add(new JLabel(tr("East:"),SwingConstants.RIGHT),c);
+            c.weightx = 1.0; panel.add(maxEastField, c);
+
+            c.gridy = 4;
+            c.weightx = 0.0; panel.add(new JLabel(tr("Y:"),SwingConstants.RIGHT),c);
+            c.weightx = 1.0; panel.add(maxYField, c);
+            c.weightx = 0.0; panel.add(new JLabel(tr("North:"),SwingConstants.RIGHT),c);
+            c.weightx = 1.0; panel.add(maxNorthField, c);
+            panel.add(getMaxButton, cGetButton);
+            /*
+             * Min Corner
+             */
+            panel.add(new JLabel(tr("Bottom left (min) corner:"),SwingConstants.CENTER), cCornerHeading);
+            c = (GridBagConstraints) cLine.clone();
+            c.weightx = 0.0; panel.add(new JLabel(tr("X:"),SwingConstants.RIGHT),c);
+            c.weightx = 1.0; panel.add(minXField, c);
+            c.weightx = 0.0; panel.add(new JLabel(tr("East:"),SwingConstants.RIGHT),c);
+            c.weightx = 1.0; panel.add(minEastField, c);
+
+            c.gridy = 8;
+            c.weightx = 0.0; panel.add(new JLabel(tr("Y:"),SwingConstants.RIGHT),c);
+            c.weightx = 1.0; panel.add(minYField, c);
+            c.weightx = 0.0; panel.add(new JLabel(tr("North:"),SwingConstants.RIGHT),c);
+            c.weightx = 1.0; panel.add(minNorthField, c);
+
+            panel.add(getMinButton, cGetButton);
+            /*
+             * Hints
+             */
+            c.gridx = 0;c.gridy = 11;c.gridwidth = GridBagConstraints.REMAINDER; c.fill = GridBagConstraints.HORIZONTAL;
+            panel.add(hintField, cGetButton);
+        }
+
+        private EastNorth getSelectedCoor() {
+            /*
+             * Assumtions:
+             *    selection is from preview,
+             *    preview has been create without any projection / transformation
+             *    TODO: enshure this
+             */
+            hintField.setText("");
+            Collection<OsmPrimitive> selected = MainApplication.getLayerManager().getEditDataSet().getSelected();
+
+            if (selected.size() != 1 || !(selected.iterator().next() instanceof Node)) {
+                hintField.setText(tr("Please select exactly one node."));
+                return null;
+            }
+
+            LatLon ll = ((Node) selected.iterator().next()).getCoor();
+//            FilePlacement pl = new FilePlacement();
+//            return pl.reverseTransform(ll);
+            return new EastNorth(ll.lon() * 1000, ll.lat() * 1000);
+        }
+
+        private void Verify() {
+            hintField.setText("");
+            String Hint = "";
+            fc.valid = false;
+            FilePlacement placement = fc;
+            try {
+                placement.projection = projectionChooser.getProjection();
+                try {
+                    placement.setPdfBounds(minXField.getValue(), minYField.getValue(), maxXField.getValue(),
+                            maxYField.getValue());
+                    placement.setEastNorthBounds(minEastField.getValue(), minNorthField.getValue(),
+                            maxEastField.getValue(), maxNorthField.getValue());
+                } catch (Exception e) {
+                    Hint=(tr("Check numbers"));
+                    return;
+                }
+                String transformError = placement.prepareTransform();
+                if (transformError != null) {
+                    Hint=(transformError);
+                    return;
+                }
+                fc.valid = true;
+            } finally {
+                hintField.setText(Hint);
+                if (dependsOnValid!=null) dependsOnValid.setEnabled(fc.valid && panel.isEnabled());
+            }
+
+            return;
+        }
+
+        public void setDependsOnValid(JComponent c) {
+            dependsOnValid=c;
+        }
+
+        void setFromCoor(CoorFields f) {
+            EastNorth en = getSelectedCoor();
+
+            if (en != null) {
+                f.SetCoor(en);
+            }
+
+        }
+
+    }
 
     private PlacementPanel panel=null;
-    private boolean valid=false;	// the data is consistent and the object ready to use for transformation
+    private boolean valid=false;    // the data is consistent and the object ready to use for transformation
 
     public boolean isValid() {
-    	/*
-    	 * TODO: compupte it now
-    	 */
-    	return valid;
-    }
-	public void setDependsOnValid(JComponent c) {
-		panel.setDependsOnValid(c);
-	}
+        /*
+         * TODO: compupte it now
+         */
+        return valid;
+    }
+    public void setDependsOnValid(JComponent c) {
+        panel.setDependsOnValid(c);
+    }
 
     public JPanel getGui() {
-    	if (panel==null) panel = new PlacementPanel(this);
-    	if (panel.panel==null) panel.build();
-    	return panel.panel;
+        if (panel==null) panel = new PlacementPanel(this);
+        if (panel.panel==null) panel.build();
+        return panel.panel;
     }
 
     public FilePlacement18 () {
-    	panel = new PlacementPanel(this);
-    }
-
-	public void load(File baseFile) throws IOException {
-		File file = new File(baseFile + ".placement");
-		Properties p = new Properties();
-		try (FileInputStream s = new FileInputStream(file)){
-			p.load(s);
-			s.close();
-		};
-		fromProperties(p);
-	}
-
-	public void verify() {
-		panel.Verify();
-	}
+        panel = new PlacementPanel(this);
+    }
+
+    public void load(File baseFile) throws IOException {
+        File file = new File(baseFile + ".placement");
+        Properties p = new Properties();
+        try (FileInputStream s = new FileInputStream(file)){
+            p.load(s);
+            s.close();
+        };
+        fromProperties(p);
+    }
+
+    public void verify() {
+        panel.Verify();
+    }
 
     public void save(File baseFile) throws IOException {
-    	File file = new File(baseFile + ".placement");
-    	FileOutputStream s = new FileOutputStream(file);
-    	Properties p = toProperties();
-    	p.store(s, "PDF file placement on OSM");
-    	s.close();
+        File file = new File(baseFile + ".placement");
+        FileOutputStream s = new FileOutputStream(file);
+        Properties p = toProperties();
+        p.store(s, "PDF file placement on OSM");
+        s.close();
     }
 
@@ -406,19 +406,19 @@
             return ProjectionInfo.getProjectionByCode(p.getProperty("Projection", null));
         }
-    	return null;
+        return null;
     }
 
     private double getDouble(Properties p, String name, double defaultValue) {
-    	try {
-    		return Double.parseDouble(p.getProperty(name));
-    	} catch (Exception e) {
-    		return defaultValue;
-    	}
+        try {
+            return Double.parseDouble(p.getProperty(name));
+        } catch (Exception e) {
+            return defaultValue;
+        }
     }
 
     @Override
-	protected void fromProperties(Properties p) {
-    	super.fromProperties(p);
-    	panel.load();
+    protected void fromProperties(Properties p) {
+        super.fromProperties(p);
+        panel.load();
     }
 
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldBool.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldBool.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldBool.java	(revision 34541)
@@ -11,76 +11,76 @@
 
 public class GuiFieldBool extends JCheckBox {
-	/*
-	 * TODO: evolve to a component with integrated display of dependend components
-	 */
-	private JComponent companion =null;
-	private boolean value = false;
+    /*
+     * TODO: evolve to a component with integrated display of dependend components
+     */
+    private JComponent companion =null;
+    private boolean value = false;
 
-	public JComponent getCompanion() {
-		return companion;
-	}
+    public JComponent getCompanion() {
+        return companion;
+    }
 
-	public void setCompanion(JComponent c) {
-		companion = c;
-		if (companion != null) companion.setEnabled(isSelected());
-	}
+    public void setCompanion(JComponent c) {
+        companion = c;
+        if (companion != null) companion.setEnabled(isSelected());
+    }
 
-	public boolean getValue() {
-		return super.isSelected();
-	}
+    public boolean getValue() {
+        return super.isSelected();
+    }
 
-	public void setValue(boolean value) {
-		this.value = value;
-		super.setSelected(value);
-	}
+    public void setValue(boolean value) {
+        this.value = value;
+        super.setSelected(value);
+    }
 
-	public GuiFieldBool() {
-		super();
-		addChangeListener(new Monitor());
-	}
+    public GuiFieldBool() {
+        super();
+        addChangeListener(new Monitor());
+    }
 
-	public GuiFieldBool(Action a) {
-		super(a);
-		addChangeListener(new Monitor());
-	}
+    public GuiFieldBool(Action a) {
+        super(a);
+        addChangeListener(new Monitor());
+    }
 
-	public GuiFieldBool(Icon icon, boolean selected) {
-		super(icon, selected);
-		addChangeListener(new Monitor());
-	}
+    public GuiFieldBool(Icon icon, boolean selected) {
+        super(icon, selected);
+        addChangeListener(new Monitor());
+    }
 
-	public GuiFieldBool(Icon icon) {
-		super(icon);
-		addChangeListener(new Monitor());
-	}
+    public GuiFieldBool(Icon icon) {
+        super(icon);
+        addChangeListener(new Monitor());
+    }
 
-	public GuiFieldBool(String text, boolean selected) {
-		super(text, selected);
-		addChangeListener(new Monitor());
-	}
+    public GuiFieldBool(String text, boolean selected) {
+        super(text, selected);
+        addChangeListener(new Monitor());
+    }
 
-	public GuiFieldBool(String text, Icon icon, boolean selected) {
-		super(text, icon, selected);
-		addChangeListener(new Monitor());
-	}
+    public GuiFieldBool(String text, Icon icon, boolean selected) {
+        super(text, icon, selected);
+        addChangeListener(new Monitor());
+    }
 
-	public GuiFieldBool(String text, Icon icon) {
-		super(text, icon);
-		addChangeListener(new Monitor());
-	}
+    public GuiFieldBool(String text, Icon icon) {
+        super(text, icon);
+        addChangeListener(new Monitor());
+    }
 
-	public GuiFieldBool(String text) {
-		super(text);
-		addChangeListener(new Monitor());
-	}
+    public GuiFieldBool(String text) {
+        super(text);
+        addChangeListener(new Monitor());
+    }
 
-	private class Monitor implements ChangeListener {
+    private class Monitor implements ChangeListener {
 
-		@Override
-		public void stateChanged(ChangeEvent e) {
-			GuiFieldBool o = (GuiFieldBool) e.getSource();
-			value = o.isSelected();
-			if (o.companion != null) o.companion.setEnabled(value);
-		}
-	}
+        @Override
+        public void stateChanged(ChangeEvent e) {
+            GuiFieldBool o = (GuiFieldBool) e.getSource();
+            value = o.isSelected();
+            if (o.companion != null) o.companion.setEnabled(value);
+        }
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldDouble.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldDouble.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldDouble.java	(revision 34541)
@@ -11,57 +11,57 @@
 public class GuiFieldDouble extends GuiFieldString {
 
-	private double value;
-	public CheckDouble checker;
+    private double value;
+    public CheckDouble checker;
 
-	public GuiFieldDouble() {
-		super();
-		addFocusListener(checker = new CheckDouble());
-		setValue(0.0);
-	}
+    public GuiFieldDouble() {
+        super();
+        addFocusListener(checker = new CheckDouble());
+        setValue(0.0);
+    }
 
-	@SuppressWarnings("unused")
-	private GuiFieldDouble(String text) {
-		super(text);
-		addFocusListener(checker = new CheckDouble());
-	}
+    @SuppressWarnings("unused")
+    private GuiFieldDouble(String text) {
+        super(text);
+        addFocusListener(checker = new CheckDouble());
+    }
 
-	public GuiFieldDouble(double v) {
-		super();
-		addFocusListener(checker = new CheckDouble());
-		setValue(v);
-	}
+    public GuiFieldDouble(double v) {
+        super();
+        addFocusListener(checker = new CheckDouble());
+        setValue(v);
+    }
 
-	public void setValue(double v) {
-		super.setText(Double.toString(v));
-		this.checker.check(this);
-	}
+    public void setValue(double v) {
+        super.setText(Double.toString(v));
+        this.checker.check(this);
+    }
 
-	public double getValue() throws NumberFormatException {
-		if (!dataValid) throw new NumberFormatException();
-		return value;
-	}
+    public double getValue() throws NumberFormatException {
+        if (!dataValid) throw new NumberFormatException();
+        return value;
+    }
 
-	public class CheckDouble implements FocusListener {
+    public class CheckDouble implements FocusListener {
 
-		@Override
-		public void focusGained(FocusEvent e) {
-		}
+        @Override
+        public void focusGained(FocusEvent e) {
+        }
 
-		@Override
-		public void focusLost(FocusEvent event) {
-			check((GuiFieldDouble) event.getSource());
-		}
+        @Override
+        public void focusLost(FocusEvent event) {
+            check((GuiFieldDouble) event.getSource());
+        }
 
-		public void check(GuiFieldDouble field) {
-			try {
-				value = Double.parseDouble(field.getText());
-				dataValid =true;
-				field.setBorder(defaultBorder);
-			} catch (NumberFormatException e) {
-				field.setBorder(BorderFactory.createLineBorder(Color.red));
-				value = Double.NaN;
-				dataValid = false;
-			}
-		}
-	}
+        public void check(GuiFieldDouble field) {
+            try {
+                value = Double.parseDouble(field.getText());
+                dataValid =true;
+                field.setBorder(defaultBorder);
+            } catch (NumberFormatException e) {
+                field.setBorder(BorderFactory.createLineBorder(Color.red));
+                value = Double.NaN;
+                dataValid = false;
+            }
+        }
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldHex.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldHex.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldHex.java	(revision 34541)
@@ -16,64 +16,64 @@
 public class GuiFieldHex extends GuiFieldString {
 
-	private int value;
-	public CheckHex checker;
+    private int value;
+    public CheckHex checker;
 
-	public GuiFieldHex() {
-		super();
-		addFocusListener(checker = new CheckHex());
-		setValue(0);
-	}
+    public GuiFieldHex() {
+        super();
+        addFocusListener(checker = new CheckHex());
+        setValue(0);
+    }
 
-	@SuppressWarnings("unused")
-	public GuiFieldHex(String text) {
-		super(text);
-		addFocusListener(checker = new CheckHex());
-	}
+    @SuppressWarnings("unused")
+    public GuiFieldHex(String text) {
+        super(text);
+        addFocusListener(checker = new CheckHex());
+    }
 
-	public GuiFieldHex(int v) {
-		super();
-		addFocusListener(checker = new CheckHex());
-		setValue(v);
-	}
+    public GuiFieldHex(int v) {
+        super();
+        addFocusListener(checker = new CheckHex());
+        setValue(v);
+    }
 
-	public void setValue(int v) {
-		super.setText("#" + Integer.toHexString(v));
-		value=v;
-		this.checker.check(this);
-	}
+    public void setValue(int v) {
+        super.setText("#" + Integer.toHexString(v));
+        value=v;
+        this.checker.check(this);
+    }
 
-	public int getValue() throws NumberFormatException {
-		if (!dataValid) throw new NumberFormatException();
-		return value;
-	}
+    public int getValue() throws NumberFormatException {
+        if (!dataValid) throw new NumberFormatException();
+        return value;
+    }
 
-	@Override
-	public void setEnabled(boolean enabled) {
-		super.setEnabled(enabled);
-		this.checker.check(this);
-	}
+    @Override
+    public void setEnabled(boolean enabled) {
+        super.setEnabled(enabled);
+        this.checker.check(this);
+    }
 
-	public class CheckHex implements FocusListener {
+    public class CheckHex implements FocusListener {
 
-		@Override
-		public void focusGained(FocusEvent e) {
-		}
+        @Override
+        public void focusGained(FocusEvent e) {
+        }
 
-		@Override
-		public void focusLost(FocusEvent event) {
-			check((GuiFieldHex) event.getSource());
-		}
+        @Override
+        public void focusLost(FocusEvent event) {
+            check((GuiFieldHex) event.getSource());
+        }
 
-		public void check(GuiFieldHex field) {
-			try {
-				value = Integer.decode(field.getText());
-//				value = Integer.parseUnsignedInt(field.getText().replace("#", ""), 16);
-				dataValid = true;
-				field.setBorder(defaultBorder);
-			} catch (NumberFormatException e) {
-				field.setBorder(BorderFactory.createLineBorder(Color.red));
-				dataValid = false;
-			}
-		}
-	}
+        public void check(GuiFieldHex field) {
+            try {
+                value = Integer.decode(field.getText());
+//                value = Integer.parseUnsignedInt(field.getText().replace("#", ""), 16);
+                dataValid = true;
+                field.setBorder(defaultBorder);
+            } catch (NumberFormatException e) {
+                field.setBorder(BorderFactory.createLineBorder(Color.red));
+                dataValid = false;
+            }
+        }
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldInteger.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldInteger.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldInteger.java	(revision 34541)
@@ -12,57 +12,57 @@
 public class GuiFieldInteger extends GuiFieldString {
 
-	private int value;
-	public CheckInteger checker;
+    private int value;
+    public CheckInteger checker;
 
-	public GuiFieldInteger() {
-		super();
-		addFocusListener(checker = new CheckInteger());
-		setValue(0);
-	}
+    public GuiFieldInteger() {
+        super();
+        addFocusListener(checker = new CheckInteger());
+        setValue(0);
+    }
 
-	@SuppressWarnings("unused")
-	private GuiFieldInteger(String text) {
-		super(text);
-		addFocusListener(checker = new CheckInteger());
-	}
+    @SuppressWarnings("unused")
+    private GuiFieldInteger(String text) {
+        super(text);
+        addFocusListener(checker = new CheckInteger());
+    }
 
-	public GuiFieldInteger(int v) {
-		super();
-		addFocusListener(checker = new CheckInteger());
-		setValue(v);
-	}
+    public GuiFieldInteger(int v) {
+        super();
+        addFocusListener(checker = new CheckInteger());
+        setValue(v);
+    }
 
-	public void setValue(int v) {
-		super.setText(Integer.toString(v));
-		value=v;
-		this.checker.check(this);
-	}
+    public void setValue(int v) {
+        super.setText(Integer.toString(v));
+        value=v;
+        this.checker.check(this);
+    }
 
-	public int getValue() throws NumberFormatException {
-		if (!dataValid) throw new NumberFormatException();
-		return value;
-	}
+    public int getValue() throws NumberFormatException {
+        if (!dataValid) throw new NumberFormatException();
+        return value;
+    }
 
-	public class CheckInteger implements FocusListener {
+    public class CheckInteger implements FocusListener {
 
-		@Override
-		public void focusGained(FocusEvent e) {
-		}
+        @Override
+        public void focusGained(FocusEvent e) {
+        }
 
-		@Override
-		public void focusLost(FocusEvent event) {
-			check((GuiFieldInteger) event.getSource());
-		}
+        @Override
+        public void focusLost(FocusEvent event) {
+            check((GuiFieldInteger) event.getSource());
+        }
 
-		public void check(GuiFieldInteger field) {
-			try {
-				value = Integer.valueOf(field.getText());
-				dataValid = true;
-				field.setBorder(defaultBorder);
-			} catch (NumberFormatException e) {
-				field.setBorder(BorderFactory.createLineBorder(Color.red));
-				dataValid = false;
-			}
-		}
-	}
+        public void check(GuiFieldInteger field) {
+            try {
+                value = Integer.valueOf(field.getText());
+                dataValid = true;
+                field.setBorder(defaultBorder);
+            } catch (NumberFormatException e) {
+                field.setBorder(BorderFactory.createLineBorder(Color.red));
+                dataValid = false;
+            }
+        }
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldLong.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldLong.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldLong.java	(revision 34541)
@@ -12,57 +12,57 @@
 public class GuiFieldLong extends GuiFieldString {
 
-	private long value;
-	public CheckLong checker;
+    private long value;
+    public CheckLong checker;
 
-	public GuiFieldLong() {
-		super();
-		addFocusListener(checker = new CheckLong());
-		setValue(0);
-	}
+    public GuiFieldLong() {
+        super();
+        addFocusListener(checker = new CheckLong());
+        setValue(0);
+    }
 
-	@SuppressWarnings("unused")
-	private GuiFieldLong(String text) {
-		super(text);
-		addFocusListener(checker = new CheckLong());
-	}
+    @SuppressWarnings("unused")
+    private GuiFieldLong(String text) {
+        super(text);
+        addFocusListener(checker = new CheckLong());
+    }
 
-	public GuiFieldLong(long v) {
-		super();
-		addFocusListener(checker = new CheckLong());
-		setValue(v);
-	}
+    public GuiFieldLong(long v) {
+        super();
+        addFocusListener(checker = new CheckLong());
+        setValue(v);
+    }
 
-	public void setValue(long v) {
-		super.setText(Long.toString(v));
-		value=v;
-		this.checker.check(this);
-	}
+    public void setValue(long v) {
+        super.setText(Long.toString(v));
+        value=v;
+        this.checker.check(this);
+    }
 
-	public long getValue() throws NumberFormatException {
-		if (!dataValid) throw new NumberFormatException();
-		return value;
-	}
+    public long getValue() throws NumberFormatException {
+        if (!dataValid) throw new NumberFormatException();
+        return value;
+    }
 
-	public class CheckLong implements FocusListener {
+    public class CheckLong implements FocusListener {
 
-		@Override
-		public void focusGained(FocusEvent e) {
-		}
+        @Override
+        public void focusGained(FocusEvent e) {
+        }
 
-		@Override
-		public void focusLost(FocusEvent event) {
-			check((GuiFieldLong) event.getSource());
-		}
+        @Override
+        public void focusLost(FocusEvent event) {
+            check((GuiFieldLong) event.getSource());
+        }
 
-		public void check(GuiFieldLong field) {
-			try {
-				value = Long.valueOf(field.getText());
-				dataValid = true;
-				field.setBorder(defaultBorder);
-			} catch (NumberFormatException e) {
-				field.setBorder(BorderFactory.createLineBorder(Color.red));
-				dataValid = false;
-			}
-		}
-	}
+        public void check(GuiFieldLong field) {
+            try {
+                value = Long.valueOf(field.getText());
+                dataValid = true;
+                field.setBorder(defaultBorder);
+            } catch (NumberFormatException e) {
+                field.setBorder(BorderFactory.createLineBorder(Color.red));
+                dataValid = false;
+            }
+        }
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldString.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldString.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiFieldString.java	(revision 34541)
@@ -7,24 +7,24 @@
 
 public class GuiFieldString extends JTextField {
-	/*
-	 * TODO: integrate presentation of dataValid;
-	 */
+    /*
+     * TODO: integrate presentation of dataValid;
+     */
 
-	protected Border defaultBorder;
-	protected boolean dataValid;
+    protected Border defaultBorder;
+    protected boolean dataValid;
 
-	public GuiFieldString() {
-		super();
-		defaultBorder = getBorder();
-	}
+    public GuiFieldString() {
+        super();
+        defaultBorder = getBorder();
+    }
 
-	public GuiFieldString(String text) {
-		super(text);
-		defaultBorder = getBorder();
-	}
+    public GuiFieldString(String text) {
+        super(text);
+        defaultBorder = getBorder();
+    }
 
-	public boolean isDataValid() {
-		return dataValid;
-	}
+    public boolean isDataValid() {
+        return dataValid;
+    }
 
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiPanel.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiPanel.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiPanel.java	(revision 34541)
@@ -10,18 +10,18 @@
 public class GuiPanel extends JPanel{
 
-	public GuiPanel() {
-		super();
-	}
+    public GuiPanel() {
+        super();
+    }
 
-	public GuiPanel(LayoutManager layout) {
-		super(layout);
-	}
+    public GuiPanel(LayoutManager layout) {
+        super(layout);
+    }
 
-	@Override
-	public void setEnabled(boolean enabled) {
-		for (Component c : this.getComponents()) {
-			c.setEnabled(enabled);
-		}
-		super.setEnabled(enabled);
-	}
+    @Override
+    public void setEnabled(boolean enabled) {
+        for (Component c : this.getComponents()) {
+            c.setEnabled(enabled);
+        }
+        super.setEnabled(enabled);
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiProjections.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiProjections.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/GuiProjections.java	(revision 34541)
@@ -16,7 +16,7 @@
 import javax.swing.SwingConstants;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.ProjectionBounds;
 import org.openstreetmap.josm.data.projection.Projection;
+import org.openstreetmap.josm.data.projection.ProjectionRegistry;
 import org.openstreetmap.josm.gui.preferences.projection.CodeProjectionChoice;
 import org.openstreetmap.josm.gui.preferences.projection.CustomProjectionChoice;
@@ -28,153 +28,153 @@
 
 public class GuiProjections {
-	/*
-	 * provide a component let the user select a projection
-	 * TODO: allow preferences for sub-projections like UTM, Gauss-Krüger, etc.
-	 * TODO: allow selection of projection by code (EPSG)
-	 * TODO: allow selection of custom projection
-	 */
-	private GuiPanel panel = null;
-	private Chooser chooser = null;
-	private JLabel pCode = null;
-	private JLabel pName = null;
-	private JLabel pInfo = null;
-	private Projection projection = null;
-
-	private class Chooser extends JComboBox<ProjectionChoice> {
-		/*
-		 * Component to choose a Projection
-		 */
-		public Chooser() {
-			setEditable(false);
-			setToolTipText(tr("Projection of the PDF-Document"));
-			 Monitor monitor = new Monitor();
-			 for (ProjectionChoice p : ProjectionPreference.getProjectionChoices()) {
-				 if ((p instanceof CodeProjectionChoice)) continue;	// can not handle this projection for now
-				 if ((p instanceof CustomProjectionChoice)) continue;	// can not handle this projection for now
-				 addItem(p);
-			}
-			addActionListener(monitor);
-			setProjection (Main.getProjection());
-		}
-
-		public void setProjection (Projection p) {
-			/*
-			 * set current Projection to @p
-			 * update internal variables
-			 */
-			if (p==null) return;	// better keep the old one
-			projection = p;
-			pName.setText(p.toString());
-			pCode.setText(p.toCode());
-			pInfo.setText(userHints(p));
-			/*
-			 * find projectionChoice that matches current code
-			 */
-			final String projectionCode = p.toCode();
-			for (ProjectionChoice projectionChoice : ProjectionPreference.getProjectionChoices()) {
-				for (String code : projectionChoice.allCodes()) {
-					if (code.equals(projectionCode)) {
-						setSelectedItem(projectionChoice);
-						return;	// stop searching
-					}
-				}
-			}
-			/*
-			 * Not found ==> search in combobox
-			 */
-			final String localId = "PdfImport:" + projectionCode;
-			for (int i=getItemCount()-1; i>=0; i--) {
-				ProjectionChoice projectionChoice = getItemAt(i);
-				if (!(projectionChoice instanceof SingleProjectionChoice)) continue;
-				if (localId.equals(projectionChoice.getId())) {
-					setSelectedItem(projectionChoice);
-					return;	// stop searching
-				}
-			}
-			/*
-			 * Still not found ==> add it now
-			 */
-			Logging.debug("New projection encountered");
-			ProjectionChoice px = new SingleProjectionChoice(p.toString(), localId, projectionCode) ;
-			addItem(px);
-			setSelectedItem(px);
-		}
-
-		private class Monitor implements ActionListener {
-			/*
-			 * (non-Javadoc)
-			 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
-			 *
-			 * monitor user selection and set internal var accordingly
-			 */
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				try {
-				ProjectionChoice pc = (ProjectionChoice)((Chooser) e.getSource()).getSelectedItem();
-				setProjection(pc.getProjection());
-				} catch (Exception X) {
-				}
-			}
-		}
-	}
-
-	public GuiProjections(){
-		build();
-	}
-
-	public static String getDefault() {
-		/*
-		 * provide default projection
-		 */
-		return Config.getPref().get("projection.default");
-	}
-
-	public JPanel getPanel() {
-		return panel;
-	}
-
-	public Projection getProjection() {
-		return projection;
-	}
-
-	public void setProjection(Projection p) {
-		chooser.setProjection(p);
-	}
-
-	private String userHints(Projection p) {
-		/*
-		 * Provide some hints about projection @p
-		 */
-		String s="";
-		ProjectionBounds bd;
-		try {
-			bd=p.getWorldBoundsBoxEastNorth();
-			s += String.format("(%3$.0f %4$.0f) : (%5$.0f %6$.0f)", bd.getCenter().east(),bd.getCenter().north(), bd.getMin().east(),bd.getMin().north(),bd.getMax().east(),bd.getMax().north());
-		} catch (Exception e) {
-			e.toString();
-			// Leave it, if we cant get it
-		}
-		return s;
-	}
-
-	private void build() {
-//		JButton specBtn = new JButton(tr("Specifiy"));
-		pCode = new JLabel("code",SwingConstants.RIGHT);
-		pName = new JLabel("Name",SwingConstants.RIGHT);
-		pInfo = new JLabel("Info",SwingConstants.RIGHT);
-		chooser = new Chooser();
-
-		GridBagConstraints c = new GridBagConstraints();
-		c.fill = GridBagConstraints.NONE;
-		c.insets = new Insets(1, 1, 1, 4);
-		c.anchor = GridBagConstraints.LINE_END;
-
-		panel = new GuiPanel(new GridBagLayout());
-		panel.add(new JLabel(tr("Projection:"),SwingConstants.RIGHT),c);
-		panel.add(pCode,c);
-		c.weightx = 1.0; c.gridx = 2; panel.add(chooser,c);
-		c.weightx = 0.0; c.gridy = 1; c.gridx = 0; c.gridwidth = 3; c.anchor = GridBagConstraints.LINE_END;
-		panel.add(pInfo,c);
-	}
+    /*
+     * provide a component let the user select a projection
+     * TODO: allow preferences for sub-projections like UTM, Gauss-Krüger, etc.
+     * TODO: allow selection of projection by code (EPSG)
+     * TODO: allow selection of custom projection
+     */
+    private GuiPanel panel = null;
+    private Chooser chooser = null;
+    private JLabel pCode = null;
+    private JLabel pName = null;
+    private JLabel pInfo = null;
+    private Projection projection = null;
+
+    private class Chooser extends JComboBox<ProjectionChoice> {
+        /*
+         * Component to choose a Projection
+         */
+        public Chooser() {
+            setEditable(false);
+            setToolTipText(tr("Projection of the PDF-Document"));
+             Monitor monitor = new Monitor();
+             for (ProjectionChoice p : ProjectionPreference.getProjectionChoices()) {
+                 if ((p instanceof CodeProjectionChoice)) continue;    // can not handle this projection for now
+                 if ((p instanceof CustomProjectionChoice)) continue;    // can not handle this projection for now
+                 addItem(p);
+            }
+            addActionListener(monitor);
+            setProjection (ProjectionRegistry.getProjection());
+        }
+
+        public void setProjection (Projection p) {
+            /*
+             * set current Projection to @p
+             * update internal variables
+             */
+            if (p==null) return;    // better keep the old one
+            projection = p;
+            pName.setText(p.toString());
+            pCode.setText(p.toCode());
+            pInfo.setText(userHints(p));
+            /*
+             * find projectionChoice that matches current code
+             */
+            final String projectionCode = p.toCode();
+            for (ProjectionChoice projectionChoice : ProjectionPreference.getProjectionChoices()) {
+                for (String code : projectionChoice.allCodes()) {
+                    if (code.equals(projectionCode)) {
+                        setSelectedItem(projectionChoice);
+                        return;    // stop searching
+                    }
+                }
+            }
+            /*
+             * Not found ==> search in combobox
+             */
+            final String localId = "PdfImport:" + projectionCode;
+            for (int i=getItemCount()-1; i>=0; i--) {
+                ProjectionChoice projectionChoice = getItemAt(i);
+                if (!(projectionChoice instanceof SingleProjectionChoice)) continue;
+                if (localId.equals(projectionChoice.getId())) {
+                    setSelectedItem(projectionChoice);
+                    return;    // stop searching
+                }
+            }
+            /*
+             * Still not found ==> add it now
+             */
+            Logging.debug("New projection encountered");
+            ProjectionChoice px = new SingleProjectionChoice(p.toString(), localId, projectionCode) ;
+            addItem(px);
+            setSelectedItem(px);
+        }
+
+        private class Monitor implements ActionListener {
+            /*
+             * (non-Javadoc)
+             * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
+             *
+             * monitor user selection and set internal var accordingly
+             */
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                try {
+                ProjectionChoice pc = (ProjectionChoice)((Chooser) e.getSource()).getSelectedItem();
+                setProjection(pc.getProjection());
+                } catch (Exception X) {
+                }
+            }
+        }
+    }
+
+    public GuiProjections(){
+        build();
+    }
+
+    public static String getDefault() {
+        /*
+         * provide default projection
+         */
+        return Config.getPref().get("projection.default");
+    }
+
+    public JPanel getPanel() {
+        return panel;
+    }
+
+    public Projection getProjection() {
+        return projection;
+    }
+
+    public void setProjection(Projection p) {
+        chooser.setProjection(p);
+    }
+
+    private String userHints(Projection p) {
+        /*
+         * Provide some hints about projection @p
+         */
+        String s="";
+        ProjectionBounds bd;
+        try {
+            bd=p.getWorldBoundsBoxEastNorth();
+            s += String.format("(%3$.0f %4$.0f) : (%5$.0f %6$.0f)", bd.getCenter().east(),bd.getCenter().north(), bd.getMin().east(),bd.getMin().north(),bd.getMax().east(),bd.getMax().north());
+        } catch (Exception e) {
+            e.toString();
+            // Leave it, if we cant get it
+        }
+        return s;
+    }
+
+    private void build() {
+//        JButton specBtn = new JButton(tr("Specifiy"));
+        pCode = new JLabel("code",SwingConstants.RIGHT);
+        pName = new JLabel("Name",SwingConstants.RIGHT);
+        pInfo = new JLabel("Info",SwingConstants.RIGHT);
+        chooser = new Chooser();
+
+        GridBagConstraints c = new GridBagConstraints();
+        c.fill = GridBagConstraints.NONE;
+        c.insets = new Insets(1, 1, 1, 4);
+        c.anchor = GridBagConstraints.LINE_END;
+
+        panel = new GuiPanel(new GridBagLayout());
+        panel.add(new JLabel(tr("Projection:"),SwingConstants.RIGHT),c);
+        panel.add(pCode,c);
+        c.weightx = 1.0; c.gridx = 2; panel.add(chooser,c);
+        c.weightx = 0.0; c.gridy = 1; c.gridx = 0; c.gridwidth = 3; c.anchor = GridBagConstraints.LINE_END;
+        panel.add(pInfo,c);
+    }
 }
 
@@ -189,88 +189,88 @@
 //
 //ProjectionSubPrefsDialog(Component parent, ProjectionChoice pr) {
-//	super(JOptionPane.getFrameForComponent(parent), ModalityType.DOCUMENT_MODAL);
-//
-//	projPref = pr;
-//
-//	setTitle(tr("Projection Preferences"));
-//	setDefaultCloseOperation(DISPOSE_ON_CLOSE);
-//
-//	build();
+//    super(JOptionPane.getFrameForComponent(parent), ModalityType.DOCUMENT_MODAL);
+//
+//    projPref = pr;
+//
+//    setTitle(tr("Projection Preferences"));
+//    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
+//
+//    build();
 //}
 //
 //protected void makeButtonRespondToEnter(SideButton btn) {
-//	btn.setFocusable(true);
-//	btn.getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "enter");
-//	btn.getActionMap().put("enter", btn.getAction());
+//    btn.setFocusable(true);
+//    btn.getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "enter");
+//    btn.getActionMap().put("enter", btn.getAction());
 //}
 //
 //protected JPanel buildInputForm() {
-//	return projPref.getPreferencePanel(null);
+//    return projPref.getPreferencePanel(null);
 //}
 //
 //protected JPanel buildButtonRow() {
-//	JPanel pnl = new JPanel(new FlowLayout());
-//
-//	actOK = new OKAction();
-//	actCancel = new CancelAction();
-//
-//	SideButton btn;
-//	pnl.add(btn = new SideButton(actOK));
-//	// makeButtonRespondToEnter(btn);
-//	// pnl.add(btn = new SideButton(actCancel));
-//	// makeButtonRespondToEnter(btn);
-//	return pnl;
+//    JPanel pnl = new JPanel(new FlowLayout());
+//
+//    actOK = new OKAction();
+//    actCancel = new CancelAction();
+//
+//    SideButton btn;
+//    pnl.add(btn = new SideButton(actOK));
+//    // makeButtonRespondToEnter(btn);
+//    // pnl.add(btn = new SideButton(actCancel));
+//    // makeButtonRespondToEnter(btn);
+//    return pnl;
 //}
 //
 //protected void build() {
-//	projPrefPanel = buildInputForm();
-//	getContentPane().setLayout(new BorderLayout());
-//	getContentPane().add(projPrefPanel, BorderLayout.CENTER);
-//	getContentPane().add(buildButtonRow(), BorderLayout.SOUTH);
-//	pack();
-//
-//	// make dialog respond to ESCAPE
-//	getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
-//			.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "escape");
-//	getRootPane().getActionMap().put("escape", actCancel);
+//    projPrefPanel = buildInputForm();
+//    getContentPane().setLayout(new BorderLayout());
+//    getContentPane().add(projPrefPanel, BorderLayout.CENTER);
+//    getContentPane().add(buildButtonRow(), BorderLayout.SOUTH);
+//    pack();
+//
+//    // make dialog respond to ESCAPE
+//    getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
+//            .put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "escape");
+//    getRootPane().getActionMap().put("escape", actCancel);
 //}
 //
 //class OKAction extends AbstractAction {
-//	OKAction() {
-//		putValue(NAME, tr("OK"));
-//		putValue(SHORT_DESCRIPTION, tr("Close the dialog and apply projection preferences"));
-//		putValue(SMALL_ICON, ImageProvider.get("ok"));
-//	}
-//
-//	@Override
-//	public void actionPerformed(ActionEvent e) {
-//		projPref.setPreferences(projPref.getPreferences(projPrefPanel));
-//		setVisible(false);
-//	}
+//    OKAction() {
+//        putValue(NAME, tr("OK"));
+//        putValue(SHORT_DESCRIPTION, tr("Close the dialog and apply projection preferences"));
+//        putValue(SMALL_ICON, ImageProvider.get("ok"));
+//    }
+//
+//    @Override
+//    public void actionPerformed(ActionEvent e) {
+//        projPref.setPreferences(projPref.getPreferences(projPrefPanel));
+//        setVisible(false);
+//    }
 //}
 //
 //class CancelAction extends AbstractAction {
-//	CancelAction() {
-//		putValue(NAME, tr("Cancel"));
-//		putValue(SHORT_DESCRIPTION, tr("Close the dialog, discard projection preference changes"));
-//		putValue(SMALL_ICON, ImageProvider.get("cancel"));
-//	}
-//
-//	@Override
-//	public void actionPerformed(ActionEvent e) {
-//		setVisible(false);
-//	}
+//    CancelAction() {
+//        putValue(NAME, tr("Cancel"));
+//        putValue(SHORT_DESCRIPTION, tr("Close the dialog, discard projection preference changes"));
+//        putValue(SMALL_ICON, ImageProvider.get("cancel"));
+//    }
+//
+//    @Override
+//    public void actionPerformed(ActionEvent e) {
+//        setVisible(false);
+//    }
 //}
 //
 //@Override
 //public void setVisible(boolean visible) {
-//	if (visible) {
-//		new WindowGeometry(getClass().getName() + ".geometry",
-//				WindowGeometry.centerOnScreen(new Dimension(400, 300))).applySafe(this);
-//	} else if (isShowing()) { // Avoid IllegalComponentStateException like in #8775
-//		new WindowGeometry(this).remember(getClass().getName() + ".geometry");
-//	}
-//	super.setVisible(visible);
-//}
-//}
-
+//    if (visible) {
+//        new WindowGeometry(getClass().getName() + ".geometry",
+//                WindowGeometry.centerOnScreen(new Dimension(400, 300))).applySafe(this);
+//    } else if (isShowing()) { // Avoid IllegalComponentStateException like in #8775
+//        new WindowGeometry(this).remember(getClass().getName() + ".geometry");
+//    }
+//    super.setVisible(visible);
+//}
+//}
+
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java	(revision 34541)
@@ -34,5 +34,4 @@
 import javax.swing.filechooser.FileFilter;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.UploadPolicy;
@@ -49,708 +48,708 @@
 public class LoadPdfDialog extends JFrame {
 
-	public static class MainButtons {
-		public JButton okButton;
-		public JButton cancelButton;
-		public JButton showButton;
-		public JButton saveButton;
-		public JPanel panel;
-
-		public MainButtons() {
-		}
-
-		void build(LoadPdfDialog loadPdfDialog) {
-			/*
-			 * build the dialog Window from components
-			 */
-			okButton = new JButton(tr("Import"));
-			okButton.addActionListener(new ActionListener() {
-				@Override
-				public void actionPerformed(ActionEvent e) {
-					loadPdfDialog.importAction();
-				}
-			});
-			saveButton = new JButton(tr("Save"));
-			saveButton.addActionListener(new ActionListener() {
-				@Override
-				public void actionPerformed(ActionEvent e) {
-					loadPdfDialog.saveAction();
-				}
-			});
-
-			showButton = new JButton(tr("Show target"));
-			showButton.addActionListener(new ActionListener() {
-				@Override
-				public void actionPerformed(ActionEvent e) {
-					loadPdfDialog.showAction();
-				}
-			});
-
-			cancelButton = new JButton(tr("Cancel"));
-			cancelButton.addActionListener(new ActionListener() {
-				@Override
-				public void actionPerformed(ActionEvent e) {
-					loadPdfDialog.cancelAction();
-				}
-			});
-
-			panel = new JPanel(new FlowLayout());
-			panel.add(cancelButton);
-			panel.add(showButton);
-			panel.add(okButton);
-			panel.add(saveButton);
-			showButton.setVisible(Preferences.isLegacyActions());
-			saveButton.setVisible(Preferences.isLegacyActions());
-		}
-	}
-
-
-	private static class Config {
-		/*
-		 * encapsulate options for Path optimizer
-		 * provide GUI
-		 */
-		public GuiFieldBool debugModeCheck;
-		public GuiFieldBool mergeCloseNodesCheck;
-		public GuiFieldDouble mergeCloseNodesTolerance;
-		public GuiFieldBool removeSmallObjectsCheck;
-		public GuiFieldDouble removeSmallObjectsSize;
-		public JTextField colorFilterColor;
-		public GuiFieldBool colorFilterCheck;
-		public GuiFieldBool removeParallelSegmentsCheck;
-		public GuiFieldDouble removeParallelSegmentsTolerance;
-		public GuiFieldBool removeLargeObjectsCheck;
-		public GuiFieldDouble removeLargeObjectsSize;
-		public GuiFieldBool limitPathCountCheck;
-		public GuiFieldInteger limitPathCount;
-		public GuiFieldBool splitOnColorChangeCheck;
-		public GuiFieldBool splitOnShapeClosedCheck;
-		public GuiFieldBool splitOnSingleSegmentCheck;
-		public GuiFieldBool splitOnOrthogonalCheck;
-		private JPanel panel;
-
-		public Config() {
-			build();
-		}
-
-		public JComponent getComponent() {
-			return panel;
-		}
-
-		private void build() {
-
-
-			debugModeCheck = new GuiFieldBool(tr("Debug info"), Preferences.isDebugTags());
-
-			mergeCloseNodesTolerance = new GuiFieldDouble(Preferences.getMergeNodesValue());
-			mergeCloseNodesCheck = new GuiFieldBool(tr("Merge close nodes"), Preferences.isMergeNodes());
-			mergeCloseNodesCheck.setCompanion(mergeCloseNodesTolerance);
-
-			removeSmallObjectsSize = new GuiFieldDouble(Preferences.getRemoveSmallValue());
-			removeSmallObjectsCheck = new GuiFieldBool(tr("Remove objects smaller than"),Preferences.isRemoveSmall());
-			removeSmallObjectsCheck.setCompanion(removeSmallObjectsSize);
-
-			removeLargeObjectsSize = new GuiFieldDouble((Preferences.getRemoveLargeValue()));
-			removeLargeObjectsCheck = new GuiFieldBool(tr("Remove objects larger than"),Preferences.isRemoveLarge());
-			removeLargeObjectsCheck.setCompanion(removeLargeObjectsSize);
-
-			colorFilterColor = new GuiFieldHex(Preferences.getLimitColorValue());
-			colorFilterCheck = new GuiFieldBool(tr("Only this color"), Preferences.isLimitColor());
-			colorFilterCheck.setCompanion(colorFilterColor);
-
-			removeParallelSegmentsTolerance = new GuiFieldDouble((Preferences.getRemoveParallelValue()));
-			removeParallelSegmentsCheck = new GuiFieldBool(tr("Remove parallel lines"),Preferences.isRemoveParallel());
-			removeParallelSegmentsCheck.setCompanion(removeParallelSegmentsTolerance);
-
-			limitPathCount = new GuiFieldInteger((Preferences.getLimitPathValue()));
-			limitPathCountCheck = new GuiFieldBool(tr("Take only first X paths"),Preferences.isLimitPath());
-			limitPathCountCheck.setCompanion(limitPathCount);
-
-			splitOnColorChangeCheck = new GuiFieldBool(tr("Color/width change"),Preferences.isLayerAttribChange());
-			splitOnShapeClosedCheck = new GuiFieldBool(tr("Shape closed"), Preferences.isLayerClosed());
-
-			splitOnSingleSegmentCheck = new GuiFieldBool(tr("Single segments", Preferences.isLayerSegment()));
-			splitOnOrthogonalCheck = new GuiFieldBool(tr("Orthogonal shapes", Preferences.isLayerOrtho()));
-
-			panel = new JPanel(new GridBagLayout());
-			panel.setBorder(BorderFactory.createTitledBorder(tr("Import settings")));
-
-			GridBagConstraints cBasic = new GridBagConstraints();
-			cBasic.gridx = GridBagConstraints.RELATIVE;
-			cBasic.gridy = GridBagConstraints.RELATIVE;
-			cBasic.insets = new Insets(0, 0, 0, 4);
-			cBasic.anchor = GridBagConstraints.LINE_START;
-			cBasic.fill = GridBagConstraints.HORIZONTAL;
-			cBasic.gridheight = 1;
-			cBasic.gridwidth = 1;
-			cBasic.ipadx = 0;
-			cBasic.ipady = 0;
-			cBasic.weightx = 0.0;
-			cBasic.weighty = 0.0;
-
-			GridBagConstraints cLeft = (GridBagConstraints) cBasic.clone();
-			cLeft.gridx = 0;
-
-			GridBagConstraints cMiddle = (GridBagConstraints) cBasic.clone();
-			cMiddle.gridx = 1;
-			cMiddle.anchor = GridBagConstraints.LINE_END;
-
-			GridBagConstraints cRight = (GridBagConstraints) cBasic.clone();
-			cRight.gridx = 2;
-
-			panel.add(mergeCloseNodesCheck, cLeft);
-			panel.add(new JLabel(tr("Tolerance:"),SwingConstants.RIGHT), cMiddle);
-			panel.add(mergeCloseNodesTolerance, cRight);
-
-			panel.add(removeSmallObjectsCheck, cLeft);
-			panel.add(new JLabel(tr("Tolerance:"),SwingConstants.RIGHT), cMiddle);
-			panel.add(removeSmallObjectsSize, cRight);
-
-			panel.add(removeLargeObjectsCheck, cLeft);
-			panel.add(new JLabel(tr("Tolerance:"),SwingConstants.RIGHT), cMiddle);
-			panel.add(removeLargeObjectsSize, cRight);
-
-			panel.add(removeParallelSegmentsCheck, cLeft);
-			panel.add(new JLabel(tr("Max distance:"),SwingConstants.RIGHT), cMiddle);
-			panel.add(removeParallelSegmentsTolerance, cRight);
-
-			panel.add(limitPathCountCheck, cLeft);
-			panel.add(limitPathCount, cRight);
-
-			panel.add(colorFilterCheck, cLeft);
-			panel.add(colorFilterColor, cRight);
-
-			panel.add(debugModeCheck, cLeft);
-
-			cLeft.gridy = 8; panel.add(new JLabel(tr("Introduce separate layers for:")), cLeft);
-			cMiddle.gridy = 8; panel.add(splitOnShapeClosedCheck, cMiddle);
-			cRight.gridy = 8; panel.add(splitOnSingleSegmentCheck, cRight);
-			cMiddle.gridy = 9; panel.add(splitOnColorChangeCheck, cMiddle);
-			cRight.gridy = 9;panel.add(splitOnOrthogonalCheck, cRight);
-		}
-	}
-
-	static class LoadProgressRenderer implements ProgressRenderer {
-		private final JProgressBar pBar;
-		private String title = "";
-
-		LoadProgressRenderer(JProgressBar pb) {
-			this.pBar = pb;
-			this.pBar.setMinimum(0);
-			this.pBar.setValue(0);
-			this.pBar.setMaximum(1);
-			this.pBar.setString("");
-			this.pBar.setStringPainted(true);
-
-		}
-
-		@Override
-		public void setCustomText(String message) {
-			this.pBar.setString(this.title + message);
-		}
-
-		@Override
-		public void setIndeterminate(boolean indeterminate) {
-			this.pBar.setIndeterminate(indeterminate);
-		}
-
-		@Override
-		public void setMaximum(int maximum) {
-			this.pBar.setMaximum(maximum);
-		}
-
-		@Override
-		public void setTaskTitle(String taskTitle) {
-			this.title = taskTitle;
-			this.pBar.setString(this.title);
-		}
-
-		@Override
-		public void setValue(int value) {
-			this.pBar.setValue(value);
-		}
-
-		public void finish() {
-			this.pBar.setString(tr("Finished"));
-			this.pBar.setValue(this.pBar.getMaximum());
-		}
-
-	}
-
-	private File pdfFile;
-	private final FilePlacement18 placement = new FilePlacement18();
-
-	private PathOptimizer pdfData;
-//	private OsmDataLayer dataLayer;
-
-	private final JButton loadFileButton = new JButton(tr("Load preview ..."));
-
-	private final JProgressBar loadProgress = new JProgressBar();
+    public static class MainButtons {
+        public JButton okButton;
+        public JButton cancelButton;
+        public JButton showButton;
+        public JButton saveButton;
+        public JPanel panel;
+
+        public MainButtons() {
+        }
+
+        void build(LoadPdfDialog loadPdfDialog) {
+            /*
+             * build the dialog Window from components
+             */
+            okButton = new JButton(tr("Import"));
+            okButton.addActionListener(new ActionListener() {
+                @Override
+                public void actionPerformed(ActionEvent e) {
+                    loadPdfDialog.importAction();
+                }
+            });
+            saveButton = new JButton(tr("Save"));
+            saveButton.addActionListener(new ActionListener() {
+                @Override
+                public void actionPerformed(ActionEvent e) {
+                    loadPdfDialog.saveAction();
+                }
+            });
+
+            showButton = new JButton(tr("Show target"));
+            showButton.addActionListener(new ActionListener() {
+                @Override
+                public void actionPerformed(ActionEvent e) {
+                    loadPdfDialog.showAction();
+                }
+            });
+
+            cancelButton = new JButton(tr("Cancel"));
+            cancelButton.addActionListener(new ActionListener() {
+                @Override
+                public void actionPerformed(ActionEvent e) {
+                    loadPdfDialog.cancelAction();
+                }
+            });
+
+            panel = new JPanel(new FlowLayout());
+            panel.add(cancelButton);
+            panel.add(showButton);
+            panel.add(okButton);
+            panel.add(saveButton);
+            showButton.setVisible(Preferences.isLegacyActions());
+            saveButton.setVisible(Preferences.isLegacyActions());
+        }
+    }
+
+
+    private static class Config {
+        /*
+         * encapsulate options for Path optimizer
+         * provide GUI
+         */
+        public GuiFieldBool debugModeCheck;
+        public GuiFieldBool mergeCloseNodesCheck;
+        public GuiFieldDouble mergeCloseNodesTolerance;
+        public GuiFieldBool removeSmallObjectsCheck;
+        public GuiFieldDouble removeSmallObjectsSize;
+        public JTextField colorFilterColor;
+        public GuiFieldBool colorFilterCheck;
+        public GuiFieldBool removeParallelSegmentsCheck;
+        public GuiFieldDouble removeParallelSegmentsTolerance;
+        public GuiFieldBool removeLargeObjectsCheck;
+        public GuiFieldDouble removeLargeObjectsSize;
+        public GuiFieldBool limitPathCountCheck;
+        public GuiFieldInteger limitPathCount;
+        public GuiFieldBool splitOnColorChangeCheck;
+        public GuiFieldBool splitOnShapeClosedCheck;
+        public GuiFieldBool splitOnSingleSegmentCheck;
+        public GuiFieldBool splitOnOrthogonalCheck;
+        private JPanel panel;
+
+        public Config() {
+            build();
+        }
+
+        public JComponent getComponent() {
+            return panel;
+        }
+
+        private void build() {
+
+
+            debugModeCheck = new GuiFieldBool(tr("Debug info"), Preferences.isDebugTags());
+
+            mergeCloseNodesTolerance = new GuiFieldDouble(Preferences.getMergeNodesValue());
+            mergeCloseNodesCheck = new GuiFieldBool(tr("Merge close nodes"), Preferences.isMergeNodes());
+            mergeCloseNodesCheck.setCompanion(mergeCloseNodesTolerance);
+
+            removeSmallObjectsSize = new GuiFieldDouble(Preferences.getRemoveSmallValue());
+            removeSmallObjectsCheck = new GuiFieldBool(tr("Remove objects smaller than"),Preferences.isRemoveSmall());
+            removeSmallObjectsCheck.setCompanion(removeSmallObjectsSize);
+
+            removeLargeObjectsSize = new GuiFieldDouble((Preferences.getRemoveLargeValue()));
+            removeLargeObjectsCheck = new GuiFieldBool(tr("Remove objects larger than"),Preferences.isRemoveLarge());
+            removeLargeObjectsCheck.setCompanion(removeLargeObjectsSize);
+
+            colorFilterColor = new GuiFieldHex(Preferences.getLimitColorValue());
+            colorFilterCheck = new GuiFieldBool(tr("Only this color"), Preferences.isLimitColor());
+            colorFilterCheck.setCompanion(colorFilterColor);
+
+            removeParallelSegmentsTolerance = new GuiFieldDouble((Preferences.getRemoveParallelValue()));
+            removeParallelSegmentsCheck = new GuiFieldBool(tr("Remove parallel lines"),Preferences.isRemoveParallel());
+            removeParallelSegmentsCheck.setCompanion(removeParallelSegmentsTolerance);
+
+            limitPathCount = new GuiFieldInteger((Preferences.getLimitPathValue()));
+            limitPathCountCheck = new GuiFieldBool(tr("Take only first X paths"),Preferences.isLimitPath());
+            limitPathCountCheck.setCompanion(limitPathCount);
+
+            splitOnColorChangeCheck = new GuiFieldBool(tr("Color/width change"),Preferences.isLayerAttribChange());
+            splitOnShapeClosedCheck = new GuiFieldBool(tr("Shape closed"), Preferences.isLayerClosed());
+
+            splitOnSingleSegmentCheck = new GuiFieldBool(tr("Single segments", Preferences.isLayerSegment()));
+            splitOnOrthogonalCheck = new GuiFieldBool(tr("Orthogonal shapes", Preferences.isLayerOrtho()));
+
+            panel = new JPanel(new GridBagLayout());
+            panel.setBorder(BorderFactory.createTitledBorder(tr("Import settings")));
+
+            GridBagConstraints cBasic = new GridBagConstraints();
+            cBasic.gridx = GridBagConstraints.RELATIVE;
+            cBasic.gridy = GridBagConstraints.RELATIVE;
+            cBasic.insets = new Insets(0, 0, 0, 4);
+            cBasic.anchor = GridBagConstraints.LINE_START;
+            cBasic.fill = GridBagConstraints.HORIZONTAL;
+            cBasic.gridheight = 1;
+            cBasic.gridwidth = 1;
+            cBasic.ipadx = 0;
+            cBasic.ipady = 0;
+            cBasic.weightx = 0.0;
+            cBasic.weighty = 0.0;
+
+            GridBagConstraints cLeft = (GridBagConstraints) cBasic.clone();
+            cLeft.gridx = 0;
+
+            GridBagConstraints cMiddle = (GridBagConstraints) cBasic.clone();
+            cMiddle.gridx = 1;
+            cMiddle.anchor = GridBagConstraints.LINE_END;
+
+            GridBagConstraints cRight = (GridBagConstraints) cBasic.clone();
+            cRight.gridx = 2;
+
+            panel.add(mergeCloseNodesCheck, cLeft);
+            panel.add(new JLabel(tr("Tolerance:"),SwingConstants.RIGHT), cMiddle);
+            panel.add(mergeCloseNodesTolerance, cRight);
+
+            panel.add(removeSmallObjectsCheck, cLeft);
+            panel.add(new JLabel(tr("Tolerance:"),SwingConstants.RIGHT), cMiddle);
+            panel.add(removeSmallObjectsSize, cRight);
+
+            panel.add(removeLargeObjectsCheck, cLeft);
+            panel.add(new JLabel(tr("Tolerance:"),SwingConstants.RIGHT), cMiddle);
+            panel.add(removeLargeObjectsSize, cRight);
+
+            panel.add(removeParallelSegmentsCheck, cLeft);
+            panel.add(new JLabel(tr("Max distance:"),SwingConstants.RIGHT), cMiddle);
+            panel.add(removeParallelSegmentsTolerance, cRight);
+
+            panel.add(limitPathCountCheck, cLeft);
+            panel.add(limitPathCount, cRight);
+
+            panel.add(colorFilterCheck, cLeft);
+            panel.add(colorFilterColor, cRight);
+
+            panel.add(debugModeCheck, cLeft);
+
+            cLeft.gridy = 8; panel.add(new JLabel(tr("Introduce separate layers for:")), cLeft);
+            cMiddle.gridy = 8; panel.add(splitOnShapeClosedCheck, cMiddle);
+            cRight.gridy = 8; panel.add(splitOnSingleSegmentCheck, cRight);
+            cMiddle.gridy = 9; panel.add(splitOnColorChangeCheck, cMiddle);
+            cRight.gridy = 9;panel.add(splitOnOrthogonalCheck, cRight);
+        }
+    }
+
+    static class LoadProgressRenderer implements ProgressRenderer {
+        private final JProgressBar pBar;
+        private String title = "";
+
+        LoadProgressRenderer(JProgressBar pb) {
+            this.pBar = pb;
+            this.pBar.setMinimum(0);
+            this.pBar.setValue(0);
+            this.pBar.setMaximum(1);
+            this.pBar.setString("");
+            this.pBar.setStringPainted(true);
+
+        }
+
+        @Override
+        public void setCustomText(String message) {
+            this.pBar.setString(this.title + message);
+        }
+
+        @Override
+        public void setIndeterminate(boolean indeterminate) {
+            this.pBar.setIndeterminate(indeterminate);
+        }
+
+        @Override
+        public void setMaximum(int maximum) {
+            this.pBar.setMaximum(maximum);
+        }
+
+        @Override
+        public void setTaskTitle(String taskTitle) {
+            this.title = taskTitle;
+            this.pBar.setString(this.title);
+        }
+
+        @Override
+        public void setValue(int value) {
+            this.pBar.setValue(value);
+        }
+
+        public void finish() {
+            this.pBar.setString(tr("Finished"));
+            this.pBar.setValue(this.pBar.getMaximum());
+        }
+
+    }
+
+    private File pdfFile;
+    private final FilePlacement18 placement = new FilePlacement18();
+
+    private PathOptimizer pdfData;
+//    private OsmDataLayer dataLayer;
+
+    private final JButton loadFileButton = new JButton(tr("Load preview ..."));
+
+    private final JProgressBar loadProgress = new JProgressBar();
 ;
-	private OsmDataLayer newLayer;
-
-	private LoadProgressRenderer progressRenderer;
-
-	public LoadPdfDialog() {
-		buildGUI();
-		removeLayer();
-		if (Preferences.getGuiMode() == Preferences.GuiMode.Simple) {
-			loadFileButton.setVisible(false);
-			configPanel.panel.setVisible(false);
-			actionPanel.saveButton.setVisible(false);
-			actionPanel.showButton.setVisible(false);
-			setSize(new Dimension(380, 350));
-			if (!loadAction()) {
-				cancelAction();
-				return;
-			}
-		} else {
-			setSize(new Dimension(450, 600));
-		}
-		setAlwaysOnTop(true);
-		setVisible(true);
-	}
-
-	Component placementPanel = placement.getGui();
-	MainButtons actionPanel = new MainButtons();
-	Config configPanel = new Config();
-
-	private void buildGUI() {
-		/*
-		 * build the GUI from Components
-		 */
-		GridBagConstraints c = new GridBagConstraints();
-		c.gridheight = 1;
-		c.gridwidth = 1;
-		c.gridx = 0;
-		c.gridy = GridBagConstraints.RELATIVE;
-		c.fill = GridBagConstraints.BOTH;
-		c.insets = new java.awt.Insets(0, 0, 0, 0);
-
-		actionPanel.build(this);
-
-		loadFileButton.addActionListener(new ActionListener() {
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				loadAction();
-			}
-		});
-
-		progressRenderer = new LoadProgressRenderer(loadProgress);
-
-		JPanel panel = new JPanel(new GridBagLayout());
-
-		panel.add(configPanel.getComponent(), c);
-		c.fill = GridBagConstraints.HORIZONTAL;
-		panel.add(loadFileButton, c);
-		c.fill = GridBagConstraints.BOTH;
-		panel.add(placementPanel, c);
-		panel.add(actionPanel.panel, c);
-		c.fill = GridBagConstraints.HORIZONTAL;
-		panel.add(this.loadProgress, c);
-
-		setContentPane(panel);
-		addWindowListener(new WindowAdapter() {
-			@Override
-			public void windowClosing(WindowEvent e) {
-				cancelAction();
-			}
-		});
-		placement.setDependsOnValid(actionPanel.okButton);
-
-		/*
-		 * TODO: Make okButton to default Button of Dialog, make cancelButton to react on ESC-Key
-		 */
-//		SwingUtilities.getRootPane(panel).setDefaultButton(actionPanel.okButton);
-	}
-
-	 private boolean loadAction() {
-		 /*
-		  * perform load PDF file to preview
-		  * TODO: load preview to previous placement, involves reverse transform
-		  */
-		final File newFileName = this.chooseFile();
-
-		if (newFileName == null) {
-			return false;
-		}
-		Logging.debug("PdfImport: Load Preview");
-		this.removeLayer();
-
-		this.loadFileButton.setEnabled(false);
-
-		this.runAsBackgroundTask(new Runnable() {
-			@Override
-			public void run() {
-				// async part
-				LoadPdfDialog.this.loadProgress.setVisible(true);
-				SwingRenderingProgressMonitor monitor = new SwingRenderingProgressMonitor(progressRenderer);
-				monitor.beginTask("Loading file", 1000);
-				pdfData = loadPDF(newFileName, monitor.createSubTaskMonitor(500, false));
-				OsmBuilder.Mode mode = LoadPdfDialog.this.configPanel.debugModeCheck.getValue()
-						? OsmBuilder.Mode.Debug
-						: OsmBuilder.Mode.Draft;
-
-				if (pdfData != null) {
-					LoadPdfDialog.this.newLayer = LoadPdfDialog.this.makeLayer(
-							tr("PDF preview: ") + newFileName.getName(), new FilePlacement(), mode,
-							monitor.createSubTaskMonitor(500, false));
-				}
-
-				monitor.finishTask();
-				progressRenderer.finish();
-			}
-		}, new ActionListener() {
-
-			@Override
-			public void actionPerformed(ActionEvent event) {
-				// sync part
-				LoadPdfDialog.this.pdfFile = newFileName;
-				if (pdfData != null) {
-					Preview.set(newLayer, new FilePlacement());
-					MainApplication.getMap().mapView.zoomTo(placement.getWorldBounds(pdfData));
-					try {
-						LoadPdfDialog.this.placement.load(newFileName);
-					} catch (IOException e) {
-						// Saved placement does not exist, corrupt, ... ---> ignore it
-					} finally {
-						LoadPdfDialog.this.placement.verify();
-					}
-					LoadPdfDialog.this.newLayer = null;
-					LoadPdfDialog.this.loadFileButton.setEnabled(true);
-					LoadPdfDialog.this.placementPanel.setEnabled(true);
-					LoadPdfDialog.this.actionPanel.panel.setEnabled(true);
-					LoadPdfDialog.this.actionPanel.showButton.setEnabled(true);
-					LoadPdfDialog.this.actionPanel.saveButton.setEnabled(true);
-					LoadPdfDialog.this.actionPanel.okButton.setEnabled(true);
-					LoadPdfDialog.this.loadProgress.setVisible(false);
-				}
-			}
-		});
-		return true;
-	}
-
-	private void importAction() {
-
-		if (!placement.isValid()) return;
-		try {
-			placement.save(pdfFile);
-		} catch (IOException e) {
-			e.toString();
-		}
-		removeLayer();
-
-		runAsBackgroundTask(new Runnable() {
-			@Override
-			public void run() {
-				// async part
-				LoadPdfDialog.this.loadProgress.setVisible(true);
-				SwingRenderingProgressMonitor monitor = new SwingRenderingProgressMonitor(progressRenderer);
-				LoadPdfDialog.this.newLayer = LoadPdfDialog.this.makeLayer(tr("PDF: ") + pdfFile.getName(), placement,
-						OsmBuilder.Mode.Final, monitor);
-				progressRenderer.finish();
-			}
-		}, new ActionListener() {
-
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				// sync part
-				// rebuild layer with latest projection
-				MainApplication.getLayerManager().addLayer(newLayer);
-				MainApplication.getMap().mapView.zoomTo(placement.getWorldBounds(pdfData));
-				LoadPdfDialog.this.setVisible(false);
-			}
-		});
-	}
-
-	private void saveAction() {
-		/*
-		 * perform save preview layer to file
-		 * TODO: is this action valueable? Can be easily performed from main menu
-		 */
-
-		if (!placement.isValid()) return;
-
-		final java.io.File file = this.chooseSaveFile();
-
-		if (file == null) {
-			return;
-		}
-
-		this.removeLayer();
-
-		this.runAsBackgroundTask(new Runnable() {
-			@Override
-			public void run() {
-				// async part
-				SwingRenderingProgressMonitor monitor = new SwingRenderingProgressMonitor(progressRenderer);
-				LoadPdfDialog.this.saveLayer(file, placement, monitor);
-				progressRenderer.finish();
-			}
-		}, new ActionListener() {
-
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				// sync part
-				LoadPdfDialog.this.setVisible(false);
-			}
-		});
-	}
-
-	private void showAction() {
-		/*
-		 * perform show action
-		 * TODO: is this action valuable? User can do it easy from OSM Main Menu
-		 */
-		if (!placement.isValid()) return;
-
-		// zoom to new location
-		MainApplication.getMap().mapView.zoomTo(placement.getWorldBounds(pdfData));
-		MainApplication.getMap().repaint();
-	}
-
-	private void cancelAction() {
-		/*
-		 * perform cancel action
-		 */
-		removeLayer();
-		setVisible(false);
-	}
-
-	// Implementation methods
-
-	private static JFileChooser loadChooser = null;
-
-	private java.io.File chooseFile() {
-		// get PDF file to load
-		if (loadChooser == null) {
-			loadChooser = new JFileChooser(Preferences.getLoadDir());
-			loadChooser.setAcceptAllFileFilterUsed(false);
-			loadChooser.setMultiSelectionEnabled(false);
-			loadChooser.setFileFilter(new FileFilter() {
-				@Override
-				public boolean accept(java.io.File pathname) {
-					return pathname.isDirectory() || pathname.getName().endsWith(".pdf");
-				}
-
-				@Override
-				public String getDescription() {
-					return tr("PDF files");
-				}
-			});
-		} else {
-			loadChooser.rescanCurrentDirectory();
-		}
-		int result = loadChooser.showDialog(this, tr("Import PDF"));
-		if (result != JFileChooser.APPROVE_OPTION) {
-			return null;
-		} else {
-			Preferences.setLoadDir(loadChooser.getSelectedFile().getParentFile().getAbsolutePath());
-			return loadChooser.getSelectedFile();
-		}
-	}
-
-	private java.io.File chooseSaveFile() {
-		// get file name
-		JFileChooser fc = new JFileChooser();
-		fc.setAcceptAllFileFilterUsed(true);
-		fc.setMultiSelectionEnabled(false);
-		fc.setFileFilter(new FileFilter() {
-			@Override
-			public boolean accept(java.io.File pathname) {
-				return pathname.isDirectory() || pathname.getName().endsWith(".osm");
-			}
-
-			@Override
-			public String getDescription() {
-				return tr("OSM files");
-			}
-		});
-		int result = fc.showOpenDialog(Main.parent);
-
-		if (result != JFileChooser.APPROVE_OPTION) {
-			return null;
-		} else {
-			return fc.getSelectedFile();
-		}
-	}
-
-	private void runAsBackgroundTask(final Runnable task, final ActionListener after) {
-		/*
-		 * run @task in background (asychronosly , run @after when @task has finished
-		 */
-		this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
-		Thread t = new Thread(new Runnable() {
-			@Override
-			public void run() {
-				task.run();
-
-				SwingUtilities.invokeLater(new Runnable() {
-					@Override
-					public void run() {
-						setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
-						after.actionPerformed(null);
-					}
-				});
-			}
-		});
-		t.start();
-	}
-
-	private PathOptimizer loadPDF(File fileName, ProgressMonitor monitor) {
-		/*
-		 * postprocess load PDF-file according to options
-		 */
-
-		monitor.beginTask("", 100);
-		monitor.setTicks(0);
-		monitor.setCustomText(tr("Preparing"));
-
-		double nodesTolerance = 0.0;
-		Color color = null;
-		int maxPaths = Integer.MAX_VALUE;
-
-		if (configPanel.mergeCloseNodesCheck.getValue() && configPanel.mergeCloseNodesTolerance.isDataValid()) {
-				nodesTolerance = configPanel.mergeCloseNodesTolerance.getValue();
-		}
-
-		if (configPanel.colorFilterCheck.getValue()) {
-			try {
-				String colString = this.configPanel.colorFilterColor.getText().replace("#", "");
-				color = new Color(Integer.parseInt(colString, 16));
-			} catch (Exception e) {
-				JOptionPane.showMessageDialog(Main.parent, tr("Could not parse color"));
-				return null;
-			}
-		}
-
-		if (configPanel.limitPathCountCheck.getValue() && configPanel.limitPathCount.isDataValid()) {
-				maxPaths = configPanel.limitPathCount.getValue();
-		}
-
-		monitor.setTicks(10);
-		monitor.setCustomText(tr("Parsing file"));
-
-		PathOptimizer data = new PathOptimizer(nodesTolerance, color, configPanel.splitOnColorChangeCheck.getValue());
-
-		try {
-			PdfBoxParser parser = new PdfBoxParser(data);
-			parser.parse(fileName, maxPaths, monitor.createSubTaskMonitor(80, false));
-
-		} catch (FileNotFoundException e1) {
-			JOptionPane.showMessageDialog(Main.parent, tr("File not found."));
-			return null;
-		} catch (Exception e) {
-			e.printStackTrace();
-			JOptionPane.showMessageDialog(Main.parent, tr("Error while parsing: {0}", e.getMessage()));
-			return null;
-		}
-
-		monitor.setTicks(80);
-
-		if (configPanel.removeParallelSegmentsCheck.getValue() && configPanel.removeParallelSegmentsTolerance.isDataValid()) {
-				double tolerance = configPanel.removeParallelSegmentsTolerance.getValue();
-				monitor.setCustomText(tr("Removing parallel segments"));
-		}
-
-		if (nodesTolerance > 0.0) {
-			monitor.setTicks(83);
-			monitor.setCustomText(tr("Joining nodes"));
-			data.mergeNodes();
-		}
-
-		monitor.setTicks(85);
-		monitor.setCustomText(tr("Joining adjacent segments"));
-		data.mergeSegments();
-
-		if (configPanel.removeSmallObjectsCheck.getValue() && configPanel.removeSmallObjectsSize.isDataValid()) {
-				double tolerance = configPanel.removeSmallObjectsSize.getValue();
-				monitor.setTicks(90);
-				monitor.setCustomText(tr("Removing small objects"));
-
-				data.removeSmallObjects(tolerance);
-
-		}
-
-		if (configPanel.removeLargeObjectsCheck.getValue() && configPanel.removeLargeObjectsSize.isDataValid()) {
-				double tolerance = configPanel.removeLargeObjectsSize.getValue();
-				monitor.setTicks(90);
-				monitor.setCustomText(tr("Removing large objects"));
-				data.removeLargeObjects(tolerance);
-		}
-
-		monitor.setTicks(95);
-		monitor.setCustomText(tr("Finalizing layers"));
-		data.splitLayersByPathKind(configPanel.splitOnShapeClosedCheck.getValue(),
-				configPanel.splitOnSingleSegmentCheck.getValue(),
-				configPanel.splitOnOrthogonalCheck.getValue());
-		data.finish();
-
-		monitor.finishTask();
-		return data;
-	}
-
-	private OsmDataLayer makeLayer(String name, FilePlacement placement, OsmBuilder.Mode mode,
-			ProgressMonitor monitor) {
-		/*
-		 * create a layer from data
-		 */
-		monitor.beginTask(tr("Building JOSM layer"), 100);
-		OsmBuilder builder = new OsmBuilder(placement);
-		DataSet data = builder.build(pdfData.getLayers(), mode, monitor.createSubTaskMonitor(50, false));
-		data.setUploadPolicy(UploadPolicy.BLOCKED);
-		monitor.setTicks(50);
-		monitor.setCustomText(tr("Postprocessing layer"));
-		OsmDataLayer result = new OsmDataLayer(data, name, null);
-		result.setUploadDiscouraged(true);
-		result.setBackgroundLayer(true);
-		result.onPostLoadFromFile();
-
-		monitor.finishTask();
-		return result;
-	}
-
-		private void removeLayer() {
-		/*
-		 * remove preview layer
-		 */
-//		if (dataLayer != null) {
-//			MainApplication.getLayerManager().removeLayer(dataLayer);
-//			dataLayer.data.clear(); // saves memory
-//			dataLayer = null;
-//		}
-		Preview.clear();
-		// No layer ==> no actions
-		actionPanel.showButton.setEnabled(false);
-		actionPanel.saveButton.setEnabled(false);
-		actionPanel.okButton.setEnabled(false);
-		placementPanel.setEnabled(false);
-
-	}
-
-	private void saveLayer(java.io.File file, FilePlacement placement, ProgressMonitor monitor) {
-		/*
-		 * save layer to file
-		 * TODO: is this methode valuable? Functionality can easily performed from Main-Menu
-		 */
-		monitor.beginTask(tr("Saving to file."), 1000);
-
-		OsmBuilder builder = new OsmBuilder(placement);
-		DataSet data = builder.build(this.pdfData.getLayers(), OsmBuilder.Mode.Final,
-				monitor.createSubTaskMonitor(500, false));
-		OsmDataLayer layer = new OsmDataLayer(data, file.getName(), file);
-
-		monitor.setCustomText(tr(" Writing to file"));
-		monitor.setTicks(500);
-
-		OsmExporter exporter = new OsmExporter();
-
-		try {
-			exporter.exportData(file, layer);
-		} catch (IOException e) {
-			Logging.error(e);
-		}
-
-		monitor.finishTask();
-	}
+    private OsmDataLayer newLayer;
+
+    private LoadProgressRenderer progressRenderer;
+
+    public LoadPdfDialog() {
+        buildGUI();
+        removeLayer();
+        if (Preferences.getGuiMode() == Preferences.GuiMode.Simple) {
+            loadFileButton.setVisible(false);
+            configPanel.panel.setVisible(false);
+            actionPanel.saveButton.setVisible(false);
+            actionPanel.showButton.setVisible(false);
+            setSize(new Dimension(380, 350));
+            if (!loadAction()) {
+                cancelAction();
+                return;
+            }
+        } else {
+            setSize(new Dimension(450, 600));
+        }
+        setAlwaysOnTop(true);
+        setVisible(true);
+    }
+
+    Component placementPanel = placement.getGui();
+    MainButtons actionPanel = new MainButtons();
+    Config configPanel = new Config();
+
+    private void buildGUI() {
+        /*
+         * build the GUI from Components
+         */
+        GridBagConstraints c = new GridBagConstraints();
+        c.gridheight = 1;
+        c.gridwidth = 1;
+        c.gridx = 0;
+        c.gridy = GridBagConstraints.RELATIVE;
+        c.fill = GridBagConstraints.BOTH;
+        c.insets = new java.awt.Insets(0, 0, 0, 0);
+
+        actionPanel.build(this);
+
+        loadFileButton.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                loadAction();
+            }
+        });
+
+        progressRenderer = new LoadProgressRenderer(loadProgress);
+
+        JPanel panel = new JPanel(new GridBagLayout());
+
+        panel.add(configPanel.getComponent(), c);
+        c.fill = GridBagConstraints.HORIZONTAL;
+        panel.add(loadFileButton, c);
+        c.fill = GridBagConstraints.BOTH;
+        panel.add(placementPanel, c);
+        panel.add(actionPanel.panel, c);
+        c.fill = GridBagConstraints.HORIZONTAL;
+        panel.add(this.loadProgress, c);
+
+        setContentPane(panel);
+        addWindowListener(new WindowAdapter() {
+            @Override
+            public void windowClosing(WindowEvent e) {
+                cancelAction();
+            }
+        });
+        placement.setDependsOnValid(actionPanel.okButton);
+
+        /*
+         * TODO: Make okButton to default Button of Dialog, make cancelButton to react on ESC-Key
+         */
+//        SwingUtilities.getRootPane(panel).setDefaultButton(actionPanel.okButton);
+    }
+
+     private boolean loadAction() {
+         /*
+          * perform load PDF file to preview
+          * TODO: load preview to previous placement, involves reverse transform
+          */
+        final File newFileName = this.chooseFile();
+
+        if (newFileName == null) {
+            return false;
+        }
+        Logging.debug("PdfImport: Load Preview");
+        this.removeLayer();
+
+        this.loadFileButton.setEnabled(false);
+
+        this.runAsBackgroundTask(new Runnable() {
+            @Override
+            public void run() {
+                // async part
+                LoadPdfDialog.this.loadProgress.setVisible(true);
+                SwingRenderingProgressMonitor monitor = new SwingRenderingProgressMonitor(progressRenderer);
+                monitor.beginTask("Loading file", 1000);
+                pdfData = loadPDF(newFileName, monitor.createSubTaskMonitor(500, false));
+                OsmBuilder.Mode mode = LoadPdfDialog.this.configPanel.debugModeCheck.getValue()
+                        ? OsmBuilder.Mode.Debug
+                        : OsmBuilder.Mode.Draft;
+
+                if (pdfData != null) {
+                    LoadPdfDialog.this.newLayer = LoadPdfDialog.this.makeLayer(
+                            tr("PDF preview: ") + newFileName.getName(), new FilePlacement(), mode,
+                            monitor.createSubTaskMonitor(500, false));
+                }
+
+                monitor.finishTask();
+                progressRenderer.finish();
+            }
+        }, new ActionListener() {
+
+            @Override
+            public void actionPerformed(ActionEvent event) {
+                // sync part
+                LoadPdfDialog.this.pdfFile = newFileName;
+                if (pdfData != null) {
+                    Preview.set(newLayer, new FilePlacement());
+                    MainApplication.getMap().mapView.zoomTo(placement.getWorldBounds(pdfData));
+                    try {
+                        LoadPdfDialog.this.placement.load(newFileName);
+                    } catch (IOException e) {
+                        // Saved placement does not exist, corrupt, ... ---> ignore it
+                    } finally {
+                        LoadPdfDialog.this.placement.verify();
+                    }
+                    LoadPdfDialog.this.newLayer = null;
+                    LoadPdfDialog.this.loadFileButton.setEnabled(true);
+                    LoadPdfDialog.this.placementPanel.setEnabled(true);
+                    LoadPdfDialog.this.actionPanel.panel.setEnabled(true);
+                    LoadPdfDialog.this.actionPanel.showButton.setEnabled(true);
+                    LoadPdfDialog.this.actionPanel.saveButton.setEnabled(true);
+                    LoadPdfDialog.this.actionPanel.okButton.setEnabled(true);
+                    LoadPdfDialog.this.loadProgress.setVisible(false);
+                }
+            }
+        });
+        return true;
+    }
+
+    private void importAction() {
+
+        if (!placement.isValid()) return;
+        try {
+            placement.save(pdfFile);
+        } catch (IOException e) {
+            e.toString();
+        }
+        removeLayer();
+
+        runAsBackgroundTask(new Runnable() {
+            @Override
+            public void run() {
+                // async part
+                LoadPdfDialog.this.loadProgress.setVisible(true);
+                SwingRenderingProgressMonitor monitor = new SwingRenderingProgressMonitor(progressRenderer);
+                LoadPdfDialog.this.newLayer = LoadPdfDialog.this.makeLayer(tr("PDF: ") + pdfFile.getName(), placement,
+                        OsmBuilder.Mode.Final, monitor);
+                progressRenderer.finish();
+            }
+        }, new ActionListener() {
+
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                // sync part
+                // rebuild layer with latest projection
+                MainApplication.getLayerManager().addLayer(newLayer);
+                MainApplication.getMap().mapView.zoomTo(placement.getWorldBounds(pdfData));
+                LoadPdfDialog.this.setVisible(false);
+            }
+        });
+    }
+
+    private void saveAction() {
+        /*
+         * perform save preview layer to file
+         * TODO: is this action valueable? Can be easily performed from main menu
+         */
+
+        if (!placement.isValid()) return;
+
+        final java.io.File file = this.chooseSaveFile();
+
+        if (file == null) {
+            return;
+        }
+
+        this.removeLayer();
+
+        this.runAsBackgroundTask(new Runnable() {
+            @Override
+            public void run() {
+                // async part
+                SwingRenderingProgressMonitor monitor = new SwingRenderingProgressMonitor(progressRenderer);
+                LoadPdfDialog.this.saveLayer(file, placement, monitor);
+                progressRenderer.finish();
+            }
+        }, new ActionListener() {
+
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                // sync part
+                LoadPdfDialog.this.setVisible(false);
+            }
+        });
+    }
+
+    private void showAction() {
+        /*
+         * perform show action
+         * TODO: is this action valuable? User can do it easy from OSM Main Menu
+         */
+        if (!placement.isValid()) return;
+
+        // zoom to new location
+        MainApplication.getMap().mapView.zoomTo(placement.getWorldBounds(pdfData));
+        MainApplication.getMap().repaint();
+    }
+
+    private void cancelAction() {
+        /*
+         * perform cancel action
+         */
+        removeLayer();
+        setVisible(false);
+    }
+
+    // Implementation methods
+
+    private static JFileChooser loadChooser = null;
+
+    private java.io.File chooseFile() {
+        // get PDF file to load
+        if (loadChooser == null) {
+            loadChooser = new JFileChooser(Preferences.getLoadDir());
+            loadChooser.setAcceptAllFileFilterUsed(false);
+            loadChooser.setMultiSelectionEnabled(false);
+            loadChooser.setFileFilter(new FileFilter() {
+                @Override
+                public boolean accept(java.io.File pathname) {
+                    return pathname.isDirectory() || pathname.getName().endsWith(".pdf");
+                }
+
+                @Override
+                public String getDescription() {
+                    return tr("PDF files");
+                }
+            });
+        } else {
+            loadChooser.rescanCurrentDirectory();
+        }
+        int result = loadChooser.showDialog(this, tr("Import PDF"));
+        if (result != JFileChooser.APPROVE_OPTION) {
+            return null;
+        } else {
+            Preferences.setLoadDir(loadChooser.getSelectedFile().getParentFile().getAbsolutePath());
+            return loadChooser.getSelectedFile();
+        }
+    }
+
+    private java.io.File chooseSaveFile() {
+        // get file name
+        JFileChooser fc = new JFileChooser();
+        fc.setAcceptAllFileFilterUsed(true);
+        fc.setMultiSelectionEnabled(false);
+        fc.setFileFilter(new FileFilter() {
+            @Override
+            public boolean accept(java.io.File pathname) {
+                return pathname.isDirectory() || pathname.getName().endsWith(".osm");
+            }
+
+            @Override
+            public String getDescription() {
+                return tr("OSM files");
+            }
+        });
+        int result = fc.showOpenDialog(MainApplication.getMainFrame());
+
+        if (result != JFileChooser.APPROVE_OPTION) {
+            return null;
+        } else {
+            return fc.getSelectedFile();
+        }
+    }
+
+    private void runAsBackgroundTask(final Runnable task, final ActionListener after) {
+        /*
+         * run @task in background (asychronosly , run @after when @task has finished
+         */
+        this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+        Thread t = new Thread(new Runnable() {
+            @Override
+            public void run() {
+                task.run();
+
+                SwingUtilities.invokeLater(new Runnable() {
+                    @Override
+                    public void run() {
+                        setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+                        after.actionPerformed(null);
+                    }
+                });
+            }
+        });
+        t.start();
+    }
+
+    private PathOptimizer loadPDF(File fileName, ProgressMonitor monitor) {
+        /*
+         * postprocess load PDF-file according to options
+         */
+
+        monitor.beginTask("", 100);
+        monitor.setTicks(0);
+        monitor.setCustomText(tr("Preparing"));
+
+        double nodesTolerance = 0.0;
+        Color color = null;
+        int maxPaths = Integer.MAX_VALUE;
+
+        if (configPanel.mergeCloseNodesCheck.getValue() && configPanel.mergeCloseNodesTolerance.isDataValid()) {
+                nodesTolerance = configPanel.mergeCloseNodesTolerance.getValue();
+        }
+
+        if (configPanel.colorFilterCheck.getValue()) {
+            try {
+                String colString = this.configPanel.colorFilterColor.getText().replace("#", "");
+                color = new Color(Integer.parseInt(colString, 16));
+            } catch (Exception e) {
+                JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Could not parse color"));
+                return null;
+            }
+        }
+
+        if (configPanel.limitPathCountCheck.getValue() && configPanel.limitPathCount.isDataValid()) {
+                maxPaths = configPanel.limitPathCount.getValue();
+        }
+
+        monitor.setTicks(10);
+        monitor.setCustomText(tr("Parsing file"));
+
+        PathOptimizer data = new PathOptimizer(nodesTolerance, color, configPanel.splitOnColorChangeCheck.getValue());
+
+        try {
+            PdfBoxParser parser = new PdfBoxParser(data);
+            parser.parse(fileName, maxPaths, monitor.createSubTaskMonitor(80, false));
+
+        } catch (FileNotFoundException e1) {
+            JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("File not found."));
+            return null;
+        } catch (Exception e) {
+            e.printStackTrace();
+            JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Error while parsing: {0}", e.getMessage()));
+            return null;
+        }
+
+        monitor.setTicks(80);
+
+        if (configPanel.removeParallelSegmentsCheck.getValue() && configPanel.removeParallelSegmentsTolerance.isDataValid()) {
+                double tolerance = configPanel.removeParallelSegmentsTolerance.getValue();
+                monitor.setCustomText(tr("Removing parallel segments"));
+        }
+
+        if (nodesTolerance > 0.0) {
+            monitor.setTicks(83);
+            monitor.setCustomText(tr("Joining nodes"));
+            data.mergeNodes();
+        }
+
+        monitor.setTicks(85);
+        monitor.setCustomText(tr("Joining adjacent segments"));
+        data.mergeSegments();
+
+        if (configPanel.removeSmallObjectsCheck.getValue() && configPanel.removeSmallObjectsSize.isDataValid()) {
+                double tolerance = configPanel.removeSmallObjectsSize.getValue();
+                monitor.setTicks(90);
+                monitor.setCustomText(tr("Removing small objects"));
+
+                data.removeSmallObjects(tolerance);
+
+        }
+
+        if (configPanel.removeLargeObjectsCheck.getValue() && configPanel.removeLargeObjectsSize.isDataValid()) {
+                double tolerance = configPanel.removeLargeObjectsSize.getValue();
+                monitor.setTicks(90);
+                monitor.setCustomText(tr("Removing large objects"));
+                data.removeLargeObjects(tolerance);
+        }
+
+        monitor.setTicks(95);
+        monitor.setCustomText(tr("Finalizing layers"));
+        data.splitLayersByPathKind(configPanel.splitOnShapeClosedCheck.getValue(),
+                configPanel.splitOnSingleSegmentCheck.getValue(),
+                configPanel.splitOnOrthogonalCheck.getValue());
+        data.finish();
+
+        monitor.finishTask();
+        return data;
+    }
+
+    private OsmDataLayer makeLayer(String name, FilePlacement placement, OsmBuilder.Mode mode,
+            ProgressMonitor monitor) {
+        /*
+         * create a layer from data
+         */
+        monitor.beginTask(tr("Building JOSM layer"), 100);
+        OsmBuilder builder = new OsmBuilder(placement);
+        DataSet data = builder.build(pdfData.getLayers(), mode, monitor.createSubTaskMonitor(50, false));
+        data.setUploadPolicy(UploadPolicy.BLOCKED);
+        monitor.setTicks(50);
+        monitor.setCustomText(tr("Postprocessing layer"));
+        OsmDataLayer result = new OsmDataLayer(data, name, null);
+        result.setUploadDiscouraged(true);
+        result.setBackgroundLayer(true);
+        result.onPostLoadFromFile();
+
+        monitor.finishTask();
+        return result;
+    }
+
+        private void removeLayer() {
+        /*
+         * remove preview layer
+         */
+//        if (dataLayer != null) {
+//            MainApplication.getLayerManager().removeLayer(dataLayer);
+//            dataLayer.data.clear(); // saves memory
+//            dataLayer = null;
+//        }
+        Preview.clear();
+        // No layer ==> no actions
+        actionPanel.showButton.setEnabled(false);
+        actionPanel.saveButton.setEnabled(false);
+        actionPanel.okButton.setEnabled(false);
+        placementPanel.setEnabled(false);
+
+    }
+
+    private void saveLayer(java.io.File file, FilePlacement placement, ProgressMonitor monitor) {
+        /*
+         * save layer to file
+         * TODO: is this methode valuable? Functionality can easily performed from Main-Menu
+         */
+        monitor.beginTask(tr("Saving to file."), 1000);
+
+        OsmBuilder builder = new OsmBuilder(placement);
+        DataSet data = builder.build(this.pdfData.getLayers(), OsmBuilder.Mode.Final,
+                monitor.createSubTaskMonitor(500, false));
+        OsmDataLayer layer = new OsmDataLayer(data, file.getName(), file);
+
+        monitor.setCustomText(tr(" Writing to file"));
+        monitor.setTicks(500);
+
+        OsmExporter exporter = new OsmExporter();
+
+        try {
+            exporter.exportData(file, layer);
+        } catch (IOException e) {
+            Logging.error(e);
+        }
+
+        monitor.finishTask();
+    }
 
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/PdfImportAction.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/PdfImportAction.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/PdfImportAction.java	(revision 34541)
@@ -33,7 +33,7 @@
 
         //show dialog asking to select coordinate axes and input coordinates and projection.
-    	/*
-    	 * TODO: make dialog reusable
-    	 */
+        /*
+         * TODO: make dialog reusable
+         */
         LoadPdfDialog dialog = new LoadPdfDialog();
         dialog.setTitle(tr("Import PDF"));
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/PdfImportPlugin.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/PdfImportPlugin.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/PdfImportPlugin.java	(revision 34541)
@@ -14,45 +14,41 @@
  * A plugin to import a PDF file.
  */
-
 public class PdfImportPlugin extends Plugin {
 
+    public PdfImportPlugin(PluginInformation info) {
+        super(info);
+        MainMenu.add(MainApplication.getMenu().imagerySubMenu, new PdfImportAction());
+        new Preferences(getPluginInformation().name);
+    }
 
-	public PdfImportPlugin(PluginInformation info) {
-		super(info);
-		MainMenu.add(MainApplication.getMenu().imagerySubMenu, new PdfImportAction());
-		new Preferences(getPluginInformation().name);
-	}
+    public static class pdfimportPrefs implements SubPreferenceSetting {
+        @Override
+        public TabPreferenceSetting getTabPreferenceSetting(PreferenceTabbedPane gui) {
+            return null;
+        }
 
-	public class pdfimportPrefs implements SubPreferenceSetting
-	{
-		@Override
-		public TabPreferenceSetting getTabPreferenceSetting(PreferenceTabbedPane gui)
-		{
-			return null;
-		}
+        @Override
+        public void addGui(PreferenceTabbedPane gui) {
+            return;
+        }
 
-		@Override
-		public void addGui(PreferenceTabbedPane gui) {
-			return;
-		}
+        @Override
+        public boolean ok() {
+            return false;
+        }
 
-		@Override
-		public boolean ok() {
-			return false;
-		}
+        @Override
+        public boolean isExpert() {
+            return false;
+        }
+    }
 
-		@Override
-		public boolean isExpert() {
-			return false;
-		}
-	}
-
-	@Override
-	public PreferenceSetting getPreferenceSetting() {
-		/*
-		 * TODO: implement it
-		 */
-		return new pdfimportPrefs();
-		}
+    @Override
+    public PreferenceSetting getPreferenceSetting() {
+        /*
+         * TODO: implement it
+         */
+        return new pdfimportPrefs();
+        }
 
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/Preferences.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/Preferences.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/Preferences.java	(revision 34541)
@@ -8,115 +8,115 @@
 public class Preferences {
 
-	public enum GuiMode {
-		Auto, Expert, Simple
-	};
+    public enum GuiMode {
+        Auto, Expert, Simple
+    };
 
-	public static String getLoadDir() {
-		return 	Config.getPref().get(Preferences.prefix + "loadDir");
-	}
+    public static String getLoadDir() {
+        return     Config.getPref().get(Preferences.prefix + "loadDir");
+    }
 
-	public static void setLoadDir(String loadDir) {
-		Config.getPref().put(Preferences.prefix + "loadDir", loadDir);
-	}
+    public static void setLoadDir(String loadDir) {
+        Config.getPref().put(Preferences.prefix + "loadDir", loadDir);
+    }
 
-	public static GuiMode getGuiMode() {
-		int GuiCode = Config.getPref().getInt(Preferences.prefix + "guiCode", 0);
-		switch (GuiCode) {
-		case -1:
-		case 1:
-			return GuiMode.Expert;
-		case 2:
-			return GuiMode.Simple;
-		default:
-			if (Config.getPref().getBoolean("expert"))
-				return GuiMode.Expert;
-			else
-				return GuiMode.Simple;
-		}
-	}
+    public static GuiMode getGuiMode() {
+        int GuiCode = Config.getPref().getInt(Preferences.prefix + "guiCode", 0);
+        switch (GuiCode) {
+        case -1:
+        case 1:
+            return GuiMode.Expert;
+        case 2:
+            return GuiMode.Simple;
+        default:
+            if (Config.getPref().getBoolean("expert"))
+                return GuiMode.Expert;
+            else
+                return GuiMode.Simple;
+        }
+    }
 
-	public static boolean isLegacyActions() {
-		return (Config.getPref().getInt(Preferences.prefix + "guiCode", 0) == -1);
-	}
+    public static boolean isLegacyActions() {
+        return (Config.getPref().getInt(Preferences.prefix + "guiCode", 0) == -1);
+    }
 
-	public static boolean isMergeNodes() {
-		return Config.getPref().getBoolean(Preferences.prefix + "mergeNodes");
-	}
+    public static boolean isMergeNodes() {
+        return Config.getPref().getBoolean(Preferences.prefix + "mergeNodes");
+    }
 
-	public static double getMergeNodesValue() {
-		return Config.getPref().getDouble(Preferences.prefix + "mergeNodes.value", 1e-3);
-	}
+    public static double getMergeNodesValue() {
+        return Config.getPref().getDouble(Preferences.prefix + "mergeNodes.value", 1e-3);
+    }
 
-	public static boolean isRemoveSmall() {
-		return Config.getPref().getBoolean(Preferences.prefix + "removeSmall");
-	}
+    public static boolean isRemoveSmall() {
+        return Config.getPref().getBoolean(Preferences.prefix + "removeSmall");
+    }
 
-	public static double getRemoveSmallValue() {
-		return Config.getPref().getDouble(Preferences.prefix + "removeSmall.value", 1);
-	}
+    public static double getRemoveSmallValue() {
+        return Config.getPref().getDouble(Preferences.prefix + "removeSmall.value", 1);
+    }
 
-	public static boolean isRemoveLarge() {
-		return Config.getPref().getBoolean(Preferences.prefix + "removeLarge");
-	}
+    public static boolean isRemoveLarge() {
+        return Config.getPref().getBoolean(Preferences.prefix + "removeLarge");
+    }
 
-	public static double getRemoveLargeValue() {
-		return Config.getPref().getDouble(Preferences.prefix + "removeLarge.value", 10);
-	}
+    public static double getRemoveLargeValue() {
+        return Config.getPref().getDouble(Preferences.prefix + "removeLarge.value", 10);
+    }
 
-	public static boolean isRemoveParallel() {
-		return Config.getPref().getBoolean(Preferences.prefix + "removeParallel");
-	}
+    public static boolean isRemoveParallel() {
+        return Config.getPref().getBoolean(Preferences.prefix + "removeParallel");
+    }
 
-	public static double getRemoveParallelValue() {
-		return Config.getPref().getDouble(Preferences.prefix + "removeParallel.value", 3);
-	}
+    public static double getRemoveParallelValue() {
+        return Config.getPref().getDouble(Preferences.prefix + "removeParallel.value", 3);
+    }
 
-	public static boolean isLimitPath() {
-		return Config.getPref().getBoolean(Preferences.prefix + "limitPath");
-	}
+    public static boolean isLimitPath() {
+        return Config.getPref().getBoolean(Preferences.prefix + "limitPath");
+    }
 
-	public static int getLimitPathValue() {
-		return Config.getPref().getInt(Preferences.prefix + "limitPath.value", Integer.MAX_VALUE);
-	}
+    public static int getLimitPathValue() {
+        return Config.getPref().getInt(Preferences.prefix + "limitPath.value", Integer.MAX_VALUE);
+    }
 
-	public static boolean isLimitColor() {
-		return Config.getPref().getBoolean(Preferences.prefix + "limitColor");
-	}
+    public static boolean isLimitColor() {
+        return Config.getPref().getBoolean(Preferences.prefix + "limitColor");
+    }
 
-	public static String getLimitColorValue() {
-		return Config.getPref().get(Preferences.prefix + "limitColor.value","#000000");
-	}
+    public static String getLimitColorValue() {
+        return Config.getPref().get(Preferences.prefix + "limitColor.value","#000000");
+    }
 
-	public static boolean isDebugTags() {
-		return Config.getPref().getBoolean(Preferences.prefix + "debugTags");
-	}
+    public static boolean isDebugTags() {
+        return Config.getPref().getBoolean(Preferences.prefix + "debugTags");
+    }
 
-	public static boolean isLayerClosed() {
-		return Config.getPref().getBoolean(Preferences.prefix + "layerClosed");
-	}
+    public static boolean isLayerClosed() {
+        return Config.getPref().getBoolean(Preferences.prefix + "layerClosed");
+    }
 
-	public static boolean isLayerSegment() {
-		return Config.getPref().getBoolean(Preferences.prefix + "layerSegment");
-	}
+    public static boolean isLayerSegment() {
+        return Config.getPref().getBoolean(Preferences.prefix + "layerSegment");
+    }
 
-	public static boolean isLayerAttribChange() {
-		return Config.getPref().getBoolean(Preferences.prefix + "layerAttribChanges");
-	}
+    public static boolean isLayerAttribChange() {
+        return Config.getPref().getBoolean(Preferences.prefix + "layerAttribChanges");
+    }
 
-	public static boolean isLayerOrtho() {
-		return Config.getPref().getBoolean(Preferences.prefix + "layerOrtho");
-	}
+    public static boolean isLayerOrtho() {
+        return Config.getPref().getBoolean(Preferences.prefix + "layerOrtho");
+    }
 
-	protected static int GuiCode;
+    protected static int GuiCode;
 
-	private static String prefix;
+    private static String prefix;
 
-	private Preferences() {
-		return;
-	}
+    private Preferences() {
+        return;
+    }
 
-	public Preferences (String p) {
-		prefix = p + "." ;
-	}
+    public Preferences (String p) {
+        prefix = p + "." ;
+    }
 
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/Preview.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/Preview.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/Preview.java	(revision 34541)
@@ -3,6 +3,4 @@
  */
 package pdfimport;
-
-import java.io.File;
 
 import org.openstreetmap.josm.gui.MainApplication;
@@ -16,27 +14,27 @@
  */
 public class Preview {
-	public static OsmDataLayer dataLayer;
-	public static FilePlacement placement;
-	
-	public static synchronized void set (@NotNull OsmDataLayer dataLayer, @NotNull FilePlacement placement) {
-		clear();
-		Preview.dataLayer = dataLayer;
-		Preview.placement = placement;
-		MainApplication.getLayerManager().addLayer(dataLayer); 
+    public static OsmDataLayer dataLayer;
+    public static FilePlacement placement;
+    
+    public static synchronized void set (@NotNull OsmDataLayer dataLayer, @NotNull FilePlacement placement) {
+        clear();
+        Preview.dataLayer = dataLayer;
+        Preview.placement = placement;
+        MainApplication.getLayerManager().addLayer(dataLayer); 
 
-	}
-	
-	public static void clear() {
-		if (Preview.dataLayer != null) {
-			MainApplication.getLayerManager().removeLayer(Preview.dataLayer);
-			Preview.dataLayer.data.clear(); // saves memory
-		}
-		Preview.dataLayer = null;
-		Preview.placement = null;
-	}
-	
-	public void save() {
-//		TODO: implement
-	}
+    }
+    
+    public static void clear() {
+        if (Preview.dataLayer != null) {
+            MainApplication.getLayerManager().removeLayer(Preview.dataLayer);
+            Preview.dataLayer.data.clear(); // saves memory
+        }
+        Preview.dataLayer = null;
+        Preview.placement = null;
+    }
+    
+    public void save() {
+//        TODO: implement
+    }
 
 
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/ProjectionInfo.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/ProjectionInfo.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/ProjectionInfo.java	(revision 34541)
@@ -26,12 +26,12 @@
     }
 
-	public static Projection getProjectionByCode(String code) {
-		try {
-			ProjectionChoice pc = new SingleProjectionChoice(code.toString(), code.toString(), code);
-			Projection p = pc.getProjection();
-			return p;
-		} catch (Exception e) {
-			throw new IllegalArgumentException();
-		}
+    public static Projection getProjectionByCode(String code) {
+        try {
+            ProjectionChoice pc = new SingleProjectionChoice(code.toString(), code.toString(), code);
+            Projection p = pc.getProjection();
+            return p;
+        } catch (Exception e) {
+            throw new IllegalArgumentException();
+        }
 
 //        Projection p = allCodes.get(code);
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/PageDrawer.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/PageDrawer.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/PageDrawer.java	(revision 34541)
@@ -39,4 +39,5 @@
 import org.apache.pdfbox.util.ResourceLoader;
 import org.apache.pdfbox.util.TextPosition;
+import org.openstreetmap.josm.tools.Logging;
 
 
@@ -140,6 +141,6 @@
             graphics.setClip(getGraphicsState().getCurrentClippingPath());
             graphics.drawString(x, y, text.getCharacter(), color);
-        } catch (IOException io) {
-            io.printStackTrace();
+        } catch (IOException e) {
+            Logging.error(e);
         }
     }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/AppendRectangleToPath.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/AppendRectangleToPath.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/AppendRectangleToPath.java	(revision 34541)
@@ -38,42 +38,42 @@
 
 
-	/**
-	 * process : re : append rectangle to path.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments)
-	{
-		PageDrawer drawer = (PageDrawer)context;
+    /**
+     * process : re : append rectangle to path.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments)
+    {
+        PageDrawer drawer = (PageDrawer)context;
 
-		COSNumber x = (COSNumber)arguments.get( 0 );
-		COSNumber y = (COSNumber)arguments.get( 1 );
-		COSNumber w = (COSNumber)arguments.get( 2 );
-		COSNumber h = (COSNumber)arguments.get( 3 );
+        COSNumber x = (COSNumber)arguments.get( 0 );
+        COSNumber y = (COSNumber)arguments.get( 1 );
+        COSNumber w = (COSNumber)arguments.get( 2 );
+        COSNumber h = (COSNumber)arguments.get( 3 );
 
-		double x1 = x.doubleValue();
-		double y1 = y.doubleValue();
-		// create a pair of coordinates for the transformation
-		double x2 = w.doubleValue()+x1;
-		double y2 = h.doubleValue()+y1;
+        double x1 = x.doubleValue();
+        double y1 = y.doubleValue();
+        // create a pair of coordinates for the transformation
+        double x2 = w.doubleValue()+x1;
+        double y2 = h.doubleValue()+y1;
 
-		Point2D startCoords = drawer.transformedPoint(x1,y1);
-		Point2D endCoords = drawer.transformedPoint(x2,y2);
+        Point2D startCoords = drawer.transformedPoint(x1,y1);
+        Point2D endCoords = drawer.transformedPoint(x2,y2);
 
-		float width = (float)(endCoords.getX()-startCoords.getX());
-		float height = (float)(endCoords.getY()-startCoords.getY());
-		float xStart = (float)startCoords.getX();
-		float yStart = (float)startCoords.getY();
+        float width = (float)(endCoords.getX()-startCoords.getX());
+        float height = (float)(endCoords.getY()-startCoords.getY());
+        float xStart = (float)startCoords.getX();
+        float yStart = (float)startCoords.getY();
 
-		// To ensure that the path is created in the right direction,
-		// we have to create it by combining single lines instead of
-		// creating a simple rectangle
-		GeneralPath path = drawer.getLinePath();
-		path.moveTo(xStart, yStart);
-		path.lineTo(xStart+width, yStart);
-		path.lineTo(xStart+width, yStart+height);
-		path.lineTo(xStart, yStart+height);
-		path.lineTo(xStart, yStart);
-	}
+        // To ensure that the path is created in the right direction,
+        // we have to create it by combining single lines instead of
+        // creating a simple rectangle
+        GeneralPath path = drawer.getLinePath();
+        path.moveTo(xStart, yStart);
+        path.lineTo(xStart+width, yStart);
+        path.lineTo(xStart+width, yStart+height);
+        path.lineTo(xStart, yStart+height);
+        path.lineTo(xStart, yStart);
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/BeginInlineImage.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/BeginInlineImage.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/BeginInlineImage.java	(revision 34541)
@@ -35,15 +35,15 @@
 {
 
-	/**
-	 * process : BI : begin inline image.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 * @throws IOException If there is an error displaying the inline image.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments)  throws IOException
-	{
-		PageDrawer drawer = (PageDrawer)context;
-		drawer.drawImage();
-	}
+    /**
+     * process : BI : begin inline image.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     * @throws IOException If there is an error displaying the inline image.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments)  throws IOException
+    {
+        PageDrawer drawer = (PageDrawer)context;
+        drawer.drawImage();
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/ClipEvenOddRule.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/ClipEvenOddRule.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/ClipEvenOddRule.java	(revision 34541)
@@ -38,29 +38,29 @@
 {
 
-	/**
-	 * Log instance.
-	 */
-	private static final Log log = LogFactory.getLog(ClipEvenOddRule.class);
+    /**
+     * Log instance.
+     */
+    private static final Log log = LogFactory.getLog(ClipEvenOddRule.class);
 
-	/**
-	 * process : W* : set clipping path using even odd rule.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 *
-	 * @throws IOException if there is an error during execution.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
+    /**
+     * process : W* : set clipping path using even odd rule.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     *
+     * @throws IOException if there is an error during execution.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
 
-		try
-		{
-			PageDrawer drawer = (PageDrawer)context;
-			drawer.setClippingPath(GeneralPath.WIND_EVEN_ODD);
-		}
-		catch (Exception e)
-		{
-			log.warn(e, e);
-		}
-	}
+        try
+        {
+            PageDrawer drawer = (PageDrawer)context;
+            drawer.setClippingPath(GeneralPath.WIND_EVEN_ODD);
+        }
+        catch (Exception e)
+        {
+            log.warn(e, e);
+        }
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/ClipNonZeroRule.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/ClipNonZeroRule.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/ClipNonZeroRule.java	(revision 34541)
@@ -38,29 +38,29 @@
 {
 
-	/**
-	 * Log instance.
-	 */
-	private static final Log log = LogFactory.getLog(ClipNonZeroRule.class);
+    /**
+     * Log instance.
+     */
+    private static final Log log = LogFactory.getLog(ClipNonZeroRule.class);
 
-	/**
-	 * process : W : Set the clipping path using non zero winding rule.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 *
-	 * @throws IOException If there is an error during the processing.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
+    /**
+     * process : W : Set the clipping path using non zero winding rule.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     *
+     * @throws IOException If there is an error during the processing.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
 
-		try
-		{
-			PageDrawer drawer = (PageDrawer)context;
-			drawer.setClippingPath(GeneralPath.WIND_NON_ZERO);
-		}
-		catch (Exception e)
-		{
-			log.warn(e, e);
-		}
-	}
+        try
+        {
+            PageDrawer drawer = (PageDrawer)context;
+            drawer.setClippingPath(GeneralPath.WIND_NON_ZERO);
+        }
+        catch (Exception e)
+        {
+            log.warn(e, e);
+        }
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/CloseFillEvenOddAndStrokePath.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/CloseFillEvenOddAndStrokePath.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/CloseFillEvenOddAndStrokePath.java	(revision 34541)
@@ -36,17 +36,17 @@
 {
 
-	/**
-	 * fill and stroke the path.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 *
-	 * @throws IOException If an error occurs while processing the font.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
-		PageDrawer drawer = (PageDrawer)context;
-		drawer.getLinePath().closePath();
-		drawer.drawPath(true, true, Path2D.WIND_EVEN_ODD);
-	}
+    /**
+     * fill and stroke the path.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     *
+     * @throws IOException If an error occurs while processing the font.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
+        PageDrawer drawer = (PageDrawer)context;
+        drawer.getLinePath().closePath();
+        drawer.drawPath(true, true, Path2D.WIND_EVEN_ODD);
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/CloseFillNonZeroAndStrokePath.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/CloseFillNonZeroAndStrokePath.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/CloseFillNonZeroAndStrokePath.java	(revision 34541)
@@ -36,17 +36,17 @@
 {
 
-	/**
-	 * fill and stroke the path.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 *
-	 * @throws IOException If an error occurs while processing the font.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
-		PageDrawer drawer = (PageDrawer)context;
-		drawer.getLinePath().closePath();
-		drawer.drawPath(true, true, Path2D.WIND_NON_ZERO);
-	}
+    /**
+     * fill and stroke the path.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     *
+     * @throws IOException If an error occurs while processing the font.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
+        PageDrawer drawer = (PageDrawer)context;
+        drawer.getLinePath().closePath();
+        drawer.drawPath(true, true, Path2D.WIND_NON_ZERO);
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/ClosePath.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/ClosePath.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/ClosePath.java	(revision 34541)
@@ -34,16 +34,16 @@
 {
 
-	/**
-	 * process : h : Close path.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 *
-	 * @throws IOException if something went wrong during logging
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
-		PageDrawer drawer = (PageDrawer)context;
-		drawer.getLinePath().closePath();
-	}
+    /**
+     * process : h : Close path.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     *
+     * @throws IOException if something went wrong during logging
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
+        PageDrawer drawer = (PageDrawer)context;
+        drawer.getLinePath().closePath();
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/CurveTo.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/CurveTo.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/CurveTo.java	(revision 34541)
@@ -37,27 +37,27 @@
 
 
-	/**
-	 * process : c : Append curved segment to path.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments)
-	{
-		PageDrawer drawer = (PageDrawer)context;
+    /**
+     * process : c : Append curved segment to path.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments)
+    {
+        PageDrawer drawer = (PageDrawer)context;
 
-		COSNumber x1 = (COSNumber)arguments.get( 0 );
-		COSNumber y1 = (COSNumber)arguments.get( 1 );
-		COSNumber x2 = (COSNumber)arguments.get( 2 );
-		COSNumber y2 = (COSNumber)arguments.get( 3 );
-		COSNumber x3 = (COSNumber)arguments.get( 4 );
-		COSNumber y3 = (COSNumber)arguments.get( 5 );
+        COSNumber x1 = (COSNumber)arguments.get( 0 );
+        COSNumber y1 = (COSNumber)arguments.get( 1 );
+        COSNumber x2 = (COSNumber)arguments.get( 2 );
+        COSNumber y2 = (COSNumber)arguments.get( 3 );
+        COSNumber x3 = (COSNumber)arguments.get( 4 );
+        COSNumber y3 = (COSNumber)arguments.get( 5 );
 
-		Point2D point1 = drawer.transformedPoint(x1.doubleValue(), y1.doubleValue());
-		Point2D point2 = drawer.transformedPoint(x2.doubleValue(), y2.doubleValue());
-		Point2D point3 = drawer.transformedPoint(x3.doubleValue(), y3.doubleValue());
+        Point2D point1 = drawer.transformedPoint(x1.doubleValue(), y1.doubleValue());
+        Point2D point2 = drawer.transformedPoint(x2.doubleValue(), y2.doubleValue());
+        Point2D point3 = drawer.transformedPoint(x3.doubleValue(), y3.doubleValue());
 
-		drawer.getLinePath().curveTo((float)point1.getX(), (float)point1.getY(),
-				(float)point2.getX(), (float)point2.getY(), (float)point3.getX(), (float)point3.getY());
-	}
+        drawer.getLinePath().curveTo((float)point1.getX(), (float)point1.getY(),
+                (float)point2.getX(), (float)point2.getY(), (float)point3.getX(), (float)point3.getY());
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/CurveToReplicateFinalPoint.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/CurveToReplicateFinalPoint.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/CurveToReplicateFinalPoint.java	(revision 34541)
@@ -37,24 +37,24 @@
 
 
-	/**
-	 * process : y : Append curved segment to path (final point replicated).
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments)
-	{
-		PageDrawer drawer = (PageDrawer)context;
+    /**
+     * process : y : Append curved segment to path (final point replicated).
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments)
+    {
+        PageDrawer drawer = (PageDrawer)context;
 
-		COSNumber x1 = (COSNumber)arguments.get( 0 );
-		COSNumber y1 = (COSNumber)arguments.get( 1 );
-		COSNumber x3 = (COSNumber)arguments.get( 2 );
-		COSNumber y3 = (COSNumber)arguments.get( 3 );
+        COSNumber x1 = (COSNumber)arguments.get( 0 );
+        COSNumber y1 = (COSNumber)arguments.get( 1 );
+        COSNumber x3 = (COSNumber)arguments.get( 2 );
+        COSNumber y3 = (COSNumber)arguments.get( 3 );
 
-		Point2D point1 = drawer.transformedPoint(x1.doubleValue(), y1.doubleValue());
-		Point2D point3 = drawer.transformedPoint(x3.doubleValue(), y3.doubleValue());
+        Point2D point1 = drawer.transformedPoint(x1.doubleValue(), y1.doubleValue());
+        Point2D point3 = drawer.transformedPoint(x3.doubleValue(), y3.doubleValue());
 
-		drawer.getLinePath().curveTo((float)point1.getX(), (float)point1.getY(),
-				(float)point3.getX(), (float)point3.getY(), (float)point3.getX(), (float)point3.getY());
-	}
+        drawer.getLinePath().curveTo((float)point1.getX(), (float)point1.getY(),
+                (float)point3.getX(), (float)point3.getY(), (float)point3.getX(), (float)point3.getY());
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/CurveToReplicateInitialPoint.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/CurveToReplicateInitialPoint.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/CurveToReplicateInitialPoint.java	(revision 34541)
@@ -38,26 +38,26 @@
 
 
-	/**
-	 * process : v : Append curved segment to path (initial point replicated).
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments)
-	{
-		PageDrawer drawer = (PageDrawer)context;
+    /**
+     * process : v : Append curved segment to path (initial point replicated).
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments)
+    {
+        PageDrawer drawer = (PageDrawer)context;
 
-		COSNumber x2 = (COSNumber)arguments.get( 0 );
-		COSNumber y2 = (COSNumber)arguments.get( 1 );
-		COSNumber x3 = (COSNumber)arguments.get( 2 );
-		COSNumber y3 = (COSNumber)arguments.get( 3 );
-		GeneralPath path = drawer.getLinePath();
-		Point2D currentPoint = path.getCurrentPoint();
+        COSNumber x2 = (COSNumber)arguments.get( 0 );
+        COSNumber y2 = (COSNumber)arguments.get( 1 );
+        COSNumber x3 = (COSNumber)arguments.get( 2 );
+        COSNumber y3 = (COSNumber)arguments.get( 3 );
+        GeneralPath path = drawer.getLinePath();
+        Point2D currentPoint = path.getCurrentPoint();
 
-		Point2D point2 = drawer.transformedPoint(x2.doubleValue(), y2.doubleValue());
-		Point2D point3 = drawer.transformedPoint(x3.doubleValue(), y3.doubleValue());
+        Point2D point2 = drawer.transformedPoint(x2.doubleValue(), y2.doubleValue());
+        Point2D point3 = drawer.transformedPoint(x3.doubleValue(), y3.doubleValue());
 
-		drawer.getLinePath().curveTo((float)currentPoint.getX(), (float)currentPoint.getY(),
-				(float)point2.getX(), (float)point2.getY(), (float)point3.getX(), (float)point3.getY());
-	}
+        drawer.getLinePath().curveTo((float)currentPoint.getX(), (float)currentPoint.getY(),
+                (float)point2.getX(), (float)point2.getY(), (float)point3.getX(), (float)point3.getY());
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/EndPath.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/EndPath.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/EndPath.java	(revision 34541)
@@ -35,14 +35,14 @@
 
 
-	/**
-	 * process : n : End path.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments)
-	{
-		PageDrawer drawer = (PageDrawer)context;
-		drawer.getLinePath().reset();
-	}
+    /**
+     * process : n : End path.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments)
+    {
+        PageDrawer drawer = (PageDrawer)context;
+        drawer.getLinePath().reset();
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/FillEvenOddAndStrokePath.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/FillEvenOddAndStrokePath.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/FillEvenOddAndStrokePath.java	(revision 34541)
@@ -36,16 +36,16 @@
 {
 
-	/**
-	 * fill and stroke the path.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 *
-	 * @throws IOException If an error occurs while processing the font.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
-		PageDrawer drawer = (PageDrawer)context;
-		drawer.drawPath(true, true, Path2D.WIND_EVEN_ODD);
-	}
+    /**
+     * fill and stroke the path.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     *
+     * @throws IOException If an error occurs while processing the font.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
+        PageDrawer drawer = (PageDrawer)context;
+        drawer.drawPath(true, true, Path2D.WIND_EVEN_ODD);
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/FillEvenOddRule.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/FillEvenOddRule.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/FillEvenOddRule.java	(revision 34541)
@@ -38,29 +38,29 @@
 {
 
-	/**
-	 * Log instance.
-	 */
-	private static final Log log = LogFactory.getLog(FillEvenOddRule.class);
+    /**
+     * Log instance.
+     */
+    private static final Log log = LogFactory.getLog(FillEvenOddRule.class);
 
-	/**
-	 * process : f* : fill path using even odd rule.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 *
-	 * @throws IOException if there is an error during execution.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
-		try
-		{
-			///dwilson refactoring
-			PageDrawer drawer = (PageDrawer)context;
-			drawer.drawPath(false, true, GeneralPath.WIND_EVEN_ODD);
-		}
-		catch (Exception e)
-		{
-			log.warn(e, e);
-		}
-	}
+    /**
+     * process : f* : fill path using even odd rule.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     *
+     * @throws IOException if there is an error during execution.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
+        try
+        {
+            ///dwilson refactoring
+            PageDrawer drawer = (PageDrawer)context;
+            drawer.drawPath(false, true, GeneralPath.WIND_EVEN_ODD);
+        }
+        catch (Exception e)
+        {
+            log.warn(e, e);
+        }
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/FillNonZeroAndStrokePath.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/FillNonZeroAndStrokePath.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/FillNonZeroAndStrokePath.java	(revision 34541)
@@ -36,16 +36,16 @@
 {
 
-	/**
-	 * fill and stroke the path.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 *
-	 * @throws IOException If an error occurs while processing the font.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
-		PageDrawer drawer = (PageDrawer)context;
-		drawer.drawPath(true, true, Path2D.WIND_NON_ZERO);
-	}
+    /**
+     * fill and stroke the path.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     *
+     * @throws IOException If an error occurs while processing the font.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
+        PageDrawer drawer = (PageDrawer)context;
+        drawer.drawPath(true, true, Path2D.WIND_NON_ZERO);
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/FillNonZeroRule.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/FillNonZeroRule.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/FillNonZeroRule.java	(revision 34541)
@@ -36,16 +36,16 @@
 {
 
-	/**
-	 * process : F/f : fill path using non zero winding rule.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 *
-	 * @throws IOException If there is an error during the processing.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
-		PageDrawer drawer = (PageDrawer)context;
-		drawer.drawPath(false, true, GeneralPath.WIND_NON_ZERO);
-	}
+    /**
+     * process : F/f : fill path using non zero winding rule.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     *
+     * @throws IOException If there is an error during the processing.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
+        PageDrawer drawer = (PageDrawer)context;
+        drawer.drawPath(false, true, GeneralPath.WIND_NON_ZERO);
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/Invoke.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/Invoke.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/Invoke.java	(revision 34541)
@@ -45,48 +45,48 @@
 
 
-	/**
-	 * process : Do : Paint the specified XObject (section 4.7).
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 * @throws IOException If there is an error invoking the sub object.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
-		PageDrawer drawer = (PageDrawer)context;
-		PDPage page = drawer.getPage();
-		COSName objectName = (COSName)arguments.get( 0 );
-		Map<?, ?> xobjects = drawer.getResources().getXObjects();
-		PDXObject xobject = (PDXObject)xobjects.get( objectName.getName() );
-		if( xobject instanceof PDXObjectImage )
-		{
-			drawer.drawImage();
-		}
-		else if(xobject instanceof PDXObjectForm)
-		{
-			PDXObjectForm form = (PDXObjectForm)xobject;
-			COSStream invoke = (COSStream)form.getCOSObject();
-			PDResources pdResources = form.getResources();
-			if(pdResources == null)
-			{
-				pdResources = page.findResources();
-			}
-			// if there is an optional form matrix, we have to
-			// map the form space to the user space
-			Matrix matrix = form.getMatrix();
-			if (matrix != null)
-			{
-				Matrix xobjectCTM = matrix.multiply( context.getGraphicsState().getCurrentTransformationMatrix());
-				context.getGraphicsState().setCurrentTransformationMatrix(xobjectCTM);
-			}
-			getContext().processSubStream( page, pdResources, invoke );
-		}
-		else
-		{
-			//unknown xobject type
-		}
+    /**
+     * process : Do : Paint the specified XObject (section 4.7).
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     * @throws IOException If there is an error invoking the sub object.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
+        PageDrawer drawer = (PageDrawer)context;
+        PDPage page = drawer.getPage();
+        COSName objectName = (COSName)arguments.get( 0 );
+        Map<?, ?> xobjects = drawer.getResources().getXObjects();
+        PDXObject xobject = (PDXObject)xobjects.get( objectName.getName() );
+        if( xobject instanceof PDXObjectImage )
+        {
+            drawer.drawImage();
+        }
+        else if(xobject instanceof PDXObjectForm)
+        {
+            PDXObjectForm form = (PDXObjectForm)xobject;
+            COSStream invoke = (COSStream)form.getCOSObject();
+            PDResources pdResources = form.getResources();
+            if(pdResources == null)
+            {
+                pdResources = page.findResources();
+            }
+            // if there is an optional form matrix, we have to
+            // map the form space to the user space
+            Matrix matrix = form.getMatrix();
+            if (matrix != null)
+            {
+                Matrix xobjectCTM = matrix.multiply( context.getGraphicsState().getCurrentTransformationMatrix());
+                context.getGraphicsState().setCurrentTransformationMatrix(xobjectCTM);
+            }
+            getContext().processSubStream( page, pdResources, invoke );
+        }
+        else
+        {
+            //unknown xobject type
+        }
 
 
-		//invoke named object.
-	}
+        //invoke named object.
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/LineTo.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/LineTo.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/LineTo.java	(revision 34541)
@@ -37,20 +37,20 @@
 
 
-	/**
-	 * process : l : Append straight line segment to path.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments)
-	{
-		PageDrawer drawer = (PageDrawer)context;
+    /**
+     * process : l : Append straight line segment to path.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments)
+    {
+        PageDrawer drawer = (PageDrawer)context;
 
-		//append straight line segment from the current point to the point.
-		COSNumber x = (COSNumber)arguments.get( 0 );
-		COSNumber y = (COSNumber)arguments.get( 1 );
+        //append straight line segment from the current point to the point.
+        COSNumber x = (COSNumber)arguments.get( 0 );
+        COSNumber y = (COSNumber)arguments.get( 1 );
 
-		Point2D pos = drawer.transformedPoint(x.doubleValue(), y.doubleValue());
-		drawer.getLinePath().lineTo((float)pos.getX(), (float)pos.getY());
-	}
+        Point2D pos = drawer.transformedPoint(x.doubleValue(), y.doubleValue());
+        drawer.getLinePath().lineTo((float)pos.getX(), (float)pos.getY());
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/MoveTo.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/MoveTo.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/MoveTo.java	(revision 34541)
@@ -39,30 +39,30 @@
 {
 
-	/**
-	 * Log instance.
-	 */
-	private static final Log log = LogFactory.getLog(MoveTo.class);
+    /**
+     * Log instance.
+     */
+    private static final Log log = LogFactory.getLog(MoveTo.class);
 
-	/**
-	 * process : m : Begin new subpath.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 * @throws IOException If there is an error processing the operator.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
-		try
-		{
-			PageDrawer drawer = (PageDrawer)context;
-			COSNumber x = (COSNumber)arguments.get( 0 );
-			COSNumber y = (COSNumber)arguments.get( 1 );
-			Point2D pos = drawer.transformedPoint(x.doubleValue(), y.doubleValue());
-			drawer.getLinePath().moveTo((float)pos.getX(), (float)pos.getY());
-		}
-		catch (Exception exception)
-		{
-			log.warn( exception, exception);
-		}
-	}
+    /**
+     * process : m : Begin new subpath.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     * @throws IOException If there is an error processing the operator.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
+        try
+        {
+            PageDrawer drawer = (PageDrawer)context;
+            COSNumber x = (COSNumber)arguments.get( 0 );
+            COSNumber y = (COSNumber)arguments.get( 1 );
+            Point2D pos = drawer.transformedPoint(x.doubleValue(), y.doubleValue());
+            drawer.getLinePath().moveTo((float)pos.getX(), (float)pos.getY());
+        }
+        catch (Exception exception)
+        {
+            log.warn( exception, exception);
+        }
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SHFill.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SHFill.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SHFill.java	(revision 34541)
@@ -37,16 +37,16 @@
 {
 
-	/**
-	 * process : sh : shade fill the path or clipping area.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 *
-	 * @throws IOException if there is an error during execution.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
-		PageDrawer drawer = (PageDrawer)context;
-		drawer.drawPath(false, true, Path2D.WIND_NON_ZERO);
-	}
+    /**
+     * process : sh : shade fill the path or clipping area.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     *
+     * @throws IOException if there is an error during execution.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
+        PageDrawer drawer = (PageDrawer)context;
+        drawer.drawPath(false, true, Path2D.WIND_NON_ZERO);
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SetLineCapStyle.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SetLineCapStyle.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SetLineCapStyle.java	(revision 34541)
@@ -35,27 +35,27 @@
 {
 
-	/**
-	 * Set the line cap style.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 *
-	 * @throws IOException If an error occurs while processing the font.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
-		super.process( operator, arguments );
-		int lineCapStyle = context.getGraphicsState().getLineCap();
-		PageDrawer drawer = (PageDrawer)context;
-		BasicStroke stroke = drawer.getStroke();
-		if (stroke == null)
-		{
-			drawer.setStroke( new BasicStroke(1,lineCapStyle,BasicStroke.JOIN_MITER) );
-		}
-		else
-		{
-			drawer.setStroke( new BasicStroke(stroke.getLineWidth(), lineCapStyle, stroke.getLineJoin(),
-					stroke.getMiterLimit(), stroke.getDashArray(), stroke.getDashPhase()));
-		}
-	}
+    /**
+     * Set the line cap style.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     *
+     * @throws IOException If an error occurs while processing the font.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
+        super.process( operator, arguments );
+        int lineCapStyle = context.getGraphicsState().getLineCap();
+        PageDrawer drawer = (PageDrawer)context;
+        BasicStroke stroke = drawer.getStroke();
+        if (stroke == null)
+        {
+            drawer.setStroke( new BasicStroke(1,lineCapStyle,BasicStroke.JOIN_MITER) );
+        }
+        else
+        {
+            drawer.setStroke( new BasicStroke(stroke.getLineWidth(), lineCapStyle, stroke.getLineJoin(),
+                    stroke.getMiterLimit(), stroke.getDashArray(), stroke.getDashPhase()));
+        }
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SetLineDashPattern.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SetLineDashPattern.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SetLineDashPattern.java	(revision 34541)
@@ -36,45 +36,45 @@
 {
 
-	/**
-	 * Set the line dash pattern.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 *
-	 * @throws IOException If an error occurs while processing the font.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
-		super.process( operator, arguments );
-		PDLineDashPattern lineDashPattern = context.getGraphicsState().getLineDashPattern();
-		PageDrawer drawer = (PageDrawer)context;
-		BasicStroke stroke = drawer.getStroke();
-		if (stroke == null)
-		{
-			if (lineDashPattern.isDashPatternEmpty())
-			{
-				drawer.setStroke(new BasicStroke(1, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10.0f) );
-			}
-			else
-			{
-				drawer.setStroke(new BasicStroke(1, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10.0f,
-						lineDashPattern.getCOSDashPattern().toFloatArray(), lineDashPattern.getPhaseStart()) );
-			}
-		}
-		else
-		{
-			if (lineDashPattern.isDashPatternEmpty())
-			{
-				drawer.setStroke( new BasicStroke(stroke.getLineWidth(), stroke.getEndCap(),
-						stroke.getLineJoin(), stroke.getMiterLimit()) );
-			}
-			else
-			{
-				drawer.setStroke( new BasicStroke(stroke.getLineWidth(), stroke.getEndCap(), stroke.getLineJoin(),
-						stroke.getMiterLimit(), lineDashPattern.getCOSDashPattern().toFloatArray(),
-						lineDashPattern.getPhaseStart()) );
-			}
-		}
-	}
+    /**
+     * Set the line dash pattern.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     *
+     * @throws IOException If an error occurs while processing the font.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
+        super.process( operator, arguments );
+        PDLineDashPattern lineDashPattern = context.getGraphicsState().getLineDashPattern();
+        PageDrawer drawer = (PageDrawer)context;
+        BasicStroke stroke = drawer.getStroke();
+        if (stroke == null)
+        {
+            if (lineDashPattern.isDashPatternEmpty())
+            {
+                drawer.setStroke(new BasicStroke(1, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10.0f) );
+            }
+            else
+            {
+                drawer.setStroke(new BasicStroke(1, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10.0f,
+                        lineDashPattern.getCOSDashPattern().toFloatArray(), lineDashPattern.getPhaseStart()) );
+            }
+        }
+        else
+        {
+            if (lineDashPattern.isDashPatternEmpty())
+            {
+                drawer.setStroke( new BasicStroke(stroke.getLineWidth(), stroke.getEndCap(),
+                        stroke.getLineJoin(), stroke.getMiterLimit()) );
+            }
+            else
+            {
+                drawer.setStroke( new BasicStroke(stroke.getLineWidth(), stroke.getEndCap(), stroke.getLineJoin(),
+                        stroke.getMiterLimit(), lineDashPattern.getCOSDashPattern().toFloatArray(),
+                        lineDashPattern.getPhaseStart()) );
+            }
+        }
+    }
 
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SetLineJoinStyle.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SetLineJoinStyle.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SetLineJoinStyle.java	(revision 34541)
@@ -35,27 +35,27 @@
 {
 
-	/**
-	 * Set the line cap style.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 *
-	 * @throws IOException If an error occurs while processing the font.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
-		super.process( operator, arguments );
-		int lineJoinStyle = context.getGraphicsState().getLineJoin();
-		PageDrawer drawer = (PageDrawer)context;
-		BasicStroke stroke = drawer.getStroke();
-		if (stroke == null)
-		{
-			drawer.setStroke( new BasicStroke(1,BasicStroke.CAP_SQUARE,lineJoinStyle) );
-		}
-		else
-		{
-			drawer.setStroke( new BasicStroke(stroke.getLineWidth(), stroke.getEndCap(), lineJoinStyle,
-					stroke.getMiterLimit(), stroke.getDashArray(), stroke.getDashPhase()) );
-		}
-	}
+    /**
+     * Set the line cap style.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     *
+     * @throws IOException If an error occurs while processing the font.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
+        super.process( operator, arguments );
+        int lineJoinStyle = context.getGraphicsState().getLineJoin();
+        PageDrawer drawer = (PageDrawer)context;
+        BasicStroke stroke = drawer.getStroke();
+        if (stroke == null)
+        {
+            drawer.setStroke( new BasicStroke(1,BasicStroke.CAP_SQUARE,lineJoinStyle) );
+        }
+        else
+        {
+            drawer.setStroke( new BasicStroke(stroke.getLineWidth(), stroke.getEndCap(), lineJoinStyle,
+                    stroke.getMiterLimit(), stroke.getDashArray(), stroke.getDashPhase()) );
+        }
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SetLineMiterLimit.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SetLineMiterLimit.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SetLineMiterLimit.java	(revision 34541)
@@ -35,28 +35,28 @@
 {
 
-	/**
-	 * Set the line dash pattern.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 *
-	 * @throws IOException If an error occurs while processing the font.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
-		super.process(operator, arguments);
-		float miterLimit = (float)context.getGraphicsState().getMiterLimit();
-		PageDrawer drawer = (PageDrawer)context;
-		BasicStroke stroke = drawer.getStroke();
-		if (stroke == null)
-		{
-			drawer.setStroke(new BasicStroke(1, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER,
-					miterLimit, null, 0.0f));
-		}
-		else
-		{
-			drawer.setStroke( new BasicStroke(stroke.getLineWidth(), stroke.getEndCap(), stroke.getLineJoin(),
-					miterLimit, null, 0.0f));
-		}
-	}
+    /**
+     * Set the line dash pattern.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     *
+     * @throws IOException If an error occurs while processing the font.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
+        super.process(operator, arguments);
+        float miterLimit = (float)context.getGraphicsState().getMiterLimit();
+        PageDrawer drawer = (PageDrawer)context;
+        BasicStroke stroke = drawer.getStroke();
+        if (stroke == null)
+        {
+            drawer.setStroke(new BasicStroke(1, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER,
+                    miterLimit, null, 0.0f));
+        }
+        else
+        {
+            drawer.setStroke( new BasicStroke(stroke.getLineWidth(), stroke.getEndCap(), stroke.getLineJoin(),
+                    miterLimit, null, 0.0f));
+        }
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SetLineWidth.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SetLineWidth.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/SetLineWidth.java	(revision 34541)
@@ -35,30 +35,30 @@
 {
 
-	/**
-	 * w Set line width.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 * @throws IOException If an error occurs while processing the font.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
-		super.process( operator, arguments );
-		float lineWidth = (float)context.getGraphicsState().getLineWidth();
-		if (lineWidth == 0)
-		{
-			lineWidth = 1;
-		}
-		PageDrawer drawer = (PageDrawer)context;
-		BasicStroke stroke = drawer.getStroke();
-		if (stroke == null)
-		{
-			drawer.setStroke( new BasicStroke( lineWidth ) );
-		}
-		else
-		{
-			drawer.setStroke( new BasicStroke(lineWidth, stroke.getEndCap(), stroke.getLineJoin(),
-					stroke.getMiterLimit(), stroke.getDashArray(), stroke.getDashPhase()) );
-		}
-	}
+    /**
+     * w Set line width.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     * @throws IOException If an error occurs while processing the font.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
+        super.process( operator, arguments );
+        float lineWidth = (float)context.getGraphicsState().getLineWidth();
+        if (lineWidth == 0)
+        {
+            lineWidth = 1;
+        }
+        PageDrawer drawer = (PageDrawer)context;
+        BasicStroke stroke = drawer.getStroke();
+        if (stroke == null)
+        {
+            drawer.setStroke( new BasicStroke( lineWidth ) );
+        }
+        else
+        {
+            drawer.setStroke( new BasicStroke(lineWidth, stroke.getEndCap(), stroke.getLineJoin(),
+                    stroke.getMiterLimit(), stroke.getDashArray(), stroke.getDashPhase()) );
+        }
+    }
 }
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/StrokePath.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/StrokePath.java	(revision 34540)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/pdfbox/operators/StrokePath.java	(revision 34541)
@@ -35,16 +35,16 @@
 {
 
-	/**
-	 * S stroke the path.
-	 * @param operator The operator that is being executed.
-	 * @param arguments List
-	 *
-	 * @throws IOException If an error occurs while processing the font.
-	 */
-	@Override
-	public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
-	{
-		PageDrawer drawer = (PageDrawer)context;
-		drawer.drawPath(true, false, 0);
-	}
+    /**
+     * S stroke the path.
+     * @param operator The operator that is being executed.
+     * @param arguments List
+     *
+     * @throws IOException If an error occurs while processing the font.
+     */
+    @Override
+    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
+    {
+        PageDrawer drawer = (PageDrawer)context;
+        drawer.drawPath(true, false, 0);
+    }
 }
