using std::endl;
-static double const tol = 1.0e-08;
+namespace {
+
+// Zero test for double precision numbers
+double const tol = 1.0e-08;
+
+// The maximum digits for the image scale
+int const SCALE_MAXDIGITS = 3;
+
+// The maximum digits for the image width
+int const WIDTH_MAXDIGITS = 3;
+
+// The maximum digits for the image height
+int const HEIGHT_MAXDIGITS = 3;
+
+// The max characters in the rotation angle (minus sign and 3 digits)
+int const ROTATE_MAXCHARS = 4;
+
+// The maximum characters in a filename.
+int const FILENAME_MAXCHARS = 1024;
+
+} // namespace anon
+
typedef FormCB<ControlGraphics, FormDB<FD_form_graphics> > base_class;
fl_set_input(dialog_->input_width, number.c_str());
int pos = 1;
+ //use inch as default with US papersizes in lyxrc
+ if (lyxrc.default_papersize < 3)
+ pos = 2;
switch (igp.widthResize) {
+ case InsetGraphicsParams::CM:
+ pos = 1; break;
+
case InsetGraphicsParams::INCH:
pos = 2; break;
fl_set_input(dialog_->input_height, number.c_str());
pos = 1;
+ //use inch as default with US papersizes in lyxrc
+ if (lyxrc.default_papersize < 3)
+ pos = 2;
switch (igp.heightResize) {
+ case InsetGraphicsParams::CM:
+ pos = 1; break;
+
case InsetGraphicsParams::INCH:
pos = 2; break;